diff --git a/build.bat b/build.bat index 522fc22f..ba23d157 100644 --- a/build.bat +++ b/build.bat @@ -1,7 +1,13 @@ -cd elevenclock +xcopy elevenclock elevenclock_bin /E /H /C /I +cd elevenclock_bin +python -m compileall -b . +del /S *.py +rmdir /Q /S __pycache__ +rmdir /Q /S external\__pycache__ +rmdir /Q /S lang\__pycache__ rmdir /Q /S build rmdir /Q /S dist -python -m PyInstaller __init__.py --icon "resources/icon.ico" --add-binary "*.py;." --add-data "resources;resources" --add-data "lang;lang" --onefile --windowed --clean --version-file ../elevenclock-version-info +python -m PyInstaller ../elevenclock/__init__.py --icon "resources/icon.ico" --add-binary "*.pyc;." --add-data "resources;resources" --add-data "lang;lang" --onefile --windowed --clean --version-file ../elevenclock-version-info rem --add-data "%homedrive%%homepath%\AppData\Local\Programs\Python\Python39\Lib\site-packages\PySide6\plugins;PySide6/plugins" cd dist move __init__.exe ../../ @@ -10,6 +16,7 @@ rmdir /Q /S build rmdir /Q /S dist del __init__.spec cd .. +rmdir /Q /S elevenclock_bin taskkill /im ElevenClock.exe /f del ElevenClock.exe rename __init__.exe ElevenClock.exe diff --git a/build_legacy.bat b/build_legacy.bat new file mode 100644 index 00000000..522fc22f --- /dev/null +++ b/build_legacy.bat @@ -0,0 +1,17 @@ +cd elevenclock +rmdir /Q /S build +rmdir /Q /S dist +python -m PyInstaller __init__.py --icon "resources/icon.ico" --add-binary "*.py;." --add-data "resources;resources" --add-data "lang;lang" --onefile --windowed --clean --version-file ../elevenclock-version-info +rem --add-data "%homedrive%%homepath%\AppData\Local\Programs\Python\Python39\Lib\site-packages\PySide6\plugins;PySide6/plugins" +cd dist +move __init__.exe ../../ +cd .. +rmdir /Q /S build +rmdir /Q /S dist +del __init__.spec +cd .. +taskkill /im ElevenClock.exe /f +del ElevenClock.exe +rename __init__.exe ElevenClock.exe +ElevenClock.exe +pause