run ./build.sh in git-bash to build + upload the exe ## ============================================================ ## first-time setup on a stock win7x32sp1 vm: ## to obtain the files referenced below, see ./deps.txt download + install git (32bit OK on 64): http://192.168.123.1:3923/ro/pyi/Git-2.38.1-32-bit.exe ===[ copy-paste into git-bash ]================================ fns=( upx-4.0.0-win32.zip pip-22.3-py3-none-any.whl altgraph-0.17.3-py2.py3-none-any.whl future-0.18.2.tar.gz importlib_metadata-5.0.0-py3-none-any.whl pefile-2022.5.30.tar.gz pyinstaller_hooks_contrib-2022.11-py2.py3-none-any.whl pywin32_ctypes-0.2.0-py2.py3-none-any.whl typing_extensions-4.4.0-py3-none-any.whl zipp-3.10.0-py3-none-any.whl ) uname -s | grep WOW64 && fns+=( windows6.1-kb2533623-x64.msu pyinstaller-5.6.1-py3-none-win_amd64.whl python-3.7.9-amd64.exe ) || fns+=( windows6.1-kb2533623-x86.msu pyinstaller-5.6.1-py3-none-win32.whl python-3.7.9.exe ) dl() { curl -fkLOC- "$1" && return 0; echo "$1"; return 1; } cd ~/Downloads && for fn in "${fns[@]}"; do dl "https://192.168.123.1:3923/ro/pyi/$fn" || { echo ERROR; ok=; break } done manually install: windows6.1-kb2533623 + reboot python-3.7.9 ===[ copy-paste into git-bash ]================================ cd ~/Downloads && unzip upx-*-win32.zip && mv upx-*/upx.exe . && python -m ensurepip && python -m pip install --user -U pip-*.whl && python -m pip install --user -U pyinstaller-*.whl pefile-*.tar.gz pywin32_ctypes-*.whl pyinstaller_hooks_contrib-*.whl altgraph-*.whl future-*.tar.gz importlib_metadata-*.whl typing_extensions-*.whl zipp-*.whl && cd && rm -f build.sh && curl -fkLO https://192.168.123.1:3923/cpp/scripts/pyinstaller/build.sh && echo ok # python -m pip install --user -U Pillow-9.2.0-cp37-cp37m-win32.whl # sed -ri 's/, bestopt, /]+bestopt+[/' $APPDATA/Python/Python37/site-packages/pyinstaller/building/utils.py # sed -ri 's/(^\s+bestopt = ).*/\1["--best","--lzma","--ultra-brute"]/' $APPDATA/Python/Python37/site-packages/pyinstaller/building/utils.py ## ============================================================ ## notes ## size t-unpack virustotal cmnt 8059k 0m0.375s 5/70 generic-only, sandbox-ok no-upx 7095k 0m0.563s 4/70 generic-only, sandbox-ok standard-upx 6958k 0m0.578s 7/70 generic-only, sandbox-ok upx+upx use python 3.7 since 3.8 onwards requires KB2533623 on target generate loader.rc template: %appdata%\python\python37\scripts\pyi-grab_version C:\Users\ed\AppData\Local\Programs\Python\Python37\python.exe