cec: let create-installer.cmd sign all binaries on the production build system.
authorLars Op den Kamp <lars@opdenkamp.eu>
Sat, 4 Feb 2012 16:14:06 +0000 (17:14 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sat, 4 Feb 2012 16:14:06 +0000 (17:14 +0100)
.gitignore
support/create-installer.cmd

index 4da907e4f5e469f6fcdbc3fde5f5b5ea514d8932..30608704e16ab0aadf48b5562187f1ae00e9ea27 100644 (file)
@@ -14,6 +14,8 @@
 *.suo
 *.user
 
+/support/sign-binary.cmd
+
 aclocal.m4
 autom4te.cache
 config.guess
index cd5227c564488eb7c65d43130ce1bfb4d1705807..6a6648679799c7fa75b57cf2470a3a9417613618 100644 (file)
@@ -77,7 +77,6 @@ echo. Compiling LibCecSharp (x86)
 %COMPILER9% LibCecSharp.sln /build "Release|x86" /project CecSharpTester
 
 :NOSDK9
-:CREATEINSTALLER
 echo. Copying driver installer
 copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\build\dpinst-amd64.exe
 copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\build\dpinst-x86.exe
@@ -92,9 +91,31 @@ del ..\build\libcec.x64.dll
 copy ..\build\libcec.x64.lib ..\build\x64\libcec.x64.lib
 del ..\build\libcec.x64.lib
 
+rem Check for sign-binary.cmd, only present on the Pulse-Eight production build system
+rem Calls signtool.exe and signs the DLLs with Pulse-Eight's code signing key
+IF NOT EXIST "..\support\sign-binary.cmd" GOTO CREATEINSTALLER
+echo. Signing all binaries
+CALL ..\support\sign-binary.cmd ..\build\cec-client.exe
+CALL ..\support\sign-binary.cmd ..\build\CecSharpTester.exe
+CALL ..\support\sign-binary.cmd ..\build\libcec.dll
+CALL ..\support\sign-binary.cmd ..\build\LibCecSharp.dll
+CALL ..\support\sign-binary.cmd ..\build\x64\cec-client.x64.exe
+CALL ..\support\sign-binary.cmd ..\build\x64\CecSharpTester.exe
+CALL ..\support\sign-binary.cmd ..\build\x64\libcec.x64.dll
+CALL ..\support\sign-binary.cmd ..\build\x64\LibCecSharp.dll
+
+:CREATEINSTALLER
 echo. Creating the installer
 %NSIS% /V1 /X"SetCompressor /FINAL lzma" "libCEC.nsi"
 
+IF NOT EXIST "..\build\libCEC-installer.exe" GOTO :ERRORCREATINGINSTALLER
+
+rem Sign the installer if sign-binary.cmd exists
+IF EXIST "..\support\sign-binary.cmd" (
+  echo. Signing the installer binaries
+  CALL ..\support\sign-binary.cmd ..\build\libCEC-installer.exe
+)
+
 echo. The installer can be found here: ..\build\libCEC-installer.exe
 
 GOTO EXIT
@@ -109,5 +130,10 @@ GOTO EXIT
 
 :NODDK
 echo. Windows DDK could not be found on your system
+GOTO EXIT
+
+:ERRORCREATINGINSTALLER
+echo. The installer could not be created. The most likely cause is that something went wrong while compiling.
 
 :EXIT
+cd ..\support
\ No newline at end of file