takluyver / pynsist

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

Custom cmd command does not work when executed from C:\> #220

Closed susnak closed 3 years ago

susnak commented 3 years ago

I am using pynsist 2.6 (on Linux) and I have this in my installer.cfg

[Command connect_controls] entry_point=connect_controls:main console=true

It works great except when I am in C:> the program does not run. The command is found, but exits without any message.

takluyver commented 3 years ago

That's odd. I don't know of any reason it should depend on the working directory. You can see the code that runs for a command here:

https://github.com/takluyver/pynsist/blob/89431e7c382da103f08c2fe006e388db4d2cf09b/nsist/commands.py#L8-L26

Is it possible that it's a problem in your code that runs? E.g. if you do open('blah', 'w'), it may fail if it's running in a directory where it can't create files. If you print something right at the beginning of your main() function, does it show up?

susnak commented 3 years ago

Ah, I had broken connect_controls.exe (from pyinstaller) in C:>. That was stupid. Sorry & thanks for a great tool.

takluyver commented 3 years ago

No problem, glad you like it!