From fda7c8b388c5dc0925865d5385c8bd4ff4b4f658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20M=C3=B6sner?= Date: Fri, 23 Dec 2022 22:02:04 +0100 Subject: [PATCH 1/2] Fix dependecies from commit 75f4d1b --- wingetui/Win.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wingetui/Win.spec b/wingetui/Win.spec index 5db4cf249c..f77f92fd7c 100644 --- a/wingetui/Win.spec +++ b/wingetui/Win.spec @@ -10,7 +10,7 @@ import importlib, os a = Analysis(['__init__.py'], pathex=['Y:\WingetUI-Store\wingetui_bin'], - binaries=[('blurwindow.pyc', '.'), ('globals.pyc', '.'), ('mainWindow.pyc', '.'), ('scoopHelpers.pyc', '.'), ('storeEngine.pyc', '.'), ('tools.pyc', '.'), ('wingetHelpers.pyc', '.'), ("uiSections.pyc", "."), ("customWidgets.pyc", "."), ("languages.pyc", ".")], + binaries=[('globals.pyc', '.'), ('mainWindow.pyc', '.'), ('scoopHelpers.pyc', '.'), ('storeEngine.pyc', '.'), ('tools.pyc', '.'), ('wingetHelpers.pyc', '.'), ("uiSections.pyc", "."), ("customWidgets.pyc", "."), ("languages.pyc", ".")], datas=[('resources/', 'resources/'), ("winget-cli/", "winget-cli/"), ("sudo/", "sudo/"), ("lang/", "lang/")], hiddenimports=['pkg_resources.py2_warn', "win32gui"], hookspath=[], From fac63104e92a54567727f3453402041439e3625f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20M=C3=B6sner?= Date: Fri, 23 Dec 2022 22:03:23 +0100 Subject: [PATCH 2/2] Update build script, simplify and check python error --- build.bat | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/build.bat b/build.bat index d3d268c8fe..699e50c758 100644 --- a/build.bat +++ b/build.bat @@ -3,9 +3,13 @@ python -m pip install -r requirements.txt python apply_versions.py +rmdir /Q /S wingetuiBin xcopy wingetui wingetui_bin /E /H /C /I /Y -cd wingetui_bin +pushd wingetui_bin + python -m compileall -b . +if %errorlevel% neq 0 goto:error + del /S *.py copy ..\wingetui\__init__.py .\ rmdir /Q /S __pycache__ @@ -13,25 +17,11 @@ rmdir /Q /S external\__pycache__ rmdir /Q /S lang\__pycache__ rmdir /Q /S build rmdir /Q /S dist + python -m PyInstaller "Win.spec" -cd dist -cd .. -cd .. -rmdir /Q /S wingetuiBin -cd wingetui_bin -cd dist -move wingetuiBin ../../ -cd .. -rmdir /Q /S build -rmdir /Q /S dist -cd .. -rmdir /Q /S wingetui_bin -cd wingetuiBin -rem cd tcl -rem rmdir /Q /S tzdata -rem cd .. -rem cd .. -cd PySide6 +if %errorlevel% neq 0 goto:error + +pushd dist\wingetuiBin\PySide6 del opengl32sw.dll del Qt6Quick.dll del Qt6Qml.dll @@ -42,8 +32,10 @@ del Qt6DataVisualization.dll del Qt6VirtualKeyboard.dll del QtDataVisualization.pyd del QtOpenGL.pyd -cd .. -cd .. +popd +move dist\wingetuiBin ..\ +popd +rmdir /Q /S wingetui_bin set INSTALLATOR="%SYSTEMDRIVE%\Program Files (x86)\Inno Setup 6\ISCC.exe" if exist %INSTALLATOR% ( @@ -55,4 +47,10 @@ if exist %INSTALLATOR% ( start /b wingetuiBin/wingetui.exe ) +goto:end + +:error +echo "Error!" + +:end pause