fix: dynamic height layout + bundle mysql locales to fix 'no localization for eng' error\n\n- Replace all fixed pixel heights in content_layout with size_hint_y proportions\n so the 6 rows fill available space on any screen (800p, 1080p, etc.)\n- Remove AnchorLayout wrapper that caused dead space above content\n- Bundle mysql/connector/locales in PyInstaller build (spec + build_windows.py)\n- Add mysql.connector.plugins hidden imports to spec and build script"
This commit is contained in:
@@ -22,6 +22,13 @@ def build_executable():
|
||||
else:
|
||||
print("No icon file found (optional)")
|
||||
|
||||
# Locate mysql connector locales inside the venv
|
||||
import site
|
||||
venv_site = os.path.join('venv', 'Lib', 'site-packages')
|
||||
mysql_locales = os.path.join(venv_site, 'mysql', 'connector', 'locales')
|
||||
add_data_sep = ';' if sys.platform == 'win32' else ':'
|
||||
mysql_locales_arg = f'--add-data={mysql_locales}{add_data_sep}mysql/connector/locales'
|
||||
|
||||
# PyInstaller command - simplified to avoid module collection issues
|
||||
cmd = [
|
||||
'pyinstaller',
|
||||
@@ -29,11 +36,17 @@ def build_executable():
|
||||
'--onefile',
|
||||
'--windowed',
|
||||
'--hidden-import=mysql.connector',
|
||||
'--hidden-import=mysql.connector.locales',
|
||||
'--hidden-import=mysql.connector.locales.eng',
|
||||
'--hidden-import=mysql.connector.plugins',
|
||||
'--hidden-import=mysql.connector.plugins.mysql_native_password',
|
||||
'--hidden-import=mysql.connector.plugins.caching_sha2_password',
|
||||
'--hidden-import=kivy.core.window.window_sdl2',
|
||||
'--hidden-import=win32timezone',
|
||||
'--exclude-module=_tkinter',
|
||||
'--exclude-module=matplotlib',
|
||||
'--exclude-module=numpy',
|
||||
mysql_locales_arg,
|
||||
] + icon_param + ['main.py']
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user