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/ffms2*
|
||||
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();
|
||||
SetToken("?user", 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);
|
||||
#endif
|
||||
SetToken("?dictionary", "/usr/share/hunspell");
|
||||
#else
|
||||
agi::fs::path app_support = agi::util::GetApplicationSupportDirectory();
|
||||
|
|
Loading…
Reference in New Issue