-
Notifications
You must be signed in to change notification settings - Fork 178
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
Pyinstaller branch rebase and fbs removal #238
base: main
Are you sure you want to change the base?
Conversation
fbs was holding back the code from using modern versions of python, qt, and everything else. Remove fsb and update everything. * Remove fbs from spec * update to python 3.12 * update all dependencies to latest minor releases * update to latest version of pyinstaller * re-implement part of fbs context object to minimize refactoring * update Vial.spec to have all options necessary to run
721338d
to
0794bcc
Compare
0794bcc
to
9d4067d
Compare
Anecdotally, this seems to work on Linux for me. The Vial window opens, I can change key mappings on the keyboard, unlock the keyboard and run the matrix tester, save/load the keyboard layout. |
I am still having issues with vial recognizing my via-configured keyboard, so I haven't even been able to test beyond "software builds and runs". |
I managed to build this on a Mac but seems like it keeps opening new windows for some reason. |
I had the same problem of application endlessly spawning new instances. This seems to be fixed by adding call to multiprocessing.freeze_support() to main.py |
|
Huh, I had no idea this package used multiprocessing, but there it is:
Would you mind sending a patch for where this goes? |
|
This is what I needed to get vial running on my m1 mac: diff --git a/requirements.txt b/requirements.txt
index faa0f9d..5c2bb54 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,9 +8,9 @@ packaging==24.0
pefile==2023.2.7
pyinstaller==6.5.0
pyinstaller-hooks-contrib==2024.3
-PyQt5==5.15.7
-PyQt5-Qt5==5.15.2
-PyQt5-sip==12.13.0
+PyQt5==5.15.11
+PyQt5-Qt5==5.15.11
+PyQt5-sip==12.15.0
pywin32==306; sys_platform == 'win32'
pywin32-ctypes==0.2.2
setuptools==69.2.0
diff --git a/src/main/python/main.py b/src/main/python/main.py
index 1012acf..bab32b7 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -12,6 +12,7 @@ import certifi
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtWidgets import QApplication
+from multiprocessing import freeze_support
from main_window import MainWindow
# http://timlehr.com/python-exception-hooks-with-qt-message-box/
@@ -107,6 +108,9 @@ class VialApplicationContext():
if __name__ == '__main__':
+ # https://pyinstaller.org/en/stable/common-issues-and-pitfalls.html#multi-processing
+ freeze_support()
+
if len(sys.argv) == 2 and sys.argv[1] == "--linux-recorder":
from linux_keystroke_recorder import linux_keystroke_recorder |
I rebased that branch onto head, updated python to 3.12, updated Qt5 to latest, and allowed all dependencies to update accordingly. Then i removed FBS and implemented the minimum I could see that was needed to run (on windows).
This involved adding a couple json to the Vial.spec, some code to load those files, and the minimum possible amount of refactoring. There's more code that could be simplified with FBS gone, but I didn't want to go too far before getting some input and maybe getting someone to test on linux. I haven't kept a full vm handy for a couple years now...