Build: Add script to edit windows installer resources

This commit is contained in:
zzz
2019-04-23 16:26:17 +00:00
parent 5db67f13e1
commit 6f86522c2b
3 changed files with 31 additions and 1 deletions

Binary file not shown.

23
installer/lib/izpack/rh.bat Executable file
View File

@@ -0,0 +1,23 @@
:: Files required:
:: ResourceHacker.exe from http://www.angusj.com/resourcehacker/
:: VersionInfo_template.rc copied from installer/lib/izpack
:: console.ico copied from installer/resources
:: the unsigned i2pinstall_0.9.xx_windows.exe
::
:: the original file will be renamed to i2pinstall_0.9.xx_windows_unsigned.exe
:: the output will be the same as the original file name
:: on success, sign it.
::
set VER=39
set FULLVER=0.9.%VER%
set INFILE=i2pinstall_%FULLVER%_windows.exe
set UNSIGNED=i2pinstall_%FULLVER%_windows_unsigned.exe
set TEMPFILE=i2pinstall_%FULLVER%_windows_temp.exe
set RCFILE=VersionInfo_%FULLVER%.rc
set RESFILE=VersionInfo_%FULLVER%.res
rename %INFILE% %UNSIGNED%
powershell -Command "(gc VersionInfo_template.rc) -replace 'I2PVER', '%VER%' | Out-File %RCFILE%"
ResourceHacker.exe -open %RCFILE% -save %RESFILE% -action compile
ResourceHacker.exe -open %UNSIGNED% -save %TEMPFILE% -action addoverwrite -res VersionInfo1.res -mask VERSIONINFO,,
ResourceHacker.exe -open %TEMPFILE% -save %INFILE% -action addoverwrite -res console.ico -mask ICONGROUP,159,
del %TEMPFILE% %RCFILE% %RESFILE%