mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-03-02 13:47:12 +00:00
Move installer signing into MSBuild
This commit is contained in:
parent
d5e2d59fe9
commit
34ba9063ad
5 changed files with 16 additions and 20 deletions
|
@ -44,7 +44,6 @@ Hosting for Moonlight's Raspberry Pi and L4T package repositories is graciously
|
|||
* [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) (Community edition is fine)
|
||||
* Select **MSVC 2019** option during Qt installation. MinGW is not supported.
|
||||
* [7-Zip](https://www.7-zip.org/) (only if building installers for non-development PCs)
|
||||
* Wix 4 .NET Tool (install using `dotnet tool install --global wix`)
|
||||
|
||||
### macOS Build Requirements
|
||||
* Qt 6.2 SDK or later
|
||||
|
|
|
@ -215,12 +215,6 @@ echo Building MSI
|
|||
msbuild -Restore %SOURCE_ROOT%\wix\Moonlight\Moonlight.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH%
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
|
||||
if "%SIGN%"=="1" (
|
||||
echo Signing MSI
|
||||
signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\Moonlight.msi
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
)
|
||||
|
||||
echo Copying application binary to deployment directory
|
||||
copy %BUILD_FOLDER%\app\%BUILD_CONFIG%\Moonlight.exe %DEPLOY_FOLDER%
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
|
|
|
@ -81,21 +81,9 @@ if !ERRORLEVEL! NEQ 0 goto Error
|
|||
|
||||
echo Building bundle
|
||||
rem Bundles are always x86 binaries
|
||||
msbuild %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 /p:DefineConstants="INCLUDE_ARM64=%INCLUDE_ARM64%"
|
||||
msbuild -Restore %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86 /p:DefineConstants="INCLUDE_ARM64=%INCLUDE_ARM64%"
|
||||
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
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
"%WIX%\bin\insignia" -ab %BUILD_FOLDER%\engine.exe %INSTALLER_FOLDER%\MoonlightSetup.exe -o %INSTALLER_FOLDER%\MoonlightSetup.exe
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
signtool %SIGNTOOL_PARAMS% %INSTALLER_FOLDER%\MoonlightSetup.exe
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
)
|
||||
|
||||
rem Rename the installer to match the publishing convention
|
||||
ren %INSTALLER_FOLDER%\MoonlightSetup.exe MoonlightSetup-%VERSION%.exe
|
||||
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
</HarvestDirectory>
|
||||
<BindPath Include="$(DEPLOY_FOLDER)" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="$(SIGN)!=''">
|
||||
<SignOutput>true</SignOutput>
|
||||
</PropertyGroup>
|
||||
<Target Name="SignMsi">
|
||||
<Exec Command='signtool.exe $(SIGNTOOL_PARAMS) %(SignMsi.FullPath)' />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixToolset.Firewall.wixext" Version="4.*" />
|
||||
<PackageReference Include="WixToolset.Util.wixext" Version="4.*" />
|
||||
|
|
|
@ -9,6 +9,15 @@
|
|||
<OutputPath>$(INSTALLER_FOLDER)\</OutputPath>
|
||||
<IntermediateOutputPath>$(BUILD_FOLDER)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="$(SIGN)!=''">
|
||||
<SignOutput>true</SignOutput>
|
||||
</PropertyGroup>
|
||||
<Target Name="SignBundleEngine">
|
||||
<Exec Command='signtool.exe $(SIGNTOOL_PARAMS) %(SignBundleEngine.FullPath)' />
|
||||
</Target>
|
||||
<Target Name="SignBundle">
|
||||
<Exec Command='signtool.exe $(SIGNTOOL_PARAMS) %(SignBundle.FullPath)' />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixToolset.Bal.wixext" Version="4.*" />
|
||||
<PackageReference Include="WixToolset.Util.wixext" Version="4.*" />
|
||||
|
|
Loading…
Add table
Reference in a new issue