(Linux) The data installation directory is now excluded for themes and resources when built as an AppImage.

This commit is contained in:
Leon Styhre 2022-08-20 11:30:15 +02:00
parent fb61849d4f
commit 67488467c3
2 changed files with 9 additions and 5 deletions

View file

@ -545,15 +545,19 @@ void ThemeData::populateThemeSets()
// directory (Unix only) and last under the ES-DE binary directory. // directory (Unix only) and last under the ES-DE binary directory.
#if defined(__unix__) || defined(__APPLE__) #if defined(__unix__) || defined(__APPLE__)
static const size_t pathCount = 3; #if defined(APPIMAGE_BUILD)
static const size_t pathCount {2};
#else #else
static const size_t pathCount = 2; static const size_t pathCount {3};
#endif
#else
static const size_t pathCount {2};
#endif #endif
std::string paths[pathCount] = { std::string paths[pathCount] = {
Utils::FileSystem::getExePath() + "/themes", Utils::FileSystem::getExePath() + "/themes",
#if defined(__APPLE__) #if defined(__APPLE__)
Utils::FileSystem::getExePath() + "/../Resources/themes", Utils::FileSystem::getExePath() + "/../Resources/themes",
#elif defined(__unix__) #elif defined(__unix__) && !defined(APPIMAGE_BUILD)
Utils::FileSystem::getProgramDataPath() + "/themes", Utils::FileSystem::getProgramDataPath() + "/themes",
#endif #endif
Utils::FileSystem::getHomePath() + "/.emulationstation/themes" Utils::FileSystem::getHomePath() + "/.emulationstation/themes"

View file

@ -44,7 +44,7 @@ std::string ResourceManager::getResourcePath(const std::string& path, bool termi
return applePackagePath; return applePackagePath;
} }
#elif defined(__unix__) #elif defined(__unix__) && !defined(APPIMAGE_BUILD)
// Check under the data installation directory (Unix only). // Check under the data installation directory (Unix only).
std::string testDataPath; std::string testDataPath;
@ -71,7 +71,7 @@ std::string ResourceManager::getResourcePath(const std::string& path, bool termi
LOG(LogError) << testHome; LOG(LogError) << testHome;
#if defined(__APPLE__) #if defined(__APPLE__)
LOG(LogError) << applePackagePath; LOG(LogError) << applePackagePath;
#elif defined(__unix__) #elif defined(__unix__) && !defined(APPIMAGE_BUILD)
LOG(LogError) << testDataPath; LOG(LogError) << testDataPath;
#endif #endif
LOG(LogError) << testExePath; LOG(LogError) << testExePath;