Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/minetest32double' into minetest3…
Browse files Browse the repository at this point in the history
…2net
  • Loading branch information
proller committed Jul 27, 2023
2 parents 9086925 + dc67978 commit d8ba6d8
Show file tree
Hide file tree
Showing 176 changed files with 15,051 additions and 5,505 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
# Older gcc version (should be close to our minimum supported version)
gcc_5:
runs-on: ubuntu-18.04
if: "false" # FIXME
steps:
- uses: actions/checkout@v3
- name: Install deps
Expand Down Expand Up @@ -78,6 +79,7 @@ jobs:
# Older clang version (should be close to our minimum supported version)
clang_3_9:
runs-on: ubuntu-18.04
if: "false" # FIXME
steps:
- uses: actions/checkout@v3
- name: Install deps
Expand Down
9 changes: 7 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ numzero <[email protected]> <[email protected]>
Jean-Patrick Guerrero <[email protected]>
Jean-Patrick Guerrero <[email protected]> <[email protected]>
HybridDog <[email protected]> <[email protected]>
srfqi <[email protected]>
srifqi <[email protected]>
Dániel Juhász <[email protected]>
rubenwardy <[email protected]>
rubenwardy <[email protected]> <[email protected]>
Expand All @@ -48,7 +48,8 @@ ClobberXD <[email protected]> <[email protected]>
ClobberXD <[email protected]> <[email protected]>
Auke Kok <[email protected]>
Auke Kok <[email protected]> <[email protected]>
Desour <[email protected]>
DS <[email protected]>
DS <[email protected]> <[email protected]>
Nathanaëlle Courant <[email protected]> <[email protected]>
Ezhh <[email protected]>
paramat <[email protected]>
Expand All @@ -67,3 +68,7 @@ gregorycu <[email protected]>
Rogier <[email protected]>
Rogier <[email protected]> <[email protected]>
x2048 <[email protected]>
Lars Müller <[email protected]>
Lars Müller <[email protected]> <[email protected]>
ROllerozxa <[email protected]>
ROllerozxa <[email protected]> <[email protected]>
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set(VERSION_PATCH 0)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")

# Change to false for releases
set(DEVELOPMENT_BUILD TRUE)
set(DEVELOPMENT_BUILD FALSE)

set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
if(VERSION_EXTRA)
Expand Down Expand Up @@ -127,7 +127,7 @@ if(BUILD_CLIENT AND TARGET IrrlichtMt::IrrlichtMt)
endif()
message(STATUS "Found IrrlichtMt ${IrrlichtMt_VERSION}")

set(TARGET_VER_S 1.9.0mt9)
set(TARGET_VER_S 1.9.0mt10)
string(REPLACE "mt" "." TARGET_VER ${TARGET_VER_S})
if(IrrlichtMt_VERSION VERSION_LESS ${TARGET_VER})
message(FATAL_ERROR "At least IrrlichtMt ${TARGET_VER_S} is required to build")
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ Some can be changed in the key config dialog in the settings tab.
| T | Chat |
| / | Command |
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
| R | Enable/disable full range view |
| + | Increase view range |
| - | Decrease view range |
| K | Enable/disable fly mode (needs fly privilege) |
| P | Enable/disable pitch move mode |
| J | Enable/disable fast mode (needs fast privilege) |
| H | Enable/disable noclip mode (needs noclip privilege) |
| E | Aux1 (Move fast in fast mode. Games may add special features) |
Expand Down Expand Up @@ -148,7 +146,7 @@ For Debian/Ubuntu users:

For Fedora users:

sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-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
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

For Arch users:

Expand All @@ -170,6 +168,14 @@ For Fedora users:

sudo dnf install git

For Arch users:

sudo pacman -S git

For Alpine users:

sudo apk add git

Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:

git clone --depth 1 https://github.com/minetest/minetest.git
Expand Down
85 changes: 47 additions & 38 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 32
buildToolsVersion '32.0.0'
compileSdkVersion 33
buildToolsVersion '33.0.2'
ndkVersion "$ndk_version"
defaultConfig {
applicationId 'net.minetest.minetest'
minSdkVersion 16
targetSdkVersion 32
minSdkVersion 21
targetSdkVersion 33
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
versionCode project.versionCode
}
Expand Down Expand Up @@ -52,51 +53,59 @@ android {

task prepareAssets() {
def assetsFolder = "build/assets"
def projRoot = "../.."
def projRoot = rootDir.parent
def gameToCopy = "minetest_game"

copy {
from "${projRoot}/minetest.conf.example", "${projRoot}/README.md" into assetsFolder
}
copy {
from "${projRoot}/doc/lgpl-2.1.txt" into "${assetsFolder}"
}
copy {
from "${projRoot}/builtin" into "${assetsFolder}/builtin"
}
copy {
from "${projRoot}/client/shaders" into "${assetsFolder}/client/shaders"
}
copy {
from "../native/deps/armeabi-v7a/Irrlicht/Shaders" into "${assetsFolder}/client/shaders/Irrlicht"
doFirst {
logger.lifecycle('Preparing assets at {}', assetsFolder)
}
copy {
from "${projRoot}/fonts" include "*.ttf" into "${assetsFolder}/fonts"
}
copy {
from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}"
}
fileTree("${projRoot}/po").include("**/*.po").forEach { poFile ->
def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/"
file(moPath).mkdirs()
exec {
commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile
doLast {
copy {
from "${projRoot}/minetest.conf.example", "${projRoot}/README.md" into assetsFolder
}
copy {
from "${projRoot}/doc/lgpl-2.1.txt" into assetsFolder
}
copy {
from "${projRoot}/builtin" into "${assetsFolder}/builtin"
}
copy {
from "${projRoot}/client/shaders" into "${assetsFolder}/client/shaders"
}
copy {
from "../native/deps/armeabi-v7a/Irrlicht/Shaders" into "${assetsFolder}/client/shaders/Irrlicht"
}
copy {
from "${projRoot}/fonts" include "*.ttf" into "${assetsFolder}/fonts"
}
copy {
from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}"
}
copy {
from "${projRoot}/textures" into "${assetsFolder}/textures"
}
}
copy {
from "${projRoot}/textures" into "${assetsFolder}/textures"
}

file("${assetsFolder}/.nomedia").text = ""
// compile translations
fileTree("${projRoot}/po").include("**/*.po").forEach { poFile ->
def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/"
file(moPath).mkdirs()
exec {
commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile
}
}

file("${assetsFolder}/.nomedia").text = ""
}

task zipAssets(type: Zip) {
task zipAssets(dependsOn: prepareAssets, type: Zip) {
archiveFileName = "Minetest.zip"
from "${assetsFolder}"
from assetsFolder
destinationDirectory = file("src/main/assets")
}
}

preBuild.dependsOn zipAssets
prepareAssets.dependsOn ':native:getDeps'

// Map for the version code that gives each ABI a value.
import com.android.build.OutputFile
Expand All @@ -112,5 +121,5 @@ android.applicationVariants.all { variant ->

dependencies {
implementation project(':native')
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
}
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:glEsVersion="0x00020000" />

<!--
`android:requestLegacyExternalStorage="true"` is workaround for using `/sdcard`
Expand Down
11 changes: 5 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
project.ext.set("versionMajor", 5) // Version Major
project.ext.set("versionMinor", 7) // Version Minor
project.ext.set("versionPatch", 0) // Version Patch
project.ext.set("versionExtra", "-dev") // Version Extra
project.ext.set("versionCode", 40) // Android Version Code
project.ext.set("developmentBuild", 1) // Whether it is a development build, or a release
project.ext.set("versionExtra", "") // Version Extra
project.ext.set("versionCode", 44) // Android Version Code
project.ext.set("developmentBuild", 0) // Whether it is a development build, or a release
// NOTE: +2 after each release!
// +1 for ARM and +1 for ARM64 APK's, because
// each APK must have a larger `versionCode` than the previous

buildscript {
ext.ndk_version = '25.1.8937393'
ext.ndk_version = '25.2.9519653'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.1'
classpath 'de.undercouch:gradle-download-task:4.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -33,5 +33,4 @@ allprojects {

task clean(type: Delete) {
delete rootProject.buildDir
delete 'native/deps'
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
29 changes: 17 additions & 12 deletions android/native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'de.undercouch.download'

android {
compileSdkVersion 32
buildToolsVersion '32.0.0'
compileSdkVersion 33
buildToolsVersion '33.0.2'
ndkVersion "$ndk_version"
defaultConfig {
minSdkVersion 16
targetSdkVersion 32
minSdkVersion 21
targetSdkVersion 33
externalNativeBuild {
ndkBuild {
arguments '-j' + Runtime.getRuntime().availableProcessors(),
Expand Down Expand Up @@ -52,18 +52,23 @@ android {

// get precompiled deps
task downloadDeps(type: Download) {
def depsDir = new File(buildDir.parent, 'deps')
def depsZip = new File(buildDir, 'deps.zip')

src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps.zip'
dest new File(buildDir, 'deps.zip')
dest depsZip
overwrite false
}

task getDeps(dependsOn: downloadDeps, type: Copy) {
def deps = new File(buildDir.parent, 'deps')
if (!deps.exists()) {
deps.mkdir()
from zipTree(downloadDeps.dest)
into deps
task getDeps(dependsOn: downloadDeps, type: Copy) {
depsDir.mkdir()
from zipTree(depsZip)
into depsDir
doFirst { logger.lifecycle('Extracting to {}', depsDir) }
}
}

preBuild.dependsOn getDeps

clean {
delete new File(buildDir.parent, 'deps')
}
2 changes: 1 addition & 1 deletion builtin/game/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ core.register_chatcommand("revokeme", {

core.register_chatcommand("setpassword", {
params = S("<name> <password>"),
description = S("Set player's password"),
description = S("Set player's password (sent unencrypted, thus insecure)"),
privs = {password=true},
func = function(name, param)
local toname, raw_password = string.match(param, "^([^ ]+) +(.+)$")
Expand Down
26 changes: 12 additions & 14 deletions builtin/game/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -390,22 +390,20 @@ function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed

-- Changing hp might kill the player causing mods to do who-knows-what to the
-- inventory, so do this before set_hp().
if replace_with_item then
if itemstack:is_empty() then
itemstack:add_item(replace_with_item)
else
local inv = user:get_inventory()
-- Check if inv is null, since non-players don't have one
if inv and inv:room_for_item("main", {name=replace_with_item}) then
inv:add_item("main", replace_with_item)
else
local pos = user:get_pos()
pos.y = math.floor(pos.y + 0.5)
core.add_item(pos, replace_with_item)
end
replace_with_item = itemstack:add_item(replace_with_item)
user:set_wielded_item(itemstack)
if not replace_with_item:is_empty() then
local inv = user:get_inventory()
-- Check if inv is null, since non-players don't have one
if inv then
replace_with_item = inv:add_item("main", replace_with_item)
end
end
user:set_wielded_item(itemstack)
if not replace_with_item:is_empty() then
local pos = user:get_pos()
pos.y = math.floor(pos.y + 0.5)
core.add_item(pos, replace_with_item)
end

user:set_hp(user:get_hp() + hp_change)

Expand Down
4 changes: 2 additions & 2 deletions builtin/locale/__builtin.de.tr
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Invalid parameters (see /help revoke).=Ungültige Parameter (siehe „/help revo
Revoke privileges from yourself=Privilegien von Ihnen selbst entfernen
Invalid parameters (see /help revokeme).=Ungültige Parameter (siehe „/help revokeme“).
<name> <password>=<Name> <Passwort>
Set player's password=Passwort von Spieler setzen
Set player's password (sent unencrypted, thus insecure)=Spielerpasswort setzen (unverschlüsselt gesendet, also unsicher)
Name field required.=Namensfeld benötigt.
Your password was cleared by @1.=Ihr Passwort wurde von @1 geleert.
Password of player "@1" cleared.=Passwort von Spieler „@1“ geleert.
Expand Down Expand Up @@ -197,6 +197,7 @@ Available commands:=Verfügbare Befehle:
Command not available: @1=Befehl nicht verfügbar: @1
[all | privs | <cmd>] [-t]=[all | privs | <Befehl>] [-t]
Get help for commands or list privileges (-t: output in chat)=Hilfe für Befehle erhalten oder Privilegien auflisten (-t: Ausgabe im Chat)
Available privileges:=Verfügbare Privilegien:
Command=Befehl
Parameters=Parameter
For more information, click on any entry in the list.=Für mehr Informationen klicken Sie auf einen beliebigen Eintrag in der Liste.
Expand All @@ -206,7 +207,6 @@ Available commands: (see also: /help <cmd>)=Verfügbare Befehle: (siehe auch: /h
Close=Schließen
Privilege=Privileg
Description=Beschreibung
Available privileges:=Verfügbare Privilegien:
print [<filter>] | dump [<filter>] | save [<format> [<filter>]] | reset=print [<Filter>] | dump [<Filter>] | save [<Format> [<Filter>]]
Handle the profiler and profiling data=Den Profiler und Profilingdaten verwalten
Statistics written to action log.=Statistiken zum Aktionsprotokoll geschrieben.
Expand Down
Loading

0 comments on commit d8ba6d8

Please sign in to comment.