From 5ab7ad2dac1fa68f74cdbcb26637d0fc2f2ab5cc Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 10 Sep 2019 20:58:59 +1000 Subject: [PATCH] AAAA: Fix working directory --- games-action/aaaa/aaaa-1.1.recipe | 6 +++--- games-action/aaaa/patches/aaaa-1.1.patchset | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/games-action/aaaa/aaaa-1.1.recipe b/games-action/aaaa/aaaa-1.1.recipe index 76f60dbe1..13c7b8c86 100644 --- a/games-action/aaaa/aaaa-1.1.recipe +++ b/games-action/aaaa/aaaa-1.1.recipe @@ -37,9 +37,9 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libGL$secondaryArchSuffix devel:libglu$secondaryArchSuffix - devel:libSDL2_2.0$secondaryArchSuffix - devel:libSDL2_image_2.0$secondaryArchSuffix - devel:libSDL2_mixer_2.0$secondaryArchSuffix + devel:libSDL2$secondaryArchSuffix + devel:libSDL2_image$secondaryArchSuffix + devel:libSDL2_mixer$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:cmake diff --git a/games-action/aaaa/patches/aaaa-1.1.patchset b/games-action/aaaa/patches/aaaa-1.1.patchset index b762a2fff..befaba71c 100644 --- a/games-action/aaaa/patches/aaaa-1.1.patchset +++ b/games-action/aaaa/patches/aaaa-1.1.patchset @@ -1,27 +1,29 @@ -From bb63bf1383e27cb8b2bd057569b5acd962afe292 Mon Sep 17 00:00:00 2001 +From ed099174e329d792de8b18e7aba960768c039179 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Sun, 30 Sep 2018 21:35:07 +1000 +Date: Mon, 9 Sep 2019 23:54:02 +1000 Subject: Set current dir diff --git a/aaaa/src/main/cpp/AAAA-Engine/main.c b/aaaa/src/main/cpp/AAAA-Engine/main.c -index 81242ed..da7bd03 100644 +index 81242ed..738acc1 100644 --- a/aaaa/src/main/cpp/AAAA-Engine/main.c +++ b/aaaa/src/main/cpp/AAAA-Engine/main.c -@@ -4,6 +4,13 @@ +@@ -4,6 +4,15 @@ int main(int argc, char *argv[]) { +#ifdef __HAIKU__ -+ char *ptr; -+ if(ptr = strrchr(argv[0], '/')) { -+ *ptr = '\0'; -+ chdir(argv[0]); ++ char *binpath = realpath(argv[0], NULL); ++ if (binpath != NULL) { ++ char *appdir = strrchr(binpath, '/'); ++ *appdir = '\0'; ++ chdir(binpath); ++ free(binpath); + } +#endif zresminit(); zcoreinit(); -- -2.19.0 +2.23.0