mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Use newer IrrlichtMt
now with SDL2
This commit is contained in:
parent
225aa107f6
commit
699d1bf27c
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@ -74,7 +74,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
VCPKG_VERSION: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
|
VCPKG_VERSION: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
|
||||||
# 2023.10.19
|
# 2023.10.19
|
||||||
vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry
|
vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry sdl2
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -140,7 +140,7 @@ elseif(BUILD_CLIENT AND TARGET IrrlichtMt::IrrlichtMt)
|
|||||||
endif()
|
endif()
|
||||||
message(STATUS "Found IrrlichtMt ${IrrlichtMt_VERSION}")
|
message(STATUS "Found IrrlichtMt ${IrrlichtMt_VERSION}")
|
||||||
|
|
||||||
set(TARGET_VER_S 1.9.0mt13)
|
set(TARGET_VER_S 1.9.0mt14)
|
||||||
string(REPLACE "mt" "." TARGET_VER ${TARGET_VER_S})
|
string(REPLACE "mt" "." TARGET_VER ${TARGET_VER_S})
|
||||||
if(IrrlichtMt_VERSION VERSION_LESS ${TARGET_VER})
|
if(IrrlichtMt_VERSION VERSION_LESS ${TARGET_VER})
|
||||||
message(FATAL_ERROR "At least IrrlichtMt ${TARGET_VER_S} is required to build")
|
message(FATAL_ERROR "At least IrrlichtMt ${TARGET_VER_S} is required to build")
|
||||||
|
@ -7,8 +7,12 @@
|
|||||||
| GCC | 7.5+ | or Clang 7.0.1+ |
|
| GCC | 7.5+ | or Clang 7.0.1+ |
|
||||||
| CMake | 3.5+ | |
|
| CMake | 3.5+ | |
|
||||||
| IrrlichtMt | - | Custom version of Irrlicht, see https://github.com/minetest/irrlicht |
|
| IrrlichtMt | - | Custom version of Irrlicht, see https://github.com/minetest/irrlicht |
|
||||||
|
| libjpeg | - | (via IrrlichtMt) |
|
||||||
|
| libpng | - | (via IrrlichtMt) |
|
||||||
|
| SDL | 2.x | (via IrrlichtMt) |
|
||||||
| Freetype | 2.0+ | |
|
| Freetype | 2.0+ | |
|
||||||
| SQLite3 | 3+ | |
|
| SQLite3 | 3+ | |
|
||||||
|
| Zlib | - | |
|
||||||
| Zstd | 1.0+ | |
|
| Zstd | 1.0+ | |
|
||||||
| LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present |
|
| LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present |
|
||||||
| GMP | 5.0.0+ | Bundled mini-GMP is used if not present |
|
| GMP | 5.0.0+ | Bundled mini-GMP is used if not present |
|
||||||
@ -18,27 +22,27 @@
|
|||||||
|
|
||||||
For Debian/Ubuntu users:
|
For Debian/Ubuntu users:
|
||||||
|
|
||||||
sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext
|
sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext libsdl2-dev
|
||||||
|
|
||||||
For Fedora users:
|
For Fedora users:
|
||||||
|
|
||||||
sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libpng-devel libjpeg-devel libvorbis-devel libXi-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel libzstd-devel gettext
|
sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libpng-devel libjpeg-devel libvorbis-devel libXi-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel spatialindex-devel libzstd-devel gettext SDL2-devel
|
||||||
|
|
||||||
For openSUSE users:
|
For openSUSE users:
|
||||||
|
|
||||||
sudo zypper install gcc cmake libjpeg8-devel libpng16-devel openal-soft-devel libcurl-devel sqlite3-devel luajit-devel libzstd-devel Mesa-libGL-devel libXi-devel libvorbis-devel freetype2-devel
|
sudo zypper install gcc cmake libjpeg8-devel libpng16-devel openal-soft-devel libcurl-devel sqlite3-devel luajit-devel libzstd-devel Mesa-libGL-devel libXi-devel libvorbis-devel freetype2-devel SDL2-devel
|
||||||
|
|
||||||
For Arch users:
|
For Arch users:
|
||||||
|
|
||||||
sudo pacman -S --needed base-devel libcurl-gnutls cmake libxi libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses zstd gettext
|
sudo pacman -S --needed base-devel libcurl-gnutls cmake libxi libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses zstd gettext sdl2
|
||||||
|
|
||||||
For Alpine users:
|
For Alpine users:
|
||||||
|
|
||||||
sudo apk add build-base cmake libpng-dev jpeg-dev libxi-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev zstd-dev gettext
|
sudo apk add build-base cmake libpng-dev jpeg-dev libxi-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev zstd-dev gettext sdl2-dev
|
||||||
|
|
||||||
For Void users:
|
For Void users:
|
||||||
|
|
||||||
sudo xbps-install cmake libpng-devel jpeg-devel libXi-devel mesa sqlite-devel libogg-devel libvorbis-devel libopenal-devel libcurl-devel freetype-devel zlib-devel gmp-devel jsoncpp-devel LuaJIT-devel libzstd-devel gettext
|
sudo xbps-install cmake libpng-devel jpeg-devel libXi-devel mesa sqlite-devel libogg-devel libvorbis-devel libopenal-devel libcurl-devel freetype-devel zlib-devel gmp-devel jsoncpp-devel LuaJIT-devel libzstd-devel gettext SDL2-devel
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ It is highly recommended to use vcpkg as package manager.
|
|||||||
|
|
||||||
After you successfully built vcpkg you can easily install the required libraries:
|
After you successfully built vcpkg you can easily install the required libraries:
|
||||||
```powershell
|
```powershell
|
||||||
vcpkg install zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry gettext --triplet x64-windows
|
vcpkg install zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry gettext sdl2 --triplet x64-windows
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Don't forget about IrrlichtMt.** The easiest way is to clone it to `lib/irrlichtmt`:
|
- **Don't forget about IrrlichtMt.** The easiest way is to clone it to `lib/irrlichtmt`:
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0mt13
|
1.9.0mt14
|
||||||
|
@ -678,12 +678,8 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
|
|||||||
if (!was_url_pressed
|
if (!was_url_pressed
|
||||||
&& event.MouseInput.Event == EMIE_MMOUSE_PRESSED_DOWN) {
|
&& event.MouseInput.Event == EMIE_MMOUSE_PRESSED_DOWN) {
|
||||||
// Paste primary selection at cursor pos
|
// Paste primary selection at cursor pos
|
||||||
#if IRRLICHT_VERSION_MT_REVISION >= 11
|
|
||||||
const c8 *text = Environment->getOSOperator()
|
const c8 *text = Environment->getOSOperator()
|
||||||
->getTextFromPrimarySelection();
|
->getTextFromPrimarySelection();
|
||||||
#else
|
|
||||||
const c8 *text = nullptr;
|
|
||||||
#endif
|
|
||||||
if (text)
|
if (text)
|
||||||
prompt.input(utf8_to_wide(text));
|
prompt.input(utf8_to_wide(text));
|
||||||
}
|
}
|
||||||
@ -774,9 +770,7 @@ bool GUIChatConsole::weblinkClick(s32 col, s32 row)
|
|||||||
|
|
||||||
void GUIChatConsole::updatePrimarySelection()
|
void GUIChatConsole::updatePrimarySelection()
|
||||||
{
|
{
|
||||||
#if IRRLICHT_VERSION_MT_REVISION >= 11
|
|
||||||
std::wstring wselected = m_chat_backend->getPrompt().getSelection();
|
std::wstring wselected = m_chat_backend->getPrompt().getSelection();
|
||||||
std::string selected = wide_to_utf8(wselected);
|
std::string selected = wide_to_utf8(wselected);
|
||||||
Environment->getOSOperator()->copyToPrimarySelection(selected.c_str());
|
Environment->getOSOperator()->copyToPrimarySelection(selected.c_str());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,6 @@ void GUIEditBox::setTextMarkers(s32 begin, s32 end)
|
|||||||
m_mark_begin = begin;
|
m_mark_begin = begin;
|
||||||
m_mark_end = end;
|
m_mark_end = end;
|
||||||
|
|
||||||
#if IRRLICHT_VERSION_MT_REVISION >= 11
|
|
||||||
if (!m_passwordbox && m_operator && m_mark_begin != m_mark_end) {
|
if (!m_passwordbox && m_operator && m_mark_begin != m_mark_end) {
|
||||||
// copy to primary selection
|
// copy to primary selection
|
||||||
const s32 realmbgn = m_mark_begin < m_mark_end ? m_mark_begin : m_mark_end;
|
const s32 realmbgn = m_mark_begin < m_mark_end ? m_mark_begin : m_mark_end;
|
||||||
@ -187,7 +186,6 @@ void GUIEditBox::setTextMarkers(s32 begin, s32 end)
|
|||||||
std::string s = stringw_to_utf8(Text.subString(realmbgn, realmend - realmbgn));
|
std::string s = stringw_to_utf8(Text.subString(realmbgn, realmend - realmbgn));
|
||||||
m_operator->copyToPrimarySelection(s.c_str());
|
m_operator->copyToPrimarySelection(s.c_str());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
sendGuiEvent(EGET_EDITBOX_MARKING_CHANGED);
|
sendGuiEvent(EGET_EDITBOX_MARKING_CHANGED);
|
||||||
}
|
}
|
||||||
@ -796,7 +794,6 @@ bool GUIEditBox::processMouse(const SEvent &event)
|
|||||||
m_mouse_marking = false;
|
m_mouse_marking = false;
|
||||||
setTextMarkers(m_cursor_pos, m_cursor_pos);
|
setTextMarkers(m_cursor_pos, m_cursor_pos);
|
||||||
|
|
||||||
#if IRRLICHT_VERSION_MT_REVISION >= 11
|
|
||||||
// paste from the primary selection
|
// paste from the primary selection
|
||||||
inputString([&] {
|
inputString([&] {
|
||||||
if (!m_operator)
|
if (!m_operator)
|
||||||
@ -806,7 +803,6 @@ bool GUIEditBox::processMouse(const SEvent &event)
|
|||||||
return core::stringw();
|
return core::stringw();
|
||||||
return utf8_to_stringw(inserted_text_utf8);
|
return utf8_to_stringw(inserted_text_utf8);
|
||||||
}());
|
}());
|
||||||
#endif
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ mkdir -p $libdir
|
|||||||
|
|
||||||
cd $libdir
|
cd $libdir
|
||||||
libhost="http://minetest.kitsunemimi.pw"
|
libhost="http://minetest.kitsunemimi.pw"
|
||||||
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32-ucrt.zip" irrlicht-$irrlicht_version-win32.zip
|
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32.zip" irrlicht-$irrlicht_version-win32.zip
|
||||||
download "$libhost/zlib-$zlib_version-win32.zip"
|
download "$libhost/zlib-$zlib_version-win32.zip"
|
||||||
download "$libhost/ucrt/zstd-$zstd_version-win32.zip"
|
download "$libhost/ucrt/zstd-$zstd_version-win32.zip"
|
||||||
download "$libhost/ucrt/libogg-$ogg_version-win32.zip"
|
download "$libhost/ucrt/libogg-$ogg_version-win32.zip"
|
||||||
|
@ -37,7 +37,7 @@ mkdir -p $libdir
|
|||||||
|
|
||||||
cd $libdir
|
cd $libdir
|
||||||
libhost="http://minetest.kitsunemimi.pw"
|
libhost="http://minetest.kitsunemimi.pw"
|
||||||
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win64-ucrt.zip" irrlicht-$irrlicht_version-win64.zip
|
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win64.zip" irrlicht-$irrlicht_version-win64.zip
|
||||||
download "$libhost/zlib-$zlib_version-win64.zip"
|
download "$libhost/zlib-$zlib_version-win64.zip"
|
||||||
download "$libhost/ucrt/zstd-$zstd_version-win64.zip"
|
download "$libhost/ucrt/zstd-$zstd_version-win64.zip"
|
||||||
download "$libhost/ucrt/libogg-$ogg_version-win64.zip"
|
download "$libhost/ucrt/libogg-$ogg_version-win64.zip"
|
||||||
|
@ -4,8 +4,8 @@ d70c9886526513a2c8a7962815fb425f296ab934239470a03ea350944169a7ac freetype-2.13.
|
|||||||
06aa20c71724e832874baa296d047aa866db2c336e26aa49e4faa72e559414a6 freetype-2.13.2-win64.zip
|
06aa20c71724e832874baa296d047aa866db2c336e26aa49e4faa72e559414a6 freetype-2.13.2-win64.zip
|
||||||
41b10766de2773f0f0851fde16b363024685e0397f4bb2e5cd2a7be196960a01 gettext-0.20.2-win32.zip
|
41b10766de2773f0f0851fde16b363024685e0397f4bb2e5cd2a7be196960a01 gettext-0.20.2-win32.zip
|
||||||
1ceed167ff16fea944f76ab6ea2969160c71a67419259b17c9c523e7a01eb883 gettext-0.20.2-win64.zip
|
1ceed167ff16fea944f76ab6ea2969160c71a67419259b17c9c523e7a01eb883 gettext-0.20.2-win64.zip
|
||||||
15d09d259b62ce0b5d7582a26360f60bb99784c5b223364b6f21dc9d99844d15 irrlicht-1.9.0mt13-win32.zip
|
faa09cd5c3790fdad3fcb43ba1d5c5102492a7b88b9301de59cecb92af37c162 irrlicht-1.9.0mt14-win32.zip
|
||||||
ddfa8d61ac5404202588c0793842f49b0198d8e87b963fe196cca0781a3099ca irrlicht-1.9.0mt13-win64.zip
|
a5724e994f417b04e43bc9dd54adf6f32050e39b2cc1a79acdf361a9d3972ece irrlicht-1.9.0mt14-win64.zip
|
||||||
6d49348215916ff355187fec808d0847450f70e45fe2719f45af9eb61c047358 leveldb-1.23-win32.zip
|
6d49348215916ff355187fec808d0847450f70e45fe2719f45af9eb61c047358 leveldb-1.23-win32.zip
|
||||||
30c680277320bdda130b238d0adc30c3c59e7522dc008d677893ebfaea22f28b leveldb-1.23-win64.zip
|
30c680277320bdda130b238d0adc30c3c59e7522dc008d677893ebfaea22f28b leveldb-1.23-win64.zip
|
||||||
d58b67954f3f552fba5e315ed476c38b230d0cf53445fe07dc733e72f8ba7dc2 libogg-1.3.5-win32.zip
|
d58b67954f3f552fba5e315ed476c38b230d0cf53445fe07dc733e72f8ba7dc2 libogg-1.3.5-win32.zip
|
||||||
|
@ -13,8 +13,8 @@ install_linux_deps() {
|
|||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
local ver=$(cat misc/irrlichtmt_tag.txt)
|
local ver=$(cat misc/irrlichtmt_tag.txt)
|
||||||
wget "https://github.com/minetest/irrlicht/releases/download/$ver/ubuntu-bionic.tar.gz"
|
wget "https://github.com/minetest/irrlicht/releases/download/$ver/ubuntu-focal.tar.gz"
|
||||||
sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local
|
sudo tar -xaf ubuntu-focal.tar.gz -C /usr/local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
Loading…
Reference in New Issue
Block a user