runt1me / stormcloud

Windows backup software from Dark Age Technology Group
2 stars 0 forks source link

PyInstaller switches #50

Closed runt1me closed 1 year ago

runt1me commented 1 year ago

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

https://express.esigner.com/

runt1me commented 1 year ago

Tagging @EccentricKnight for awareness

runt1me commented 1 year ago

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?

EccentricKnight commented 1 year ago

Is this resolved with the pyinstaller recompile?

runt1me commented 1 year ago

@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.

runt1me commented 1 year ago

Closing as documentation has been moved to the Wiki.