diff --git a/VERSION b/VERSION index 005119b..8e8299d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4.1 +2.4.2 diff --git a/cmake/util.cmake b/cmake/util.cmake index 8becb14..10e9ae2 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -8,3 +8,24 @@ function(install_symlink target link) file(CREATE_LINK "${target}" "${CMAKE_BINARY_DIR}/symlink/${link}" SYMBOLIC) install(FILES "${CMAKE_BINARY_DIR}/symlink/${link}" DESTINATION "${parent}") endfunction() + +# Embed Resources +function(embed_resource target file) + # Read Hex Data + file(READ "${file}" data HEX) + # Convert Hex Data For C Compatibility + string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," data "${data}") + # Get C Name + get_filename_component(name "${file}" NAME) + string(MAKE_C_IDENTIFIER "${name}" name) + # Write Data + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${name}.c" "#include \nconst unsigned char ${name}[] = {${data}};\nconst size_t ${name}_len = sizeof (${name});\n") + # Add To Target + target_sources("${target}" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${name}.c") + # Mark Dependency + set_property( + DIRECTORY + APPEND + PROPERTY CMAKE_CONFIGURE_DEPENDS "${file}" + ) +endfunction() diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 38acb38..6f0af9c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +**2.4.2** +* Fix Picking Up Lava +* Fix Wayland App ID + **2.4.1** * Allow More Characters In Usernames And Chat * Fix Running On ARMHF Debian Buster diff --git a/images/start.png b/images/start.png index a15bc00..1085feb 100644 Binary files a/images/start.png and b/images/start.png differ diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index 11113b0..7d7345f 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -8,14 +8,8 @@ add_executable(launcher src/bootstrap.c src/patchelf.c src/crash-report.c) if(MCPI_SERVER_MODE) target_sources(launcher PRIVATE src/server/launcher.c) else() - add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/available-feature-flags.c" - COMMAND xxd -i available-feature-flags "${CMAKE_CURRENT_BINARY_DIR}/available-feature-flags.c" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/client/available-feature-flags" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/client" - VERBATIM - ) - target_sources(launcher PRIVATE src/client/launcher.cpp "${CMAKE_CURRENT_BINARY_DIR}/available-feature-flags.c") + embed_resource(launcher src/client/available-feature-flags) + target_sources(launcher PRIVATE src/client/launcher.cpp) endif() target_link_libraries(launcher reborn-util) # RPath @@ -44,7 +38,7 @@ else() file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop" "Terminal=false\n" "StartupNotify=false\n" - "StartupWMClass=${MCPI_APP_TITLE}\n" + "StartupWMClass=${MCPI_APP_ID}\n" ) endif() install( diff --git a/launcher/src/client/launcher.cpp b/launcher/src/client/launcher.cpp index a108198..47c68ae 100644 --- a/launcher/src/client/launcher.cpp +++ b/launcher/src/client/launcher.cpp @@ -37,7 +37,7 @@ static std::string strip_feature_flag_default(std::string flag, bool *default_re // Load Available Feature Flags extern unsigned char available_feature_flags[]; -extern unsigned int available_feature_flags_len; +extern size_t available_feature_flags_len; static void load_available_feature_flags(std::function callback) { // Get Path char *binary_directory = get_binary_directory(); @@ -112,7 +112,7 @@ static void run_zenity_and_set_env(const char *env_name, std::vectorauxiliary != *(int32_t *) (*Tile_water + Tile_id_property_offset) && item_instance->auxiliary != *(int32_t *) (*Tile_lava + Tile_id_property_offset)) { + valid = false; + } if (valid) { (*Level_setTileAndData)(level, x, y, z, item_instance->auxiliary, 0); item_instance->auxiliary = 0; diff --git a/mods/src/chat/ui.c b/mods/src/chat/ui.c index 3752a2e..b0a6650 100644 --- a/mods/src/chat/ui.c +++ b/mods/src/chat/ui.c @@ -29,7 +29,7 @@ static void *chat_thread(__attribute__((unused)) void *nop) { const char *command[] = { "zenity", "--title", DIALOG_TITLE, - "--name", MCPI_APP_TITLE, + "--name", MCPI_APP_ID, "--entry", "--text", "Enter Chat Message:", NULL diff --git a/mods/src/game-mode/ui.cpp b/mods/src/game-mode/ui.cpp index 3d16e12..ffba4cc 100644 --- a/mods/src/game-mode/ui.cpp +++ b/mods/src/game-mode/ui.cpp @@ -88,7 +88,7 @@ static void *create_world_thread(__attribute__((unused)) void *nop) { const char *command[] = { "zenity", "--title", DIALOG_TITLE, - "--name", MCPI_APP_TITLE, + "--name", MCPI_APP_ID, "--entry", "--text", "Enter World Name:", "--entry-text", DEFAULT_WORLD_NAME, @@ -115,7 +115,7 @@ static void *create_world_thread(__attribute__((unused)) void *nop) { const char *command[] = { "zenity", "--title", DIALOG_TITLE, - "--name", MCPI_APP_TITLE, + "--name", MCPI_APP_ID, "--list", "--radiolist", "--width", GAME_MODE_DIALOG_SIZE, @@ -148,7 +148,7 @@ static void *create_world_thread(__attribute__((unused)) void *nop) { const char *command[] = { "zenity", "--title", DIALOG_TITLE, - "--name", MCPI_APP_TITLE, + "--name", MCPI_APP_ID, "--entry", "--only-numerical", "--text", "Enter Seed (Leave Blank For Random):", diff --git a/scripts/build.sh b/scripts/build.sh index f030022..f40fde6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -11,20 +11,22 @@ build() { cd "build/${MODE}-${ARCH}" # Create Prefix - local prefix="$(cd ../../; pwd)/out/${MODE}-${ARCH}" - rm -rf "${prefix}" - mkdir -p "${prefix}" + if [ -z "${DESTDIR+x}" ]; then + export DESTDIR="$(cd ../../; pwd)/out/${MODE}-${ARCH}" + rm -rf "${DESTDIR}" + mkdir -p "${DESTDIR}" + fi # Build ARM Components cd arm cmake --build . - DESTDIR="${prefix}" cmake --install . + cmake --install . cd ../ # Build Native Components cd native cmake --build . - DESTDIR="${prefix}" cmake --install . + cmake --install . cd ../ # Exit diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 9ac1b1f..6978ecf 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -30,8 +30,7 @@ run() { # Host Dependencies Needed For Compile queue_pkg \ - libwayland-bin \ - xxd + libwayland-bin # Host Dependencies Needed For Running queue_pkg \