Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

[ci] fix windows environment variables

cruetercc9c3dd5a37f
diff --git a/.ci/windows/build-amd64.bat b/.ci/windows/build-amd64.bat
deleted file mode 100755
index ec49240596..0000000000
--- a/.ci/windows/build-amd64.bat
+++ /dev/null
@@ -1,25 +0,0 @@
-@echo off
-
-set chain=%1
-
-if not defined DevEnvDir (
- CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain%
-)
-
-CALL mkdir build
-
-CALL cmake -S . -B build\%chain% ^
--DCMAKE_BUILD_TYPE=Release ^
--DENABLE_QT_TRANSLATION=ON ^
--DUSE_DISCORD_PRESENCE=ON ^
--DYUZU_USE_BUNDLED_QT=ON ^
--DYUZU_USE_QT_MULTIMEDIA=ON ^
--DYUZU_USE_QT_WEB_ENGINE=ON ^
--DYUZU_USE_BUNDLED_VCPKG=ON ^
--DYUZU_USE_BUNDLED_SDL2=ON ^
--DYUZU_ENABLE_LTO=ON ^
--DUSE_CCACHE=ON ^
--G "Ninja" ^
--DYUZU_TESTS=OFF
-
-CALL cmake --build build\%chain%
diff --git a/.ci/windows/build-arm64.bat b/.ci/windows/build-arm64.bat
deleted file mode 100755
index dc6fbf0862..0000000000
--- a/.ci/windows/build-arm64.bat
+++ /dev/null
@@ -1,27 +0,0 @@
-@echo off
-
-REM TODO: make this a shell script...
-
-set chain=%1
-
-if not defined DevEnvDir (
- CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain%
-)
-
-CALL mkdir build
-
-CALL cmake -S . -B build\%chain% ^
--DCMAKE_BUILD_TYPE=Release ^
--DENABLE_QT_TRANSLATION=ON ^
--DUSE_DISCORD_PRESENCE=ON ^
--DYUZU_USE_BUNDLED_QT=ON ^
--DYUZU_USE_QT_MULTIMEDIA=ON ^
--DYUZU_USE_QT_WEB_ENGINE=ON ^
--DYUZU_USE_BUNDLED_VCPKG=ON ^
--DYUZU_USE_BUNDLED_SDL2=OFF ^
--DYUZU_USE_EXTERNAL_SDL2=ON ^
--DYUZU_ENABLE_LTO=ON ^
--G "Ninja" ^
--DYUZU_TESTS=OFF
-
-CALL cmake --build build\%chain%
diff --git a/.ci/windows/build.bat b/.ci/windows/build.bat
deleted file mode 100755
index 19379911ef..0000000000
--- a/.ci/windows/build.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-@echo off
-
-set chain=%1
-set qt_ver=%2
-
-if not defined DevEnvDir (
- CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain%
-)
-
-CALL mkdir build
-
-CALL cmake -S . -B build\%chain% ^
--DCMAKE_BUILD_TYPE=Release ^
--DENABLE_QT_TRANSLATION=ON ^
--DUSE_DISCORD_PRESENCE=ON ^
--DYUZU_USE_BUNDLED_QT=OFF ^
--DYUZU_USE_QT_MULTIMEDIA=ON ^
--DYUZU_USE_QT_WEB_ENGINE=ON ^
--DYUZU_USE_BUNDLED_VCPKG=ON ^
--DYUZU_USE_BUNDLED_SDL2=OFF ^
--DYUZU_USE_EXTERNAL_SDL2=ON ^
--DYUZU_ENABLE_LTO=ON ^
--G "Ninja" ^
--DYUZU_TESTS=OFF ^
--DQt6_DIR=C:/Qt/%qt_ver%/msvc2022_64
-
-CALL cmake --build build\%chain%
-
-set bindir=build/%chain%/bin
-
-CALL C:\Qt\%qt_ver%\msvc2022_64\bin\windeployqt.exe %bindir%/eden.exe --dir %bindir% --libdir %bindir% --plugindir %bindir%/plugins --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0
diff --git a/.ci/windows/package.ps1 b/.ci/windows/package.ps1
deleted file mode 100755
index 4cdc938933..0000000000
--- a/.ci/windows/package.ps1
+++ /dev/null
@@ -1,40 +0,0 @@
-# SPDX-FileCopyrightText: 2025 eden Emulator Project
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-$target=$args[0]
-$debug=$args[1]
-
-$GITDATE = $(git show -s --date=short --format='%ad') -replace "-", ""
-$GITREV = $(git show -s --format='%h')
-$RELEASE_DIST = "eden-windows-msvc"
-$ARTIFACTS_DIR = "artifacts"
-
-New-Item -ItemType Directory -Path $ARTIFACTS_DIR -Force
-New-Item -ItemType Directory -Path $RELEASE_DIST -Force
-
-Copy-Item -Path "build/$target/bin/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue -Force
-
-if ($debug -eq "yes") {
- mkdir -p pdb
- Get-ChildItem -Path "$RELEASE_DIST" -Filter "*.pdb" -Recurse | Move-Item -Destination .\pdb -ErrorAction SilentlyContinue -Force
-
- if (Test-Path -Path ".\pdb\*.pdb") {
- $BUILD_PDB = "eden-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip"
- 7z a -tzip $BUILD_PDB .\pdb\*.pdb
- Move-Item -Path $BUILD_PDB -Destination $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue -Force
- }
-}
-
-if ($debug -ne "yes") {
- Remove-Item "$RELEASE_DIST\*.pdb" -Recurse -ErrorAction SilentlyContinue -Force
-}
-
-Move-Item -Path "$RELEASE_DIST\Release\*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue -Force
-Remove-Item "$RELEASE_DIST\Release" -ErrorAction SilentlyContinue -Force
-
-$BUILD_ZIP = "eden-windows-msvc-$GITDATE-$GITREV.zip"
-7z a -tzip $BUILD_ZIP $RELEASE_DIST\*
-Move-Item -Path $BUILD_ZIP -Destination $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue -Force
-
-Copy-Item "LICENSE*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue
-Copy-Item "README*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue
diff --git a/.ci/windows/qt-envvars.sh b/.ci/windows/qt-envvars.sh
new file mode 100755
index 0000000000..a629682e9e
--- /dev/null
+++ b/.ci/windows/qt-envvars.sh
@@ -0,0 +1,7 @@
+# This is specific to the CI runner and is unlikely to work on your machine.
+QTDIR="/c/Qt/6.9.0/msvc2022_64"
+
+export QT_ROOT_DIR="$QTDIR"
+export QT_PLUGIN_PATH="$QTDIR/plugins"
+export QML2_IMPORT_PATH="$QTDIR/qml"
+export PATH="${PATH}:$QTDIR/bin"
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8cf03bfc6c..15937ed2fc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -70,12 +70,14 @@ jobs:
- name: Configure & Build
shell: bash
- run: DEVEL=true ./.ci/windows/build.sh
+ run: |
+ ./.ci/windows/qt-envvars.sh
+ DEVEL=true ./.ci/windows/build.sh
- name: Package artifacts
shell: bash
run: |
- export PATH="${PATH}:/c/Qt/6.9.0/msvc2022_64/bin"
+ ./.ci/windows/qt-envvars.sh
./.ci/windows/package.sh
- name: Upload Windows artifacts