mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
AAAA: Fix working directory
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user