Using Pyinstaller to make exe from python scripts
Instruction that I can give now is:
- Uninstall ALL python from your windows.
- Yes, and remove libs too. Manually. Find them and delete.
- Install Python 3.6.6 x32 (default version) as user (default)
- pip install pyinstaller
- Modify that string according to your pathes: pyinstaller --key=yourkey --onefile --add-binary="C:\Program Files (x86)\StarCraft II\Support64\icuin52.dll;." --add-binary="C:\Program Files (x86)\StarCraft II\Support64\icuuc52.dll;." --add-binary="C:\Program Files (x86)\StarCraft II\Support64\icudt52.dll;." --add-data="D:\Web\Python\python-sc2\sc2\;sc2" --distpath=".\build\dist" --workpath=".\build\build" --specpath=".\build" --clean seebot.py
You can start from step 4, but if it won't work, you can try to start from step 1.
But even this doesn't guarantee to work if your bot depends not only on python-sc2
--key=yourkey - is to encrypt your binary. It won't work if you don't install pycrypto. Which won't compile if you don't install gcc. You can omit it and make exe without encryption.
If you are getting errors like: "can't find library blablabla" when trying to launch your exe, use additional
--add-data= to add needed libreries to exe