Commit Graph

212 Commits

Author SHA1 Message Date
Loic Blot
9855651c06
Update gradle android tool to 3.1.3
Thanks to Monte48 for the correct maven URL outside of android studio
2018-07-22 13:03:31 +02:00
lhofhansl
94cd2bfeac Revert 6587 - Optimize entity-entity collision (#7539) 2018-07-08 21:30:55 +01:00
Loïc Blot
7d20ff47d7
Backport Android cleanup parts from #7123 (#7513)
Also resync properly the dependencies versions.

Don't let the makefile handle the cleanups itself. Let gradle do it.

This is one of the first steps to remove the makefile and replace it with a full gradle support
2018-07-01 12:23:38 +02:00
Loïc Blot
eef62c82a2
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* Modernize lua read (part 2 & 3): C++ templating assurance

Implement the boolean reader
Implement the string reader
Also remove unused & unimplemented script_error_handler
Add a reader with default value
2018-06-30 17:11:38 +02:00
Loic Blot
2513886969
Bump android version to 20 2018-06-28 19:11:34 +02:00
Loic Blot
caab9e51a4
Update cURL (7.60.0) & SQLite3 (3.24.0) 2018-06-28 19:11:31 +02:00
Loic Blot
142ce6a5d2
Android: gradle 3.1.3 is not available on mavenCentral
Also update wrapper
2018-06-11 20:38:31 +02:00
Loïc Blot
2b30f8b849
Android: fix tools versions
Resync with stable-0.4
2018-06-11 19:19:06 +02:00
Loïc Blot
956a0ba180
Android: fix assets cleanup 2018-06-11 19:18:34 +02:00
Loic Blot
2e18a2d68c
Bump android version for next release 2018-06-10 18:30:25 +02:00
Loic Blot
5966e897e4
Android: use c++_shared library instead of c++_static
MT doesn't launch without that
2018-06-10 17:57:29 +02:00
Loic Blot
057f1574cb
Fix many Android build issues
It remains one issue with MT itself and rtti
2018-06-10 17:54:44 +02:00
SmallJoker
63ca604b64 Fix Android build, broken since 87ad4d8 2018-04-21 10:17:16 +02:00
rubenwardy
87ad4d8e7f
Add online content repository
Replaces mods and texture pack tabs with a single content tab
2018-04-19 20:14:53 +01:00
rubenwardy
91615f9588 Add player:get_meta(), deprecate player attributes (#7202)
* Add player:get_meta(), deprecate player attributes
2018-04-06 10:52:29 +02:00
Vitaliy
528908a4c3 Optimize entity-entity collision (#6587)
* Add IrrLicht type aliases
* Add hash for IrrLicht vector
* Add object map
2018-04-03 08:23:46 +02:00
Loïc Blot
4fd9715876
Cleanup sound manager class (#7158)
* Cleanup sound manager client

* Use some const refs
* Use auto on iterators
* Drop unused parameters
* Move sound_openal.* to client folder
* Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
2018-03-24 15:45:25 +01:00
Vitaliy
9fcc0c1217 Update mesh collector and move it to a separate file (#6904)
* Update MeshCollector

* Simplify MeshCollector
2018-03-22 20:59:49 +01:00
Loic Blot
c34d28bad6
Add missing file to android build 2018-03-17 12:13:42 +01:00
Loic Blot
1106109998
Android: typo fix since recent gradle update, as output path changed 2018-03-11 18:22:11 +01:00
Loic Blot
a1c5a01142
Fix Android build, but there is a remaining linking issue in guiConfirmRegistration
* Also fix variable name overloading in guiConfirmRegistration
2018-03-11 17:45:58 +01:00
stujones11
22a891a925
Android build fixes for c++11 2018-03-11 16:56:27 +01:00
Loic Blot
69247ca223
Android: update tools (gradle, NDK) & prepare to switch to clang 2018-03-11 16:52:53 +01:00
red-001
5dab742645 [CSM] Add functions to create particles and particlespawners. (#6072) 2018-01-20 23:31:53 +01:00
Loic Blot
99c9e7a986 Game refactor [4/X]: keycache is now owned by InputHandler
* Make InputHandler own the key cache
* Add a helper function InputHandler::cancelPressed to avoid multiple similar calls in game.cpp
* Move RandomInputHandler::step definition into cpp file
2018-01-20 16:38:38 +01:00
red-001
9649e47214 [CSM] Add basic HUD manipulation. (#6067)
* [CSM] Add basic HUD manipulation.

Workaround for on_connect not working right now.
2018-01-20 14:09:58 +01:00
Wayward One
ff2ceed381 Prevent Android from automatically locking display (#6876)
As mentioned in #5759
2018-01-04 21:18:18 +01:00
stujones11
2507d32afe Android: Update build system for ndk-r15x
Add workarounds for ndk-r16.
2017-12-04 02:20:32 +00:00
Vitaliy
20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
adelcoding1
9b8fa99fe3
FormSpec : Add an auto vertical scrollbar to the textarea 2017-10-09 08:11:00 +02:00
Vaughan Lapsley
a80ecbee1e Mapgen: Add Carpathian mapgen (#6015) 2017-07-06 13:53:56 +02:00
Loïc Blot
b3a36f7378 Isolate irrlicht references and use a singleton (#6041)
* Add Device3D class which will contain IrrlichtDevice interface

move getSupportedVideoDrivers to Device3D

Add Device3D singleton & use it in various places

Rename Device3D to Rendering engine & add helper functions to various device pointers

More singleton work

RenderingEngine owns draw_load_screen

move draw functions to RenderingEngine

Reduce IrrlichtDevice exposure and guienvironment

RenderingEngine: Expose get_timer_time() to remove device from guiEngine

Make irrlichtdevice & scene manager less exposed

* Code style fixes

* Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine

Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly

* enum paralax => enum parallax
2017-06-26 20:11:17 +02:00
Loïc Blot
ddcd026344 Remove legacy content_abm.{cpp,h} 2017-06-14 16:23:08 +02:00
red-001
26e2eb019a Improve the path select GUI (#5852)
- Allow lua to chose whatever directories or files can be selected
- Fix selecting directories
- Rename dialog to `guiPathSelectMenu` from `guiFileSelectMenu`
- Rename lua function for opening the menu from `show_file_open_dialog` to `show_path_select_dialog`
- Remove duplicate code and fix code style.

Related changes
- fix `clang-format` whitelist.
- Regenerate minetest.conf.example
2017-06-11 09:43:31 +02:00
Loïc Blot
8bdde45895 Revert "Remove deprecated code segments (#5891)"
This reverts commit 599e13e95e81aadb959c9f3715aec9b425ede084.
2017-06-06 16:19:04 +02:00
Thomas--S
599e13e95e Remove deprecated code segments (#5891) 2017-06-04 21:42:32 +02:00
Loic Blot
72eec0f6f5
Android: update build tools version + versionCode bump for release 2017-06-03 19:36:17 +02:00
Loïc Blot
0d4d35ab93 Android dependencies updates (#5755)
* irrlicht ogles 5122 -> 5145
* openssl 1.0.2j -> 1.0.2k
* curl 7.52 -> 7.54
* sqlite 3.15.2 -> 3.18.0
2017-05-13 13:32:59 +02:00
Loïc Blot
9b8ca3a746 Move KeyList & InputHandler from game.h to client/inputhandler.h (#5752)
* Move KeyList & InputHandler from game.h to client/inputhandler.h

We have a header for inputs, move inputhandler class & related keylist object to it

Also introduce a cpp file for MyEventReceiver::OnEvent function in inputhandler.h because a so huge function doesn't needs to be inlined

* Pass clang-format on inputhandler.{cpp,h} (compatible)
2017-05-13 11:05:16 +02:00
ShadowNinja
77597c4ff3 Clean up numeric.h and split FacePositionCache from it
I also optiized FacePositionCache a bit: I removed a map
lookup and vector copy from both branches of getFacePosition.
2017-05-06 16:09:45 -04:00
bigfoot547
de028fc056 [CSM] Add camera API (#5609)
* [CSM] Add camera API
roper rebase & squash

* Address nerzhul's review
2017-05-05 22:07:36 +02:00
Loic Blot
1670bc7366
Fix Android build since 2818d3f2244d2146a5cdb61cd41f6561c514f97c 2017-04-26 21:11:46 +02:00
Loïc Blot
29ab20c272 Player data to Database (#5475)
* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
2017-04-23 14:35:08 +02:00
Perttu Ahola
04cc9de8f2 MeshUpdateQueue: Add a MapBlock cache that minimizes the amount of MapBlock copying done in the main thread
Cache size is configurable by the meshgen_block_cache_size (default 20 MB).

New profiler stats:
- MeshUpdateQueue MapBlock cache hit %
- MeshUpdateQueue MapBlock cache size kB

Removes one type of stutter that was seen on the client when received MapBlocks
were being handled. (the "MeshMakeData::fill" stutter)

Kind of related to at least #5239

Originally preceded by these commits, now includes them:
- Move the mesh generator thread into src/mesh_generator_thread.{cpp,h}
- mesh_generator_thread.cpp: Update code style
- MeshUpdateThread: Modify interface to house a different implementation: Actual functionality will be changed by next commits.
- MeshMakeData: Add fillBlockData() interface (so that caller can fill in stuff from eg. a MapBlock cache)
2017-04-17 14:58:29 +03:00
Nathanaël Courant
d17636484d Disable android leveldb by default (#5596)
1) Now leveldb is brick (thanks google)
2) By default, use SQLite3, this work perfectly and NOBODY not use LevelDB on Android :)
2017-04-16 09:48:48 +02:00
Loic Blot
98286a24bc
Fix android build 2017-04-14 09:26:11 +02:00
Loïc Blot
86b1542181 Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib/ instead of src/ (#5473)
* Update embedded jsoncpp from unk version to 0.10.6

0.10.6 is last release without c++11

* Make jsoncpp more compliant with its amalgamate

Jsoncpp cpp file should be upper, make the library like it does in amalgamate

* Reorganization: move minetest embedded libs outside of source tree to /lib

* Fix a dead grep in LINT
2017-04-02 10:51:50 +02:00
Uwe Koloska
ef56586ed3 Add missing source to android build (#5496) 2017-04-01 16:47:58 +02:00
Wayward One
39fa249f91 Fix undefined references (#5400) 2017-03-15 15:42:47 +01:00
Loic Blot
607dab2b0d Fix android build
This fixes #5190
2017-02-08 07:47:56 +01:00
rubenwardy
f2aa2c6a98 Add ItemStack key-value meta storage 2017-02-04 22:07:55 +00:00
rubenwardy
c2e7b1f579 Derive NodeMetaRef from MetaDataRef 2017-02-04 22:07:55 +00:00
rubenwardy
bbdd869d72 Derive NodeMetadata from Metadata 2017-02-04 22:07:55 +00:00
Ner'zhul
8e7449e092 Environment & IGameDef code refactoring (#4985)
* Environment code refactoring
* Cleanup includes & class declarations in client & server environment to improve build speed
* ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts.
* Cleanup IGameDef
  * Move ITextureSource* IGameDef::getTextureSource() to Client only.
  * Also move ITextureSource *IGameDef::tsrc() helper
  * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call
  * drop unused emerge() call
  * cleanup server unused functions (mentionned before)
* Drop one unused parameter from ContentFeatures::updateTextures
* move checkLocalPrivilege to Client
* Remove some unnecessary casts
* create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it
* Fix some comments
* Change required IGameDef to Server/Client pointers
* Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects
* Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu
* drop ClientMap::sectorWasDrawn which is unused
2017-01-09 20:39:22 +01:00
Wayward1
8f22272df5 Add raycast.cpp and tileanimation.cpp to Android.mk 2017-01-05 08:19:54 +01:00
Ner'zhul
b95f543da9 Add gradle wrapper (#4954)
Gradle wrapper permit to use multiple gradle versions across OS versions
2016-12-24 12:30:18 +01:00
rubenwardy
e3cbe521fc Update Android build tools to latest version (#4872) 2016-12-24 08:34:19 +01:00
sfan5
231ac33d34 Bump version to 0.4.15 2016-12-22 23:14:17 +01:00
sfan5
70579dc7c3 Android: Workarounds for Googles completely broken NDK 2016-12-22 22:17:54 +01:00
est31
1dd361f37c Android: update curl and libgmp 2016-12-21 14:36:14 +01:00
rubenwardy
2886f0ccb0 Fix sqlite databases being read-only on 64bit Android by patching sqlite (#4871)
Fixes #4121
2016-12-09 18:27:36 +01:00
est31
24719c6908 Android: fix build and update deps 2016-12-07 21:27:07 +01:00
Ner'zhul
7252c803e0 Add missing remoteplayer.cpp to Android build
this should fix #4683
2016-10-28 15:37:19 +02:00
Rogier-5
a4962240bd Fix for failure to find jsoncpp in android build (#4456)
Commit 4503b5 did not update the android build script.
2016-08-19 20:23:30 +02:00
Ner'zhul
919d9d791c Increase android versionCode (#4350)
This little update is due to a packaging problem when uploading on play store. They don't permit to re upload an APK with same version code.
This case was a fail on openssl packaged version which was old and rejected by Google but they don't remove the APK then i should increase the version code to permit having it on play store
2016-07-28 13:13:25 +02:00
kwolekr
3c63c3044d Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
2016-07-03 15:38:36 -04:00
est31
817fea6330 Fix android build
Thanks to @Wayward1 for reporting the bug.

Fixes #4212.
2016-06-11 05:44:55 +02:00
est31
fa6b21a15b Tell irrlicht if we handle a key or not.
We can remove the function in MtNativeActivity now
as it serves precisely that purpose: to tell irrlicht
that we handled the esc key.

TODO for later:
 * Perhaps try to find a more performant container than KeyList
2016-05-26 20:33:33 +02:00
est31
7a828de1bc Android: enable parallelism for main target too
This adds to the changes that commit

98d16e0d9a945f5f48462c05f26ae4bde2db5731 "Android: Tell make about sub-makes to speed up build"

did, and enables parallel builds for minetest
itself as well.
2016-05-16 05:14:25 +01:00
sfan5
854d9e3745 Bump version to 0.4.14 2016-05-15 14:49:15 +02:00
est31
b25554c8d7 Fix android build by fixing patch line endings 2016-05-14 16:46:46 +02:00
Maksim Gamarnik
b906ed4e59 Fix locked hardware buttons on Android
Fixes #2122
Fixes #1454

Addendum (est31)
According from its docs in android_native_app_glue.h (from the NDK), the
onInputEvent should "Return 1 if you have handled the event, 0 for any
default dispatching". Before, we always returned 1, meaning we blocked
all hardware keys to be given to the OS.
This broke the volume keys and has caused #2122 and #1454.

Although it bases on lots of guesswork, it can probably safely be said that
CGUIEnvironment::postEventFromUser returns true if the event was handled,
and false if not. Therefore, set the status variable depending on what
postEventFromUser returned.
2016-05-14 23:42:36 +10:00
est31
997002703b Android: download deps using https
Its more secure, and some pages even redirect to the https version.
2016-05-12 05:03:15 +02:00
est31
a9b5c2662f Android: update openssl to 1.0.2h 2016-05-12 00:52:29 +02:00
ShadowNinja
e41673820f Upgrade Android build to Gradle build system
The old Ant build system has been deprecated for a while and new development is focused on Gradle.
I also removed a hardcoded string that lint caught and moved the patch files to a subdirectory.
I left the JNI files in the root directory.
2016-04-28 12:28:42 -04:00
Maksim Gamarnik
26a9a85129 Android: Update dependencies, GMP was required as a dependency 2016-04-26 10:17:04 +01:00
ShadowNinja
0079887b64 Move AreaStore to util 2016-03-07 16:33:20 -05:00
Maksim Gamarnik
096a01ffef Update Android dependencies, -O3 optimization, remove old ARMv5 config
* Update OpenSSL (thanks @sapier, i use his patch!), Curl and SQLite3.
* Remove old arm config. Almost all phones that use ARMv5 have 1 core and 256-512 RAM, it's about 2-5 FPS.
* Do -O3 optimization for libs and remove -fexpensive-optimizations for Minetest (-O3 includes this! Read gcc docs).
* OpenSSL fix - thanks @sapier, again.
2016-03-05 05:52:45 +01:00
est31
f3f4af3fb9 Fix android build
Android had a linker error since commit:

31e0667a4a53a238d0321194b57b083bd74c0a5b "Add Lua interface to HTTPFetchRequest"

Fixes #3766. Thanks to @MoNTE48 for reporting the bug.
2016-02-23 01:48:52 +01:00
est31
a26970cdd4 Android: hardcode leveldb revision
Newest leveldb commit breaks build.
With no fix in sight, there is no other way
than to fall back to the last working leveldb
revision, and hardcode it.

Workaround for upstream bug

https://github.com/google/leveldb/issues/340
2016-02-22 17:46:16 +01:00
est31
ef779b0ab6 Fix compilation warning if compiling for android with c++11 2016-01-23 06:26:58 +01:00
Duane Robertson
3c6b2ffb10 Add Valleys mapgen. 2016-01-14 05:04:29 +00:00
Sapier
9c9b02ca8a Android: shorten initial progress bar text way more simple 2015-12-23 21:01:35 +01:00
est31
98d16e0d9a Android: Tell make about sub-makes to speed up build
Before, sub-makes called by make were called without make knowing they
were sub-makes. This however led make's jobserver not do its tasks,
and the build process ended up with inefficient parralelisation. This
commit fixes this by applying the two ways the make manual tells
about: putting + to the start of the line (used when ndk-build is
invoked), and exchanging "make" with "$(MAKE)".

Before, make complained with messages like:

make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

This complaint can now only been seen for openssl. openssl has issues
if make gets exchanged with $(MAKE): if exchanged, above error message
is multiplied for various subdirs of the openssl source tree.

On a 4 core box, "make -j 4" build time from "make clean_all" cleaned
source tree could be improved from 15:34 minutes to 10:45 minutes.
This means a speedup of 45%.
2015-12-23 06:17:42 +01:00
ShadowNinja
b4eb614d31 Android: Fix extra files being copied to the APK
dcb91cf0c0c9a20622feeb4e5e8104ffbc9fa8ec hacked around the biggest issue
this caused, but wasted a lot of CPU time and disk space  It also still
included a lot of other unwanted files.  This removes all of `doc/` except
the license, and also removes the server list.
2015-12-20 12:48:55 +01:00
Sapier
bde6194638 Android: Remove unused build target curl_binary 2015-12-17 23:00:51 +01:00
Sapier
dcb91cf0c0 Android: Don't put html docs to apk 2015-12-17 23:00:43 +01:00
Sapier
a3fd167dda Android: Remove non freetype fonts from apk 2015-12-17 23:00:31 +01:00
est31
6133b2bc45 Fix android build
Fix android build since commit

696148e29889b2923f926b27f76979454676506d "Fix Event implementation"

by @ShadowNinja.

Fixes #3444. Thanks @kwolekr for pointing out the fix.
2015-12-11 11:24:26 +01:00
est31
2f58e4d962 Android: hardcode irrlicht revision, update other dependencies
Recent irrlicht revisions break the build, hardcode the revision to a working one
until upstream publishes a working version. See issue #3366 for
a discussion about this.

Also update dependencies to current versions.
2015-11-16 17:33:01 +01:00
paramat
76c9abe4c8 Mapgen: Add flat mapgen in hidden form 2015-11-11 09:37:54 +00:00
est31
49bda7f98d Android: statically load iconv library
Fixes #3291

Thanks to @arpruss for reporting the bug, and suggesting the fix.

Also, remove trailing whitespaces.
2015-10-24 20:47:02 +02:00
paramat
d152b55971 Android/Mapgen: Add fractal mapgen file to android makefiles 2015-10-06 22:32:13 +01:00
est31
183d0d5633 Update leveldb git url
Google code was shut down, project moved to github.
2015-09-08 21:45:16 +02:00
ShadowNinja
67d38a303b Add setting for mods to copy to Android app 2015-08-24 14:37:14 -04:00
ShadowNinja
32e4f4b32d Fix Android build of threading sources 2015-08-24 11:20:53 -04:00
ShadowNinja
e4bff8be94 Clean up threading
* Rename everything.
    * Strip J prefix.
    * Change UpperCamelCase functions to lowerCamelCase.
  * Remove global (!) semaphore count mutex on OSX.
  * Remove semaphore count getter (unused, unsafe, depended on internal
    API functions on Windows, and used a hack on OSX).
  * Add `Atomic<type>`.
  * Make `Thread` handle thread names.
  * Add support for C++11 multi-threading.
  * Combine pthread and win32 sources.
  * Remove `ThreadStarted` (unused, unneeded).
  * Move some includes from the headers to the sources.
  * Move all of `Event` into its header (allows inlining with no new includes).
  * Make `Event` use `Semaphore` (except on Windows).
  * Move some porting functions into `Thread`.
  * Integrate logging with `Thread`.
  * Add threading test.
2015-08-23 22:04:06 -04:00
est31
6a1047d8c1 Fix wrong android versionName
Before, android versionName was set to "...13", which made the f-droid build fail.
2015-08-21 22:47:04 +02:00
est31
d44fceac7e Bump version to 0.4.13 2015-08-20 04:02:00 +02:00
est31
47225346be Android: fix sound issue, and gitignore
Previously, sound failed due to errors with hardfp abi build
instructions. As the problem couldn't be found, the softfp
compatible abi was chosen instead.

This move will cause a small performance overhead, but due to the
abi being armeabi-v7a, the internal calculations will still be done
using the FPU.

We also fix some issues with ABI information passing. However, the
fixes aren't sufficient to get sound working.

The patch also fixes an issue with the gitignore file.
2015-08-02 19:23:17 +02:00