add build and platform support for Haiku#425
Conversation
|
|
||
| std::string Platform::FindResourceFolder() { | ||
| static std::string found_path; | ||
| static bool found = false; |
| char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH]; | ||
| find_directory(B_SYSTEM_DATA_DIRECTORY, volume, false, buffer, sizeof(buffer)); |
There was a problem hiding this comment.
can find_directory fail? at least zero-initialize with char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH] {};
There was a problem hiding this comment.
in theory it could (according to https://www.haiku-os.org/legacy-docs/bebook/BDirectory.html#find_directory ), however /system/data/ is a directory generated by the package kit and should never fail.
|
|
||
| dev_t volume = dev_for_path("/boot"); | ||
| char buffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH]; | ||
| char cmdbuffer[B_PATH_NAME_LENGTH+B_FILE_NAME_LENGTH] = "mkdir -p "; |
There was a problem hiding this comment.
why not just use std::filesystem::create_directories
There was a problem hiding this comment.
I'm now using the Haiku-native create_directory function. I used the system()-call previously as I did the same on another port when I was much less experienced.
| return found_path; | ||
| } | ||
|
|
||
| std::string Platform::FindStateCacheFolder() { |
There was a problem hiding this comment.
I've also moved the cache to the user directory instead of the system directory (in practice, Haiku is a single-user system, so it should not matter, but the cache cotains user-specific data)
| PATH_SUFFIXES ${GTKMM_LIBRARY_NAME} | ||
| PATH_SUFFIXES ${GTKMM_LIBRARY_NAME}/include) |
There was a problem hiding this comment.
PATH_SUFFIXES unnecessarily doubled up
There was a problem hiding this comment.
I hope I've fixed that up properly now. I'm not that experienced with cmake
| HINTS ${GTKMM_INCLUDE_DIR} | ||
| PATH ${GTKMM_INCLUDE_DIR} |
There was a problem hiding this comment.
HINTS doubled up and PATH is not a keyword
| endif () | ||
|
|
||
| if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")) | ||
| if (NOT (CMAKE_SYSTEM_NAME STREQUAL "Haiku") AND |
There was a problem hiding this comment.
if if (HAIKU) works above then why not here ?
da42ff0 to
117781d
Compare
|
Haiku has a qrcodegen package, so I've also added some stuff to check for a system package and use that if it exists |
nevermind. I messed some cmake stuff up. I'll do another PR for that once I've fixed that up. Sorry about that |
Hello,
I wanted to upstream the patches that are needed to compile abaddon on Haiku for quite some time
and now finally found the time to do that. Until now, they were only on the haikuports/haikuports repository.