-
Notifications
You must be signed in to change notification settings - Fork 93
Description
Previously during my AppImage build I was creating a portable home and config directory, manually loading my required files there, then bundling those directories along with the AppImage as a zip. I don't believe this is the best practice so attempting a different approach in order to have everything in a single file.
This is a cmake project and I have initially followed this tutorial: https://www.codeintrinsic.com/create-appimage-with-linuxdeploy-and-cmake/
I am struggling to get my AppImage to find files that are contained within the AppImage. I am probably missing something simple, but haven't been able to find an answer by searching for the past 2 days. Any guidance would be appreciated.
I have 3 main cmake variables that are of interest.
- CMAKE_INSTALL_PREFIX
- SUNSHINE_ASSETS_DIR (should be read only)
- SUNSHINE_CONFIG_DIR (ideally user would have write access)
I've attempted several combinations but have yet to get the AppImage to run properly. I'll only show the config directory in this table for simplification.
Trial 1:
run: https://github.com/SunshineStream/Sunshine/actions/runs/2328210056
CMAKE_INSTALL_PREFIX = /usr
SUNSHINE_CONFIG_DIR = config
where program looks for config = config
config dir location in AppDir = usr/config (however folder is empty)
./sunshine.AppImage finds config = ❌
extract, then AppRun finds config = ❌
where program attempts to save config = n/a
Trial 2:
run: https://github.com/SunshineStream/Sunshine/actions/runs/2328317061
CMAKE_INSTALL_PREFIX = /usr/local/sunshine
SUNSHINE_CONFIG_DIR = config
where program looks for config = config
config dir location in AppDir = usr/local/sunshine/config (files present unlike Trial 1)
./sunshine.AppImage finds config = ❌
extract, then AppRun finds config = ❌
where program attempts to save config = n/a
Trial 3:
run: https://github.com/SunshineStream/Sunshine/actions/runs/2328361321
CMAKE_INSTALL_PREFIX = /
SUNSHINE_CONFIG_DIR = usr/local/sunshine/config
where program looks for config = usr/local/sunshine/config
config dir location in AppDir = usr/local/sunshine/config
./sunshine.AppImage finds config = ❌
extract, then AppRun finds config = ✅
where program attempts to save config = ~/.config/sunshine/usr/local/sunshine/config (fails to save anything here, but folder is created)
Trial 4:
run: https://github.com/SunshineStream/Sunshine/actions/runs/2328397391
CMAKE_INSTALL_PREFIX = .
SUNSHINE_CONFIG_DIR = usr/local/sunshine/config
where program looks for config = usr/local/sunshine/config
config dir location in AppDir = home/runner/work/Sunshine/Sunshine/build/usr/local/sunshine/config
./sunshine.AppImage finds config = ❌
extract, then AppRun finds config = ❌
where program attempts to save config = n/a