Rev 9 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
setlocal enableextensions enabledelayedexpansion
rem // change directory to the script's path, in case we are started as Administrator
set PRODUCT_NAME=Rick Dangerous
set OUTPUT_FILE=Z:\Documents\Mes projets\www.pmbaty.com\rick\Rick Dangerous Installer.exe
rem // NOTE NO DASH v----- HERE IN THE FIRST NAME! THE CERTIFICATE WAS ISSUED BY GLOBALSIGN WITHOUT IT!
set PUBLISHER=Pierre Marie Baty
rem // NOTE NO DASH ^----- HERE IN THE FIRST NAME! THE CERTIFICATE WAS ISSUED BY GLOBALSIGN WITHOUT IT!
set PUBLISHER_WEBSITE=https://www.pmbaty.com/rick/
set OSSLSIGNCODE=
%~dp0osslsigncode.Win32-x64.exe
set OSSLSIGNCODE_SIGN_FLAGS=-pkcs11module IDPrimePKCS1164.dll -pass 0000 -key "pkcs11:object=
%PUBLISHER%;type=private" -certs "
%PUBLISHER%+Verokey Secure Code+DigiCert Trusted Root G4.pem" -ts http://timestamp.digicert.com
if not exist "
%OSSLSIGNCODE%"
echo osslsigncode
not found - Please fix the path
in this installer script
!&& goto :
error
rem //////////////////////////////////////
rem // create the Rick Dangerous installer
rem // sign the main executable if it's not signed already
set BINARY=..\Rick Dangerous.exe
set DESCRIPTION=
%PRODUCT_NAME% executable
set URL=
%PUBLISHER_WEBSITE%
"
%OSSLSIGNCODE%"
verify "
%BINARY%"
> nul && (
echo Already signed:
%BINARY%
) || (
"
%OSSLSIGNCODE%" sign
%OSSLSIGNCODE_SIGN_FLAGS% -n "
%DESCRIPTION%" -i "
%URL%" -in "
%BINARY%"
>> codesigning.log
|| goto :
error
)
rem // sign the SDL library if it's not signed already
set DESCRIPTION=Simple DirectMedia Layer library
for %PRODUCT_NAME%
set URL=
%PUBLISHER_WEBSITE%
"
%OSSLSIGNCODE%"
verify "
%BINARY%"
> nul && (
echo Already signed:
%BINARY%
) || (
"
%OSSLSIGNCODE%" sign
%OSSLSIGNCODE_SIGN_FLAGS% -n "
%DESCRIPTION%" -i "
%URL%" -in "
%BINARY%"
>> codesigning.log
|| goto :
error
)
rem // create the NSIS install package
echo Creating the installer...
"
%ProgramFiles(x86)%\NSIS\makensis.exe" "/XOutFile \"
%OUTPUT_FILE%\"" installer.nsi
> installer.nsi.log
|| goto :
error
rem // some time is needed for antiviruses etc to release the newly created file
rem // sign the installer
set DESCRIPTION=
%PRODUCT_NAME% installer
set URL=
%PUBLISHER_WEBSITE%
echo Signing the installer...
"
%OSSLSIGNCODE%" sign
%OSSLSIGNCODE_SIGN_FLAGS% -n "
%DESCRIPTION%" -i "
%URL%" -in "
%BINARY%"
>> codesigning.log
|| goto :
error
:success
:error