aboutsummaryrefslogtreecommitdiff
path: root/build/android/Makefile
Commit message (Expand)AuthorAge
* Disable android leveldb by default (#5596)Nathanaƫl Courant2017-04-16
* Fix android buildLoic Blot2017-04-14
* Add gradle wrapper (#4954)Ner'zhul2016-12-24
* Android: Workarounds for Googles completely broken NDKsfan52016-12-22
* Android: update curl and libgmpest312016-12-21
* Fix sqlite databases being read-only on 64bit Android by patching sqlite (#4871)rubenwardy2016-12-09
* Android: fix build and update depsest312016-12-07
* Android: enable parallelism for main target tooest312016-05-16
* Android: download deps using httpsest312016-05-12
* Android: update openssl to 1.0.2hest312016-05-12
* Upgrade Android build to Gradle build systemShadowNinja2016-04-28
* Android: Update dependencies, GMP was required as a dependencyMaksim Gamarnik2016-04-26
* Update Android dependencies, -O3 optimization, remove old ARMv5 configMaksim Gamarnik2016-03-05
* Android: hardcode leveldb revisionest312016-02-22
* Fix compilation warning if compiling for android with c++11est312016-01-23
* Android: Tell make about sub-makes to speed up buildest312015-12-23
* Android: Fix extra files being copied to the APKShadowNinja2015-12-20
* Android: Remove unused build target curl_binarySapier2015-12-17
* Android: Don't put html docs to apkSapier2015-12-17
* Android: Remove non freetype fonts from apkSapier2015-12-17
* Android: hardcode irrlicht revision, update other dependenciesest312015-11-16
* Update leveldb git urlest312015-09-08
* Add setting for mods to copy to Android appShadowNinja2015-08-24
* Fix wrong android versionNameest312015-08-21
* Bump version to 0.4.13est312015-08-20
* Android: fix sound issue, and gitignoreest312015-08-02
* Android: Add githash header to spare rebuilds after new commitsest312015-08-01
* Android: speed up rebuild, and prevent race condition failest312015-07-31
* Fix 0.4.11 githash for androidest312015-07-31
* Android: fix horrible libiconv buildest312015-07-29
* Android: Fix minor makefile bugsest312015-07-29
* Android: use loop inside makefile to spare repetitionest312015-06-20
* Add utf-8 conversion utilities and re-add intlGUIEditBoxest312015-06-13
* Reposition irrlicht timestamp in makefileest312015-06-11
* Fix libgmp for Androidest312015-05-15
* Add LibGMPest312015-05-11
* Fix Android build-related bugsCraig Robbins2015-03-29
* Clean up and tweak build systemShadowNinja2015-03-27
* Fix Android build on 32 bitest312015-03-23
* Remove Android makefile ugly make -j hackLoic Blot2015-03-17
* Bump android version codeLoic Blot2015-03-16
* Android Makefile update backported from stable-0.4 with minor changesLoic Blot2015-03-15
* Android: Backport changes from stable-0.4Loic Blot2015-03-14
* AndroidManifest.xml version bumpLoic Blot2015-03-14
* Update Android MakefileMaksim Gamarnik2015-03-08
* Bump version to 0.4.12Perttu Ahola2015-02-18
* Android, build: Update curl to 7.40.00sapier2015-01-15
* Fix armv7 using arm arch while arm uses armv7sapier2015-01-08
* Switch android build to external sqlite3sapier2015-01-07
* Fixes for androidsapier2015-01-06
erialize, ndef); TEST(testFileSerializeDeserialize, ndef); ndef->resetNodeResolveState(); } //////////////////////////////////////////////////////////////////////////////// void TestSchematic::testMtsSerializeDeserialize(INodeDefManager *ndef) { static const v3s16 size(7, 6, 4); static const u32 volume = size.X * size.Y * size.Z; std::stringstream ss(std::ios_base::binary | std::ios_base::in | std::ios_base::out); std::vector<std::string> names; names.push_back("foo"); names.push_back("bar"); names.push_back("baz"); names.push_back("qux"); Schematic schem, schem2; schem.flags = 0; schem.size = size; schem.schemdata = new MapNode[volume]; schem.slice_probs = new u8[size.Y]; for (size_t i = 0; i != volume; i++) schem.schemdata[i] = MapNode(test_schem1_data[i], MTSCHEM_PROB_ALWAYS, 0); for (s16 y = 0; y != size.Y; y++) schem.slice_probs[y] = MTSCHEM_PROB_ALWAYS; UASSERT(schem.serializeToMts(&ss, names)); ss.seekg(0); names.clear(); UASSERT(schem2.deserializeFromMts(&ss, &names)); UASSERTEQ(size_t, names.size(), 4); UASSERTEQ(std::string, names[0], "foo"); UASSERTEQ(std::string, names[1], "bar"); UASSERTEQ(std::string, names[2], "baz"); UASSERTEQ(std::string, names[3], "qux"); UASSERT(schem2.size == size); for (size_t i = 0; i != volume; i++) UASSERT(schem2.schemdata[i] == schem.schemdata[i]); for (s16 y = 0; y != size.Y; y++) UASSERTEQ(u8, schem2.slice_probs[y], schem.slice_probs[y]); } void TestSchematic::testLuaTableSerialize(INodeDefManager *ndef) { static const v3s16 size(3, 3, 3); static const u32 volume = size.X * size.Y * size.Z; Schematic schem; schem.flags = 0; schem.size = size; schem.schemdata = new MapNode[volume]; schem.slice_probs = new u8[size.Y]; for (size_t i = 0; i != volume; i++) schem.schemdata[i] = MapNode(test_schem2_data[i], test_schem2_prob[i], 0); for (s16 y = 0; y != size.Y; y++) schem.slice_probs[y] = MTSCHEM_PROB_ALWAYS; std::vector<std::string> names; names.push_back("air"); names.push_back("default:lava_source"); names.push_back("default:glass"); std::ostringstream ss(std::ios_base::binary); UASSERT(schem.serializeToLua(&ss, names, false, 0)); UASSERTEQ(std::string, ss.str(), expected_lua_output); } void TestSchematic::testFileSerializeDeserialize(INodeDefManager *ndef) { static const v3s16 size(3, 3, 3); static const u32 volume = size.X * size.Y * size.Z; static const content_t content_map[] = { CONTENT_AIR, t_CONTENT_STONE, t_CONTENT_LAVA, }; static const content_t content_map2[] = { CONTENT_AIR, t_CONTENT_STONE, t_CONTENT_WATER, }; StringMap replace_names; replace_names["default:lava"] = "default:water"; Schematic schem1, schem2; //// Construct the schematic to save schem1.flags = 0; schem1.size = size; schem1.schemdata = new MapNode[volume]; schem1.slice_probs = new u8[size.Y]; schem1.slice_probs[0] = 80; schem1.slice_probs[1] = 160; schem1.slice_probs[2] = 240; for (size_t i = 0; i != volume; i++) { content_t c = content_map[test_schem2_data[i]]; schem1.schemdata[i] = MapNode(c, test_schem2_prob[i], 0); } std::string temp_file = getTestTempFile(); UASSERT(schem1.saveSchematicToFile(temp_file, ndef)); UASSERT(schem2.loadSchematicFromFile(temp_file, ndef, &replace_names)); UASSERT(schem2.size == size); UASSERT(schem2.slice_probs[0] == 80); UASSERT(schem2.slice_probs[1] == 160); UASSERT(schem2.slice_probs[2] == 240); for (size_t i = 0; i != volume; i++) { content_t c = content_map2[test_schem2_data[i]]; UASSERT(schem2.schemdata[i] == MapNode(c, test_schem2_prob[i], 0)); } } // Should form a cross-shaped-thing...? const content_t TestSchematic::test_schem1_data[7 * 6 * 4] = { 3, 3, 1, 1, 1, 3, 3, // Y=0, Z=0 3, 0, 1, 2, 1, 0, 3, // Y=1, Z=0 3, 0, 1, 2, 1, 0, 3, // Y=2, Z=0 3, 1, 1, 2, 1, 1, 3, // Y=3, Z=0 3, 2, 2, 2, 2, 2, 3, // Y=4, Z=0 3, 1, 1, 2, 1, 1, 3, // Y=5, Z=0 0, 0, 1, 1, 1, 0, 0, // Y=0, Z=1 0, 0, 1, 2, 1, 0, 0, // Y=1, Z=1 0, 0, 1, 2, 1, 0, 0, // Y=2, Z=1 1, 1, 1, 2, 1, 1, 1, // Y=3, Z=1 1, 2, 2, 2, 2, 2, 1, // Y=4, Z=1 1, 1, 1, 2, 1, 1, 1, // Y=5, Z=1 0, 0, 1, 1, 1, 0, 0, // Y=0, Z=2 0, 0, 1, 2, 1, 0, 0, // Y=1, Z=2 0, 0, 1, 2, 1, 0, 0, // Y=2, Z=2 1, 1, 1, 2, 1, 1, 1, // Y=3, Z=2 1, 2, 2, 2, 2, 2, 1, // Y=4, Z=2 1, 1, 1, 2, 1, 1, 1, // Y=5, Z=2 3, 3, 1, 1, 1, 3, 3, // Y=0, Z=3 3, 0, 1, 2, 1, 0, 3, // Y=1, Z=3 3, 0, 1, 2, 1, 0, 3, // Y=2, Z=3 3, 1, 1, 2, 1, 1, 3, // Y=3, Z=3 3, 2, 2, 2, 2, 2, 3, // Y=4, Z=3 3, 1, 1, 2, 1, 1, 3, // Y=5, Z=3 }; const content_t TestSchematic::test_schem2_data[3 * 3 * 3] = { 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 1, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, }; const u8 TestSchematic::test_schem2_prob[3 * 3 * 3] = { 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, }; const char *TestSchematic::expected_lua_output = "schematic = {\n" "\tsize = {x=3, y=3, z=3},\n" "\tyslice_prob = {\n" "\t\t{ypos=0, prob=254},\n" "\t\t{ypos=1, prob=254},\n" "\t\t{ypos=2, prob=254},\n" "\t},\n" "\tdata = {\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"default:glass\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"default:glass\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"default:glass\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"default:lava_source\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"default:glass\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"default:glass\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"default:glass\", prob=254, param2=0, force_place=true},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t\t{name=\"air\", prob=0, param2=0},\n" "\t},\n" "}\n";