mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-20 10:40:05 +02:00
51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
From 8a29e8c8dc97c3f2d911f5dc57160ff519e0d21b Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Thu, 21 Sep 2017 21:16:29 +0200
|
|
Subject: Haiku patch
|
|
|
|
|
|
diff --git a/SConscript b/SConscript
|
|
index 54b6468..b862fc7 100644
|
|
--- a/SConscript
|
|
+++ b/SConscript
|
|
@@ -261,6 +261,9 @@ class Project:
|
|
#if sys.platform == "darwin":
|
|
# self.env.StaticLibrary("sdlmain", ["src/macosx/SDLmain.m"], [ 'SDL' ])
|
|
|
|
+ if sys.platform == 'haiku1':
|
|
+ self.conf.env.Append(LIBS = ['be'])
|
|
+
|
|
self.env.Default(self.env.Program('pingus', ['src/main.cpp', libpingus]))
|
|
|
|
# build test and utils
|
|
diff --git a/src/util/system.cpp b/src/util/system.cpp
|
|
index 8b80140..649be87 100644
|
|
--- a/src/util/system.cpp
|
|
+++ b/src/util/system.cpp
|
|
@@ -42,6 +42,11 @@
|
|
#define F_OK 0
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+# include <FindDirectory.h>
|
|
+# include <Path.h>
|
|
+#endif
|
|
+
|
|
#include "pingus/globals.hpp"
|
|
#include "util/log.hpp"
|
|
#include "util/pathname.hpp"
|
|
@@ -299,6 +304,10 @@ System::find_userdir()
|
|
|
|
return tmpstr;
|
|
|
|
+#elif defined(__HAIKU__)
|
|
+ BPath settingsDir;
|
|
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, &settingsDir) == B_OK)
|
|
+ return std::string(settingsDir.Path()) + "/pingus/";
|
|
#else /* !WIN32 */
|
|
char* homedir = getenv("HOME");
|
|
|
|
--
|
|
2.13.1
|
|
|