build: Bundle files from the ImHex-Patterns repo with the installation

This commit is contained in:
WerWolv
2022-02-21 22:47:56 +01:00
parent bdb2ac3a0b
commit 1487f760b0
3 changed files with 27 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ namespace hex {
CoTaskMemFree(wAppDataPath);
}
std::vector<fs::path> paths = { parentDir, appDataDir / "imhex" };
std::vector<fs::path> paths = { appDataDir / "imhex", parentDir };
switch (path) {
case ImHexPath::Patterns:
@@ -128,7 +128,7 @@ namespace hex {
// Get path to special directories
const fs::path applicationSupportDir(getMacApplicationSupportDirectoryPath());
std::vector<fs::path> paths = { exePath, applicationSupportDir };
std::vector<fs::path> paths = { applicationSupportDir, exePath };
switch (path) {
case ImHexPath::Patterns:
@@ -179,9 +179,6 @@ namespace hex {
for (auto &dir : dataDirs)
dir = dir / "imhex";
if (!exePath.empty())
dataDirs.emplace(dataDirs.begin(), fs::path(exePath.data()).parent_path());
switch (path) {
case ImHexPath::Patterns:
addUserDirs(dataDirs);
@@ -226,6 +223,9 @@ namespace hex {
default:
__builtin_unreachable();
}
if (!exePath.empty())
dataDirs.emplace(dataDirs.begin(), fs::path(exePath.data()).parent_path());
#endif
if (!listNonExisting) {