Sign the MSI within the bundle too

This commit is contained in:
Cameron Gutman 2018-08-15 20:29:59 -07:00
parent f714a5d0cb
commit 1fda7550da
4 changed files with 26 additions and 13 deletions

View file

@ -88,21 +88,24 @@ if "%SIGN%"=="1" (
)
)
echo Building installer
set VCREDIST_INSTALLER=%VCREDIST_PATH%\vcredist_%ARCH%.exe
msbuild %SOURCE_ROOT%\wix\Moonlight.sln /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH%
if !ERRORLEVEL! NEQ 0 goto Error
echo Building portable package
rem This must be done after WiX harvesting and signing, since the VCRT dlls are MS signed
rem and should not be harvested for inclusion in the full installer
copy "%VCREDIST_PATH%\%ARCH%\Microsoft.VC141.CRT\*.dll" %DEPLOY_FOLDER%
if !ERRORLEVEL! NEQ 0 goto Error
7z a %INSTALLER_FOLDER%\MoonlightPortable.zip %DEPLOY_FOLDER%\*
echo Building MSI
msbuild %SOURCE_ROOT%\wix\Moonlight\Moonlight.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH%
if !ERRORLEVEL! NEQ 0 goto Error
if "%SIGN%"=="1" (
echo Signing installer binary
echo Signing MSI
signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\Moonlight.msi
if !ERRORLEVEL! NEQ 0 goto Error
)
echo Building bundle
set VCREDIST_INSTALLER=%VCREDIST_PATH%\vcredist_%ARCH%.exe
rem Bundles are always x86 binaries
msbuild %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86
if !ERRORLEVEL! NEQ 0 goto Error
if "%SIGN%"=="1" (
echo Signing bundle
"%WIX%\bin\insignia" -ib %INSTALLER_FOLDER%\MoonlightSetup.exe -o %BUILD_FOLDER%\engine.exe
if !ERRORLEVEL! NEQ 0 goto Error
signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\engine.exe
@ -113,6 +116,14 @@ if "%SIGN%"=="1" (
if !ERRORLEVEL! NEQ 0 goto Error
)
echo Building portable package
rem This must be done after WiX harvesting and signing, since the VCRT dlls are MS signed
rem and should not be harvested for inclusion in the full installer
copy "%VCREDIST_PATH%\%ARCH%\Microsoft.VC141.CRT\*.dll" %DEPLOY_FOLDER%
if !ERRORLEVEL! NEQ 0 goto Error
7z a %INSTALLER_FOLDER%\MoonlightPortable.zip %DEPLOY_FOLDER%\*
if !ERRORLEVEL! NEQ 0 goto Error
if /i "%APPVEYOR%"=="true" (
echo Pushing artifacts
appveyor PushArtifact %INSTALLER_FOLDER%\MoonlightSetup.exe -FileName MoonlightSetup-%ARCH%-%BUILD_CONFIG%.exe

View file

@ -6,6 +6,7 @@
<SchemaVersion>2.0</SchemaVersion>
<OutputName>Moonlight</OutputName>
<OutputType>Package</OutputType>
<DefineSolutionProperties>false</DefineSolutionProperties>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>Debug</DefineConstants>

View file

@ -20,7 +20,7 @@
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." Schedule="afterInstallInitialize" />
<MediaTemplate CompressionLevel="high" />
<MediaTemplate CompressionLevel="high" EmbedCab="yes" />
<?if $(var.Platform) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>

View file

@ -6,6 +6,7 @@
<SchemaVersion>2.0</SchemaVersion>
<OutputName>MoonlightSetup</OutputName>
<OutputType>Bundle</OutputType>
<DefineSolutionProperties>false</DefineSolutionProperties>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>Debug</DefineConstants>