Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I spend some time looking into the build on Windows 10. Note that I have no experience with Python3 packaging and GTK on Windows.
Good news first: I was able to create a binary that can be started without having to install anything. On the first glance it looked complete, but I didn't test everything.
I'm writing this PR to document my results, so that someone else can continue from here on.
In my description I'm using PyInstaller with the command
pyinstaller FAHControl --windowed
. This has two issues:pyinstaller FAHControl --onefile --windowed
to work, which would be easier to distribute. When I try to start the exe I get the errorgi/_gi-cpython-38.dll could not be extracted!
setup.py
as it looks a bit complicated looking at https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Setuptools-Entry-Point and https://stackoverflow.com/questions/48884766/pyinstaller-on-a-setuptools-packageBefore I tried PyInstaller I tried cx_Freeze, but encountered several issues in the current published versions:
pacman -S mingw-w64-x86_64-python3-cx_Freeze
, however that fails witherror: [Errno 2] No such file or directory: 'C:/msys64/mingw64/tcl/tcl8.6'
As an alternative to MSYS2 / mingw I tried out the usual windows python installation and to install gtk via vcpkg packages as suggested in https://www.gtk.org/docs/installations/windows/#using-gtk-from-vcpkg-packages I think this also required to install "Build Tools for Visual Studio 2019".
Unfortunately I think I was too inexperienced with all of this, as I failed to tell
pip install PyGObject
where to find the libraries / header files.