aboutsummaryrefslogtreecommitdiff
path: root/flatpak/org.prismlauncher.PrismLauncher.yml
blob: a9b9762f52cf736a9a5d4a570c14d4c8f139b1f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
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

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

cleanup:
  - /lib/libGLU*

modules:
  # Might be needed by some Controller mods (see https://github.com/isXander/Controlify/issues/31)
  - shared-modules/libusb/libusb.json

  # Needed for proper Wayland support
  - libdecor.json

  - name: prismlauncher
    buildsystem: cmake-ninja
    builddir: true
    config-opts:
      - -DLauncher_BUILD_PLATFORM=flatpak
      - -DCMAKE_BUILD_TYPE=RelWithDebInfo
      - -DLauncher_QT_VERSION_MAJOR=5
    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: glfw
    buildsystem: cmake-ninja
    config-opts:
      - -DCMAKE_BUILD_TYPE=RelWithDebInfo
      - -DBUILD_SHARED_LIBS:BOOL=ON
      - -DGLFW_USE_WAYLAND=ON
    sources:
      - type: git
        url: https://github.com/glfw/glfw.git
        commit: 3fa2360720eeba1964df3c0ecf4b5df8648a8e52
      - type: patch
        path: patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
      - type: patch
        path: patches/0005-Add-warning-about-being-an-unofficial-patch.patch
      - type: patch
        path: patches/0007-Platform-Prefer-Wayland-over-X11.patch
    cleanup:
      - /include
      - /lib/cmake
      - /lib/pkgconfig

  - name: xrandr
    buildsystem: autotools
    sources:
      - type: archive
        url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.2.tar.xz
        sha256: c8bee4790d9058bacc4b6246456c58021db58a87ddda1a9d0139bf5f18f1f240
        x-checker-data:
          type: anitya
          project-id: 14957
          stable-only: true
          url-template: https://xorg.freedesktop.org/archive/individual/app/xrandr-$version.tar.xz
    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: archive
        archive-type: tar-gzip
        url: https://api.github.com/repos/FeralInteractive/gamemode/tarball/1.7
        sha256: 57ce73ba605d1cf12f8d13725006a895182308d93eba0f69f285648449641803
        x-checker-data:
          type: json
          url: https://api.github.com/repos/FeralInteractive/gamemode/releases/latest
          version-query: .tag_name
          url-query: .tarball_url
          timestamp-query: .published_at
    cleanup:
      - /include
      - /lib/pkgconfig
      - /lib/libgamemodeauto.a

  - name: glxinfo
    buildsystem: meson
    config-opts:
      - --bindir=/app/mesa-demos
      - -Degl=disabled
      - -Dglut=disabled
      - -Dosmesa=disabled
      - -Dvulkan=disabled
      - -Dwayland=disabled
    post-install:
      - mv -v /app/mesa-demos/glxinfo /app/bin
    sources:
      - type: archive
        url: https://archive.mesa3d.org/demos/mesa-demos-9.0.0.tar.xz
        sha256: 3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b
        x-checker-data:
          type: anitya
          project-id: 16781
          stable-only: true
          url-template: https://archive.mesa3d.org/demos/mesa-demos-$version.tar.xz
    cleanup:
      - /include
      - /mesa-demos
      - /share
    modules:
      - shared-modules/glu/glu-9.json

  - name: enhance
    buildsystem: simple
    build-commands:
      - 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: prime-run
      - type: file
        path: prismlauncher