mirror of
https://github.com/Vita3K/Vita3K-Android.git
synced 2024-11-26 23:10:39 +00:00
io/appimage: Correctly handle appdir for static and shared assets
This commit is contained in:
parent
072e9192ea
commit
201777fac6
@ -108,13 +108,23 @@
|
||||
{
|
||||
"name": "linux-ninja-clang15-appimage",
|
||||
"inherits": "linux-ninja-clang15",
|
||||
"displayName": "Linux AppImage with Ninja and Clang",
|
||||
"displayName": "Linux AppImage with Ninja and Clang 15",
|
||||
"description": "Linux AppImage build using Ninja Multi-Config generator and Clang 15 compiler",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_PREFIX": "/usr",
|
||||
"BUILD_APPIMAGE": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-ninja-clang-appimage",
|
||||
"inherits": "linux-ninja-clang",
|
||||
"displayName": "Linux AppImage with Ninja and Clang",
|
||||
"description": "Linux AppImage build using Ninja Multi-Config generator and Clang compiler",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_PREFIX": "/usr",
|
||||
"BUILD_APPIMAGE": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-ninja-gnu",
|
||||
"inherits": "linux-ninja",
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
if [ "${APPIMAGE}" != "" ]; then
|
||||
XDG_DATA_DIRS="${APPDIR}/usr/share:${XDG_DATA_DIRS}" "${APPDIR}/usr/bin/Vita3K" $@
|
||||
"${APPDIR}/usr/bin/Vita3K" $@
|
||||
fi
|
||||
|
@ -123,6 +123,7 @@ void init_paths(Root &root_paths) {
|
||||
auto XDG_DATA_HOME = getenv("XDG_DATA_HOME");
|
||||
auto XDG_CACHE_HOME = getenv("XDG_CACHE_HOME");
|
||||
auto XDG_CONFIG_HOME = getenv("XDG_CONFIG_HOME");
|
||||
auto APPDIR = getenv("APPDIR"); // Used in AppImage
|
||||
|
||||
if (XDG_DATA_HOME != NULL)
|
||||
root_paths.set_pref_path(fs::path(XDG_DATA_HOME) / app_name / app_name / dir_sep);
|
||||
@ -159,6 +160,10 @@ void init_paths(Root &root_paths) {
|
||||
root_paths.set_static_assets_path(fs::path(XDG_DATA_HOME) / app_name / dir_sep);
|
||||
}
|
||||
|
||||
if (APPDIR != NULL) {
|
||||
root_paths.set_static_assets_path(fs::path(APPDIR) / "usr/share/Vita3K");
|
||||
}
|
||||
|
||||
// shared path
|
||||
if (env_home != NULL)
|
||||
root_paths.set_shared_path(fs::path(env_home) / ".local/share" / app_name / dir_sep);
|
||||
|
Loading…
Reference in New Issue
Block a user