forked from marticliment/UniGetUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_release.bat
72 lines (55 loc) · 2.01 KB
/
build_release.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
@echo off
rem update resources
python scripts/apply_versions.py
pushd scripts
python download_translations.py
popd ..
rem clean old builds
taskkill /im wingetui.exe /f
taskkill /im unigetui.exe /f
rem Run tests
dotnet test src/UniGetUI.sln -v q --nologo
rem check exit code of the last command
if %errorlevel% neq 0 (
echo "The tests failed!."
pause
)
rem build executable
dotnet clean src/UniGetUI.sln
dotnet publish src/UniGetUI/UniGetUI.csproj /noLogo /property:Configuration=Release /property:Platform=x64
rem sign code
rmdir /Q /S unigetui_bin
mkdir unigetui_bin
robocopy src\UniGetUI\bin\x64\Release\net8.0-windows10.0.19041.0\win-x64\publish unigetui_bin *.* /MOVE /E
rem pushd src\UniGetUI\bin\x64\Release\net8.0-windows10.0.19041.0\win-x64\publish
pushd unigetui_bin
signtool.exe sign /v /debug /fd SHA256 /tr "http://timestamp.acs.microsoft.com" /td SHA256 /dlib "Y:\- Signing\azure.codesigning.client\x64\Azure.CodeSigning.Dlib.dll" /dmdf "Y:\- Signing\metadata.json" UniGetUI.exe
signtool.exe sign /v /debug /fd SHA256 /tr "http://timestamp.acs.microsoft.com" /td SHA256 /dlib "Y:\- Signing\azure.codesigning.client\x64\Azure.CodeSigning.Dlib.dll" /dmdf "Y:\- Signing\metadata.json" UniGetUI.dll
echo .
echo .
echo You may want to sign now the following executables
cd
echo UniGetUI.dll
echo UniGetUI.exe
echo .
echo .
pause
copy UniGetUI.exe WingetUI.exe
popd
set INSTALLATOR="%SYSTEMDRIVE%\Program Files (x86)\Inno Setup 6\ISCC.exe"
if exist %INSTALLATOR% (
%INSTALLATOR% "UniGetUI.iss"
echo You may now sign the installer
signtool.exe sign /v /debug /fd SHA256 /tr "http://timestamp.acs.microsoft.com" /td SHA256 /dlib "Y:\- Signing\azure.codesigning.client\x64\Azure.CodeSigning.Dlib.dll" /dmdf "Y:\- Signing\metadata.json" "UniGetUI Installer.exe"
del "WingetUI Installer.exe"
copy "UniGetUI Installer.exe" "WingetUI Installer.exe"
pause
"UniGetUI Installer.exe"
) else (
echo "Make installer was skipped, because the installer is missing."
)
goto:end
:error
echo "Error!"
:end
pause