Re: [WIP] new GUI for debug console
Using the system python 3.10, and not wanting to mess with my local setup by shoving things in willy-nilly with pip, I created a venv in a directory where I keep a heap of them. Activated it, and pip installed pyinstaller only in the venv.
Code: Select all
#python3-tk is needed.
# the packaged twisted works to run python scripts but fails
# with pyinstaller. If only building the binary, then no
# need to add it here.
apt install python3-tk python3-twisted
venv="$HOME/python3/pyinstaller"
python3 -m venv "$venv"
source "${venv}"/bin/activate
pip install pyinstaller
pip install twisted
deactivate
Code: Select all
#!/bin/bash
venv="$HOME/python3/pyinstaller"
source "${venv}"/bin/activate
pyinstaller $*
As $HOME/bin is in my path, I can now run pyinstaller.sh from a shell anywhere.
At this point, I can go for it, and with a minimum of swearing and demanding more coffee, I had myself a single executable and a workflow of sorts.
In a clean copy of the DebugConsole2 folder, I put this in a file called makebin.sh
Code: Select all
pyinstaller.sh --onefile DebugConsole.py --add-binary "oojsc.xbm:." --add-binary "OoJSC.ico:."
Code: Select all
pyinstaller.sh --clean --onefile DebugConsole.py --add-binary "oojsc.xbm:." --add-binary "OoJSC.ico:."
...then look in the newly created 'dist' folder.
There are complications where files are included, like for icons etc, but it looks like cag has done most of the work to take care of that.
For now, my version is without an icon on Linux, as the way I've found to get a nice icon working in Linux is not obviously easy to get working properly with pyinstaller. One of us can polish that another day.
(edited to incorporate fixes from below)