Commit graph

72 commits

Author SHA1 Message Date
Colin Kinloch
853b1daa49 Fixed android arm64v8 2017-12-23 16:49:04 +00:00
Colin Kinloch
064189c693 Fixed Android NDK unified header detection for python 3 2017-12-17 12:01:16 +00:00
Rémi Verschelde
9f134aa5d1 Cleanup old references to GLES2 renderer
There are still some left in the Android Java code, even stuff to swap between
GLES1 and GLES2 support from early Godot days... would be good to see some cleanup
there too one day.

The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported.
It can be readded when GLES 2.0 support comes back. Fixes #13004.
2017-11-19 17:52:18 +01:00
Rhody Lugo
7f3ecd4227 change matrix and enable caching for Android, iOS and macOS (cross-compile) 2017-11-13 15:05:26 -04:00
Rhody Lugo
7957bbf558 add missing distutils.version.LooseVersion import 2017-11-09 11:58:29 -04:00
Rhody Lugo
7664a0feac unified headers fix 2017-11-09 09:46:43 -04:00
AndreaCatania
e44408f653 Compile Android with STL enabled by default 2017-11-08 12:51:35 +01:00
Rhody Lugo
ec31b23b33 add support for Android NDK unified headers 2017-11-06 07:51:09 -04:00
Elliott Sales de Andrade
3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
5be675eb03 Use BoolVariable for module options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Elliott Sales de Andrade
f9e463bce2 Use EnumVariable for choice-based build options. 2017-09-25 14:36:01 -04:00
Ruslan Mustakov
5ccdeccb6e Make GDNative work on Android
The changes include work done to ensure that GDNative apps and Nim
integration specifically can run on Android. The changes have been
tested on our WIP game, which uses godot-nim and depends on several
third-party .so libs, and Platformer demo to ensure nothing got broken.

 - .so libraries are exported to lib/ folder in .apk, instead of assets/,
   because that's where Android expects them to be and it resolves the
   library name into "lib/<ABI>/<name>", where <ABI> is the ABI matching
   the current device. So we establish the convention that Android .so
   files in the project must be located in the folder corresponding to
   the ABI they were compiled for.

 - Godot callbacks (event handlers) are now called from the same thread
   from which Main::iteration is called. It is also what Godot now
   considers to be the main thread, because Main::setup is also called
   from there. This makes threading on Android more consistent with
   other platforms, making the code that depends on Thread::get_main_id
   more portable (GDNative has such code).

 - Sizes of GDNative API types have been fixed to work on 32-bit
   platforms.
2017-08-30 18:14:19 +07:00
Matthias Hoelzl
b6e1e47e3a Make build scripts Python3 compatible
- The Windows, UWP, Android (on Windows) and Linux builds are
  tested with Scons 3.0 alpha using Python 3.
- OSX and iOS should hopefully work but are not tested since
  I don't have a Mac.
- Builds using SCons 2.5 and Python 2 should not be impacted.
2017-08-27 23:05:39 +02:00
Rémi Verschelde
edd69de1fd Merge pull request #9838 from RandomShaper/android-arm64
Add support for ARMv8 (64-bit) on Android
2017-08-01 22:24:31 +02:00
Pedro J. Estébanez
f78299c81b Add support for ARMv8 (64-bit) on Android 2017-07-25 12:28:46 +02:00
Pedro J. Estébanez
6ea233434a Remove ANDROID define
Fixes GDNative build error on Android.

It's also discouraged by Google to rely on it. In case someone needs to check, use ``__ANDROID__`` instead, provided by the very same compiler.
2017-07-25 11:08:52 +02:00
Ruslan Mustakov
fbb27a0c43 Fix android export templates build
This commit fixes errors occurring during Android export template
builds.
This required modification in third-party library (libpng) to compile
with NEON. Most likely a similar patch will be applied by them and we
could then replace the modified version.
2017-07-20 01:58:47 +07:00
Rémi Verschelde
e91a267a7c Buildsystem: Improve detect.py readability and fix issues
Tried to organize the configure(env) calls in sections, using the same order
for all platforms whenever possible.

Apart from cosmetic changes, the following issues were fixed:
- Android: cleanup linkage, remove GLESv1_CM and GLESv2
- iPhone: Remove obsolete "ios_gles22_override" option
- OSX:
  * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option
    (closes #9449)
  * Make "fat" bits argument explicit
- Server: sync with X11
- Windows: clean up old DirectX 9 stuff
- X11:
  * Do not require system OpenSSL for building (closes #9443)
  * Fix typo'ed use_leak_sanitizer option
  * Fix .llvm suffix overriding custom extra_suffix
2017-07-01 08:20:51 +02:00
Pedro J. Estébanez
854b3cc158 Improve/harmonize mobile builds 2017-05-27 23:26:59 +02:00
Pedro J. Estébanez
2443946307 Fix crash on Android-x86 2017-04-05 22:18:16 +02:00
Rémi Verschelde
d8f32637be SCons: Add option to toggle warnings (on by default)
All the warnings are factored out of the platform-specific files and moved to
SConstruct. Will have to check that it does not introduce regressions on some
platforms/compilers.

(cherry picked from commit 31107daa1a)
2017-03-26 21:58:37 +02:00
Juan Linietsky
b5a06cecff Export template management dialog.
Missing download (need to discuss this!)
2017-03-21 08:42:06 -03:00
Pedro J. Estébanez
5a26459c06 Update/fix Android build
Fix wrong path for 32-bit Windows, which fixes #7084
Exclude 32-bit Windows from multi-threaded linking because it's not supported by the NDK
Remove 32-bit Linux as there is no NDK variant for it
2016-11-13 23:54:06 +01:00
Rémi Verschelde
cc95d4448c scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.
2016-11-03 07:45:08 +01:00
Pedro J. Estébanez
b18ff942be Improve Android build (Clang + tidyness) 2016-11-02 10:54:51 +01:00
Rémi Verschelde
f34151ff0f style: Various other PEP8 fixes in Python files
Done with `autopep8 --select=E7`, fixes:

- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
2016-11-01 00:35:16 +01:00
Rémi Verschelde
817dd7ccbb style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-01 00:35:16 +01:00
Rémi Verschelde
d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Rémi Verschelde
97c8508f5e style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-01 00:33:51 +01:00
Randy Tan Shaoxian
638a31d972 Fixed tiny error in detect.py causing compilation for Android to fail.
(cherry picked from commit c9d7f77c6f)
2016-10-22 13:04:13 +02:00
Rémi Verschelde
0eccf42884 Merge pull request #6723 from bvbfan/patch-1
Correct OS architecture detection
2016-10-17 09:48:26 +02:00
Błażej Szczygieł
4ffa8f224d Theora: Don't compile unnecessary files, rename "x86_opt_*" 2016-10-16 22:31:27 +02:00
Rémi Verschelde
cbf52606f4 zlib: Split thirdparty files, simplify scons option 2016-10-15 12:20:47 +02:00
Rémi Verschelde
d9a291f641 ogg/vorbis/opus: Make them modules and unbundle thirdparty libs
Took the opportunity to undo the Godot changed made to the
opus source. The opus module should eventually be built in its
own environment to avoid polluting others with too many include
dirs and defines.

TODO: Fix the platform/ stuff for opus.
2016-10-15 11:50:40 +02:00
Rémi Verschelde
f63bf12193 Drop nedmalloc which is apparently not used anymore 2016-10-14 18:21:23 +02:00
Anthony Fieroni
f87e32696d Correct OS architecture detection
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-10-11 20:58:24 +03:00
Pedro J. Estébanez
7f51bb7b1c Fix compile flags not getting to the Android build 2016-10-04 16:55:29 +02:00
Juan Linietsky
1f7fde299d Revert "Change Android float ABI to hard" 2016-09-10 12:31:01 -03:00
Pedro J. Estébanez
68cd19a6c2 Change Android float ABI to hard 2016-09-09 13:31:35 +02:00
volzhs
01e39ecec8 Fix compile error if use android_stl=yes 2016-07-21 17:31:46 +09:00
Pedro J. Estébanez
e7b2626707 Make Android build smarter (SCons + Gradle)
Upgrade Gradle and Android plugin for Gradle
Disable all signing and zip-aligning for the export templates
Give correct names to generated APKs
Put .so files built by SCons right where Gradle has to pick them according to arch & build type
Downgrade NDK platform to 14 to match minSdkVersion
2016-06-27 10:49:15 +02:00
George Marques
408c26ce0b
Remove Make-related flags from Android build
They were wrongly placed, creating a file named "-fpic" instead of
applying "-fpic" to the build. This file was in .gitignore, which made it
less noticiable.

This also adds build.gradle to .gitignore.
2016-06-01 21:14:57 -03:00
Rémi Verschelde
5e0f0a962a Android buildsystem: Drop obsolete NDK_TOOLCHAIN argument
It was a duplicate of NDK_TARGET, and not used for anything.
2016-05-19 10:44:18 +02:00
Rémi Verschelde
94274b9ab5 OSX: Fix lib suffix for Android lib (#4499)
Fixes #1452.
2016-05-01 11:38:15 +02:00
Rémi Verschelde
0a5472e697 Remove trailing spaces 2016-04-02 20:26:12 +02:00
blubee
a0fb5b5f95 Add support for gnu-libstc++-4.9 needed by recent NDK versions
The 4.9 version is the default one, people can still build using 4.8
with older NDK versions by setting the (optional) NDK_TARGET
and NDK_TARGET_X86 environment variables.
2016-03-20 20:29:37 +08:00
Juan Linietsky
16b8b97472 Combies driver split and spawn fix, closes #3265 2016-01-25 00:25:32 -03:00
Juan Linietsky
401622cc22 -Removed ANT build system for Android, as it was deprecated by Google
-Added new Gradle build system, as it is the required build system
2016-01-08 13:36:44 -03:00
Rémi Verschelde
e4e7e8f396 Merge pull request #2963 from akien-mga/pr-opus-arm-opt
Enable opus ARM optimisations only on ARM
2015-12-01 10:18:41 +01:00