Skip to content

Conversation

@ayenpure
Copy link
Contributor

Adding example for bundling an app that uses ParaView.
The usual approach does not play well with ParaView with a lot of complains
about missing dynamic libraries. Using pvpython solves these issues.

@ayenpure
Copy link
Contributor Author

@jourdain Can you take a look? I had to skip windows as I have no way to test it.

@ayenpure ayenpure force-pushed the adding_paraview_example branch from de2521d to dc5211b Compare May 14, 2025 18:14
@jourdain
Copy link
Collaborator

You are missing the splash screen in src-tauri/www/

@jourdain
Copy link
Collaborator

Windows is trickier as the sidecar is an actual executable that needs to be compiled.

@jourdain
Copy link
Collaborator

otherwise it looks good. I haven't tested it though...

@ayenpure ayenpure force-pushed the adding_paraview_example branch 3 times, most recently from bd36dea to 2fe6936 Compare May 19, 2025 19:54
--name server --hidden-import pkgutil \
--collect-data trame_vtk \
--collect-data trame_client \
--collect-data trame_vuetify \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--collect-data on trame_* is not needed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if you don't use http for web delivery. Either way, you should not do http delivery.

rootdir=`dirname $0`
rootdir=`cd $rootdir && cd .. && pwd`

$rootdir/Resources/server/server $@
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing std caching option

rootdir=`dirname $0`
rootdir=`cd $rootdir && cd .. && pwd`

$rootdir/Resources/server/server $@
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing std caching option

rootdir=`dirname $0`
rootdir=`cd $rootdir && cd ../lib/cone && pwd`

$rootdir/server/server $@
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing std caching option

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed as it would not work

@ayenpure ayenpure force-pushed the adding_paraview_example branch 4 times, most recently from 52515bb to 33584f4 Compare August 8, 2025 21:43
@ayenpure
Copy link
Contributor Author

ayenpure commented Aug 8, 2025

@jourdain updated and tested -- this is the same approach I use for QuickView.

# receives the port number before Python's stdout buffer flushes
@life_cycle.server_ready
def _tauri_ready(self, **_):
os.write(1, f"tauri-server-port={self.server.port}\n".encode())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's how you prevent ParaView buffering?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! os.write very eagerly writes to stdcout, so we don't have to wait around for ParaView to flush. -- This still only prints the two lines that we have in the calls. ParaView still works on a separate buffer and flushes later. So we might see prints happening not in chronological order.

@jourdain
Copy link
Collaborator

jourdain commented Aug 8, 2025

You should fix your commit message. Something like docs(paraview): add ParaView example

  Adding example for bundling an app that uses ParaView.
  To bundle paraview properly it's important to execute PyInstaller with the
  option `--collect-all` for ParaView. `os.write` for writing out
  information tauri requires. Also a custom call RemotingCore to force
  offscreen rendering.
@ayenpure ayenpure force-pushed the adding_paraview_example branch from 17e8698 to aab718e Compare August 9, 2025 00:27
@ayenpure ayenpure requested a review from jourdain August 20, 2025 19:44
@jourdain jourdain merged commit b316f7e into Kitware:master Aug 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants