takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
882 stars 119 forks source link

No way to identify what went wrong after install #231

Closed wxguy closed 3 years ago

wxguy commented 3 years ago

I have successfully created setup.exe using pynsist and tried the application under build\nsis\application.launch.pyw which opened the application without an issue. However, after installing the application, starting application from start menu brings up only splash screen and closes immediately. How do I know what went wrong in this case? Before deploying the application I had few missing imports which were recorded in application.launch.pyw.log under Roaming directory. However, I am unable to find any log after installing the application.

Is there a way ahead for this?

takluyver commented 3 years ago

It should still be writing a log file - here's the code it uses to decide where to write it:

https://github.com/takluyver/pynsist/blob/1c202920002e71b59ce8d715c0118fa492423d62/nsist/__init__.py#L245-L247

You can also try running it from a command prompt - see the description here:

https://pynsist.readthedocs.io/en/latest/installers.html#uncaught-exceptions

wxguy commented 3 years ago

Sorry for the delayed response. Your help on the subject worked for me.

My project has numpy as well. A little tweak was required to make it work though. I have to copy all all mk*.dll files from numpy package to Python directory (nsis). May be this would help some others.

takluyver commented 3 years ago

Thanks for recording what worked!

I'd guess the mk*.dll files are part of the Intel MKL. So this may depend on how you get NumPy for your project. I think the NumPy wheels on PyPI are built without MKL, but conda packages and the wheels from Christoph Gohlke's project use it.

wxguy commented 3 years ago

Thanks for recording what worked!

I'd guess the mk*.dll files are part of the Intel MKL. So this may depend on how you get NumPy for your project. I think the NumPy wheels on PyPI are built without MKL, but conda packages and the wheels from Christoph Gohlke's project use it.

You are correct. If you wish, you can place a note on this in your official documentation to avoid people reporting similar issues later.

I don't want to include condain to my final application as it inflates the final executable size to 4-5 times higher. However, under Linux, condais the preferred distribution though.