-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling Python Code (Pyinstaller)
PyInstaller Guide: Opening this issue to document possible options to use with pyinstaller until we get this nailed down.
--onefile --noconsole --icon=stormcloud.ico
--win-private-assemblies --name "Stormcloud Backup Engine"
--hidden-import pkg_resources --hidden-import infi.systray
<?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
pyinstaller --onefile --noconsole --icon=stormcloud.ico --hidden-import pkg_resources --hidden-import infi.systray stormcloud.py
We are still popping on 4 AVs that VirusTotal scans with (Cynet, McAfee-GW-Edition, DeepInstinct, and SecureAge). These are all pretty fringe/sucky AVs so we might just be able to ignore these unless we find a customer who is actually using one of them.
Here's what I managed to do on my system to get it to work:
- Nuke all Visual Studio related stuff (run visual studio installer, go to more -> uninstall, and remove everything)
- Re-download only the 2022 Visual Studio Build Tools (https://visualstudio.microsoft.com/downloads/ -> go to "Tools for Visual Studio" section -> "Build Tools for Visual Studio 2022"
-
git clonethe pyinstaller source to C:\PyInstaller cd C:\Pyinstaller\pyinstaller\bootloaderpython.exe ./waf distclean all- I have no idea why, but running with distclean appears to find the cl.exe file associated with MSVC, if you run it without distclean, it will not find it.
cd C:\Pyinstaller\pyinstallerpip install .- If that works, it should add the pyinstaller EXE to your path
- Rebuilt stormcloud with this pyinstaller and uploaded to VT