PyInstaller switches
Closed this issue · 5 comments
Opening this issue to document possible options to use with pyinstaller until we get this nailed down.
Standard pyinstaller arguments for GUI application
--onefile --noconsole --icon=stormcloud.ico
Change name as it appears in task manager? (Untested)
--win-private-assemblies --name "Stormcloud Backup Engine"
Hidden imports from infi.systray library
--hidden-import pkg_resources --hidden-import infi.systray
Manifest file to require administrative permissions
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="Stormcloud.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Save as app.manifest
and include the switch: --manifest app.manifest
All together
pyinstaller --onefile --noconsole --icon=stormcloud.ico --win-private-assemblies --name "Stormcloud Backup Engine" --hidden-import pkg_resources --hidden-import infi.systray --manifest app.manifest stormcloud.py
Signing code after it is built
Tagging @EccentricKnight for awareness
Icon doesn't appear to be properly passed to the .exe that ends up in the system tray. Maybe a pyinstaller problem since apparently it runs 2 processes?
Is this resolved with the pyinstaller recompile?
@EccentricKnight the main reason I opened this issue was for documentation, so I'd like to document it somewhere more permanent before closing the issue. Open to ideas as to where we should store docs - I know there are best practices prescribed somewhere but I'm not tracking what they are.
Closing as documentation has been moved to the Wiki.