mirror of https://github.com/odrling/Aegisub
Patch the '?data' path when aegisub is launched as an AppImage
This commit is contained in:
parent
88d9e9cef6
commit
25f851be7d
|
@ -36,3 +36,9 @@ subprojects/icu
|
||||||
subprojects/ffmpeg
|
subprojects/ffmpeg
|
||||||
subprojects/ffms2*
|
subprojects/ffms2*
|
||||||
subprojects/boost*
|
subprojects/boost*
|
||||||
|
|
||||||
|
# Build and tag files
|
||||||
|
cscope.files
|
||||||
|
git_version.h
|
||||||
|
git_version.xml
|
||||||
|
tags
|
||||||
|
|
|
@ -44,7 +44,17 @@ void Path::FillPlatformSpecificPaths() {
|
||||||
agi::fs::path home = home_dir();
|
agi::fs::path home = home_dir();
|
||||||
SetToken("?user", home/".aegisub");
|
SetToken("?user", home/".aegisub");
|
||||||
SetToken("?local", home/".aegisub");
|
SetToken("?local", home/".aegisub");
|
||||||
|
#ifdef __linux__
|
||||||
|
/* AppImage case */
|
||||||
|
if (const char *ptr_root = getenv("APPDIR"); ptr_root != nullptr) {
|
||||||
|
agi::fs::path root = ptr_root;
|
||||||
|
SetToken("?data", root/P_DATA);
|
||||||
|
} else {
|
||||||
|
SetToken("?data", P_DATA);
|
||||||
|
}
|
||||||
|
#else
|
||||||
SetToken("?data", P_DATA);
|
SetToken("?data", P_DATA);
|
||||||
|
#endif
|
||||||
SetToken("?dictionary", "/usr/share/hunspell");
|
SetToken("?dictionary", "/usr/share/hunspell");
|
||||||
#else
|
#else
|
||||||
agi::fs::path app_support = agi::util::GetApplicationSupportDirectory();
|
agi::fs::path app_support = agi::util::GetApplicationSupportDirectory();
|
||||||
|
|
Loading…
Reference in New Issue