Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows instructions #2

Open
wants to merge 4 commits into
base: feature/gtk3-python3
Choose a base branch
from

Conversation

Locke
Copy link

@Locke Locke commented Mar 31, 2020

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:

Before I tried PyInstaller I tried cx_Freeze, but encountered several issues in the current published versions:

  • With cx_Freeze installed via pip I encountered this issue: libffi-7.dll not found with msys2/mingw64 marcelotduarte/cx_Freeze#596
  • As suggested in that issue I uninstalled cx_Freeze via pip and installed the mingw variant via pacman -S mingw-w64-x86_64-python3-cx_Freeze, however that fails with error: [Errno 2] No such file or directory: 'C:/msys64/mingw64/tcl/tcl8.6'
  • I tried to set TCL_LIBRARY and TK_LIBRARY paths, but then had the issue tkinter path error marcelotduarte/cx_Freeze#566 I did not try out the suggested workaround to copy the files manually, might be worth to look into
  • I completely excluded tcl/tk just to see if everything else would work but then was stopped by something wrong with sqlite3...

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.

@Locke Locke force-pushed the python3-windows branch from ff9d722 to e60ce45 Compare April 5, 2020 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant