diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-02 16:30:45 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-02 16:30:45 +0000 |
| commit | 9e29ea8a00538ea6d605945bc368295830c0d487 (patch) | |
| tree | d2d61be3accde3d3bcc94ed90dac05d6f5439e13 /README.Android.txt | |
| parent | f01eb0ec25d88451bb36c7ba070d60213b3cb8b3 (diff) | |
Commiting Android sample project structure
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12694 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'README.Android.txt')
| -rw-r--r-- | README.Android.txt | 94 |
1 files changed, 17 insertions, 77 deletions
diff --git a/README.Android.txt b/README.Android.txt index e8a23b873..87b7524af 100644 --- a/README.Android.txt +++ b/README.Android.txt @@ -1,95 +1,35 @@ -README.Android.txt - Building and using FLTK with CMake for the Android platform --------------------------------------------------------------------------------- +README.Android.txt - Building and using FLTK with Android Studio 3 +------------------------------------------------------------------ -WARNING: BUILDING FLTK FOR ANDROID IS WORK IN PROGRESS IN A PRETTY EARLY STAGE. -WARNING: THIS FILE MERELY CONTAINS A ROUGH LAYOUT AND SOME SIMPLE IDEAS HOW - FLTK WILL BUILD FOR ANDROID EVENTUALLY. +WARNING: FLTK FOR ANDROID IS WORK IN PROGRESS IN A PRETTY EARLY STAGE. CONTENTS ========== - 1 INTRODUCTION TO CMAKE - 2 USING CMAKE TO BUILD FLTK - 2.1 Prerequisites - 2.2 Options - 2.3 Building under Linux with Unix Makefiles - 2.4 Crosscompiling - 3 USING CMAKE WITH FLTK - 3.1 Library names - 3.2 Using Fluid files - 4 DOCUMENT HISTORY + 1 Building FLTK with Android Studio 3 + 2 DOCUMENT HISTORY - INTRODUCTION TO CMAKE -======================= + BUILDING FLTK SAMPLE WITH ANDROID STUDIO 3 +============================================ -Please read README.CMake.txt in the same directory to learn about CMake. +March 2nd, 2018: This is a first commit to SVN to have a file structure in +place. None of this compiles or runs at this point. -More information on CMake can be found on its web site http://www.cmake.org. +There is no need to ever write a single line of Java. +Download and install AndroidStudio on your developer machine. If you use +AndroidStudio for the first time, use the IDE to download and build the +"Native Plasm" sample app. In the process, all resources required to build +FLTK will be installed. Once Native Plasm runs on your emulator or physical +device, you are ready to install FLTK. - - USING CMAKE TO BUILD FLTK FOR ANDROID ON OS X AND LINUX -========================================================= - - - PREREQUISITES ---------------- - -Get CMake 3.2.3 or newer. - -Go to https://github.com/taka-no-me/android-cmake and download the content -as a zip file. - -Go into the FLTK base directory, then: - -> mkdir build -> cd build -> unzip ~/Downloads/android-cmake-master.zip -> mv android-cmake-master Android -> cd Android -> cmake -DCMAKE_TOOLCHAIN_FILE=android.toolchain.cmake -DANDROID_NDK=~/dev/android-ndk-r10e -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="armeabi-v7a" ../.. -> make - -At this time, compilation will fail relatively soon, but we are working hard to make porting easier, -and to prove our work, we poert FLTK to Android at the same time. Using CMake to cross-compile -is one of the many steps required to make life easier and maintenance more flexible. - - - OPTIONS ---------- -Options can be specified to cmake with the -D flag: - - cmake -D <OPTION_NAME>=<OPTION_VALUE> - - - -WARNING: Old outdated information: - -Building FLTK on Android (pre alpha, don't expect miracles) - - -1. cd to the root of its source code ('cd android/hello') - -2. Run ndk-build. This builds the native code, and should result in some .so files being put into the libs directory. - -3. android update project --path . --name hello - -4. ant debug (or similar). This will build the Java code and create an .apk. Crucially, the build process will pick up the .so files left within the libs directory and include them into the .apk. - -5. adb install bin/name-of-project.apk - -6. Then launch as normal using the Android GUI or using an am start command such as you give. -6a. emulator -avd Intel_x86 - -7. adb shell am start -n com.example.native_activity - -8. adb uninstall com.example.native_activity - +TODO: there will be an Android Studio project in the Android/ directory soon. DOCUMENT HISTORY ================== +Mar 2 2018 - matt: rewriting Android port and documentation from scratch Feb 9 2016 - matt: recreated document with more warnings and active support |
