openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

The Great Android Update - WIP

Open danoli3 opened this issue 4 years ago • 12 comments

The Great Android Update

Currently still WIP and have to code review cleanup before merge However! For those curious

Android Studio 2020.3.1 Support

  • Gradle Updated Build Gradle 7.0.0 / 7.10.0
  • Android X Supported
  • NDK 23.1.
  • All Architectures Supported = 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  • CMake Build System Support
  • Android.mk Build System
  • Reduced dependancies with C++17
  • Build Tools 31.0.0
  • Supports All API's from 18->31 (Android 5 all the way to Android 12/Android 11)
  • Gradle Implementation updated to latest android
  • Dependancies Updated compiled with NDK via Apothecary and updated for all achitectures
  • FreeImage Patched for Android / C++17
  • ReLinker for System.Lib Load (Google Recommended)
  • Supports different Frame Rates of the device now, returning max by default, configurable) - 90 hz phones, 120 hz, 240 hz, 30 hz etc. Can be dynamically changed in app
  • Can Build Android Bundles / Signed Releases
  • Compatible now with all external Prefabs/implementations via gradle and newer NDK's
  • High performance MSAA options
  • GL Surface Rebuildable at any time
  • Tested across All API's

Android Bug Fixes

  • Performance increased so much (13ms->2ms same code in tests)!
  • Life Cycle Fixes - The prior attempts at lifecycle fixes for GL Context and Surface pausing/re-loading all failed across numerous API's for various reasons. These have all been fixed and tested across all API's.
  • Fix countless crashes
  • Sound Engine Fixes
  • SD Card / Reading / Location Fixes
  • Permission Fixes
  • More to list
  • Windowing Fixes
  • GL Threaded Key Events / Controller

Download external built libs here via apothecary https://github.com/openframeworks/apothecary/pull/201 (NDK 23.1 Compiled:) https://drive.google.com/file/d/1nEXqXR97UhHvoDJpRBOlu_Sc9E4h6dsT/view?usp=sharing

Extract the libs from zip into openFrameworks/libs/ *

TODO:

  • [ ] Code Cleanup / Review
  • [ ] Adapt scripts to support project builder / ofxAddons variables for extra Java, Cpp source and ability to add external libs
  • [ ] Update Examples
  • [ ] Looking at Oboe sound engine replacement for ofSoundPlayer candidate
  • [ ] ANGLE Automatic Android OpenGL ES 1/2.0/3.0 to Vulkan for API >24 with no OpenGL ES code changes as optional dependancy lib / example !><<!!

danoli3 avatar Sep 15 '21 08:09 danoli3

awesome @danoli3 !! looks like there are some merge conflicts but once those are resolved I think all the checks can run.

let us know if we can help with anything.

ofTheo avatar Sep 15 '21 15:09 ofTheo

@danoli3 just fyi - Github Actions dropped support for Ubuntu 16.04 a few weeks ago. This means that the GH Actions haven't been working for Android and other targets.

I think you will have to pull in the master branch to the PR branch to get it to run with the new fixed GH Actions.

ofTheo avatar Oct 05 '21 22:10 ofTheo

How's the progress coming? Let us know if you need any help.

cerupcat avatar Oct 30 '21 21:10 cerupcat

@cerupcat

In the next few days I'll get the last remaining issues fixed, will need to get the updated Libs online so the tests can compile here and fix some of the code changes that are not required any more

@ofTheo what's the best path for getting the libs online, I think the apothecary build scripts are in a strange spot but I can build them from my MacBook currently

I'll do my review and update and revert a few changes I made in the process not needed

After that any feedback on testing your projects under the new system

danoli3 avatar Nov 02 '21 02:11 danoli3

Aren't the apothecary scripts running in the CI servers?

arturoc avatar Nov 02 '21 10:11 arturoc

yeah @danoli3 I think if you can do a clean diff of your apothecary changes in your own remote branch of https://github.com/openframeworks/apothecary then once those are passing the CI in your apothecary you could PR to the main OF apothecary repo and then all the libs stuff should be updated once merged.

There shouldn't be any need to upload libs ( unless the apothecary scripts themselves are pulling in something we are hosting ).

ofTheo avatar Nov 02 '21 16:11 ofTheo

Btw I think we'll need to update apothecary CI to use Ubuntu 18.04 - so I will try and get on that so you are not dealing with those issues too.

ofTheo avatar Nov 02 '21 16:11 ofTheo

Updated Dependency Libs Android NDK 23.17779620 - libc++ / C++17 x86_64, x86, arm-v7a (armv7), arm-v8a (arm64) image

https://drive.google.com/file/d/1YfOSpoM1pGvMSFLREGnOoZXp-6WEZVgh/view?usp=sharing

danoli3 avatar Jan 19 '22 11:01 danoli3

Adding fresh Libs with explicit C++17 dependancies to fix string issues / CMake build commands via https://github.com/openframeworks/apothecary/pull/201

Android NDK 23.1 Requirement for Android Studio 4.2+ and new Build Systems

Updated most build dependancy build scripts

Android Features:

C++17 support x86_64 Android Target NDK 23b - Allows for builds with Gradle Systems / Android.mk / CMake In Android Studio Update to Dependency Libraries Fixed a bunch of Android configure scripts for NDK 23 + and CMake option / make Apothecary Changes:

Fixed some documentation

Added to some scripts SHA hash security to check if source zip has been modified / mostly build security for OpenSSL and Curl where these are highly important for clients auditing openFrameworks for security status

Updated Assimp from 4.0.1 to 5.1.6 (converted to CMake Config to Make)

Updated uriparser from 0.8.5 to 0.9.6

Updated pugixml from 1.9 to 1.11.4

Updated OpenSSL from 1.1.0h to 1.1.1m (+security patches)

Updated cURL from 7.59.0 to 7.81.0 (fixed a bunch most platforms)

Updated OpenCV from 4.0.1 to 4.5.5 - (fixed CMake build commands, emscripten, android, vs)

Updated tess2 - Android Build Script Fixed

Updated FreeImage from 3.17.0 to 3.18.0 (iOS/tvOS/Android)

Updated libxml2 from 2.9.4 to 2.9.12 (Android CMake fixed )

Updated FreeType from 2.7 to 2.11.1

Updated uri - (removed Boost from Android make, switched to CMake for Android)

Removal: Android Boost Dependency (file system switched to C++17)

Removal: Poco - Android Core (also fixed build script for Android if anyone wants to)

Other Notes:

Fixed Android Install for NDK 23 and new download links FreeImage source code Updated to 3.18.0 for Android and patched for C++17 Removed FreeImage SubComponents (OpenEXR / LibRAWlite) removed from FreeImage util they update to support new compile targets. Updated github.com/danoli3/FreeImage to support C++17 and had to remove these broken libraries for now. / remove critical CVE's Fixed iOS Configure targets for tvOS / bitcode Updated Docker to use CMake 3.22.1 Fixed linuxarmv7l/install.sh for new URL Fixed other scripts in the process:

Updated pixman from 0.34.0 to 0.40.0 Updated pkg-config.sh from 0.28 to 0.29.2 Updated Cairo from 1.14.12 to 1.17.4

Updated Libs: https://drive.google.com/file/d/1RGTlZiK3sJfo_h6cEZxU2zndnunlAzmA/view?usp=sharing

danoli3 avatar Feb 13 '22 05:02 danoli3

I'll do a code review in the next week and try and get this merged

danoli3 avatar Feb 13 '22 05:02 danoli3

this update is awesome! What would be the correct way (workflow) to test this on macos?

roymacdonald avatar Feb 28 '22 01:02 roymacdonald

Hi, I am really curious to try this out, I downloaded your branch and the libs but cannot work out how to make a project. Can you give some instructions on how to try this?

fred-dev avatar Mar 08 '22 01:03 fred-dev