Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
stenzek
GitHub Repository: stenzek/duckstation
Path: blob/master/scripts/packaging/flatpak/org.duckstation.DuckStation.yaml
4251 views
1
# SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <[email protected]>
2
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
3
4
app-id: "org.duckstation.DuckStation"
5
runtime: "org.kde.Platform"
6
runtime-version: "6.9"
7
sdk: "org.kde.Sdk"
8
sdk-extensions:
9
- "org.freedesktop.Sdk.Extension.llvm19"
10
11
command: "duckstation-qt"
12
13
finish-args:
14
- "--device=all"
15
- "--allow=bluetooth"
16
- "--share=network"
17
- "--share=ipc"
18
- "--socket=pulseaudio"
19
- "--talk-name=org.freedesktop.ScreenSaver"
20
- "--socket=wayland"
21
- "--socket=fallback-x11"
22
23
modules:
24
# Dependencies.
25
- name: duckstation-deps
26
buildsystem: simple
27
sources:
28
- type: file
29
path: ../../deps/build-dependencies-linux.sh
30
- type: file
31
path: ../../deps/versions
32
build-options:
33
# Don't need debug info for deps, match AppImage.
34
strip: true
35
no-debuginfo: true
36
37
# Prevent flatpak defaults of fortify etc from creeping in.
38
cflags: ""
39
cflags-override: true
40
cxxflags: ""
41
cxxflags-override: true
42
43
# Need network access to download sources.
44
build-args:
45
- "--share=network"
46
build-commands:
47
- "./build-dependencies-linux.sh -system-freetype -system-harfbuzz -system-libjpeg -system-libpng -system-libwebp -system-zlib -system-zstd -system-qt /app/deps"
48
cleanup:
49
- "*"
50
51
# Main module.
52
- name: duckstation
53
buildsystem: cmake-ninja
54
builddir: true
55
build-options:
56
# Preserve debug information, it is needed for backtraces.
57
strip: false
58
no-debuginfo: true
59
60
# Prevent flatpak defaults of fortify etc from creeping in.
61
cflags: ""
62
cflags-override: true
63
cxxflags: ""
64
cxxflags-override: true
65
66
config-opts:
67
# Flatpak build does not appear to default to Release.
68
- "-DCMAKE_BUILD_TYPE=Release"
69
70
# Dependencies path.
71
- "-DCMAKE_PREFIX_PATH=/app/deps"
72
73
# Self-contained install, need to change the directory.
74
# Typical flatpak garbage makes it a pain to change the path from /app/bin...
75
- "-DCMAKE_INSTALL_PREFIX=/app/bin"
76
- "-DALLOW_INSTALL=ON"
77
78
# We're not running tests as part of the flatpak build.
79
- "-DBUILD_TESTS=OFF"
80
81
# Set the page range to 4K-16K. This has no effect on X86, but is required for
82
# ARM builds, as some devices are now shipping with 16K kernels.
83
- "-DHOST_MIN_PAGE_SIZE=4096"
84
- "-DHOST_MAX_PAGE_SIZE=16384"
85
86
# Make sure we're using ThinLTO.
87
- "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
88
- "-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm19/bin/clang"
89
- "-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm19/bin/clang++"
90
- "-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld"
91
- "-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld"
92
- "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld"
93
sources:
94
- type: dir
95
path: ../../..
96
97
post-install:
98
# Manually copy desktop file/metadata, it's not done as part of the regular build.
99
- >-
100
install -Dm644
101
"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/org.duckstation.DuckStation.png"
102
"${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/org.duckstation.DuckStation.png"
103
- >-
104
install -Dm644
105
"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/org.duckstation.DuckStation.desktop"
106
"${FLATPAK_DEST}/share/applications/org.duckstation.DuckStation.desktop"
107
- >-
108
install -Dm644
109
"${FLATPAK_BUILDER_BUILDDIR}/scripts/packaging/flatpak/org.duckstation.DuckStation.metainfo.xml"
110
"${FLATPAK_DEST}/share/metainfo/org.duckstation.DuckStation.metainfo.xml"
111
112
113