Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle the _internal directory #5

Open
banesullivan opened this issue Oct 17, 2023 · 3 comments
Open

Bundle the _internal directory #5

banesullivan opened this issue Oct 17, 2023 · 3 comments

Comments

@banesullivan
Copy link
Member

The current build ships an _internal directory along side the .exe with a lot of DLLs. Is this needed? Can we bundle this in the .exe to have a "single file executable"?

@akaszynski
Copy link
Member

akaszynski commented Oct 18, 2023

Issue with the "single file approach" is that each and every time the application needs to be run, it unzips into a temporary directory and then runs it.

A better solution is to instead use an application installer like NSIS to bundle the application in an executable installer and then install that. It will show up as a single executable installer, which once installed, has a fast start up time since it's not unzipping "on the fly" each time. It will also show up in the Windows start menu and can be uninstalled or even upgraded like any other standard windows application.

See ansys/python-installer-qt-gui for how this is done. When I get free time (a challenge right now), I might be able to implement it. NSIS isn't perfect, but it's free and universally used.

@larsoner
Copy link

larsoner commented Oct 18, 2023

In MNE we have been using conda constructor (which uses menuinst and nsis) for this stuff. Napari also uses it. Might be better to try that first and improve it rather than go to NSIS directly.

@larsoner
Copy link

... if you want to see how it works, feel free to try an installer. You can do it without messing up any system stuff / other Python configurations. FWIW our installers are > 1 GB because we bundle a ton of neuroscience stuff beyond just MNE-Python to make it so people don't have to install stuff on their own. If you just wanted to bundle pyvistaqt and its dependencies it would be much smaller.

And if you want to start working toward this approach, you could follow https://github.com/mne-tools/mne-installers#development adapting the build_local.sh and recipe. Shouldn't be too much work assuming you already have conda installed. (And if you don't, you could actually use the MNE installer to get one quickly!)

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

No branches or pull requests

3 participants