diff --git a/README.md b/README.md index 50e65618..ea93a62a 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ 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 Toolset](https://wixtoolset.org/releases/v3-14-0-5722/) v3.14.0.5722 or later (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 @@ -72,10 +72,10 @@ Hosting for Moonlight's Raspberry Pi and L4T package repositories is graciously 2. Run `git submodule update --init --recursive` from within `moonlight-qt/` 3. Open the project in Qt Creator or build from qmake on the command line. * To build a binary for use on non-development machines, use the scripts in the `scripts` folder. - * For Windows builds, use `scripts\build-arch.bat` and `scripts\generate-bundle.bat`. Execute these scripts from the root of the repository within a Qt command prompt. Ensure WiX and 7-Zip binary directories are in your `%PATH%`. + * For Windows builds, use `scripts\build-arch.bat` and `scripts\generate-bundle.bat`. Execute these scripts from the root of the repository within a Qt command prompt. Ensure 7-Zip binary directory is on your `%PATH%`. * For macOS builds, use `scripts/generate-dmg.sh`. Execute this script from the root of the repository and ensure Qt's `bin` folder is in your `$PATH`. * For Steam Link builds, run `scripts/build-steamlink-app.sh` from the root of the repository. - * To build from the command line for development use, run `qmake moonlight-qt.pro` then `make debug` or `make release` + * To build from the command line for development use on macOS or Linux, run `qmake moonlight-qt.pro` then `make debug` or `make release` * To create an embedded build for a single-purpose device, use `qmake "CONFIG+=embedded" moonlight-qt.pro` and build normally. * This build will lack windowed mode, Discord/Help links, and other features that don't make sense on an embedded device. * For platforms with poor GL performance, add `"CONFIG+=glslow"` to prefer direct KMSDRM rendering over EGL/GLES renderers. Direct KMSDRM rendering can use dedicated YUV/RGB conversion and scaling hardware rather than slower GPU shaders for these operations. diff --git a/appveyor.yml b/appveyor.yml index 00ea9857..9097b2be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,6 +15,7 @@ environment: FFMPEG_CONFIGURE_ARGS: --enable-pic --disable-static --enable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=av1 --enable-nvdec --enable-hwaccel=h264_nvdec --enable-hwaccel=hevc_nvdec --enable-hwaccel=av1_nvdec --enable-hwaccel=h264_vaapi --enable-hwaccel=hevc_vaapi --enable-hwaccel=av1_vaapi --enable-hwaccel=h264_vdpau --enable-hwaccel=hevc_vdpau --enable-hwaccel=av1_vdpau install: + - cmd: 'dotnet tool install --global wix' - sh: '[ "$BUILD_TARGET" != macos ] || nvm use node' - sh: '[ "$BUILD_TARGET" != macos ] || npm install --global create-dmg' - sh: '[ "$BUILD_TARGET" != steamlink ] || sudo apt install -y libc6:i386 libstdc++6:i386' @@ -38,9 +39,9 @@ before_build: - sh: 'export VERSION=`cat app/version.txt`' build_script: - - cmd: 'set PATH=%OLDPATH%;%QTDIR%\msvc2019_64\bin;%ProgramFiles(x86)%\WiX Toolset v3.11\bin' + - cmd: 'set PATH=%OLDPATH%;%QTDIR%\msvc2019_64\bin' - cmd: 'scripts\build-arch.bat Release' - - cmd: 'set PATH=%OLDPATH%;%QTDIR%\msvc2019\bin;%ProgramFiles(x86)%\WiX Toolset v3.11\bin' + - cmd: 'set PATH=%OLDPATH%;%QTDIR%\msvc2019\bin' - cmd: 'scripts\build-arch.bat Release' - cmd: 'scripts\generate-bundle.bat Release' - sh: '[ "$BUILD_TARGET" != linux ] || source /opt/qt515/bin/qt515-env.sh' diff --git a/scripts/build-arch.bat b/scripts/build-arch.bat index 028bda00..d04f452e 100644 --- a/scripts/build-arch.bat +++ b/scripts/build-arch.bat @@ -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 diff --git a/scripts/update-msvcredist.ps1 b/scripts/update-msvcredist.ps1 index 947aa572..65e426b3 100644 --- a/scripts/update-msvcredist.ps1 +++ b/scripts/update-msvcredist.ps1 @@ -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 "" Write-Output "" - Write-Output "" + Write-Output "" Write-Output "" Write-Output "" diff --git a/wix/Moonlight/Moonlight.wixproj b/wix/Moonlight/Moonlight.wixproj index 981a56a2..adc1a2d0 100644 --- a/wix/Moonlight/Moonlight.wixproj +++ b/wix/Moonlight/Moonlight.wixproj @@ -1,13 +1,4 @@ - - - - 3.10 - 8468ef94-3bb8-47a5-af15-0e314afe664d - 2.0 - Moonlight - Package - false - + Debug @@ -16,33 +7,22 @@ $(BUILD_FOLDER)\ - SourceDir=$(DEPLOY_FOLDER) + DeployDir=$(DEPLOY_FOLDER);BuildDir=$(BUILD_FOLDER) - - + + MoonlightDependencies + INSTALLFOLDER + DeployDir + true + true + true + + - - $(WixExtDir)\WixFirewallExtension.dll - WixFirewallExtension - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - + + + - - - - - - \ No newline at end of file diff --git a/wix/Moonlight/Product.wxs b/wix/Moonlight/Product.wxs index 0943f4cc..cee32c0a 100644 --- a/wix/Moonlight/Product.wxs +++ b/wix/Moonlight/Product.wxs @@ -1,117 +1,107 @@ - - - + - + - - - - - + + + Root="HKLM" + Key="System\CurrentControlSet\Services\MpsSvc" + Name="Start" + Type="raw" /> - - - + - - - - - - - - - - - - - - - - - %LOCALAPPDATA%\Moonlight Game Streaming Project + + Directory="ProgramFiles6432Folder" + ExeCommand="reg.exe delete "HKCU\Software\Moonlight Game Streaming Project" /f" + Execute="deferred" + Return="ignore" + Impersonate="yes" /> - Installed AND REMOVE~="ALL" AND NOT UPGRADINGPRODUCTCODE + - - - - - + + + + + - + - + Name="$(var.ShortcutName)" + Description="$(var.ShortcutDesc)" + Target="[#MoonlightExe]" + Directory="DesktopFolder" + WorkingDirectory="INSTALLFOLDER" /> + - ADDDESKTOPSHORTCUT=1 + Key="Software\Moonlight Game Streaming Project" + Name="DesktopShortcutInstalled" + Type="integer" + Value="1" + KeyPath="yes" /> - + + Key="Software\Moonlight Game Streaming Project" + Name="DesktopShortcutInstallState" + Type="integer" + Value="[ADDDESKTOPSHORTCUT]" + KeyPath="yes" /> - - + + + Scope="any" + Name="$(var.FullName)" /> @@ -123,5 +113,13 @@ - + + + + + + + + + diff --git a/wix/MoonlightSetup/Bundle.wxs b/wix/MoonlightSetup/Bundle.wxs index af8b696b..0731494d 100644 --- a/wix/MoonlightSetup/Bundle.wxs +++ b/wix/MoonlightSetup/Bundle.wxs @@ -1,41 +1,32 @@ - - - - - - - + + + + + - - - + + + - - - + + + - + + Version="!(bind.PackageVersion.Moonlight_x64)" + Manufacturer="Moonlight Game Streaming Project" + UpgradeCode="466fa35d-4be4-40ef-9ce5-afadc3b63bc5" + HelpUrl="https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide" + UpdateUrl="https://github.com/moonlight-stream/moonlight-qt/releases" + DisableModify="yes" + IconSourceFile="..\..\app\moonlight.ico"> - - = v6.1]]> - + - - - - + - - + + + UpgradeCode="$(var.VCREDIST_X86_UPGRADE_CODE)" + Result="version" + Variable="VCREDIST_14_x86" /> + UpgradeCode="$(var.VCREDIST_X64_UPGRADE_CODE)" + Result="version" + Variable="VCREDIST_14_x64" /> + UpgradeCode="$(var.VCREDIST_ARM64_UPGRADE_CODE)" + Result="version" + Variable="VCREDIST_14_ARM64" /> - - - + + + - + - + - + DetectCondition="VCREDIST_14_x64 >= v$(var.VCREDIST_VER)" + InstallArguments="/install /quiet /norestart"> - + - + DetectCondition="VCREDIST_14_ARM64 >= v$(var.VCREDIST_VER)" + InstallArguments="/install /quiet /norestart"> - + @@ -147,30 +126,30 @@ + SourceFile="$(env.BUILD_ROOT)\build-x86-$(env.BUILD_CONFIG)\Moonlight.msi" + Name="Moonlight_x86.msi" + InstallCondition="(NOT VersionNT64 AND NOT NativeMachine) OR (NativeMachine = 332)" + Vital="yes"> - + Vital="yes"> - + Vital="yes"> - diff --git a/wix/MoonlightSetup/MoonlightSetup.wixproj b/wix/MoonlightSetup/MoonlightSetup.wixproj index a5d4358c..5dc893be 100644 --- a/wix/MoonlightSetup/MoonlightSetup.wixproj +++ b/wix/MoonlightSetup/MoonlightSetup.wixproj @@ -1,12 +1,6 @@ - - + - 3.10 - 466fa35d-4be4-40ef-9ce5-afadc3b63bc5 - 2.0 - MoonlightSetup Bundle - false Debug @@ -16,29 +10,7 @@ $(BUILD_FOLDER)\ - + + - - - $(WixExtDir)\WixBalExtension.dll - WixBalExtension - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - - - - - - - - \ No newline at end of file diff --git a/wix/MoonlightSetup/RtfTheme.xml b/wix/MoonlightSetup/RtfTheme.xml index 7285b1a3..a4750ad8 100644 --- a/wix/MoonlightSetup/RtfTheme.xml +++ b/wix/MoonlightSetup/RtfTheme.xml @@ -1,88 +1,124 @@ - + - - #(loc.Caption) - Segoe UI - Segoe UI - Segoe UI - Segoe UI - Segoe UI + + Segoe UI + Segoe UI + Segoe UI + Segoe UI - - #(loc.Title) + + + - - #(loc.HelpHeader) - #(loc.HelpText) - - - - - #(loc.InstallAcceptCheckbox) - - - - - - #(loc.OptionsHeader) - #(loc.OptionsLocationLabel) - - + + + + + + + + + + #(loc.InstallAcceptCheckbox) + + + + + + + + + + - - Add desktop shortcut + + Add desktop shortcut - - - - - #(loc.FilesInUseHeader) - #(loc.FilesInUseLabel) - - - - - - - - - - #(loc.ProgressHeader) - #(loc.ProgressLabel) - #(loc.OverallProgressPackageText) - - - - - #(loc.ModifyHeader) - - - - - - #(loc.SuccessHeader) - #(loc.SuccessInstallHeader) - #(loc.SuccessRepairHeader) - #(loc.SuccessUninstallHeader) - - #(loc.SuccessRestartText) - - - - - #(loc.FailureHeader) - #(loc.FailureInstallHeader) - #(loc.FailureUninstallHeader) - #(loc.FailureRepairHeader) - #(loc.FailureHyperlinkLogText) - - #(loc.FailureRestartText) - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + #(loc.FailureHyperlinkLogText) + + + + + +