Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #456 from DioEgizio/flatpak-build
closes #62
- Loading branch information
Showing
4 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
id: org.prismlauncher.PrismLauncher | ||
runtime: org.kde.Platform | ||
runtime-version: "5.15-22.08" | ||
sdk: org.kde.Sdk | ||
sdk-extensions: | ||
- org.freedesktop.Sdk.Extension.openjdk17 | ||
- org.freedesktop.Sdk.Extension.openjdk8 | ||
add-extensions: | ||
com.valvesoftware.Steam.Utility.gamescope: | ||
version: stable | ||
add-ld-path: lib | ||
no-autodownload: true | ||
autodelete: false | ||
directory: utils/gamescope | ||
|
||
command: prismlauncher | ||
finish-args: | ||
- --share=ipc | ||
- --socket=x11 | ||
- --socket=wayland | ||
- --device=all | ||
- --share=network | ||
- --socket=pulseaudio | ||
# for Discord RPC mods | ||
- --filesystem=xdg-run/app/com.discordapp.Discord:create | ||
# Mod drag&drop | ||
- --filesystem=xdg-download:ro | ||
|
||
modules: | ||
- name: prismlauncher | ||
buildsystem: cmake-ninja | ||
config-opts: | ||
- -DLauncher_BUILD_PLATFORM=flatpak | ||
- -DCMAKE_BUILD_TYPE=Debug | ||
build-options: | ||
env: | ||
JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17 | ||
JAVA_COMPILER: /usr/lib/sdk/openjdk17/jvm/openjdk-17/bin/javac | ||
sources: | ||
- type: dir | ||
path: ../ | ||
- name: openjdk | ||
buildsystem: simple | ||
build-commands: | ||
- mkdir -p /app/jdk/ | ||
- /usr/lib/sdk/openjdk17/install.sh | ||
- mv /app/jre /app/jdk/17 | ||
- /usr/lib/sdk/openjdk8/install.sh | ||
- mv /app/jre /app/jdk/8 | ||
cleanup: [/jre] | ||
- name: xrandr | ||
buildsystem: autotools | ||
sources: | ||
- type: archive | ||
url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.1.tar.xz | ||
sha256: 7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762 | ||
cleanup: [/share/man, /bin/xkeystone] | ||
- name: gamemode | ||
buildsystem: meson | ||
config-opts: | ||
- -Dwith-sd-bus-provider=no-daemon | ||
- -Dwith-examples=false | ||
post-install: | ||
# gamemoderun is installed for users who want to use wrapper commands | ||
# post-install is running inside the build dir, we need it from the source though | ||
- install -Dm755 ../data/gamemoderun -t /app/bin | ||
sources: | ||
- type: git | ||
url: https://github.com/FeralInteractive/gamemode | ||
tag: "1.7" | ||
commit: 4dc99dff76218718763a6b07fc1900fa6d1dafd9 | ||
- name: enhance | ||
buildsystem: simple | ||
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 | ||
sources: | ||
- type: file | ||
path: ../flatpak/prime-run | ||
- type: file | ||
path: ../flatpak/prismlauncher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
export __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
# discord RPC | ||
for i in {0..9}; do | ||
test -S "$XDG_RUNTIME_DIR"/discord-ipc-"$i" || ln -sf {app/com.discordapp.Discord,"$XDG_RUNTIME_DIR"}/discord-ipc-"$i"; | ||
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 "$@" |