From 9736b9cea5f841bb0e9bb2c9c05c3b2560327064 Mon Sep 17 00:00:00 2001 From: TotalCaesar659 <14265316+TotalCaesar659@users.noreply.github.com> Date: Wed, 10 Feb 2021 16:34:21 +0300 Subject: Update URLs to HTTPS (#10923) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a06c3e257..58ec0c821 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ Table of Contents Further documentation ---------------------- -- Website: http://minetest.net/ -- Wiki: http://wiki.minetest.net/ -- Developer wiki: http://dev.minetest.net/ -- Forum: http://forum.minetest.net/ +- Website: https://minetest.net/ +- Wiki: https://wiki.minetest.net/ +- Developer wiki: https://dev.minetest.net/ +- Forum: https://forum.minetest.net/ - GitHub: https://github.com/minetest/minetest/ - [doc/](doc/) directory of source distribution -- cgit v1.2.3 From 827224635bc131dbf4f6e41dd3d78c7a2d94da0f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 24 Feb 2021 10:45:30 +0000 Subject: Use "Aux1" key name consistently everywhere --- README.md | 2 +- build/android/icons/aux1_btn.svg | 143 +++++++++++++ build/android/icons/aux_btn.svg | 411 ------------------------------------- builtin/settingtypes.txt | 16 +- src/client/game.cpp | 4 +- src/client/inputhandler.cpp | 4 +- src/client/joystick_controller.cpp | 6 +- src/client/keys.h | 2 +- src/defaultsettings.cpp | 4 +- src/gui/guiKeyChangeMenu.cpp | 6 +- src/gui/touchscreengui.cpp | 18 +- src/gui/touchscreengui.h | 8 +- textures/base/pack/aux1_btn.png | Bin 0 -> 1652 bytes textures/base/pack/aux_btn.png | Bin 1900 -> 0 bytes 14 files changed, 178 insertions(+), 446 deletions(-) create mode 100644 build/android/icons/aux1_btn.svg delete mode 100644 build/android/icons/aux_btn.svg create mode 100644 textures/base/pack/aux1_btn.png delete mode 100644 textures/base/pack/aux_btn.png (limited to 'README.md') diff --git a/README.md b/README.md index 58ec0c821..249f24a16 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Some can be changed in the key config dialog in the settings tab. | P | Enable/disable pitch move mode | | J | Enable/disable fast mode (needs fast privilege) | | H | Enable/disable noclip mode (needs noclip privilege) | -| E | Move fast in fast mode | +| E | Aux1 (Move fast in fast mode. Games may add special features) | | C | Cycle through camera modes | | V | Cycle through minimap modes | | Shift + V | Change minimap orientation | diff --git a/build/android/icons/aux1_btn.svg b/build/android/icons/aux1_btn.svg new file mode 100644 index 000000000..e0ee97c0c --- /dev/null +++ b/build/android/icons/aux1_btn.svg @@ -0,0 +1,143 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + Aux1 + + + diff --git a/build/android/icons/aux_btn.svg b/build/android/icons/aux_btn.svg deleted file mode 100644 index 6bbefff67..000000000 --- a/build/android/icons/aux_btn.svg +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - AUX - - diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index f800f71ab..62f1ee2d0 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -75,7 +75,7 @@ free_move (Flying) bool false # If enabled, makes move directions relative to the player's pitch when flying or swimming. pitch_move (Pitch move mode) bool false -# Fast movement (via the "special" key). +# Fast movement (via the "Aux1" key). # This requires the "fast" privilege on the server. fast_move (Fast movement) bool false @@ -99,14 +99,14 @@ invert_mouse (Invert mouse) bool false # Mouse sensitivity multiplier. mouse_sensitivity (Mouse sensitivity) float 0.2 -# If enabled, "special" key instead of "sneak" key is used for climbing down and +# If enabled, "Aux1" key instead of "Sneak" key is used for climbing down and # descending. -aux1_descends (Special key for climbing/descending) bool false +aux1_descends (Aux1 key for climbing/descending) bool false # Double-tapping the jump key toggles fly mode. doubletap_jump (Double tap jump for fly) bool false -# If disabled, "special" key is used to fly fast if both fly and fast mode are +# If disabled, "Aux1" key is used to fly fast if both fly and fast mode are # enabled. always_fly_fast (Always fly and fast) bool true @@ -135,9 +135,9 @@ touchscreen_threshold (Touch screen threshold) int 20 0 100 # If disabled, virtual joystick will center to first-touch's position. fixed_virtual_joystick (Fixed virtual joystick) bool false -# (Android) Use virtual joystick to trigger "aux" button. -# If enabled, virtual joystick will also tap "aux" button when out of main circle. -virtual_joystick_triggers_aux (Virtual joystick triggers aux button) bool false +# (Android) Use virtual joystick to trigger "Aux1" button. +# If enabled, virtual joystick will also tap "Aux1" button when out of main circle. +virtual_joystick_triggers_aux1 (Virtual joystick triggers Aux1 button) bool false # Enable joysticks enable_joysticks (Enable joysticks) bool false @@ -199,7 +199,7 @@ keymap_inventory (Inventory key) key KEY_KEY_I # Key for moving fast in fast mode. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 -keymap_special1 (Special key) key KEY_KEY_E +keymap_aux1 (Aux1 key) key KEY_KEY_E # Key for opening the chat window. # See http://irrlicht.sourceforge.net/docu/namespaceirr.html#a54da2a0e231901735e3da1b0edf72eb3 diff --git a/src/client/game.cpp b/src/client/game.cpp index 3c58fb46f..d4e2fe7c3 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2415,7 +2415,7 @@ void Game::updatePlayerControl(const CameraOrientation &cam) input->isKeyDown(KeyType::LEFT), input->isKeyDown(KeyType::RIGHT), isKeyDown(KeyType::JUMP), - isKeyDown(KeyType::SPECIAL1), + isKeyDown(KeyType::AUX1), isKeyDown(KeyType::SNEAK), isKeyDown(KeyType::ZOOM), isKeyDown(KeyType::DIG), @@ -2432,7 +2432,7 @@ void Game::updatePlayerControl(const CameraOrientation &cam) ( (u32)(isKeyDown(KeyType::LEFT) & 0x1) << 2) | ( (u32)(isKeyDown(KeyType::RIGHT) & 0x1) << 3) | ( (u32)(isKeyDown(KeyType::JUMP) & 0x1) << 4) | - ( (u32)(isKeyDown(KeyType::SPECIAL1) & 0x1) << 5) | + ( (u32)(isKeyDown(KeyType::AUX1) & 0x1) << 5) | ( (u32)(isKeyDown(KeyType::SNEAK) & 0x1) << 6) | ( (u32)(isKeyDown(KeyType::DIG) & 0x1) << 7) | ( (u32)(isKeyDown(KeyType::PLACE) & 0x1) << 8) | diff --git a/src/client/inputhandler.cpp b/src/client/inputhandler.cpp index 978baa320..b7e70fa6c 100644 --- a/src/client/inputhandler.cpp +++ b/src/client/inputhandler.cpp @@ -35,7 +35,7 @@ void KeyCache::populate() key[KeyType::LEFT] = getKeySetting("keymap_left"); key[KeyType::RIGHT] = getKeySetting("keymap_right"); key[KeyType::JUMP] = getKeySetting("keymap_jump"); - key[KeyType::SPECIAL1] = getKeySetting("keymap_special1"); + key[KeyType::AUX1] = getKeySetting("keymap_aux1"); key[KeyType::SNEAK] = getKeySetting("keymap_sneak"); key[KeyType::DIG] = getKeySetting("keymap_dig"); key[KeyType::PLACE] = getKeySetting("keymap_place"); @@ -219,7 +219,7 @@ void RandomInputHandler::step(float dtime) { static RandomInputHandlerSimData rnd_data[] = { { "keymap_jump", 0.0f, 40 }, - { "keymap_special1", 0.0f, 40 }, + { "keymap_aux1", 0.0f, 40 }, { "keymap_forward", 0.0f, 40 }, { "keymap_left", 0.0f, 40 }, { "keymap_dig", 0.0f, 30 }, diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index f61ae4ae6..919db5315 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -79,7 +79,7 @@ JoystickLayout create_default_layout() // Accessible without any modifier pressed JLO_B_PB(KeyType::JUMP, bm | 1 << 0, 1 << 0); - JLO_B_PB(KeyType::SPECIAL1, bm | 1 << 1, 1 << 1); + JLO_B_PB(KeyType::AUX1, bm | 1 << 1, 1 << 1); // Accessible with start button not pressed, but four pressed // TODO find usage for button 0 @@ -126,11 +126,11 @@ JoystickLayout create_xbox_layout() // 4 Buttons JLO_B_PB(KeyType::JUMP, 1 << 0, 1 << 0); // A/green JLO_B_PB(KeyType::ESC, 1 << 1, 1 << 1); // B/red - JLO_B_PB(KeyType::SPECIAL1, 1 << 2, 1 << 2); // X/blue + JLO_B_PB(KeyType::AUX1, 1 << 2, 1 << 2); // X/blue JLO_B_PB(KeyType::INVENTORY, 1 << 3, 1 << 3); // Y/yellow // Analog Sticks - JLO_B_PB(KeyType::SPECIAL1, 1 << 11, 1 << 11); // left + JLO_B_PB(KeyType::AUX1, 1 << 11, 1 << 11); // left JLO_B_PB(KeyType::SNEAK, 1 << 12, 1 << 12); // right // Triggers diff --git a/src/client/keys.h b/src/client/keys.h index 60a7a3c45..9f90da6b8 100644 --- a/src/client/keys.h +++ b/src/client/keys.h @@ -32,7 +32,7 @@ public: LEFT, RIGHT, JUMP, - SPECIAL1, + AUX1, SNEAK, AUTOFORWARD, DIG, diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index cda953082..9d155f76c 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -80,7 +80,7 @@ void set_default_settings() settings->setDefault("keymap_drop", "KEY_KEY_Q"); settings->setDefault("keymap_zoom", "KEY_KEY_Z"); settings->setDefault("keymap_inventory", "KEY_KEY_I"); - settings->setDefault("keymap_special1", "KEY_KEY_E"); + settings->setDefault("keymap_aux1", "KEY_KEY_E"); settings->setDefault("keymap_chat", "KEY_KEY_T"); settings->setDefault("keymap_cmd", "/"); settings->setDefault("keymap_cmd_local", "."); @@ -464,7 +464,7 @@ void set_default_settings() settings->setDefault("touchtarget", "true"); settings->setDefault("touchscreen_threshold","20"); settings->setDefault("fixed_virtual_joystick", "false"); - settings->setDefault("virtual_joystick_triggers_aux", "false"); + settings->setDefault("virtual_joystick_triggers_aux1", "false"); settings->setDefault("smooth_lighting", "false"); settings->setDefault("max_simultaneous_block_sends_per_client", "10"); settings->setDefault("emergequeue_limit_diskonly", "16"); diff --git a/src/gui/guiKeyChangeMenu.cpp b/src/gui/guiKeyChangeMenu.cpp index 4dcb47779..84678b629 100644 --- a/src/gui/guiKeyChangeMenu.cpp +++ b/src/gui/guiKeyChangeMenu.cpp @@ -46,7 +46,7 @@ enum GUI_ID_KEY_BACKWARD_BUTTON, GUI_ID_KEY_LEFT_BUTTON, GUI_ID_KEY_RIGHT_BUTTON, - GUI_ID_KEY_USE_BUTTON, + GUI_ID_KEY_AUX1_BUTTON, GUI_ID_KEY_FLY_BUTTON, GUI_ID_KEY_FAST_BUTTON, GUI_ID_KEY_JUMP_BUTTON, @@ -177,7 +177,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) { core::rect rect(0, 0, option_w, 30 * s); rect += topleft + v2s32(option_x, option_y); - const wchar_t *text = wgettext("\"Special\" = climb down"); + const wchar_t *text = wgettext("\"Aux1\" = climb down"); Environment->addCheckBox(g_settings->getBool("aux1_descends"), rect, this, GUI_ID_CB_AUX1_DESCENDS, text); delete[] text; @@ -416,7 +416,7 @@ void GUIKeyChangeMenu::init_keys() this->add_key(GUI_ID_KEY_BACKWARD_BUTTON, wgettext("Backward"), "keymap_backward"); this->add_key(GUI_ID_KEY_LEFT_BUTTON, wgettext("Left"), "keymap_left"); this->add_key(GUI_ID_KEY_RIGHT_BUTTON, wgettext("Right"), "keymap_right"); - this->add_key(GUI_ID_KEY_USE_BUTTON, wgettext("Special"), "keymap_special1"); + this->add_key(GUI_ID_KEY_AUX1_BUTTON, wgettext("Aux1"), "keymap_aux1"); this->add_key(GUI_ID_KEY_JUMP_BUTTON, wgettext("Jump"), "keymap_jump"); this->add_key(GUI_ID_KEY_SNEAK_BUTTON, wgettext("Sneak"), "keymap_sneak"); this->add_key(GUI_ID_KEY_DROP_BUTTON, wgettext("Drop"), "keymap_drop"); diff --git a/src/gui/touchscreengui.cpp b/src/gui/touchscreengui.cpp index e1a971462..78b18c2d9 100644 --- a/src/gui/touchscreengui.cpp +++ b/src/gui/touchscreengui.cpp @@ -40,7 +40,7 @@ const char **button_imagenames = (const char *[]) { "jump_btn.png", "down.png", "zoom.png", - "aux_btn.png" + "aux1_btn.png" }; const char **joystick_imagenames = (const char *[]) { @@ -80,8 +80,8 @@ static irr::EKEY_CODE id2keycode(touch_gui_button_id id) case zoom_id: key = "zoom"; break; - case special1_id: - key = "special1"; + case aux1_id: + key = "aux1"; break; case fly_id: key = "freemove"; @@ -425,7 +425,7 @@ TouchScreenGUI::TouchScreenGUI(IrrlichtDevice *device, IEventReceiver *receiver) m_touchscreen_threshold = g_settings->getU16("touchscreen_threshold"); m_fixed_joystick = g_settings->getBool("fixed_virtual_joystick"); - m_joystick_triggers_special1 = g_settings->getBool("virtual_joystick_triggers_aux"); + m_joystick_triggers_aux1 = g_settings->getBool("virtual_joystick_triggers_aux1"); m_screensize = m_device->getVideoDriver()->getScreenSize(); button_size = MYMIN(m_screensize.Y / 4.5f, porting::getDisplayDensity() * @@ -521,9 +521,9 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc) m_screensize.Y - (3 * button_size)), L"z", false); - // init special1/aux button - if (!m_joystick_triggers_special1) - initButton(special1_id, + // init aux1 button + if (!m_joystick_triggers_aux1) + initButton(aux1_id, rect(m_screensize.X - (1.25 * button_size), m_screensize.Y - (2.5 * button_size), m_screensize.X - (0.25 * button_size), @@ -923,7 +923,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event) } if (distance > button_size) { - m_joystick_status[j_special1] = true; + m_joystick_status[j_aux1] = true; // move joystick "button" s32 ndx = button_size * dx / distance - button_size / 2.0f; s32 ndy = button_size * dy / distance - button_size / 2.0f; @@ -1039,7 +1039,7 @@ bool TouchScreenGUI::doubleTapDetection() void TouchScreenGUI::applyJoystickStatus() { for (unsigned int i = 0; i < 5; i++) { - if (i == 4 && !m_joystick_triggers_special1) + if (i == 4 && !m_joystick_triggers_aux1) continue; SEvent translated{}; diff --git a/src/gui/touchscreengui.h b/src/gui/touchscreengui.h index 0349624fa..ad5abae87 100644 --- a/src/gui/touchscreengui.h +++ b/src/gui/touchscreengui.h @@ -39,7 +39,7 @@ typedef enum jump_id = 0, crunch_id, zoom_id, - special1_id, + aux1_id, after_last_element_id, settings_starter_id, rare_controls_starter_id, @@ -69,7 +69,7 @@ typedef enum j_backward, j_left, j_right, - j_special1 + j_aux1 } touch_gui_joystick_move_id; typedef enum @@ -217,7 +217,7 @@ private: // forward, backward, left, right touch_gui_button_id m_joystick_names[5] = { - forward_id, backward_id, left_id, right_id, special1_id}; + forward_id, backward_id, left_id, right_id, aux1_id}; bool m_joystick_status[5] = {false, false, false, false, false}; /* @@ -237,7 +237,7 @@ private: int m_joystick_id = -1; bool m_joystick_has_really_moved = false; bool m_fixed_joystick = false; - bool m_joystick_triggers_special1 = false; + bool m_joystick_triggers_aux1 = false; button_info *m_joystick_btn_off = nullptr; button_info *m_joystick_btn_bg = nullptr; button_info *m_joystick_btn_center = nullptr; diff --git a/textures/base/pack/aux1_btn.png b/textures/base/pack/aux1_btn.png new file mode 100644 index 000000000..8ceb09542 Binary files /dev/null and b/textures/base/pack/aux1_btn.png differ diff --git a/textures/base/pack/aux_btn.png b/textures/base/pack/aux_btn.png deleted file mode 100644 index f589910e8..000000000 Binary files a/textures/base/pack/aux_btn.png and /dev/null differ -- cgit v1.2.3 From dcb30a593dafed89ef52e712533b0706bddbd36e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 5 Mar 2021 16:11:55 +0100 Subject: Set ENABLE_SYSTEM_JSONCPP to TRUE by default --- CMakeLists.txt | 4 ++-- README.md | 4 ++-- cmake/Modules/FindGMP.cmake | 2 -- cmake/Modules/FindJson.cmake | 23 +++++++++++------------ 4 files changed, 15 insertions(+), 18 deletions(-) (limited to 'README.md') diff --git a/CMakeLists.txt b/CMakeLists.txt index 910213c09..31e914c76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,8 +204,8 @@ find_package(GMP REQUIRED) find_package(Json REQUIRED) find_package(Lua REQUIRED) -# JsonCPP doesn't compile well on GCC 4.8 -if(NOT ENABLE_SYSTEM_JSONCPP) +# JsonCpp doesn't compile well on GCC 4.8 +if(NOT USE_SYSTEM_JSONCPP) set(GCC_MINIMUM_VERSION "4.9") endif() diff --git a/README.md b/README.md index 249f24a16..1d8f754fe 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ General options and their default values: ENABLE_LUAJIT=ON - Build with LuaJIT (much faster than non-JIT Lua) ENABLE_PROMETHEUS=OFF - Build with Prometheus metrics exporter (listens on tcp/30000 by default) ENABLE_SYSTEM_GMP=ON - Use GMP from system (much faster than bundled mini-gmp) - ENABLE_SYSTEM_JSONCPP=OFF - Use JsonCPP from system + ENABLE_SYSTEM_JSONCPP=ON - Use JsonCPP from system OPENGL_GL_PREFERENCE=LEGACY - Linux client build only; See CMake Policy CMP0072 for reference RUN_IN_PLACE=FALSE - Create a portable install (worlds, settings etc. in current directory) USE_GPROF=FALSE - Enable profiling using GProf @@ -354,7 +354,7 @@ This is outdated and not recommended. Follow the instructions on https://dev.min Run the following script in PowerShell: ```powershell -cmake . -G"Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=OFF -DENABLE_CURSES=OFF -DENABLE_SYSTEM_JSONCPP=ON +cmake . -G"Visual Studio 15 2017 Win64" -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GETTEXT=OFF -DENABLE_CURSES=OFF cmake --build . --config Release ``` Make sure that the right compiler is selected and the path to the vcpkg toolchain is correct. diff --git a/cmake/Modules/FindGMP.cmake b/cmake/Modules/FindGMP.cmake index 7b45f16c7..190b7c548 100644 --- a/cmake/Modules/FindGMP.cmake +++ b/cmake/Modules/FindGMP.cmake @@ -12,8 +12,6 @@ if(ENABLE_SYSTEM_GMP) else() message (STATUS "Detecting GMP from system failed.") endif() -else() - message (STATUS "Detecting GMP from system disabled! (ENABLE_SYSTEM_GMP=0)") endif() if(NOT USE_SYSTEM_GMP) diff --git a/cmake/Modules/FindJson.cmake b/cmake/Modules/FindJson.cmake index a5e9098f8..cce2d387f 100644 --- a/cmake/Modules/FindJson.cmake +++ b/cmake/Modules/FindJson.cmake @@ -1,26 +1,25 @@ -# Look for JSONCPP if asked to. -# We use a bundled version by default because some distros ship versions of -# JSONCPP that cause segfaults and other memory errors when we link with them. -# See https://github.com/minetest/minetest/issues/1793 +# Look for JsonCpp, with fallback to bundeled version mark_as_advanced(JSON_LIBRARY JSON_INCLUDE_DIR) -option(ENABLE_SYSTEM_JSONCPP "Enable using a system-wide JSONCPP. May cause segfaults and other memory errors!" FALSE) +option(ENABLE_SYSTEM_JSONCPP "Enable using a system-wide JsonCpp" TRUE) +set(USE_SYSTEM_JSONCPP FALSE) if(ENABLE_SYSTEM_JSONCPP) find_library(JSON_LIBRARY NAMES jsoncpp) find_path(JSON_INCLUDE_DIR json/allocator.h PATH_SUFFIXES jsoncpp) - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Json DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR) - - if(JSON_FOUND) - message(STATUS "Using system JSONCPP library.") + if(JSON_LIBRARY AND JSON_INCLUDE_DIR) + message(STATUS "Using JsonCpp provided by system.") + set(USE_SYSTEM_JSONCPP TRUE) endif() endif() -if(NOT JSON_FOUND) - message(STATUS "Using bundled JSONCPP library.") +if(NOT USE_SYSTEM_JSONCPP) + message(STATUS "Using bundled JsonCpp library.") set(JSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/jsoncpp) set(JSON_LIBRARY jsoncpp) add_subdirectory(lib/jsoncpp) endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Json DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR) -- cgit v1.2.3 From 91c9313c87bfec8b44e5adb91b06aba9f343dd53 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 18 Feb 2021 14:50:47 +0100 Subject: Switch Irrlicht dependency to our own fork -> https://github.com/minetest/irrlicht --- CMakeLists.txt | 23 ++++++++++++++++++ README.md | 20 +++++++--------- cmake/Modules/FindIrrlicht.cmake | 51 ++++++---------------------------------- src/CMakeLists.txt | 1 - 4 files changed, 39 insertions(+), 56 deletions(-) (limited to 'README.md') diff --git a/CMakeLists.txt b/CMakeLists.txt index 31e914c76..67a35fda9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,29 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") # This is done here so that relative search paths are more reasonable find_package(Irrlicht) +if(BUILD_CLIENT AND NOT IRRLICHT_FOUND) + message(FATAL_ERROR "Irrlicht is required to build the client, but it was not found.") +elseif(IRRLICHT_INCLUDE_DIR STREQUAL "") + message(FATAL_ERROR "Irrlicht headers are required to build the server, but none found.") +endif() + +include(CheckSymbolExists) +set(CMAKE_REQUIRED_INCLUDES ${IRRLICHT_INCLUDE_DIR}) +unset(HAS_FORKED_IRRLICHT CACHE) +check_symbol_exists(IRRLICHT_VERSION_MT "IrrCompileConfig.h" HAS_FORKED_IRRLICHT) +if(NOT HAS_FORKED_IRRLICHT) + string(CONCAT EXPLANATION_MSG + "Irrlicht found, but it is not Minetest's Irrlicht fork. " + "The Minetest team has forked Irrlicht to make their own customizations. " + "It can be found here: https://github.com/minetest/irrlicht") + if(BUILD_CLIENT) + message(FATAL_ERROR "${EXPLANATION_MSG}\n" + "Building the client with upstream Irrlicht is no longer possible.") + else() + message(WARNING "${EXPLANATION_MSG}\n" + "The server can still be built with upstream Irrlicht but this is DISCOURAGED.") + endif() +endif() # Installation diff --git a/README.md b/README.md index 1d8f754fe..8e2f1be57 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Compiling |------------|---------|------------| | GCC | 4.9+ | Can be replaced with Clang 3.4+ | | CMake | 2.6+ | | -| Irrlicht | 1.7.3+ | | +| Irrlicht | - | Custom version required, see https://github.com/minetest/irrlicht | | SQLite3 | 3.0+ | | | LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present | | GMP | 5.0.0+ | Bundled mini-GMP is used if not present | @@ -142,19 +142,19 @@ Compiling For Debian/Ubuntu users: - sudo apt install g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev + sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev For Fedora users: - sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel + sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel For Arch users: - sudo pacman -S base-devel libcurl-gnutls cmake libxxf86vm irrlicht libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses + sudo pacman -S base-devel libcurl-gnutls cmake libxxf86vm libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses For Alpine users: - sudo apk add build-base irrlicht-dev cmake bzip2-dev libpng-dev jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev + sudo apk add build-base cmake libpng-dev jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev #### Download @@ -209,8 +209,8 @@ Run it: - You can disable the client build by specifying `-DBUILD_CLIENT=FALSE`. - You can select between Release and Debug build by `-DCMAKE_BUILD_TYPE=`. - Debug build is slower, but gives much more useful output in a debugger. -- If you build a bare server you don't need to have Irrlicht installed. - - In that case use `-DIRRLICHT_SOURCE_DIR=/the/irrlicht/source`. +- If you build a bare server you don't need to have the Irrlicht library installed. + - In that case use `-DIRRLICHT_INCLUDE_DIR=/some/where/irrlicht/include`. ### CMake options @@ -246,8 +246,6 @@ General options and their default values: Library specific options: - BZIP2_INCLUDE_DIR - Linux only; directory where bzlib.h is located - BZIP2_LIBRARY - Linux only; path to libbz2.a/libbz2.so CURL_DLL - Only if building with cURL on Windows; path to libcurl.dll CURL_INCLUDE_DIR - Only if building with cURL; directory where curl.h is located CURL_LIBRARY - Only if building with cURL; path to libcurl.a/libcurl.so/libcurl.lib @@ -276,7 +274,6 @@ Library specific options: SPATIAL_LIBRARY - Only when building with LibSpatial; path to libspatialindex_c.so/spatialindex-32.lib LUA_INCLUDE_DIR - Only if you want to use LuaJIT; directory where luajit.h is located LUA_LIBRARY - Only if you want to use LuaJIT; path to libluajit.a/libluajit.so - MINGWM10_DLL - Only if compiling with MinGW; path to mingwm10.dll OGG_DLL - Only if building with sound on Windows; path to libogg.dll OGG_INCLUDE_DIR - Only if building with sound; directory that contains an ogg directory which contains ogg.h OGG_LIBRARY - Only if building with sound; path to libogg.a/libogg.so/libogg.dll.a @@ -314,9 +311,10 @@ It is highly recommended to use vcpkg as package manager. After you successfully built vcpkg you can easily install the required libraries: ```powershell -vcpkg install irrlicht zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit gmp jsoncpp --triplet x64-windows +vcpkg install zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit gmp jsoncpp --triplet x64-windows ``` +- **Note that you currently need to build irrlicht on your own** - `curl` is optional, but required to read the serverlist, `curl[winssl]` is required to use the content store. - `openal-soft`, `libvorbis` and `libogg` are optional, but required to use sound. - `freetype` is optional, it allows true-type font rendering. diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake index 6f361e829..8296de685 100644 --- a/cmake/Modules/FindIrrlicht.cmake +++ b/cmake/Modules/FindIrrlicht.cmake @@ -1,44 +1,11 @@ mark_as_advanced(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR IRRLICHT_DLL) -set(IRRLICHT_SOURCE_DIR "" CACHE PATH "Path to irrlicht source directory (optional)") +# Find include directory and libraries -# Find include directory - -if(NOT IRRLICHT_SOURCE_DIR STREQUAL "") - set(IRRLICHT_SOURCE_DIR_INCLUDE - "${IRRLICHT_SOURCE_DIR}/include" - ) - - set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a Irrlicht Irrlicht.lib) - - if(WIN32) - if(MSVC) - set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Win32-visualstudio") - set(IRRLICHT_LIBRARY_NAMES Irrlicht.lib) - else() - set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Win32-gcc") - set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a libIrrlicht.dll.a) - endif() - else() - set(IRRLICHT_SOURCE_DIR_LIBS "${IRRLICHT_SOURCE_DIR}/lib/Linux") - set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a) - endif() - - find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h - PATHS - ${IRRLICHT_SOURCE_DIR_INCLUDE} - NO_DEFAULT_PATH - ) - - find_library(IRRLICHT_LIBRARY NAMES ${IRRLICHT_LIBRARY_NAMES} - PATHS - ${IRRLICHT_SOURCE_DIR_LIBS} - NO_DEFAULT_PATH - ) - -else() +if(TRUE) find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h + DOC "Path to the directory with Irrlicht includes" PATHS /usr/local/include/irrlicht /usr/include/irrlicht @@ -46,7 +13,8 @@ else() PATH_SUFFIXES "include/irrlicht" ) - find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht + find_library(IRRLICHT_LIBRARY NAMES libIrrlicht Irrlicht + DOC "Path to the Irrlicht library file" PATHS /usr/local/lib /usr/lib @@ -54,19 +22,14 @@ else() ) endif() +# Users will likely need to edit these +mark_as_advanced(CLEAR IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) # On Windows, find the DLL for installation if(WIN32) # If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG if(NOT VCPKG_APPLOCAL_DEPS) - if(MSVC) - set(IRRLICHT_COMPILER "VisualStudio") - else() - set(IRRLICHT_COMPILER "gcc") - endif() find_file(IRRLICHT_DLL NAMES Irrlicht.dll - PATHS - "${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}" DOC "Path of the Irrlicht dll (for installation)" ) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bcf8d6c7..62d604820 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -295,7 +295,6 @@ else() endif(NOT HAIKU AND NOT APPLE) find_package(JPEG REQUIRED) - find_package(BZip2 REQUIRED) find_package(PNG REQUIRED) if(APPLE) find_library(CARBON_LIB Carbon REQUIRED) -- cgit v1.2.3 From bb1c4badfbd1a81922fcb56cbe6c8427a868f0f8 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 10 Mar 2021 14:48:53 +0100 Subject: Clean up cmake DLL installation and other minor things --- CMakeLists.txt | 5 +--- README.md | 6 ++--- cmake/Modules/FindGettextLib.cmake | 9 -------- src/CMakeLists.txt | 47 +++++++++++++++----------------------- util/buildbot/buildwin32.sh | 8 +++---- util/buildbot/buildwin64.sh | 8 +++---- 6 files changed, 29 insertions(+), 54 deletions(-) (limited to 'README.md') diff --git a/CMakeLists.txt b/CMakeLists.txt index 67a35fda9..e4bda3afb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -cmake_policy(SET CMP0025 OLD) - # This can be read from ${PROJECT_NAME} after project() is called project(minetest) set(PROJECT_NAME_CAPITALIZED "Minetest") @@ -192,7 +190,6 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/devtest" DESTINATION "${SHA if(BUILD_CLIENT) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/shaders" DESTINATION "${SHAREDIR}/client") install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base") - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}") if(RUN_IN_PLACE) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/clientmods" DESTINATION "${SHAREDIR}") install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/serverlist" DESTINATION "${SHAREDIR}/client") @@ -237,7 +234,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") message(FATAL_ERROR "Insufficient gcc version, found ${CMAKE_CXX_COMPILER_VERSION}. " "Version ${GCC_MINIMUM_VERSION} or higher is required.") endif() -elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +elseif(CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLANG_MINIMUM_VERSION}") message(FATAL_ERROR "Insufficient clang version, found ${CMAKE_CXX_COMPILER_VERSION}. " "Version ${CLANG_MINIMUM_VERSION} or higher is required.") diff --git a/README.md b/README.md index 8e2f1be57..e767f1fe3 100644 --- a/README.md +++ b/README.md @@ -255,8 +255,7 @@ Library specific options: FREETYPE_INCLUDE_DIR_ft2build - Only if building with FreeType 2; directory that contains ft2build.h FREETYPE_LIBRARY - Only if building with FreeType 2; path to libfreetype.a/libfreetype.so/freetype.lib FREETYPE_DLL - Only if building with FreeType 2 on Windows; path to libfreetype.dll - GETTEXT_DLL - Only when building with gettext on Windows; path to libintl3.dll - GETTEXT_ICONV_DLL - Only when building with gettext on Windows; path to libiconv2.dll + GETTEXT_DLL - Only when building with gettext on Windows; paths to libintl + libiconv DLLs GETTEXT_INCLUDE_DIR - Only when building with gettext; directory that contains iconv.h GETTEXT_LIBRARY - Only when building with gettext on Windows; path to libintl.dll.a GETTEXT_MSGFMT - Only when building with gettext; path to msgfmt/msgfmt.exe @@ -284,9 +283,8 @@ Library specific options: OPENGLES2_LIBRARY - Only if building with GLES; path to libGLESv2.a/libGLESv2.so SQLITE3_INCLUDE_DIR - Directory that contains sqlite3.h SQLITE3_LIBRARY - Path to libsqlite3.a/libsqlite3.so/sqlite3.lib - VORBISFILE_DLL - Only if building with sound on Windows; path to libvorbisfile-3.dll VORBISFILE_LIBRARY - Only if building with sound; path to libvorbisfile.a/libvorbisfile.so/libvorbisfile.dll.a - VORBIS_DLL - Only if building with sound on Windows; path to libvorbis-0.dll + VORBIS_DLL - Only if building with sound on Windows; paths to vorbis DLLs VORBIS_INCLUDE_DIR - Only if building with sound; directory that contains a directory vorbis with vorbisenc.h inside VORBIS_LIBRARY - Only if building with sound; path to libvorbis.a/libvorbis.so/libvorbis.dll.a XXF86VM_LIBRARY - Only on Linux; path to libXXf86vm.a/libXXf86vm.so diff --git a/cmake/Modules/FindGettextLib.cmake b/cmake/Modules/FindGettextLib.cmake index 529452a4a..b7681827c 100644 --- a/cmake/Modules/FindGettextLib.cmake +++ b/cmake/Modules/FindGettextLib.cmake @@ -42,15 +42,6 @@ if(WIN32) NAMES ${GETTEXT_LIB_NAMES} PATHS "${CUSTOM_GETTEXT_PATH}/lib" DOC "GetText library") - find_file(GETTEXT_DLL - NAMES libintl.dll intl.dll libintl3.dll intl3.dll - PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib" - DOC "gettext *intl*.dll") - find_file(GETTEXT_ICONV_DLL - NAMES libiconv2.dll - PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib" - DOC "gettext *iconv*.lib") - set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_DLL GETTEXT_ICONV_DLL) endif(WIN32) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 62d604820..8a6eabccc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -63,14 +63,13 @@ if(ENABLE_GETTEXT) if(GETTEXTLIB_FOUND) if(WIN32) message(STATUS "GetText library: ${GETTEXT_LIBRARY}") - message(STATUS "GetText DLL: ${GETTEXT_DLL}") - message(STATUS "GetText iconv DLL: ${GETTEXT_ICONV_DLL}") + message(STATUS "GetText DLL(s): ${GETTEXT_DLL}") endif() set(USE_GETTEXT TRUE) message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}") endif(GETTEXTLIB_FOUND) else() - mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT) + mark_as_advanced(GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT) message(STATUS "GetText disabled.") endif() @@ -268,8 +267,10 @@ if(WIN32) if(ENABLE_SOUND) set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)") set(OGG_DLL "" CACHE FILEPATH "Path to libogg.dll for installation (optional)") - set(VORBIS_DLL "" CACHE FILEPATH "Path to libvorbis.dll for installation (optional)") - set(VORBISFILE_DLL "" CACHE FILEPATH "Path to libvorbisfile.dll for installation (optional)") + set(VORBIS_DLL "" CACHE FILEPATH "Path to Vorbis DLLs for installation (optional)") + endif() + if(USE_GETTEXT) + set(GETTEXT_DLL "" CACHE FILEPATH "Path to Intl/Iconv DLLs for installation (optional)") endif() if(USE_LUAJIT) set(LUA_DLL "" CACHE FILEPATH "Path to luajit-5.1.dll for installation (optional)") @@ -712,7 +713,7 @@ if(MSVC) # Flags that cannot be shared between cl and clang-cl # https://clang.llvm.org/docs/UsersManual.html#clang-cl - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld") # Disable pragma-pack warning @@ -730,7 +731,7 @@ else() else() set(RELEASE_WARNING_FLAGS "") endif() - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if(CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?Clang") set(WARNING_FLAGS "${WARNING_FLAGS} -Wsign-compare") endif() @@ -767,7 +768,7 @@ else() else() set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MATH_FLAGS}") endif() - endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)") + endif() set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall ${WARNING_FLAGS} ${OTHER_FLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall ${WARNING_FLAGS} ${OTHER_FLAGS}") @@ -804,7 +805,7 @@ if(WIN32) FILES_MATCHING PATTERN "*.dll") else() # Use the old-style way to install dll's - if(USE_SOUND) + if(BUILD_CLIENT AND USE_SOUND) if(OPENAL_DLL) install(FILES ${OPENAL_DLL} DESTINATION ${BINDIR}) endif() @@ -814,9 +815,6 @@ if(WIN32) if(VORBIS_DLL) install(FILES ${VORBIS_DLL} DESTINATION ${BINDIR}) endif() - if(VORBISFILE_DLL) - install(FILES ${VORBISFILE_DLL} DESTINATION ${BINDIR}) - endif() endif() if(CURL_DLL) install(FILES ${CURL_DLL} DESTINATION ${BINDIR}) @@ -824,7 +822,7 @@ if(WIN32) if(ZLIB_DLL) install(FILES ${ZLIB_DLL} DESTINATION ${BINDIR}) endif() - if(FREETYPE_DLL) + if(BUILD_CLIENT AND FREETYPE_DLL) install(FILES ${FREETYPE_DLL} DESTINATION ${BINDIR}) endif() if(SQLITE3_DLL) @@ -836,6 +834,12 @@ if(WIN32) if(LUA_DLL) install(FILES ${LUA_DLL} DESTINATION ${BINDIR}) endif() + if(BUILD_CLIENT AND IRRLICHT_DLL) + install(FILES ${IRRLICHT_DLL} DESTINATION ${BINDIR}) + endif() + if(BUILD_CLIENT AND USE_GETTEXT AND GETTEXT_DLL) + install(FILES ${GETTEXT_DLL} DESTINATION ${BINDIR}) + endif() endif() endif() @@ -863,6 +867,7 @@ if(BUILD_CLIENT) endforeach() endif() + # Install necessary fonts depending on configuration if(USE_FREETYPE) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}" FILES_MATCHING PATTERN "*.ttf" PATTERN "*.txt") @@ -870,22 +875,6 @@ if(BUILD_CLIENT) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}" FILES_MATCHING PATTERN "*.png" PATTERN "*.xml") endif() - - if(WIN32) - if(NOT VCPKG_APPLOCAL_DEPS) - if(DEFINED IRRLICHT_DLL) - install(FILES ${IRRLICHT_DLL} DESTINATION ${BINDIR}) - endif() - if(USE_GETTEXT) - if(DEFINED GETTEXT_DLL) - install(FILES ${GETTEXT_DLL} DESTINATION ${BINDIR}) - endif() - if(DEFINED GETTEXT_ICONV_DLL) - install(FILES ${GETTEXT_ICONV_DLL} DESTINATION ${BINDIR}) - endif() - endif() - endif() - endif() endif(BUILD_CLIENT) if(BUILD_SERVER) diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh index 715a89822..db3a23375 100755 --- a/util/buildbot/buildwin32.sh +++ b/util/buildbot/buildwin32.sh @@ -103,6 +103,8 @@ if [ "x$NO_MINETEST_GAME" = "x" ]; then fi irr_dlls=$(echo $libdir/irrlicht/bin/*.dll | tr ' ' ';') +vorbis_dlls=$(echo $libdir/libvorbis/bin/libvorbis{,file}-*.dll | tr ' ' ';') +gettext_dlls=$(echo $libdir/gettext/bin/lib{intl,iconv}-*.dll | tr ' ' ';') # Build the thing [ -d _build ] && rm -Rf _build/ @@ -137,9 +139,8 @@ cmake .. \ \ -DVORBIS_INCLUDE_DIR=$libdir/libvorbis/include \ -DVORBIS_LIBRARY=$libdir/libvorbis/lib/libvorbis.dll.a \ - -DVORBIS_DLL=$libdir/libvorbis/bin/libvorbis-0.dll \ + -DVORBIS_DLL="$vorbis_dlls" \ -DVORBISFILE_LIBRARY=$libdir/libvorbis/lib/libvorbisfile.dll.a \ - -DVORBISFILE_DLL=$libdir/libvorbis/bin/libvorbisfile-3.dll \ \ -DOPENAL_INCLUDE_DIR=$libdir/openal_stripped/include/AL \ -DOPENAL_LIBRARY=$libdir/openal_stripped/lib/libOpenAL32.dll.a \ @@ -150,8 +151,7 @@ cmake .. \ -DCURL_LIBRARY=$libdir/libcurl/lib/libcurl.dll.a \ \ -DGETTEXT_MSGFMT=`which msgfmt` \ - -DGETTEXT_DLL=$libdir/gettext/bin/libintl-8.dll \ - -DGETTEXT_ICONV_DLL=$libdir/gettext/bin/libiconv-2.dll \ + -DGETTEXT_DLL="$gettext_dlls" \ -DGETTEXT_INCLUDE_DIR=$libdir/gettext/include \ -DGETTEXT_LIBRARY=$libdir/gettext/lib/libintl.dll.a \ \ diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh index 226ef84c1..53c6d1ea9 100755 --- a/util/buildbot/buildwin64.sh +++ b/util/buildbot/buildwin64.sh @@ -93,6 +93,8 @@ if [ "x$NO_MINETEST_GAME" = "x" ]; then fi irr_dlls=$(echo $libdir/irrlicht/bin/*.dll | tr ' ' ';') +vorbis_dlls=$(echo $libdir/libvorbis/bin/libvorbis{,file}-*.dll | tr ' ' ';') +gettext_dlls=$(echo $libdir/gettext/bin/lib{intl,iconv}-*.dll | tr ' ' ';') # Build the thing [ -d _build ] && rm -Rf _build/ @@ -127,9 +129,8 @@ cmake .. \ \ -DVORBIS_INCLUDE_DIR=$libdir/libvorbis/include \ -DVORBIS_LIBRARY=$libdir/libvorbis/lib/libvorbis.dll.a \ - -DVORBIS_DLL=$libdir/libvorbis/bin/libvorbis-0.dll \ + -DVORBIS_DLL="$vorbis_dlls" \ -DVORBISFILE_LIBRARY=$libdir/libvorbis/lib/libvorbisfile.dll.a \ - -DVORBISFILE_DLL=$libdir/libvorbis/bin/libvorbisfile-3.dll \ \ -DOPENAL_INCLUDE_DIR=$libdir/openal_stripped/include/AL \ -DOPENAL_LIBRARY=$libdir/openal_stripped/lib/libOpenAL32.dll.a \ @@ -140,8 +141,7 @@ cmake .. \ -DCURL_LIBRARY=$libdir/libcurl/lib/libcurl.dll.a \ \ -DGETTEXT_MSGFMT=`which msgfmt` \ - -DGETTEXT_DLL=$libdir/gettext/bin/libintl-8.dll \ - -DGETTEXT_ICONV_DLL=$libdir/gettext/bin/libiconv-2.dll \ + -DGETTEXT_DLL="$gettext_dlls" \ -DGETTEXT_INCLUDE_DIR=$libdir/gettext/include \ -DGETTEXT_LIBRARY=$libdir/gettext/lib/libintl.dll.a \ \ -- cgit v1.2.3 From 6a26d6d15a9a122681772c29a7f3b0c36ac9c62e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Thu, 25 Mar 2021 15:09:49 +0100 Subject: Adjust build config for Irrlicht changes (again) --- .gitlab-ci.yml | 2 +- README.md | 4 ++-- cmake/Modules/FindIrrlicht.cmake | 29 ++++++++++++++++++----------- util/buildbot/buildwin32.sh | 6 +++--- util/buildbot/buildwin64.sh | 6 +++--- util/ci/common.sh | 2 +- 6 files changed, 28 insertions(+), 21 deletions(-) (limited to 'README.md') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39ff576cf..9764648e1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ stages: - deploy variables: - IRRLICHT_TAG: "1.9.0mt0" + IRRLICHT_TAG: "1.9.0mt1" MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git" CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH diff --git a/README.md b/README.md index e767f1fe3..662b5c4ca 100644 --- a/README.md +++ b/README.md @@ -259,9 +259,9 @@ Library specific options: GETTEXT_INCLUDE_DIR - Only when building with gettext; directory that contains iconv.h GETTEXT_LIBRARY - Only when building with gettext on Windows; path to libintl.dll.a GETTEXT_MSGFMT - Only when building with gettext; path to msgfmt/msgfmt.exe - IRRLICHT_DLL - Only on Windows; path to Irrlicht.dll + IRRLICHT_DLL - Only on Windows; path to IrrlichtMt.dll IRRLICHT_INCLUDE_DIR - Directory that contains IrrCompileConfig.h - IRRLICHT_LIBRARY - Path to libIrrlicht.a/libIrrlicht.so/libIrrlicht.dll.a/Irrlicht.lib + IRRLICHT_LIBRARY - Path to libIrrlichtMt.a/libIrrlichtMt.so/libIrrlichtMt.dll.a/IrrlichtMt.lib LEVELDB_INCLUDE_DIR - Only when building with LevelDB; directory that contains db.h LEVELDB_LIBRARY - Only when building with LevelDB; path to libleveldb.a/libleveldb.so/libleveldb.dll.a LEVELDB_DLL - Only when building with LevelDB on Windows; path to libleveldb.dll diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake index 8296de685..bb501b3b4 100644 --- a/cmake/Modules/FindIrrlicht.cmake +++ b/cmake/Modules/FindIrrlicht.cmake @@ -3,24 +3,31 @@ mark_as_advanced(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR IRRLICHT_DLL) # Find include directory and libraries -if(TRUE) +# find our fork first, then upstream (TODO: remove this?) +foreach(libname IN ITEMS IrrlichtMt Irrlicht) + string(TOLOWER "${libname}" libname2) + find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h - DOC "Path to the directory with Irrlicht includes" + DOC "Path to the directory with IrrlichtMt includes" PATHS - /usr/local/include/irrlicht - /usr/include/irrlicht - /system/develop/headers/irrlicht #Haiku - PATH_SUFFIXES "include/irrlicht" + /usr/local/include/${libname2} + /usr/include/${libname2} + /system/develop/headers/${libname2} #Haiku + PATH_SUFFIXES "include/${libname2}" ) - find_library(IRRLICHT_LIBRARY NAMES libIrrlicht Irrlicht - DOC "Path to the Irrlicht library file" + find_library(IRRLICHT_LIBRARY NAMES lib${libname} ${libname} + DOC "Path to the IrrlichtMt library file" PATHS /usr/local/lib /usr/lib /system/develop/lib # Haiku ) -endif() + + if(IRRLICHT_INCLUDE_DIR OR IRRLICHT_LIBRARY) + break() + endif() +endforeach() # Users will likely need to edit these mark_as_advanced(CLEAR IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) @@ -29,8 +36,8 @@ mark_as_advanced(CLEAR IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) if(WIN32) # If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG if(NOT VCPKG_APPLOCAL_DEPS) - find_file(IRRLICHT_DLL NAMES Irrlicht.dll - DOC "Path of the Irrlicht dll (for installation)" + find_file(IRRLICHT_DLL NAMES IrrlichtMt.dll + DOC "Path of the IrrlichtMt dll (for installation)" ) endif() endif(WIN32) diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh index db3a23375..1a66a9764 100755 --- a/util/buildbot/buildwin32.sh +++ b/util/buildbot/buildwin32.sh @@ -31,7 +31,7 @@ if [ -z "$toolchain_file" ]; then fi echo "Using $toolchain_file" -irrlicht_version=1.9.0mt0 +irrlicht_version=1.9.0mt1 ogg_version=1.3.2 vorbis_version=1.3.5 curl_version=7.65.3 @@ -122,8 +122,8 @@ cmake .. \ -DENABLE_FREETYPE=1 \ -DENABLE_LEVELDB=1 \ \ - -DIRRLICHT_INCLUDE_DIR=$libdir/irrlicht/include/irrlicht \ - -DIRRLICHT_LIBRARY=$libdir/irrlicht/lib/libIrrlicht.dll.a \ + -DIRRLICHT_INCLUDE_DIR=$libdir/irrlicht/include/irrlichtmt \ + -DIRRLICHT_LIBRARY=$libdir/irrlicht/lib/libIrrlichtMt.dll.a \ -DIRRLICHT_DLL="$irr_dlls" \ \ -DZLIB_INCLUDE_DIR=$libdir/zlib/include \ diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh index 53c6d1ea9..54bfbef69 100755 --- a/util/buildbot/buildwin64.sh +++ b/util/buildbot/buildwin64.sh @@ -20,7 +20,7 @@ packagedir=$builddir/packages libdir=$builddir/libs toolchain_file=$dir/toolchain_x86_64-w64-mingw32.cmake -irrlicht_version=1.9.0mt0 +irrlicht_version=1.9.0mt1 ogg_version=1.3.2 vorbis_version=1.3.5 curl_version=7.65.3 @@ -112,8 +112,8 @@ cmake .. \ -DENABLE_FREETYPE=1 \ -DENABLE_LEVELDB=1 \ \ - -DIRRLICHT_INCLUDE_DIR=$libdir/irrlicht/include/irrlicht \ - -DIRRLICHT_LIBRARY=$libdir/irrlicht/lib/libIrrlicht.dll.a \ + -DIRRLICHT_INCLUDE_DIR=$libdir/irrlicht/include/irrlichtmt \ + -DIRRLICHT_LIBRARY=$libdir/irrlicht/lib/libIrrlichtMt.dll.a \ -DIRRLICHT_DLL="$irr_dlls" \ \ -DZLIB_INCLUDE_DIR=$libdir/zlib/include \ diff --git a/util/ci/common.sh b/util/ci/common.sh index d73c31b2f..ca2ecbc29 100644 --- a/util/ci/common.sh +++ b/util/ci/common.sh @@ -12,7 +12,7 @@ install_linux_deps() { shift pkgs+=(libirrlicht-dev) else - wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt0/ubuntu-bionic.tar.gz" + wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt1/ubuntu-bionic.tar.gz" sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local fi -- cgit v1.2.3 From a24899bf2dcd58916922d671ee8761448b6876e5 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 20 Apr 2021 19:50:34 +0200 Subject: Look for PostgreSQL library properly and fix CI --- README.md | 2 +- src/CMakeLists.txt | 11 ++++++++++- util/ci/common.sh | 3 +-- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 662b5c4ca..0b9907992 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Compiling | Dependency | Version | Commentary | |------------|---------|------------| | GCC | 4.9+ | Can be replaced with Clang 3.4+ | -| CMake | 2.6+ | | +| CMake | 3.5+ | | | Irrlicht | - | Custom version required, see https://github.com/minetest/irrlicht | | SQLite3 | 3.0+ | | | LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 16b5bf991..f70e77dcc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -146,7 +146,16 @@ option(ENABLE_POSTGRESQL "Enable PostgreSQL backend" TRUE) set(USE_POSTGRESQL FALSE) if(ENABLE_POSTGRESQL) - find_package("PostgreSQL") + if(CMAKE_VERSION VERSION_LESS "3.20") + find_package(PostgreSQL QUIET) + # Before CMake 3.20 FindPostgreSQL.cmake always looked for server includes + # but we don't need them, so continue anyway if only those are missing. + if(PostgreSQL_INCLUDE_DIR AND PostgreSQL_LIBRARY) + set(PostgreSQL_FOUND TRUE) + endif() + else() + find_package(PostgreSQL) + endif() if(PostgreSQL_FOUND) set(USE_POSTGRESQL TRUE) diff --git a/util/ci/common.sh b/util/ci/common.sh index ca2ecbc29..1083581b5 100644 --- a/util/ci/common.sh +++ b/util/ci/common.sh @@ -5,8 +5,7 @@ install_linux_deps() { local pkgs=(cmake libpng-dev \ libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \ libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev \ - gettext libpq-dev postgresql-server-dev-all libleveldb-dev \ - libcurl4-openssl-dev) + gettext libpq-dev libleveldb-dev libcurl4-openssl-dev) if [[ "$1" == "--old-irr" ]]; then shift -- cgit v1.2.3 From 776015c350bc0210a13dd1a077c086cb81314c09 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 23 Apr 2021 19:37:45 +0000 Subject: Rename “Irrlicht” to “IrrlichtMt” in documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 +++--- LICENSE.txt | 3 ++- README.md | 6 +++--- builtin/settingtypes.txt | 2 +- minetest.conf.example | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) (limited to 'README.md') diff --git a/CMakeLists.txt b/CMakeLists.txt index c46ff6c77..1f90847ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,9 +60,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") # This is done here so that relative search paths are more reasonable find_package(Irrlicht) if(BUILD_CLIENT AND NOT IRRLICHT_FOUND) - message(FATAL_ERROR "Irrlicht is required to build the client, but it was not found.") + message(FATAL_ERROR "IrrlichtMt is required to build the client, but it was not found.") elseif(NOT IRRLICHT_INCLUDE_DIR) - message(FATAL_ERROR "Irrlicht headers are required to build the server, but none found.") + message(FATAL_ERROR "Irrlicht or IrrlichtMt headers are required to build the server, but none found.") endif() include(CheckSymbolExists) @@ -71,7 +71,7 @@ unset(HAS_FORKED_IRRLICHT CACHE) check_symbol_exists(IRRLICHT_VERSION_MT "IrrCompileConfig.h" HAS_FORKED_IRRLICHT) if(NOT HAS_FORKED_IRRLICHT) string(CONCAT EXPLANATION_MSG - "Irrlicht found, but it is not Minetest's Irrlicht fork. " + "Irrlicht found, but it is not IrrlichtMt (Minetest's Irrlicht fork). " "The Minetest team has forked Irrlicht to make their own customizations. " "It can be found here: https://github.com/minetest/irrlicht") if(BUILD_CLIENT) diff --git a/LICENSE.txt b/LICENSE.txt index 2d1c0c795..ab44488a7 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -87,7 +87,8 @@ with this program; if not, write to the Free Software Foundation, Inc., Irrlicht --------------- -This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/ +This program uses IrrlichtMt, Minetest's fork of +the Irrlicht Engine. http://irrlicht.sourceforge.net/ The Irrlicht Engine License diff --git a/README.md b/README.md index 0b9907992..013687685 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Compiling |------------|---------|------------| | GCC | 4.9+ | Can be replaced with Clang 3.4+ | | CMake | 3.5+ | | -| Irrlicht | - | Custom version required, see https://github.com/minetest/irrlicht | +| IrrlichtMt | - | Custom version of Irrlicht, see https://github.com/minetest/irrlicht | | SQLite3 | 3.0+ | | | LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present | | GMP | 5.0.0+ | Bundled mini-GMP is used if not present | @@ -209,7 +209,7 @@ Run it: - You can disable the client build by specifying `-DBUILD_CLIENT=FALSE`. - You can select between Release and Debug build by `-DCMAKE_BUILD_TYPE=`. - Debug build is slower, but gives much more useful output in a debugger. -- If you build a bare server you don't need to have the Irrlicht library installed. +- If you build a bare server you don't need to have the Irrlicht or IrrlichtMt library installed. - In that case use `-DIRRLICHT_INCLUDE_DIR=/some/where/irrlicht/include`. ### CMake options @@ -229,7 +229,7 @@ General options and their default values: ENABLE_CURSES=ON - Build with (n)curses; Enables a server side terminal (command line option: --terminal) ENABLE_FREETYPE=ON - Build with FreeType2; Allows using TTF fonts ENABLE_GETTEXT=ON - Build with Gettext; Allows using translations - ENABLE_GLES=OFF - Build for OpenGL ES instead of OpenGL (requires support by Irrlicht) + ENABLE_GLES=OFF - Build for OpenGL ES instead of OpenGL (requires support by IrrlichtMt) ENABLE_LEVELDB=ON - Build with LevelDB; Enables use of LevelDB map backend ENABLE_POSTGRESQL=ON - Build with libpq; Enables use of PostgreSQL map backend (PostgreSQL 9.5 or greater recommended) ENABLE_REDIS=ON - Build with libhiredis; Enables use of Redis map backend diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 00d1b87d7..d13bac91b 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -661,7 +661,7 @@ lighting_boost_spread (Light curve boost spread) float 0.2 0.0 0.4 # Path to texture directory. All textures are first searched from here. texture_path (Texture path) path -# The rendering back-end for Irrlicht. +# The rendering back-end. # A restart is required after changing this. # Note: On Android, stick with OGLES1 if unsure! App may fail to start otherwise. # On other platforms, OpenGL is recommended. diff --git a/minetest.conf.example b/minetest.conf.example index 47c03ff80..6343c8234 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -761,7 +761,7 @@ # type: path # texture_path = -# The rendering back-end for Irrlicht. +# The rendering back-end. # A restart is required after changing this. # Note: On Android, stick with OGLES1 if unsure! App may fail to start otherwise. # On other platforms, OpenGL is recommended. -- cgit v1.2.3