mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
105 lines
2.9 KiB
Diff
105 lines
2.9 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index ef6577f..b7631b7 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -23,6 +23,10 @@ elseif ()
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-enforce-eh-specs")
|
|
endif ()
|
|
|
|
+if(HAIKU)
|
|
+ set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}" "-lbe")
|
|
+endif()
|
|
+
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -g0")
|
|
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
|
diff --git a/src/Settings.cpp b/src/Settings.cpp
|
|
index 8beaeed..c22cc09 100644
|
|
--- a/src/Settings.cpp
|
|
+++ b/src/Settings.cpp
|
|
@@ -34,6 +34,12 @@ using namespace std;
|
|
#include "UtilsFileSystem.h"
|
|
#include "SharedResources.h"
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <String.h>
|
|
+#include <Path.h>
|
|
+#include <FindDirectory.h>
|
|
+#endif
|
|
+
|
|
#ifdef _MSC_VER
|
|
#define log2(x) logf(x)/logf(2)
|
|
#endif
|
|
@@ -232,6 +238,25 @@ void setPaths() {
|
|
if (dirExists(CUSTOM_PATH_DATA)) PATH_DATA = CUSTOM_PATH_DATA;
|
|
else if (!CUSTOM_PATH_DATA.empty()) fprintf(stderr, "Error: Could not find specified game data directory.\n");
|
|
}
|
|
+
|
|
+#elif __HAIKU__
|
|
+// Haiku paths
|
|
+void setPaths() {
|
|
+ BPath path;
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
|
+ BString str = path.Path();
|
|
+ str << "/flare/";
|
|
+ createDir(str.String());
|
|
+ PATH_CONF = str;
|
|
+ PATH_USER = str;
|
|
+ PATH_DEFAULT_USER = str;
|
|
+ find_directory(B_SYSTEM_DATA_DIRECTORY, &path);
|
|
+ str = path.Path();
|
|
+ str << "/flare/";
|
|
+ PATH_DATA = str;
|
|
+ PATH_DEFAULT_DATA = str;
|
|
+}
|
|
+
|
|
#else
|
|
void setPaths() {
|
|
|
|
|
|
From d54ff21849b9d0d9d98a0388efe95aadd00e4e3a Mon Sep 17 00:00:00 2001
|
|
From: Humdinger <humdingerb@gmail.com>
|
|
Date: Mon, 15 Dec 2014 16:35:51 +0100
|
|
Subject: Adding flare.rdef for a vector icon and an app signature.
|
|
|
|
|
|
diff --git a/distribution/flare.rdef b/distribution/flare.rdef
|
|
new file mode 100644
|
|
index 0000000..2f804f0
|
|
--- /dev/null
|
|
+++ b/distribution/flare.rdef
|
|
@@ -0,0 +1,30 @@
|
|
+resource app_signature "application/x-vnd.flare";
|
|
+
|
|
+resource app_flags B_SINGLE_LAUNCH;
|
|
+
|
|
+resource app_version {
|
|
+ major = 0,
|
|
+ middle = 1,
|
|
+ minor = 9,
|
|
+
|
|
+ /* 0 = development 1 = alpha 2 = beta
|
|
+ 3 = gamma 4 = golden master 5 = final */
|
|
+ variety = 1,
|
|
+
|
|
+ internal = 0,
|
|
+
|
|
+ short_info = "Single-player 2D action RPG",
|
|
+ long_info = "Single-player 2D RPG with fast-paced action and a dark fantasy style."
|
|
+};
|
|
+
|
|
+resource vector_icon {
|
|
+ $"6E63696603020106023E30000000000000003E10004840004AF00000FFD965FF"
|
|
+ $"DE7B060500040167040614BFFBBBAAE63D553D55BD6CC88CB823C034B526C82E"
|
|
+ $"B7D5BC16B823BDAAB690BBD5B919BE1E324232BBE3BAEFBDEBB969B9DB322F37"
|
|
+ $"36BA14BAB1BE32BABF3B243F294126463646B9EAC3EBBC464B324D3CC5DFBC98"
|
|
+ $"C2E3BF2BC28DBFB24E4447473E4234483E4C4C3451BE7CC813BD37C750BE7CC8"
|
|
+ $"130604FA3F4C47484D4B47494C4E47514C4F424E02043C2AC3A82AB8A72A2343"
|
|
+ $"23BB7123C6723C5CB8A75CC3A85C554355C67255BB710A044228482A492E412C"
|
|
+ $"060A020102023FD67FBC41253A2A0F3DAF324619A04A8C580A00010210011785"
|
|
+ $"10040A010102000A020103000A0101001001178410040A0002000100"
|
|
+};
|
|
--
|
|
1.8.3.4
|
|
|