diff --git a/.github/workflows/build-win-mac.yml b/.github/workflows/build-win-mac.yml index 8dbb316f..eb8b7371 100644 --- a/.github/workflows/build-win-mac.yml +++ b/.github/workflows/build-win-mac.yml @@ -20,11 +20,10 @@ jobs: include: # Windows - os: windows-2025 - qt_version: 6.10.1 - qt_version_arm64: 6.10.0 + qt_version: 6.10.2 # macOS - os: macos-15 - qt_version: 6.10.1 + qt_version: 6.10.2 runs-on: ${{ matrix.os }} @@ -48,6 +47,7 @@ jobs: set-env: ${{ runner.os != 'Windows' }} add-tools-to-path: ${{ runner.os != 'Windows' }} version: ${{ matrix.qt_version }} + aqtsource: 'git+https://github.com/miurahr/aqtinstall.git@9edeb24ae65361fd032a063a0b0148764eff09c5' - name: Install Qt ARM64 (Windows) if: runner.os == 'Windows' @@ -57,7 +57,7 @@ jobs: set-env: false add-tools-to-path: false arch: win64_msvc2022_arm64_cross_compiled - version: ${{ matrix.qt_version_arm64 }} + version: ${{ matrix.qt_version }} - name: Build x64 binaries (Windows) if: runner.os == 'Windows' @@ -75,7 +75,7 @@ jobs: set "PATH=%QT_PATH%;%PATH%" scripts\build-arch.bat Release arm64 env: - QT_PATH: ${{ runner.workspace }}\Qt\${{ matrix.qt_version_arm64 }}\msvc2022_arm64\bin + QT_PATH: ${{ runner.workspace }}\Qt\${{ matrix.qt_version }}\msvc2022_arm64\bin - name: Build Package shell: pwsh diff --git a/README.md b/README.md index df5ce1ab..fc47631a 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,10 @@ Moonlight builds for Steam Link are subject to hardware limitations of the Steam * Maximum video bitrate: **40 Mbps** * **HDR streaming is not supported** on the original hardware +### Docker containers +If you want to use Docker for building, look at [this repo](https://github.com/cgutman/moonlight-packaging) containing canonical containers +for different architectures, which handle building deps and extra linking for you. + ### Build Setup Steps 1. Install the latest Qt SDK (and optionally, the Qt Creator IDE) from https://www.qt.io/download * You can install Qt via Homebrew on macOS, but you will need to use `brew install qt --with-debug` to be able to create debug builds of Moonlight. @@ -93,7 +97,8 @@ Moonlight builds for Steam Link are subject to hardware limitations of the Steam * 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 on macOS or Linux, run `qmake6 moonlight-qt.pro` then `make debug` or `make release` + * To build from the command line for development use on macOS or Linux, run `qmake6 moonlight-qt.pro` then `make debug` or `make release`. + * The final binary will be placed in `app/moonlight`. * To create an embedded build for a single-purpose device, use `qmake6 "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 GPU performance, add `"CONFIG+=gpuslow"` to prefer direct KMSDRM rendering over GL/Vulkan renderers. Direct KMSDRM rendering can use dedicated YUV/RGB conversion and scaling hardware rather than slower GPU shaders for these operations. diff --git a/app/gui/NavigableDialog.qml b/app/gui/NavigableDialog.qml index 934cd013..4384d5bb 100644 --- a/app/gui/NavigableDialog.qml +++ b/app/gui/NavigableDialog.qml @@ -1,11 +1,9 @@ import QtQuick 2.0 -import QtQuick.Controls 2.3 +import QtQuick.Controls 2.5 Dialog { modal: true - - x: Math.round((parent.width - width) / 2) - y: Math.round((parent.height - height) / 2) + anchors.centerIn: Overlay.overlay onClosed: { // We must force focus back to the last item. If we don't, diff --git a/app/main.cpp b/app/main.cpp index 5816f6f9..dea6cd7d 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -359,7 +359,7 @@ int SDLCALL signalHandlerThread(void* data) // Exit immediately if we haven't changed state since last attempt if (session == lastSession || requestedQuit) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Exiting immediately on second signal"); - _exit(1); + _Exit(1); } if (sig == SIGTERM) { @@ -376,7 +376,7 @@ int SDLCALL signalHandlerThread(void* data) // Exit immediately if we haven't changed state since last attempt if (requestedQuit) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Exiting immediately on second signal"); - _exit(1); + _Exit(1); } // If we're not streaming, we'll close the whole app diff --git a/app/wm.cpp b/app/wm.cpp index 09cf6df6..88bda333 100644 --- a/app/wm.cpp +++ b/app/wm.cpp @@ -210,7 +210,7 @@ bool WMUtils::isGpuSlow() bool ret; if (!Utils::getEnvironmentVariableOverride("GL_IS_SLOW", &ret)) { -#if defined(GL_IS_SLOW) || !defined(Q_PROCESSOR_X86) +#if defined(GL_IS_SLOW) || (!defined(Q_PROCESSOR_X86) && !defined(Q_OS_DARWIN) && !defined(Q_OS_WIN)) // We currently assume GPUs on non-x86 hardware are slow by default ret = true; #else diff --git a/moonlight-common-c/moonlight-common-c b/moonlight-common-c/moonlight-common-c index 305993b0..6250fa29 160000 --- a/moonlight-common-c/moonlight-common-c +++ b/moonlight-common-c/moonlight-common-c @@ -1 +1 @@ -Subproject commit 305993b01322aeb7710a5443960774ecd391c55c +Subproject commit 6250fa29ee87873716045e3b64f1f229374324e8 diff --git a/scripts/build-arch.bat b/scripts/build-arch.bat index 1ee1cb3c..2c774fde 100644 --- a/scripts/build-arch.bat +++ b/scripts/build-arch.bat @@ -222,7 +222,7 @@ echo Deploying Qt dependencies %WINDEPLOYQT_CMD% --dir %DEPLOY_FOLDER% --%BUILD_CONFIG% --qmldir %SOURCE_ROOT%\app\gui --no-opengl-sw --no-compiler-runtime --no-sql %WINDEPLOYQT_ARGS% %BUILD_FOLDER%\app\%BUILD_CONFIG%\Moonlight.exe if !ERRORLEVEL! NEQ 0 goto Error -echo Deleting unused styles +echo Deleting unused files rem Qt 5.x directories rmdir /s /q %DEPLOY_FOLDER%\QtQuick\Controls.2\Fusion rmdir /s /q %DEPLOY_FOLDER%\QtQuick\Controls.2\Imagine @@ -234,6 +234,8 @@ rmdir /s /q %DEPLOY_FOLDER%\qml\QtQuick\Controls\Universal rmdir /s /q %DEPLOY_FOLDER%\qml\QtQuick\Controls\Windows rmdir /s /q %DEPLOY_FOLDER%\qml\QtQuick\Controls\FluentWinUI3 rmdir /s /q %DEPLOY_FOLDER%\qml\QtQuick\NativeStyle +rem icuuc.dll ships with all supported OSes (and Qt incorrectly deploys the x64 version on ARM64) +del %DEPLOY_FOLDER%\icuuc.dll if "%SIGN%"=="1" ( echo Signing deployed binaries @@ -266,9 +268,19 @@ rem This must be done after WiX harvesting and signing, since the VCRT dlls are rem and should not be harvested for inclusion in the full installer copy "%VC_REDIST_DLL_PATH%\*.dll" %DEPLOY_FOLDER% if !ERRORLEVEL! NEQ 0 goto Error -rem This file tells Moonlight that it's a portable installation -echo. > %DEPLOY_FOLDER%\portable.dat -if !ERRORLEVEL! NEQ 0 goto Error + +rem Since we don't publish Windows installers for CI builds, let's use the user profile +rem location of the regular non-portable version by default. We'll place a file in the +rem the package to allow the user to rename if they want portable behavior. +if defined CI_VERSION ( + echo. > %DEPLOY_FOLDER%\portable.dat.inactive + if !ERRORLEVEL! NEQ 0 goto Error +) else ( + rem This file tells Moonlight that it's a portable installation + echo. > %DEPLOY_FOLDER%\portable.dat + if !ERRORLEVEL! NEQ 0 goto Error +) + 7z a %INSTALLER_FOLDER%\MoonlightPortable-%ARCH%-%VERSION%.zip %DEPLOY_FOLDER%\* if !ERRORLEVEL! NEQ 0 goto Error