mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-02-16 02:30:52 +00:00
Upgrade installer to WiX v4
This commit is contained in:
@@ -193,17 +193,9 @@ echo Deleting original QML files
|
||||
forfiles /p %DEPLOY_FOLDER% /m *.qml /s /c "cmd /c del @path"
|
||||
if !ERRORLEVEL! NEQ 0 goto Error
|
||||
|
||||
echo Harvesting files for WiX
|
||||
"%WIX%\bin\heat" dir %DEPLOY_FOLDER% -srd -sfrag -ag -sw5150 -cg MoonlightDependencies -var var.SourceDir -dr INSTALLFOLDER -out %BUILD_FOLDER%\Dependencies.wxs
|
||||
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
|
||||
|
||||
if "%SIGN%"=="1" (
|
||||
echo Signing deployed binaries
|
||||
set FILES_TO_SIGN=
|
||||
set FILES_TO_SIGN=%BUILD_FOLDER%\app\%BUILD_CONFIG%\Moonlight.exe
|
||||
for /r "%DEPLOY_FOLDER%" %%f in (*.dll *.exe) do (
|
||||
set FILES_TO_SIGN=!FILES_TO_SIGN! %%f
|
||||
)
|
||||
@@ -227,6 +219,10 @@ if "%SIGN%"=="1" (
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@@ -18,11 +18,11 @@ function Print-WixForArch([string]$Arch) {
|
||||
|
||||
$targetSize = (Get-Item $file).Length
|
||||
$targetVersion = (Get-Command $file).Version
|
||||
$targetSha1 = (Get-FileHash -Path $file -Algorithm SHA1).Hash
|
||||
$targetSha512 = (Get-FileHash -Path $file -Algorithm SHA512).Hash
|
||||
|
||||
Write-Output "<?define VCREDIST_VER = `"$targetVersion`" ?>"
|
||||
Write-Output "<?define VCREDIST_$($Arch)_SIZE = `"$targetSize`" ?>"
|
||||
Write-Output "<?define VCREDIST_$($Arch)_SHA1 = `"$targetSha1`" ?>"
|
||||
Write-Output "<?define VCREDIST_$($Arch)_SHA512 = `"$targetSha512`" ?>"
|
||||
Write-Output "<?define VCREDIST_$($Arch)_URL = `"$targetUrl`" ?>"
|
||||
Write-Output "<?define VCREDIST_$($Arch)_UPGRADE_CODE = `"$($UpgradeCodes[$Arch])`" ?>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user