Attempt to get flatpak builds working

This commit is contained in:
fn2006 2023-06-09 16:20:36 +01:00
parent 392822ec7a
commit a13d3f4a38
3 changed files with 33 additions and 8 deletions

View File

@ -564,3 +564,28 @@ jobs:
shell: msys2 {0}
run: |
ccache -s
flatpak:
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-22.08
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v3
if: inputs.build_type == 'Release'
with:
submodules: 'true'
- name: Build Flatpak (Linux)
if: inputs.build_type == 'Release'
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: "PollyMC.flatpak"
manifest-path: flatpak/org.fn2006.PollyMC.yml
- name: Upload AppImage (Linux)
if: runner.os == 'Linux' && matrix.qt_ver != 5
uses: actions/upload-artifact@v3
with:
name: PollyMC-${{ env.VERSION }}-x86_64.flatpak
path: PollyMC.flatpak

View File

@ -1,4 +1,4 @@
id: org.prismlauncher.PrismLauncher
id: org.fn2006.PollyMC
runtime: org.kde.Platform
runtime-version: "5.15-22.08"
sdk: org.kde.Sdk
@ -13,7 +13,7 @@ add-extensions:
autodelete: false
directory: utils/gamescope
command: prismlauncher
command: pollymc
finish-args:
- --share=ipc
- --socket=x11
@ -27,11 +27,11 @@ finish-args:
- --filesystem=xdg-download:ro
modules:
- name: prismlauncher
- name: pollymc
buildsystem: cmake-ninja
config-opts:
- -DLauncher_BUILD_PLATFORM=flatpak
- -DCMAKE_BUILD_TYPE=Debug
- -DCMAKE_BUILD_TYPE=Release
- -DLauncher_QT_VERSION_MAJOR=5
build-options:
env:
@ -76,10 +76,10 @@ modules:
build-commands:
- mkdir -p /app/utils/gamescope
- install -Dm755 prime-run /app/bin/prime-run
- mv /app/bin/prismlauncher /app/bin/prismrun
- install -Dm755 prismlauncher /app/bin/prismlauncher
- mv /app/bin/pollymc /app/bin/pollyrun
- install -Dm755 pollymc /app/bin/pollymc
sources:
- type: file
path: ../flatpak/prime-run
- type: file
path: ../flatpak/prismlauncher
path: ../flatpak/pollymc

View File

@ -8,4 +8,4 @@ done
export PATH="${PATH}${PATH:+:}/app/utils/gamescope/bin:/usr/lib/extensions/vulkan/MangoHud/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/lib/extensions/vulkan/MangoHud/\$LIB/"
exec /app/bin/prismrun "$@"
exec /app/bin/pollyrun "$@"