Files
nixpkgs/pkgs/by-name/an/android-translation-layer/configure-microg-path.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

17 lines
826 B
Diff

diff --git a/src/main-executable/main.c b/src/main-executable/main.c
index 545da00f..2f87447d 100644
--- a/src/main-executable/main.c
+++ b/src/main-executable/main.c
@@ -390,7 +390,10 @@ static void open(GtkApplication *app, GFile **files, gint nfiles, const gchar *h
ret = stat(MICROG_APK_PATH_LOCAL, &dont_care);
errno_localdir = errno;
- if (!ret) {
+ char *env_microg = getenv("MICROG_APK_PATH");
+ if (env_microg && access(env_microg, F_OK) == 0) {
+ microg_apk = strdup(env_microg);
+ } else if (stat(MICROG_APK_PATH_LOCAL, &dont_care) == 0) {
microg_apk = strdup(MICROG_APK_PATH_LOCAL); // for running out of builddir; using strdup so we can always safely call free on this
} else {
char *microg_install_dir = malloc(strlen(dex_install_dir) + strlen(REL_MICROG_APK_INSTALL_PATH) + 1); // +1 for NULL