EasyScience / EasyDiffractionApp

Diffraction data analysis application
https://easydiffraction.org
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

EXPLORE: Is there a way to shove .dll's and .pyd's to a subdirectory in the PyInstaller distribution? #117

Open rozyczko opened 3 years ago

rozyczko commented 3 years ago

Pyinstaller copies all dependent .dll's and .pyd's into the main application directory. If we want to distribute calculator setups, like GSASII, we should look at ways to compartmentalise the libraries, so they don't clutter the main app folder and are easier to track

rozyczko commented 3 years ago

A hacky way of doing this through pyinstaller's --runtime-hook is mentioned: http://unafaltadecomprension.blogspot.com/2014/07/pyinstaller-separating-executable-from.html However, this doesn't seem to fully work with ED. Some libraries can be separated but most can't.

The Pyinstaller project has this enhancement listed https://github.com/pyinstaller/pyinstaller/issues/1048 https://github.com/pyinstaller/pyinstaller/issues/2468

but the authors are unwilling to fix it themselves.

There is a 3rd party PR for this: https://github.com/pyinstaller/pyinstaller/pull/5841

which seems to be providing some of the features requested. This attempt is pretty recent (less than a month old) so let's see how far it gets.

rozyczko commented 3 years ago

Interestingly, cx_freeze which we have been considering as the replacement for pyinstaller suffers from the same issue: https://stackoverflow.com/questions/46178843/change-folder-structure-in-python-cx-freeze-project

So, it's waiting now.