mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-06 22:10:04 +03:00
HaikuOS port (#97)
* ExternalFileLevelStorageSource: add workaround for d_type on Haiku * raknet: FileList: do not include io.h on Haiku * raknet: SocketLayer: add sockio.h for Haiku * cmake: link -lnetwork on Haiku * readme: add Haiku build dependencies * cmake: use link_libraries instead of add_link_options * ExternalFileLevelStorageSource: use scary stdstring instead of char
This commit is contained in:
14
README.md
14
README.md
@@ -17,6 +17,7 @@ based on the mcpe01_canada.apk build of the game.
|
||||
* WebGL
|
||||
* macOS (port by [BrentDaMage](https://github.com/BrentDaMage))
|
||||
* Xbox 360 (incomplete; port by [BrentDaMage](https://github.com/BrentDaMage))
|
||||
* HaikuOS
|
||||
|
||||
**We will not do the following:**
|
||||
* Add features added in or after Java Edition Beta 1.8
|
||||
@@ -140,6 +141,19 @@ cmake --build .
|
||||
./reminecraftpe
|
||||
```
|
||||
|
||||
### HaikuOS
|
||||
|
||||
#### Dependencies
|
||||
|
||||
- `libsdl2_devel` (SDL2)
|
||||
- `glu_devel mesa_devel` (Mesa)
|
||||
- `cmake` (CMake)
|
||||
- `ninja` (Ninja)
|
||||
|
||||
#### How To Build
|
||||
|
||||
- Same as for Linux.
|
||||
|
||||
## Have seams when playing?
|
||||
|
||||
I've had texture seams when playing Minecraft Classic, ClassiCube and this recreation of Minecraft PE, on a
|
||||
|
||||
@@ -20,6 +20,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(-Wno-inconsistent-missing-override -Wno-enum-compare-switch -Wno-register)
|
||||
endif()
|
||||
|
||||
# Network library
|
||||
if(HAIKU)
|
||||
link_libraries(network)
|
||||
endif()
|
||||
|
||||
# Threads
|
||||
if(EMSCRIPTEN)
|
||||
add_compile_and_link_options(-pthread)
|
||||
|
||||
@@ -58,7 +58,14 @@ void ExternalFileLevelStorageSource::getLevelList(std::vector<LevelSummary>& vls
|
||||
|
||||
LOG_I("Entry: %s", de->d_name);
|
||||
|
||||
#if defined( __HAIKU__ )
|
||||
std::string temp = m_worldsPath + '/' + de->d_name;
|
||||
|
||||
struct stat buf;
|
||||
if ( ( lstat( temp.c_str(), &buf ) == 0 ) && S_ISDIR( buf.st_mode ) )
|
||||
#else
|
||||
if (de->d_type == DT_DIR)
|
||||
#endif
|
||||
{
|
||||
addLevelSummaryIfExists(vls, de->d_name);
|
||||
}
|
||||
|
||||
2
thirdparty/raknet/FileList.cpp
vendored
2
thirdparty/raknet/FileList.cpp
vendored
@@ -20,7 +20,7 @@
|
||||
#include <io.h>
|
||||
|
||||
|
||||
#elif !defined ( __APPLE__ ) && !defined ( __APPLE_CC__ ) && !defined ( __PPC__ ) && !defined ( __FreeBSD__ ) && !defined ( __S3E__ ) && !defined( __EMSCRIPTEN__) && !defined( __ANDROID__ )
|
||||
#elif !defined ( __APPLE__ ) && !defined ( __APPLE_CC__ ) && !defined ( __PPC__ ) && !defined ( __FreeBSD__ ) && !defined ( __S3E__ ) && !defined ( __EMSCRIPTEN__ ) && !defined ( __ANDROID__ ) && !defined ( __HAIKU__ )
|
||||
#include <sys/io.h>
|
||||
#endif
|
||||
|
||||
|
||||
4
thirdparty/raknet/SocketLayer.cpp
vendored
4
thirdparty/raknet/SocketLayer.cpp
vendored
@@ -24,6 +24,10 @@
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#if defined( __HAIKU__ )
|
||||
#include "sys/sockio.h" // for SIOCGIFNETMASK
|
||||
#endif
|
||||
|
||||
using namespace RakNet;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user