use cmake for windows build

This commit is contained in:
DH 2025-04-04 03:25:27 +03:00
parent ba2c3a8ba5
commit e541fe7571
4 changed files with 13 additions and 6 deletions

View file

@ -15,6 +15,7 @@ mkdir ./rpcs3/bin/config
mkdir ./rpcs3/bin/config/input_configs
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./rpcs3/bin/config/input_configs/gamecontrollerdb.txt
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./rpcs3/bin/GuiConfigs/compat_database.dat
cp -rf ./rpcs3/build/bin/ ./rpcs3/bin/
# Download SSL certificate (not needed with CURLSSLOPT_NATIVE_CA)
#curl -fsSL 'https://curl.haxx.se/ca/cacert.pem' 1> ./bin/cacert.pem

View file

@ -19,8 +19,8 @@ QT_DECL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtdeclarative${QT_SUFFIX}"
QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}"
QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}"
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
# LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
# GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.11.2/ccache-4.11.2-windows-x86_64.zip"
@ -41,7 +41,7 @@ DEP_URLS=" \
# Pull all the submodules except llvm, since it is built separately and we just download that build
# Note: Tried to use git submodule status, but it takes over 20 seconds
# shellcheck disable=SC2046
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/FAudio/ && !/llvm/ { print $3 }' .gitmodules)
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/FAudio/ { print $3 }' .gitmodules)
# Git bash doesn't have rev, so here it is
rev()

View file

@ -104,7 +104,6 @@ jobs:
fetch-depth: 0
- name: Setup env
shell: pwsh
run: |
echo "QTDIR=C:\Qt\${{ env.QT_VER }}\${{ env.QT_VER_MSVC }}_64" >> ${{ github.env }}
echo "VULKAN_SDK=C:\VulkanSDK\${{ env.VULKAN_VER }}" >> ${{ github.env }}
@ -141,8 +140,10 @@ jobs:
uses: microsoft/setup-msbuild@main
- name: Compile RPCS3
shell: pwsh
run: msbuild rpcs3/rpcs3.sln /p:Configuration=Release /v:minimal /p:Platform=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\rpcs3\buildfiles\msvc\ci_only.targets"
run: |
cd rpcs3
cmake --preset msvc -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DQt6_DIR="$QTDIR"
cmake --build --preset msvc-release
- name: Pack up build artifacts
run: |

View file

@ -5,6 +5,11 @@ if (NOT USE_SYSTEM_LIBPNG)
set(PNG_SHARED OFF CACHE BOOL "Build shared lib")
set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
set(SKIP_INSTALL_ALL ON)
if (NOT USE_SYSTEM_ZLIB AND MSVC)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} /I${CMAKE_CURRENT_BINARY_DIR}/../zlib/zlib /I${CMAKE_CURRENT_SOURCE_DIR}/../zlib/zlib)
endif()
add_subdirectory(libpng EXCLUDE_FROM_ALL)
target_include_directories(png_static INTERFACE "${libpng_BINARY_DIR}" "${libpng_SOURCE_DIR}")