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 echo Building MSI
set VCREDIST_INSTALLER=%VCREDIST_PATH%\vcredist_%ARCH%.exe msbuild %SOURCE_ROOT%\wix\Moonlight\Moonlight.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH%
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%\*
if !ERRORLEVEL! NEQ 0 goto Error if !ERRORLEVEL! NEQ 0 goto Error
if "%SIGN%"=="1" ( 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 "%WIX%\bin\insignia" -ib %INSTALLER_FOLDER%\MoonlightSetup.exe -o %BUILD_FOLDER%\engine.exe
if !ERRORLEVEL! NEQ 0 goto Error if !ERRORLEVEL! NEQ 0 goto Error
signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\engine.exe signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\engine.exe
@ -113,6 +116,14 @@ if "%SIGN%"=="1" (
if !ERRORLEVEL! NEQ 0 goto Error 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" ( if /i "%APPVEYOR%"=="true" (
echo Pushing artifacts echo Pushing artifacts
appveyor PushArtifact %INSTALLER_FOLDER%\MoonlightSetup.exe -FileName MoonlightSetup-%ARCH%-%BUILD_CONFIG%.exe appveyor PushArtifact %INSTALLER_FOLDER%\MoonlightSetup.exe -FileName MoonlightSetup-%ARCH%-%BUILD_CONFIG%.exe

View File

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

View File

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

View File

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