3 rem Build WIX installers (.msi) for 'all' architectures & Operating environments
\r
6 rem %0 cmd Cross-CertFileName SPCSubjectName {dest-path-for-msi-files}
\r
7 rem cmd - if 'msi' then assume drivers already signed, only sign .msi
\r
8 rem otherwise sign all drivers and installers (.msi files)
\r
10 rem Cross-CertFilename is indeed a filename only, we prefix ...\WIX before
\r
12 rem SW_PUB - Software Publisher name in 'MY' Cert Store, see signtool /n switch
\r
14 rem *** REQUIRES nmake, common invocation from Visual C or WDK command window
\r
15 rem *** Assumes current folder is WIX\
\r
17 set USE=usage %0 all/msi Certificate-FileName SW_Publisher[see signtool /n] {dest-path-for-msi-files}
\r
33 echo %0 - Unknown command '%1' - 'all' or 'msi'
\r
40 echo %0: Certificate-Filename not found?
\r
45 rem need a Cert subject name string - name is passed-in quoted!
\r
52 set DST=%windir%\temp
\r
57 if NOT EXIST %DST% (
\r
58 echo %0: Installer output path %DST% not found?
\r
62 nmake /NOLOGO /? > %DST%\jnk.txt
\r
64 echo %0 missing nmake.exe in PATH?
\r
67 del /Q /F %DST%\jnk.txt
\r
69 if "%1" == "msi" goto mk_msi
\r
71 rem Sign drivers for all OSes & arches. Convert CertFilename to full path.
\r
72 call sign-all-drivers %CD%\%2 %3
\r
75 echo %0: Error signing drivers?
\r
80 echo %0: Drivers Signed.
\r
86 rem build Windows Server 2008 / Vista (LongHorn versions) x86, x64 & ia64
\r
89 call build-MSI %DST%
\r
90 if ERRORLEVEL 1 exit /B
\r
93 :: build Windows Server 2003 versions: x86, x64 & ia64
\r
95 call build-MSI %DST%
\r
96 if ERRORLEVEL 1 exit /B
\r
99 :: build Windows XP (32-bit) versions: x86 only
\r
101 call build-MSI %DST%
\r
102 if ERRORLEVEL 1 exit /B
\r
105 rem Digitally Sign the installer .msi files
\r
107 set TS=/t http://timestamp.verisign.com/scripts/timstamp.dll
\r
108 echo %0 - Signing Installer .msi files
\r
109 for %%o in ( wlh wnet wxp ) do (
\r
110 for %%a in ( x86 x64 ia64 ) do (
\r
111 if exist %DST%\WOF_%%o_%%a.msi (
\r
113 echo Signing installer %DST%\WOF_%%o_%%a.msi
\r
114 signtool sign /ac %CD%\%2 /n %3 %TS% %DST%\WOF_%%o_%%a.msi
\r
116 echo %0 signtool sign %DST%\WOF_%%o_%%a.msi failed?
\r
119 signtool verify /pa %DST%\WOF_%%o_%%a.msi
\r
121 echo %0 signtool verify %DST%\WOF_%%o_%%a.msi failed?
\r
131 echo Done - WIX installers in %DST%
\r