diff --git a/.github/workflows/linux-qt.yml b/.github/workflows/linux-qt.yml index 6848f203b..fc9755fa4 100644 --- a/.github/workflows/linux-qt.yml +++ b/.github/workflows/linux-qt.yml @@ -25,10 +25,10 @@ jobs: run: > sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev - - name: Cache CMake dependency source code + - name: Cache CMake Configuration uses: actions/cache@v4 env: - cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources + cache-name: ${{ runner.os }}-qt-cache-cmake-configuration with: path: | ${{github.workspace}}/build @@ -36,16 +36,16 @@ jobs: restore-keys: | ${{ env.cache-name }}- - - name: Cache CMake dependency build objects + - name: Cache CMake Build uses: hendrikmuhs/ccache-action@v1.2.14 env: - cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-builds + cache-name: ${{ runner.os }}-qt-cache-cmake-build with: append-timestamp: false key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d4402472a..27bb8a401 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,10 +25,10 @@ jobs: run: > sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential - - name: Cache CMake dependency source code + - name: Cache CMake Configuration uses: actions/cache@v4 env: - cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-sources + cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration with: path: | ${{github.workspace}}/build @@ -36,16 +36,16 @@ jobs: restore-keys: | ${{ env.cache-name }}- - - name: Cache CMake dependency build objects + - name: Cache CMake Build uses: hendrikmuhs/ccache-action@v1.2.14 env: - cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-builds + cache-name: ${{ runner.os }}-sdl-cache-cmake-build with: append-timestamp: false key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel diff --git a/.github/workflows/macos-qt.yml b/.github/workflows/macos-qt.yml index beb927a79..4cbfb9652 100644 --- a/.github/workflows/macos-qt.yml +++ b/.github/workflows/macos-qt.yml @@ -40,10 +40,10 @@ jobs: arch: clang_64 archives: qtbase qttools - - name: Cache CMake dependency source code + - name: Cache CMake Configuration uses: actions/cache@v4 env: - cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources + cache-name: ${{ runner.os }}-qt-cache-cmake-configuration with: path: | ${{github.workspace}}/build @@ -51,10 +51,10 @@ jobs: restore-keys: | ${{ env.cache-name }}- - - name: Cache CMake dependency build objects + - name: Cache CMake Build uses: hendrikmuhs/ccache-action@v1.2.14 env: - cache-name: ${{runner.os}}-qt-cache-cmake-dependency-builds + cache-name: ${{runner.os}}-qt-cache-cmake-build with: append-timestamp: false create-symlink: true @@ -62,7 +62,7 @@ jobs: variant: sccache - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9526c6fd6..99c85b7b8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -31,10 +31,10 @@ jobs: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" arch -x86_64 /usr/local/bin/brew install molten-vk - - name: Cache CMake dependency source code + - name: Cache CMake Configuration uses: actions/cache@v4 env: - cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-sources + cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration with: path: | ${{github.workspace}}/build @@ -42,10 +42,10 @@ jobs: restore-keys: | ${{ env.cache-name }}- - - name: Cache CMake dependency build objects + - name: Cache CMake Build uses: hendrikmuhs/ccache-action@v1.2.14 env: - cache-name: ${{runner.os}}-sdl-cache-cmake-dependency-builds + cache-name: ${{runner.os}}-sdl-cache-cmake-build with: append-timestamp: false create-symlink: true @@ -53,7 +53,7 @@ jobs: variant: sccache - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu) diff --git a/.github/workflows/windows-qt.yml b/.github/workflows/windows-qt.yml index fee202b5c..65faa7507 100644 --- a/.github/workflows/windows-qt.yml +++ b/.github/workflows/windows-qt.yml @@ -30,10 +30,10 @@ jobs: arch: win64_msvc2019_64 archives: qtbase qttools - - name: Cache CMake dependency source code + - name: Cache CMake Configuration uses: actions/cache@v4 env: - cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources + cache-name: ${{ runner.os }}-qt-ninja-cache-cmake-configuration with: path: | ${{github.workspace}}/build @@ -41,8 +41,21 @@ jobs: restore-keys: | ${{ env.cache-name }}- + - name: Cache CMake Build + uses: hendrikmuhs/ccache-action@v1.2.14 + env: + cache-name: ${{ runner.os }}-qt-cache-cmake-build + with: + append-timestamp: false + key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + + - name: Setup VS Environment + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: amd64 + - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL -DENABLE_QT_GUI=ON + run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel @@ -50,8 +63,8 @@ jobs: - name: Deploy run: | mkdir upload - move build/Release/shadPS4.exe upload - windeployqt --dir upload upload/shadPS4.exe + move build/shadPS4.exe upload + windeployqt --no-compiler-runtime --no-system-d3d-compiler --no-system-dxc-compiler --dir upload upload/shadPS4.exe - name: Get date and git hash id: vars diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4bea63b16..9c65a7444 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -20,10 +20,10 @@ jobs: with: submodules: recursive - - name: Cache CMake dependency source code + - name: Cache CMake Configuration uses: actions/cache@v4 env: - cache-name: ${{ runner.os }}-sdl-cache-cmake-dependency-sources + cache-name: ${{ runner.os }}-sdl-ninja-cache-cmake-configuration with: path: | ${{github.workspace}}/build @@ -31,8 +31,21 @@ jobs: restore-keys: | ${{ env.cache-name }}- + - name: Cache CMake Build + uses: hendrikmuhs/ccache-action@v1.2.14 + env: + cache-name: ${{ runner.os }}-sdl-cache-cmake-build + with: + append-timestamp: false + key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + + - name: Setup VS Environment + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: amd64 + - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL + run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel @@ -49,4 +62,4 @@ jobs: with: name: shadps4-win64-sdl-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }} path: | - ${{github.workspace}}/build/Release/shadPS4.exe + ${{github.workspace}}/build/shadPS4.exe diff --git a/CMakeLists.txt b/CMakeLists.txt index 348d7ba9b..b334f5940 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,11 @@ else() message(FATAL_ERROR "Unsupported CPU architecture: ${BASE_ARCHITECTURE}") endif() +if (APPLE AND ARCHITECTURE STREQUAL "x86_64") + # Exclude ARM homebrew path to avoid conflicts when cross compiling. + list(APPEND CMAKE_IGNORE_PREFIX_PATH "/opt/homebrew") +endif() + # This function should be passed a list of all files in a target. It will automatically generate file groups # following the directory hierarchy, so that the layout of the files in IDEs matches the one in the filesystem. function(create_target_directory_groups target_name) @@ -227,11 +232,18 @@ set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp src/core/libraries/system/msgdialog_ui.cpp src/core/libraries/system/posix.cpp src/core/libraries/system/posix.h - src/core/libraries/save_data/error_codes.h + src/core/libraries/save_data/save_backup.cpp + src/core/libraries/save_data/save_backup.h + src/core/libraries/save_data/save_instance.cpp + src/core/libraries/save_data/save_instance.h + src/core/libraries/save_data/save_memory.cpp + src/core/libraries/save_data/save_memory.h src/core/libraries/save_data/savedata.cpp src/core/libraries/save_data/savedata.h - src/core/libraries/system/savedatadialog.cpp - src/core/libraries/system/savedatadialog.h + src/core/libraries/save_data/dialog/savedatadialog.cpp + src/core/libraries/save_data/dialog/savedatadialog.h + src/core/libraries/save_data/dialog/savedatadialog_ui.cpp + src/core/libraries/save_data/dialog/savedatadialog_ui.h src/core/libraries/system/sysmodule.cpp src/core/libraries/system/sysmodule.h src/core/libraries/system/systemservice.cpp @@ -344,6 +356,7 @@ set(COMMON src/common/logging/backend.cpp src/common/concepts.h src/common/config.cpp src/common/config.h + src/common/cstring.h src/common/debug.h src/common/disassembler.cpp src/common/disassembler.h @@ -602,6 +615,7 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp set(IMGUI src/imgui/imgui_config.h src/imgui/imgui_layer.h src/imgui/imgui_std.h + src/imgui/imgui_texture.h src/imgui/layer/video_info.cpp src/imgui/layer/video_info.h src/imgui/renderer/imgui_core.cpp @@ -610,6 +624,8 @@ set(IMGUI src/imgui/imgui_config.h src/imgui/renderer/imgui_impl_sdl3.h src/imgui/renderer/imgui_impl_vulkan.cpp src/imgui/renderer/imgui_impl_vulkan.h + src/imgui/renderer/texture_manager.cpp + src/imgui/renderer/texture_manager.h ) set(INPUT src/input/controller.cpp diff --git a/README.md b/README.md index 2127a5791..1be14c4fa 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-2.0-or-later