I am trying to make an executable with pyinstaller, by issuing something like this:
pyinstaller -F --add-binary=\"sometool.exe:.\" myapp.py
The b
For Unix like machine
pyinstaller --noconfirm --log-level=WARN \
--onefile --nowindow \
--add-data="README:." \
--add-data="image1.png:img" \
--add-binary="libfoo.so:lib" \
--hidden-import=secret1 \
--hidden-import=secret2 \
--upx-dir=/usr/local/share/ \
myscript.spec
Or for Windows
pyinstaller --noconfirm --log-level=WARN ^
--onefile --nowindow ^
--add-data="README;." ^
--add-data="image1.png;img" ^
--add-binary="libfoo.so;lib" ^
--hidden-import=secret1 ^
--hidden-import=secret2 ^
--icon=..\MLNMFLCN.ICO ^
myscript.spec
Official Doc: https://pyinstaller.readthedocs.io/en/stable/usage.html
I spent hours to figure out how to use --add-binary
and finally got it working. Look at --add-binary="libcrypto.dll:lib"
, you must add :lib
as postfix.