Hello,
here is my current manifest
{
"app-id": "org.flatpak.AppName",
"runtime": "org.kde.Platform",
"runtime-version": "5.15-21.08",
"sdk": "org.kde.Sdk",
"base": "io.qt.qtwebengine.BaseApp",
"base-version": "5.15-21.08",
"command": "AppName",
"finish-args": [
"--share=ipc",
"--share=network",
"--socket=fallback-x11",
"--socket=wayland",
"--filesystem=host",
"--device=dri",
"--env=QTWEBENGINEPROCESS_PATH=/app/bin/QtWebEngineProcess"
],
"cleanup-commands": [
"/app/cleanup-BaseApp.sh"
],
"modules": [
{
"name": "AppName",
"buildsystem": "cmake",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DFLATPAK=ON"
],
"sources": [
{
"type": "dir",
"path": "../"
}
],
"post-install": [
"install -p -D -m 0644 ../config/config.ini -t ${FLATPAK_DEST}/data/custom/directory/"
]
}
]
}
In CMakeLists.txt, I have written this
if(FLATPAK)
install(FILES ${PROJECT_SOURCE_DIR}/config/config.ini DESTINATION ${CMAKE_INSTALL_PREFIX}/data/custom/directory/)
endif()
Doing so, I would expect that config.ini is copied in $HOME/.var/app/org.flatpak.AppName/data/custom/directory but it is not.
I have created a bundle with these commands:
flatpak-builder build-dir org.flatpak.AppName
flatpak-builder --user --install --subject="Build of AppName software `date`" --force-clean build-dir org.flatpak.AppName
flatpak-builder --repo=repo --force-clean build-dir org.flatpak.AppName
flatpak build-bundle repo/ AppName.flatpak org.flatpak.AppName
When I install the bundle, config.ini is copied in $HOME/.local/share/flatpak/app/org.flatpak.AppName/x86_64/master/ee3755700b7b6209c1df9046af78c3c61ce1c39b2d009d6c8c870a2c6fd2905a/files/data/custom/directory/ while I want it to be in $HOME/.var/app/org.flatpak.AppName/data/custom/directory/.
I’m going round in circles, so thanks in advance to those who have an idea of what’s wrong.