feat: Introduce initial application structure, SQL database tools, and license management.

This commit is contained in:
2026-01-29 23:07:55 +08:00
commit 8319916a06
97 changed files with 3207 additions and 0 deletions

26
rthook_qt_fix.py Normal file
View File

@@ -0,0 +1,26 @@
import os
import sys
# Fixing Qt Platform Plugin "windows" error for PyInstaller OneFile
# This runs BEFORE main.py
def install_qt_plugin_path():
# If running in a PyInstaller bundle
if getattr(sys, 'frozen', False):
# sys._MEIPASS is where PyInstaller unpacks the bundle
base_path = getattr(sys, '_MEIPASS', os.path.dirname(sys.executable))
# We bundled paths via "a.datas += Tree(..., prefix='platforms')"
# So it should be at base_path/platforms
platform_plugin_path = os.path.join(base_path, 'platforms')
print("runtime_hook: Detected base path: {}".format(base_path))
print("runtime_hook: Setting QT_QPA_PLATFORM_PLUGIN_PATH to: {}".format(platform_plugin_path))
# Force Qt to look here
os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = platform_plugin_path
# Also ensure general plugin path is set, just in case
os.environ['QT_PLUGIN_PATH'] = base_path
install_qt_plugin_path()