1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-18 21:43:48 +01:00

Add /../share/openrct2 as possible install location

This allows AppImage to work correctly.
This commit is contained in:
Ted John
2018-09-29 13:58:38 +01:00
parent 0b3ddc85d6
commit 9da9a9968a

View File

@@ -119,19 +119,24 @@ namespace Platform
path = Path::Combine(exeDirectory, "data");
if (!Path::DirectoryExists(path))
{
// 3. Try standard system app directories
path = FindInstallPath();
if (path.empty())
// 3. Try ${exeDir}/../share/openrct2
path = Path::Combine(exeDirectory, "../share/openrct2");
if (!Path::DirectoryExists(path))
{
// 4. Fallback to ${cwd}/data
path = GetCurrentWorkingDirectory();
if (!path.empty())
// 4. Try standard system app directories
path = FindInstallPath();
if (path.empty())
{
path = Path::Combine(path, "data");
}
else
{
return "/";
// 5. Fallback to ${cwd}/data
path = GetCurrentWorkingDirectory();
if (!path.empty())
{
path = Path::Combine(path, "data");
}
else
{
return "/";
}
}
}
}