diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b5690438cf..b85bc432323 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -143,7 +143,7 @@ jobs: arch: amd64 - name: Configure CMake - run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DENABLE_UPDATER=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=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 $env:NUMBER_OF_PROCESSORS @@ -257,7 +257,7 @@ jobs: variant: sccache - name: Configure CMake - run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=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 -DENABLE_UPDATER=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=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) @@ -360,7 +360,7 @@ jobs: key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} - name: Configure CMake - run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DENABLE_UPDATER=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_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON -DENABLE_UPDATER=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) @@ -376,9 +376,30 @@ jobs: name: shadps4-linux-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }} path: Shadps4-qt.AppImage + linux-flatpak: + runs-on: ubuntu-24.04 + needs: get-info + container: + image: bilelmoussaoui/flatpak-github-actions:kde-6.7 + options: --privileged + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + - uses: flatpak/flatpak-github-actions/flatpak-builder@master + with: + manifest-path: net.shadps4.shadPS4.yaml + cache-key: flatpak-builder-${{ github.sha }} + bundle: shadps4.flatpak + upload-artifact: false + - uses: actions/upload-artifact@v4 + with: + path: shadps4.flatpak + name: shadps4-linux-flatpak-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }} + pre-release: if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push' - needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt] + needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt, linux-flatpak] runs-on: ubuntu-latest steps: - name: Download all artifacts diff --git a/.gitignore b/.gitignore index 683f6f0a6ef..a245bbc26a0 100644 --- a/.gitignore +++ b/.gitignore @@ -418,3 +418,9 @@ FodyWeavers.xsd # JetBrains .idea cmake-build-* + +# flatpak build +builddir +.flatpak-builder +repo +*.flatpak \ No newline at end of file diff --git a/net.shadps4.shadPS4.yaml b/net.shadps4.shadPS4.yaml new file mode 100644 index 00000000000..77de8aa8e97 --- /dev/null +++ b/net.shadps4.shadPS4.yaml @@ -0,0 +1,64 @@ +# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +# SPDX-License-Identifier: GPL-2.0-or-later + +id: net.shadps4.shadPS4 +runtime: org.kde.Platform +runtime-version: '6.8' +sdk: org.kde.Sdk +command: shadps4 +separate-locales: false +finish-args: + - --share=network + - --socket=pulseaudio + - --socket=wayland + - --socket=fallback-x11 + - --allow=bluetooth + - --filesystem=home + - --device=dri + - --device=input + - --filesystem=/media + - --filesystem=/run/media + - --talk-name=org.kde.StatusNotifierWatcher +sdk-extensions: + - org.freedesktop.Sdk.Extension.llvm18 +add-extensions: + org.freedesktop.Platform.ffmpeg-full: + directory: lib/ffmpeg + add-ld-path: . + version: '24.08' + autodownload: true + autodelete: false +cleanup-commands: + - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg +modules: + - name: rapidjson + buildsystem: cmake + config-opts: + - -DRAPIDJSON_BUILD_CXX11=OFF + - -DRAPIDJSON_BUILD_TESTS=OFF + sources: + - type: git + url: https://github.com/Tencent/rapidjson.git + commit: 858451e5b7d1c56cf8f6d58f88cf958351837e53 + cleanup: + - '*' + - name: shadPS4 + buildsystem: cmake + builddir: true + build-options: + append-path: /usr/lib/sdk/llvm18/bin + prepend-ld-library-path: /usr/lib/sdk/llvm18/lib + config-opts: + - -DCMAKE_BUILD_TYPE=RelWithDebInfo + - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO=ON + - -DENABLE_QT_GUI=ON + - -DENABLE_UPDATER=OFF + - -DCMAKE_C_COMPILER=clang + - -DCMAKE_CXX_COMPILER=clang++ + - -DCMAKE_C_COMPILER_LAUNCHER=ccache + - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + - -DCMAKE_C_FLAGS_RELWITHDEBINFO=-march=native -O3 -DNDEBUG + - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-march=native -O3 -DNDEBUG + sources: + - type: dir + path: .