Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 19 additions & 21 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,25 @@
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__
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
Expand All @@ -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% (
Expand All @@ -55,4 +47,10 @@ if exist %INSTALLATOR% (
start /b wingetuiBin/wingetui.exe
)

goto:end

:error
echo "Error!"

:end
pause
2 changes: 1 addition & 1 deletion wingetui/Win.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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=[],
Expand Down