duckstation/scripts/flatpak/org.duckstation.DuckStation.yaml

102 lines
3.2 KiB
YAML
Raw Normal View History

2024-09-01 12:08:31 +00:00
# SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
# SPDX-License-Identifier: CC-BY-NC-ND-4.0
app-id: "org.duckstation.DuckStation"
runtime: "org.kde.Platform"
runtime-version: "6.7"
sdk: "org.kde.Sdk"
sdk-extensions:
- "org.freedesktop.Sdk.Extension.llvm17"
2024-08-12 03:26:43 +00:00
add-extensions:
"org.freedesktop.Platform.ffmpeg-full":
directory: "lib/ffmpeg"
version: "23.08"
2024-08-12 03:26:43 +00:00
add-ld-path: "."
autodownload: true
command: "duckstation-qt"
finish-args:
- "--device=all"
- "--allow=bluetooth"
- "--share=network"
- "--share=ipc"
- "--socket=pulseaudio"
- "--talk-name=org.freedesktop.ScreenSaver"
# Wayland is disabled due to various QtWayland issues, causing broken UI.
- "--socket=x11"
- "--env=QT_QPA_PLATFORM=xcb"
modules:
# Dependencies.
2024-10-26 06:09:52 +00:00
- "modules/10-libbacktrace.yaml"
- "modules/11-libzip.yaml"
- "modules/20-sdl2.yaml"
2024-10-26 06:09:52 +00:00
- "modules/21-shaderc.yaml"
- "modules/22-spirv-cross.yaml"
- "modules/23-cpuinfo.yaml"
- "modules/24-discord-rpc.yaml"
- "modules/25-soundtouch.yaml"
- "modules/26-lunasvg.yaml"
# Main module.
- name: duckstation
buildsystem: cmake-ninja
builddir: true
build-options:
# Preserve debug information, it is needed for backtraces.
strip: false
no-debuginfo: true
# Prevent flatpak defaults of fortify etc from creeping in.
cflags: ""
cflags-override: true
cxxflags: ""
cxxflags-override: true
config-opts:
# Flatpak build does not appear to default to Release.
- "-DCMAKE_BUILD_TYPE=Release"
# We're not running tests as part of the flatpak build.
- "-DBUILD_TESTS=OFF"
# Install to /app/bin, use /app/lib for dependencies.
- "-DALLOW_INSTALL=ON"
- "-DINSTALL_SELF_CONTAINED=OFF"
# Set the page range to 4K-16K. This has no effect on X86, but is required for
# ARM builds, as some devices are now shipping with 16K kernels.
- "-DHOST_MIN_PAGE_SIZE=4096"
- "-DHOST_MAX_PAGE_SIZE=16384"
# Make sure we're using ThinLTO.
- "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON"
- "-DCMAKE_C_COMPILER=/usr/lib/sdk/llvm17/bin/clang"
- "-DCMAKE_CXX_COMPILER=/usr/lib/sdk/llvm17/bin/clang++"
- "-DCMAKE_EXE_LINKER_FLAGS_INIT=-fuse-ld=lld"
- "-DCMAKE_MODULE_LINKER_FLAGS_INIT=-fuse-ld=lld"
- "-DCMAKE_SHARED_LINKER_FLAGS_INIT=-fuse-ld=lld"
sources:
- type: dir
path: ../..
post-install:
# Manually copy desktop file/metadata, it's not done as part of the regular build.
- >-
install -Dm644
"${FLATPAK_BUILDER_BUILDDIR}/scripts/org.duckstation.DuckStation.png"
"${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/org.duckstation.DuckStation.png"
- >-
install -Dm644
"${FLATPAK_BUILDER_BUILDDIR}/scripts/org.duckstation.DuckStation.desktop"
"${FLATPAK_DEST}/share/applications/org.duckstation.DuckStation.desktop"
- >-
install -Dm644
"${FLATPAK_BUILDER_BUILDDIR}/scripts/flatpak/org.duckstation.DuckStation.metainfo.xml"
"${FLATPAK_DEST}/share/metainfo/org.duckstation.DuckStation.metainfo.xml"
2024-08-12 03:26:43 +00:00
# Ensure ffmpeg-full mount point exists.
- "mkdir -p \"${FLATPAK_DEST}/lib/ffmpeg\""