diff options
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/app.c | 8 |
2 files changed, 16 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 75883966..9fe62ba4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -324,6 +324,9 @@ endif () | |||
324 | if (UNIX) | 324 | if (UNIX) |
325 | target_link_libraries (app PUBLIC m) | 325 | target_link_libraries (app PUBLIC m) |
326 | endif () | 326 | endif () |
327 | if (HAIKU) | ||
328 | target_link_libraries (app PUBLIC m network bsd) | ||
329 | endif () | ||
327 | 330 | ||
328 | # Deployment. | 331 | # Deployment. |
329 | if (MSYS) | 332 | if (MSYS) |
@@ -342,6 +345,13 @@ if (MSYS) | |||
342 | if (INSTALL_THE_FOUNDATION) | 345 | if (INSTALL_THE_FOUNDATION) |
343 | install (PROGRAMS $<TARGET_FILE:the_Foundation::the_Foundation> DESTINATION .) | 346 | install (PROGRAMS $<TARGET_FILE:the_Foundation::the_Foundation> DESTINATION .) |
344 | endif () | 347 | endif () |
348 | elseif (HAIKU) | ||
349 | install (TARGETS app DESTINATION .) | ||
350 | if (NOT ENABLE_RESOURCE_EMBED) | ||
351 | target_compile_definitions (app PUBLIC | ||
352 | LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/resources.lgr") | ||
353 | install (FILES ${EMB_BIN} DESTINATION .) | ||
354 | endif () | ||
345 | elseif (UNIX AND NOT APPLE) | 355 | elseif (UNIX AND NOT APPLE) |
346 | set_target_properties (app PROPERTIES | 356 | set_target_properties (app PROPERTIES |
347 | INSTALL_RPATH_USE_LINK_PATH YES | 357 | INSTALL_RPATH_USE_LINK_PATH YES |
@@ -89,6 +89,10 @@ static const char *defaultDataDir_App_ = "~/AppData/Roaming/fi.skyjake.Lagrange" | |||
89 | #define EMB_BIN "../../share/lagrange/resources.lgr" | 89 | #define EMB_BIN "../../share/lagrange/resources.lgr" |
90 | static const char *defaultDataDir_App_ = "~/.config/lagrange"; | 90 | static const char *defaultDataDir_App_ = "~/.config/lagrange"; |
91 | #endif | 91 | #endif |
92 | #if defined (iPlatformHaiku) | ||
93 | #define EMB_BIN "./resources.lgr" | ||
94 | static const char *defaultDataDir_App_ = "~/config/settings"; | ||
95 | #endif | ||
92 | #if defined (LAGRANGE_EMB_BIN) /* specified in build config */ | 96 | #if defined (LAGRANGE_EMB_BIN) /* specified in build config */ |
93 | # undef EMB_BIN | 97 | # undef EMB_BIN |
94 | # define EMB_BIN LAGRANGE_EMB_BIN | 98 | # define EMB_BIN LAGRANGE_EMB_BIN |
@@ -2128,7 +2132,7 @@ void openInDefaultBrowser_App(const iString *url) { | |||
2128 | setArguments_Process(proc, | 2132 | setArguments_Process(proc, |
2129 | #if defined (iPlatformAppleDesktop) | 2133 | #if defined (iPlatformAppleDesktop) |
2130 | iClob(newStringsCStr_StringList("/usr/bin/env", "open", cstr_String(url), NULL)) | 2134 | iClob(newStringsCStr_StringList("/usr/bin/env", "open", cstr_String(url), NULL)) |
2131 | #elif defined (iPlatformLinux) || defined (iPlatformOther) | 2135 | #elif defined (iPlatformLinux) || defined (iPlatformOther) || defined (iPlatformHaiku) |
2132 | iClob(newStringsCStr_StringList("/usr/bin/env", "xdg-open", cstr_String(url), NULL)) | 2136 | iClob(newStringsCStr_StringList("/usr/bin/env", "xdg-open", cstr_String(url), NULL)) |
2133 | #elif defined (iPlatformMsys) | 2137 | #elif defined (iPlatformMsys) |
2134 | iClob(newStringsCStr_StringList( | 2138 | iClob(newStringsCStr_StringList( |
@@ -2165,7 +2169,7 @@ void revealPath_App(const iString *path) { | |||
2165 | iRelease(proc); | 2169 | iRelease(proc); |
2166 | } | 2170 | } |
2167 | iRelease(f); | 2171 | iRelease(f); |
2168 | #elif defined (iPlatformLinux) | 2172 | #elif defined (iPlatformLinux) || defined (iPlatformHaiku) |
2169 | iFileInfo *inf = iClob(new_FileInfo(path)); | 2173 | iFileInfo *inf = iClob(new_FileInfo(path)); |
2170 | iRangecc target; | 2174 | iRangecc target; |
2171 | if (isDirectory_FileInfo(inf)) { | 2175 | if (isDirectory_FileInfo(inf)) { |