From e1461067ebeed2dfc1284d4826e5902c335b4d18 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 13 Jul 2025 08:59:53 +0200 Subject: [PATCH] Deploy --- .ci/build-windows-clang-cl.ps1 | 11 +++++------ .github/workflows/rpcs3.yml | 5 ++++- rpcs3/CMakeLists.txt | 25 ++++++++++++++++++++----- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.ci/build-windows-clang-cl.ps1 b/.ci/build-windows-clang-cl.ps1 index c7a8a0bbad..802a326c8e 100644 --- a/.ci/build-windows-clang-cl.ps1 +++ b/.ci/build-windows-clang-cl.ps1 @@ -19,6 +19,7 @@ if (-not $clangBuiltinsLibPath) { Write-Error "Could not find clang_rt.builtins-x86_64.lib in LLVM installation." exit 1 } + function Get-ShortPath([string]$path) { $fso = New-Object -ComObject Scripting.FileSystemObject return $fso.GetFolder($path).ShortPath @@ -53,8 +54,9 @@ Write-Host "Found mt.exe at: $mtExePath" $VcpkgRoot="$(Get-Location)/vcpkg" $VcpkgTriplet=$env:VCPKG_TRIPLET -$VcpkgInclude="$VcpkgRoot/installed/$VcpkgTriplet/include" -$VcpkgLib="$VcpkgRoot/installed/$VcpkgTriplet/lib" +$VcpkgInstall="$VcpkgRoot/installed/$VcpkgTriplet" +$VcpkgInclude="$VcpkgInstall/include" +$VcpkgLib="$VcpkgInstall/lib" # Configure git safe directory Write-Host "Configuring git safe directory" @@ -97,6 +99,7 @@ Write-Host "Running CMake configuration" -DCMAKE_MT="$mtExePath" ` -DUSE_NATIVE_INSTRUCTIONS=OFF ` -DUSE_PRECOMPILED_HEADERS=OFF ` + -DVCPKG_INSTALL_DIR="$VcpkgInstall" ` -DVCPKG_TARGET_TRIPLET="$VcpkgTriplet" ` -DFFMPEG_INCLUDE_DIR="$VcpkgInclude" ` -DFFMPEG_LIBAVCODEC="$VcpkgLib/avcodec.lib" ` @@ -133,7 +136,3 @@ Write-Host "Build succeeded" # Go back to root directory Set-Location .. Write-Host "Returned to root directory: $(Get-Location)" - -# Deploy if build succeeded -Write-Host "Running deployment script" -& .ci/deploy-windows-clang-cl.sh x86_64 diff --git a/.github/workflows/rpcs3.yml b/.github/workflows/rpcs3.yml index 54791a5184..5483ff6d74 100644 --- a/.github/workflows/rpcs3.yml +++ b/.github/workflows/rpcs3.yml @@ -488,12 +488,15 @@ jobs: powershell -ExecutionPolicy Bypass -File .ci/build-windows-clang-cl.ps1 - name: Save build Ccache - if: github.ref == 'refs/heads/master' + if: always() uses: actions/cache/save@main with: path: ${{ env.CCACHE_DIR }} key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }} + - name: Deploy RPCS3 + run: .ci/deploy-windows-clang-cl.sh x86_64 + - name: Upload artifacts uses: actions/upload-artifact@main with: diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index b1d10d38eb..41d4bfd3c4 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -156,11 +156,26 @@ if (NOT ANDROID) add_custom_command(TARGET rpcs3 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $/Icons COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $/GuiConfigs - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/test $/test - COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt - --no-translations --no-system-d3d-compiler --no-system-dxc-compiler --no-quick-import - --plugindir "$,$/plugins,$/share/qt6/plugins>" - --verbose 0 "$") + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/test $/test) + + if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + message(STATUS "Using clang-cl: copying Qt DLLs from vcpkg manually") + set(QT_DLLS Qt6Core.dll Qt6Gui.dll Qt6Widgets.dll Qt6Concurrent.dll Qt6Multimedia.dll Qt6MultimediaWidgets.dll Qt6Svg.dll Qt6SvgWidgets.dll) + + foreach(dll IN LISTS QT_DLLS) + add_custom_command(TARGET rpcs3 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${VCPKG_INSTALL_DIR}/bin/${dll}" + "$/${dll}") + endforeach() + else() + message(STATUS "Using windeployqt") + add_custom_command(TARGET rpcs3 POST_BUILD + COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt + --no-translations --no-system-d3d-compiler --no-system-dxc-compiler --no-quick-import + --plugindir "$/qt6/plugins" + --verbose 0 "$") + endif() endif() # Unix installation