Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Oct 27, 2024
1 parent 0cf95fd commit e0fb096
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions build_release.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@


@echo off


rem update resources
python scripts/apply_versions.py

Expand All @@ -24,44 +21,40 @@ if %errorlevel% neq 0 (
)

rem build executable
dotnet clean src/UniGetUI.sln
dotnet publish src/UniGetUI/UniGetUI.csproj /noLogo /property:Configuration=Release /property:Platform=x64

dotnet clean src/UniGetUI.sln -v m -nologo
dotnet publish src/UniGetUI/UniGetUI.csproj /noLogo /property:Configuration=Release /property:Platform=x64 -v m
if %errorlevel% neq 0 (
echo "DotNet publish has failed!"
pause
)
rem sign code

rmdir /Q /S unigetui_bin

mkdir unigetui_bin
robocopy src\UniGetUI\bin\x64\Release\net8.0-windows10.0.22621.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

powershell.exe -Command %SIGNCOMMAND% "%cd%\UniGetUI.exe"
powershell.exe -Command %SIGNCOMMAND% "%cd%\UniGetUI.dll"
powershell.exe -Command %SIGNCOMMAND% "%cd%\UniGetUI.*.dll"
powershell.exe -Command %SIGNCOMMAND% "%cd%\ExternalLibraries.*.dll"

echo .
echo .
echo You may want to sign now the following executables
cd
echo UniGetUI.dll
echo UniGetUI.exe
echo .
echo .
pause

%signcommand% "unigetui_bin/UniGetUI.exe" "unigetui_bin/UniGetUI.dll" "unigetui_bin/UniGetUI.*.dll" "unigetui_bin/ExternalLibraries.*.dll"

if %errorlevel% neq 0 (
echo "Signing has failed!"
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
%SIGNCOMMAND% "%cd%\UniGetUI` Installer.exe"
%signcommand% "UniGetUI Installer.exe"
del "WingetUI Installer.exe"
copy "UniGetUI Installer.exe" "WingetUI Installer.exe"
pause
echo Hash:
pwsh.exe -Command (Get-FileHash '.\UniGetUI Installer.exe').Hash
echo .
"UniGetUI Installer.exe"
) else (
echo "Make installer was skipped, because the installer is missing."
Expand Down

0 comments on commit e0fb096

Please sign in to comment.