Browse Source

Call ISSignTool to sign the files we want to check.

Martijn Laan 5 months ago
parent
commit
e50b625d8b
3 changed files with 59 additions and 1 deletions
  1. 6 0
      build-ce.bat
  2. 5 1
      build.bat
  3. 48 0
      issig.bat

+ 6 - 0
build-ce.bat

@@ -53,6 +53,12 @@ call :waitforfile ishelp\ishelpgen\ishelpgen.exe
 
 echo Found all, waiting 2 seconds more...
 timeout /t 2 /nobreak >nul
+echo Compiling Inno Setup done
+
+call .\issig.bat
+if errorlevel 1 goto failed
+echo ISSigTool done
+pause
 
 cd ishelp
 if errorlevel 1 goto failed

+ 5 - 1
build.bat

@@ -50,7 +50,11 @@ pause
 call .\compile.bat
 if errorlevel 1 goto failed
 echo Compiling Inno Setup done
-pause
+
+call .\issig.bat
+if errorlevel 1 goto failed
+echo ISSigTool done
+paue
 
 :setup
 echo - Setup.exe

+ 48 - 0
issig.bat

@@ -0,0 +1,48 @@
+@echo off
+
+rem  Inno Setup
+rem  Copyright (C) 1997-2024 Jordan Russell
+rem  Portions by Martijn Laan
+rem  For conditions of distribution and use, see LICENSE.TXT.
+rem
+rem  Batch file to create .issig files required by Inno Setup
+
+setlocal
+
+cd /d %~dp0
+
+if not "%ISSIGTOOL_KEY_FILE%"=="" goto keyfilefound
+:compilesettingserror
+echo ISSIGTOOL_KEY_FILE is missing or incomplete. It needs to be created
+echo with the following line, adjusted for your system:
+echo.
+echo   set ISSIGTOOL_KEY_FILE=x:\path\MyKey.isprivatekey
+echo.
+echo To create this file use the following command:
+echo.
+echo   Files\ISSigTool.exe --key-file=x:\path\MyKey.isprivatekey generate-private-key
+echo.
+echo Do not share the file with others!
+goto failed2
+
+:keyfilefound
+
+rem -------------------------------------------------------------------------
+
+cd Files
+if errorlevel 1 goto failed
+ISSigTool sign isbzip.dll ISCmplr.dll islzma.dll ISPP.dll isscint.dll iszlib.dll
+if errorlevel 1 goto failed
+cd ..
+if errorlevel 1 goto failed
+
+echo Success!
+goto exit
+
+:failed
+echo *** FAILED ***
+cd ..
+:failed2
+exit /b 1
+
+:exit