forked from marticliment/UniGetUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
80 lines (64 loc) · 1.48 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
set "py=%cd%\env\Scripts\python.exe"
IF EXIST %py% (
echo "Using VENV Python"
) ELSE (
set "py=python"
echo "Using system Python"
)
@echo on
%py% -m pip install -r requirements.txt
%py% scripts/apply_versions.py
%py% scripts/get_contributors.py
rmdir /Q /S wingetuiBin
xcopy wingetui wingetui_bin /E /H /C /I /Y
pushd wingetui_bin
%py% -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 data\__pycache__
rmdir /Q /S PackageManagers\__pycache__
rmdir /Q /S lang\__pycache__
rmdir /Q /S build
rmdir /Q /S dist
%py% -m PyInstaller "Win.spec"
if %errorlevel% neq 0 goto:error
timeout 2
pushd dist\wingetuiBin\PySide6
del opengl32sw.dll
del Qt6Quick.dll
del Qt6Qml.dll
del Qt6OpenGL.dll
del Qt6QmlModels.dll
del Qt6Network.dll
del Qt6DataVisualization.dll
del Qt6VirtualKeyboard.dll
del QtDataVisualization.pyd
del QtOpenGL.pyd
popd
pushd dist\wingetuiBin\choco-cli
rmdir /Q /S .chocolatey
rmdir /Q /S lib
rmdir /Q /S lib-bad
rmdir /Q /S lib-bkp
rmdir /Q /S logs
popd
move dist\wingetuiBin ..\
popd
rmdir /Q /S wingetui_bin
set INSTALLATOR="%SYSTEMDRIVE%\Program Files (x86)\Inno Setup 6\ISCC.exe"
if exist %INSTALLATOR% (
%INSTALLATOR% "WingetUI.iss"
"wingetui Installer.exe"
) else (
echo "Make installer was skipped, because the installer is missing."
echo "Running WingetUI..."
start /b wingetuiBin/wingetui.exe
)
goto:end
:error
echo "Error!"
:end
pause