diff --git a/ide/AndroidStudio3/app/src/main/AndroidManifest.xml b/CMake/Android/AndroidManifest.xml.in similarity index 100% rename from ide/AndroidStudio3/app/src/main/AndroidManifest.xml rename to CMake/Android/AndroidManifest.xml.in diff --git a/ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt b/CMake/Android/CMakeList.txt.in similarity index 87% rename from ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt rename to CMake/Android/CMakeList.txt.in index c9f4fab48..99019b009 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/CMakeLists.txt +++ b/CMake/Android/CMakeList.txt.in @@ -16,14 +16,15 @@ cmake_minimum_required(VERSION 3.4.1) -set(FLTK_DIR ../../../../../..) +set(FLTK_DIR ../../../../../../..) +set(FLTK_IDE_DIR ../../../..) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # FIXME: add as a second argument the binary build dir # so that the first argument can link directly to FLTK # instead of the fltk symlink, which is bad for SVN -add_subdirectory(${FLTK_DIR}/ "${CMAKE_CURRENT_BINARY_DIR}/fltk" EXCLUDE_FROM_ALL) +add_subdirectory(${FLTK_DIR}/ "${CMAKE_CURRENT_BINARY_DIR}/lib" EXCLUDE_FROM_ALL) # now build app's shared lib add_library(android-hello SHARED @@ -31,7 +32,7 @@ add_library(android-hello SHARED target_include_directories(android-hello PRIVATE ${FLTK_DIR}/ - ${FLTK_DIR}/ide/AndroidStudio3/) + ${FLTK_IDE_DIR}/ ) # Export ANativeActivity_onCreate(),
 # Refer to: https://github.com/android-ndk/ndk/issues/381. @@ -43,5 +44,6 @@ target_link_libraries(android-hello fltk android log - m) + m +) diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/CMake/Android/HelloAndroid.cxx.in similarity index 99% rename from ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx rename to CMake/Android/HelloAndroid.cxx.in index 1d0524bac..42cdba663 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/CMake/Android/HelloAndroid.cxx.in @@ -16,7 +16,7 @@ */ -#include "../../test/button.cxx" +#include "../../../test/button.cxx" /* diff --git a/ide/AndroidStudio3/app/src/main/assets/fonts/Roboto-Regular.ttf b/CMake/Android/Roboto-Regular.ttf similarity index 100% rename from ide/AndroidStudio3/app/src/main/assets/fonts/Roboto-Regular.ttf rename to CMake/Android/Roboto-Regular.ttf diff --git a/ide/AndroidStudio3/FL/abi-version.h b/CMake/Android/abi-version.cmake.in similarity index 100% rename from ide/AndroidStudio3/FL/abi-version.h rename to CMake/Android/abi-version.cmake.in diff --git a/ide/AndroidStudio3/app/build.gradle b/CMake/Android/app.build.gradle.in similarity index 100% rename from ide/AndroidStudio3/app/build.gradle rename to CMake/Android/app.build.gradle.in diff --git a/ide/AndroidStudio3/build.gradle b/CMake/Android/build.gradle.in similarity index 100% rename from ide/AndroidStudio3/build.gradle rename to CMake/Android/build.gradle.in diff --git a/ide/AndroidStudio3/app/src/main/res/mipmap-hdpi/ic_launcher.png b/CMake/Android/hdpi.ic_launcher.png similarity index 100% rename from ide/AndroidStudio3/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to CMake/Android/hdpi.ic_launcher.png diff --git a/ide/AndroidStudio3/app/src/main/res/mipmap-mdpi/ic_launcher.png b/CMake/Android/mdpi.ic_launcher.png similarity index 100% rename from ide/AndroidStudio3/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to CMake/Android/mdpi.ic_launcher.png diff --git a/CMake/Android/settings.gradle.in b/CMake/Android/settings.gradle.in new file mode 100644 index 000000000..573abcb32 --- /dev/null +++ b/CMake/Android/settings.gradle.in @@ -0,0 +1,2 @@ +include ':app' + diff --git a/ide/AndroidStudio3/app/src/main/res/values/strings.xml b/CMake/Android/strings.xml.in similarity index 100% rename from ide/AndroidStudio3/app/src/main/res/values/strings.xml rename to CMake/Android/strings.xml.in diff --git a/ide/AndroidStudio3/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/CMake/Android/xhdpi.ic_launcher.png similarity index 100% rename from ide/AndroidStudio3/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to CMake/Android/xhdpi.ic_launcher.png diff --git a/ide/AndroidStudio3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/CMake/Android/xxhdpi.ic_launcher.png similarity index 100% rename from ide/AndroidStudio3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to CMake/Android/xxhdpi.ic_launcher.png diff --git a/CMake/android.cmake b/CMake/android.cmake index cb4b790d7..75b3d4f4d 100644 --- a/CMake/android.cmake +++ b/CMake/android.cmake @@ -17,3 +17,82 @@ # http://www.fltk.org/str.php # +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/settings.gradle.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/settings.gradle" + @ONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/build.gradle.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/build.gradle" + @ONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/abi-version.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/FL/abi-version.h" + @ONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/app.build.gradle.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/build.gradle" + @ONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/AndroidManifest.xml.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/AndroidManifest.xml" + @ONLY +) + + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/Roboto-Regular.ttf" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/assets/fonts/Roboto-Regular.ttf" + COPYONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/mdpi.ic_launcher.png" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/res/mipmap-mdpi/ic_launcher.png" + COPYONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/hdpi.ic_launcher.png" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/res/mipmap-hdpi/ic_launcher.png" + COPYONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/xhdpi.ic_launcher.png" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/res/mipmap-xhdpi/ic_launcher.png" + COPYONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/xxhdpi.ic_launcher.png" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/res/mipmap-xxhdpi/ic_launcher.png" + COPYONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/strings.xml.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/res/values/strings.xml" + @ONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/CMakeList.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/cpp/CMakeLists.txt" + @ONLY +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Android/HelloAndroid.cxx.in" + "${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/app/src/main/cpp/HelloAndroid.cxx" + @ONLY +) + diff --git a/CMakeLists.txt b/CMakeLists.txt index 41cf9ac91..dd67da35e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,14 +96,6 @@ configure_file( @ONLY ) -if (OPTION_CREATE_ANDROID_STUDIO_IDE) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/abi-version.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/FL/abi-version.h - @ONLY - ) -endif (OPTION_CREATE_ANDROID_STUDIO_IDE) - ####################################################################### # build examples - these have to be built after fluid is built/imported ####################################################################### diff --git a/README.Android.md b/README.Android.md new file mode 100644 index 000000000..f9854045a --- /dev/null +++ b/README.Android.md @@ -0,0 +1,80 @@ +README.Android.md + +# Building and Running FLTK with Android Studio 3 + + +WARNING: FLTK FOR ANDROID IS WORK IN PROGRESS IN A PRETTY EARLY STAGE. + + +## Contents + +1. Building FLTK with Android Studio 3 +2. Extensions and limitation of FLTK on Android +3. Document History + + +## Building FLTK with Android Studio 3 + +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. + +Build FLTK for your native platform first using CMake. AndroidStudio will need a native +version of the user interface design tool _Fluid_. + +The following example is for the _Xcode_ IDE on _macOS_. The same should work for +other IDEs and Makefiles on other platforms that run _AndroidStudio_. + +```bash +git clone https://github.com/fltk/fltk.git fltk-1.4.git +cd fltk-1.4.git +mkdir build +cd build +mkdir Xcode +cd Xcode +cmake -G "Unix Makefiles" \ + -D OPTION_USE_SYSTEM_LIBJPEG=Off \ + -D OPTION_USE_SYSTEM_ZLIB=Off \ + -D OPTION_USE_SYSTEM_LIBPNG=Off \ + -D OPTION_CREATE_ANDROID_STUDIO_IDE=On \ + ../.. +``` +Note the last option, `-D OPTION_CREATE_ANDROID_STUDIO_IDE=On`. This option will +create the file needed to create an FLTK demo project in +`fltk-1.4.git/build/Xcode/AndroidStudio`. + +- open the `build/Xcode/AndroidStudio/` directory as a project in AndroidStudio3 + +- click "run"; the project should compile and run out of the box + + +## Extensions and limitation of FLTK on Android + +Android support for FLTK is in an early stage. As of January 2019, most +rendering works, fonts work, bitmaps and pixmaps work, clipping works, window +layering works, and mouse clicks and keyboard events are handled + +When loading fonts: + - font names starting with a $ will have the system font path inserted + - font names starting with an @ will be loaded via the Asset Manager + - all other names will be used verbatim + +Limitations: + - the screen size is currently fixed to 600x800 and is scaled up + - many many big and little functions are not yet implemented + + +## Document History + +Jan 15 2019 - matt: rewrote document to explain the new CMake process +Mar 29 2018 - matt: many graphics functions have been implemented, keyboard +Mar 17 2018 - matt: added Android extensions for fonts +Mar 12 2018 - matt: started list of limitation that serevs as information to the + user as much as a todo list for core developers +Mar 6 2018 - matt: moved project to ide/AndroidStudio3/ +Mar 2 2018 - matt: rewriting Android port and documentation from scratch +Feb 9 2016 - matt: recreated document with more warnings and active support diff --git a/README.Android.txt b/README.Android.txt deleted file mode 100644 index fbbff3679..000000000 --- a/README.Android.txt +++ /dev/null @@ -1,98 +0,0 @@ - -README.Android.txt - Building and using FLTK with Android Studio 3 -================================================================== - - -WARNING: FLTK FOR ANDROID IS WORK IN PROGRESS IN A PRETTY EARLY STAGE. - - -CONTENTS --------- - - 1 Building FLTK with Android Studio 3 - 2 Building Apps on an Android device with C4Droid - 3 Extensions and limitation of FLTK on Android - 4 DOCUMENT HISTORY - - -BUILDING FLTK SAMPLE WITH ANDROID STUDIO 3 ------------------------------------------- - -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. - -- if your host machine runs MSWindows, rename the file - "ide/AndroidStudio3/gradlew.rename_to_bat" to "gradlew.bat" first - -- open the "ide/AndroidStudio3/" directory as a project in AndroidStudio - -- click "run"; the project should compile and run out of the box - - -Building Apps on an Android device with C4Droid ------------------------------------------------ - -WORK IN PROGRESS: -C4Droid is a minimal IDE that comes with gcc/g++ and runs directly on your -Android device. C4Droid supports Native Activities, SDL, SDL2, and even Qt. -FLTK uses the Native Activity mechanism, so why not write FLTK apps right -on your phone? - - - compile and test the Android test app in ide/HelloAndroid - - create /sdcard/include/ and /sdcard/lib/ on your Android device - - copy (fltk)/FL/ and its content into /sdcard/include/ - - copy (fltk)/ide/AndroidStudio3/FL/abi-version.h to /sdcard/include/FL/ - - copy (fltk)/ide/AndroidStudio3/./app/.externalNativeBuild/cmake/debug/arm64-v8a/fltk/lib/libfltk.a - to /sdcard/lib/ - - ... change Native Activity settings in c4Droid preferences - - ... remove native glue - - ... add include and library path, add library - - ... add support for (which?) STL library - - -Extensions and limitation of FLTK on Android --------------------------------------------- - -Android support for FLTK is in an early stage. As of March 2018, most -rendering works, fonts work, bitmaps and pixmaps work, clipping works, window -layering works, and mouse clicks and keyboard events are handled - -When loading fonts: - - font names starting with a $ will have the system font path inserted - - font names starting with an @ will be loaded via the Asset Manager - - all other names will be used verbatim - -Limitations: - - the screen size is currently fixed to 600x800 and is scaled up - - many many big and little functions are not yet implemented - - -Scratch Pad ------------ - -2019 approach: -```bash -cmake -G "Unix Makefiles" \ - -D OPTION_USE_SYSTEM_LIBJPEG=Off \ - -D OPTION_USE_SYSTEM_ZLIB=Off \ - -D OPTION_USE_SYSTEM_LIBPNG=Off \ - -D OPTION_CREATE_ANDROID_STUDIO_IDE=On \ - ../.. -``` - - -DOCUMENT HISTORY ----------------- - -Mar 29 2018 - matt: many graphics functions ahve been implemented, keyboard -Mar 17 2018 - matt: added Android extensions for fonts -Mar 12 2018 - matt: started list of limitation that serevs as information to the - user as much as a todo list for core developers -Mar 6 2018 - matt: moved project to ide/AndroidStudio3/ -Mar 2 2018 - matt: rewriting Android port and documentation from scratch -Feb 9 2016 - matt: recreated document with more warnings and active support diff --git a/ide/AndroidStudio3/README.md b/ide/AndroidStudio3/README.md deleted file mode 100644 index 60bdbcaf9..000000000 --- a/ide/AndroidStudio3/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Hello Android - -Hello Android is an FLTK sample app that derives from the Android Studio sample -project Native Plasma. This sample uses Android Studio 3 and CMake. - - -## Pre-requisites - -* Android Studio 3.0+ with [NDK](https://developer.android.com/ndk/) bundle. - - -## Getting Started - -1. [Download Android Studio](http://developer.android.com/sdk/index.html) -1. Launch Android Studio. -1. Open the `IDE` directory inside the FLTK directory. -1. Open the Android Studio project by loading the `AndroidStudio3` directory. -1. Click *Run/Run 'app'*. - - -## Support - -If you've found an error in these samples, please [file an issue](http://www.fltk.org/str.php). Patches are encouraged, and may be submitted via the same FLTK Bug & Feature system. - -Please visit the FLTK [Forum](http://www.fltk.org/newsgroups.php) for additional help. - - -## License - -FLTK is provided under the terms of the [GNU Library Public License, Version 2 with exceptions](http://www.fltk.org/COPYING.php) that allow for static linking. - - -## Android Shell - -List of short little helpers: - -```bash -am start -n org.fltk.android_hello/android.app.NativeActivity -am force-stop org.fltk.android_hello - -stop -setprop libc.debug.malloc 10 -// setprop libc.debug.malloc.program org.fltk.android_hello -setprop libc.debug.malloc.options "guard fill" -start -``` diff --git a/ide/AndroidStudio3/app/app.iml b/ide/AndroidStudio3/app/app.iml deleted file mode 100644 index 12e033381..000000000 --- a/ide/AndroidStudio3/app/app.iml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ide/AndroidStudio3/gradle/wrapper/gradle-wrapper.jar b/ide/AndroidStudio3/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 8c0fb64a8..000000000 Binary files a/ide/AndroidStudio3/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/ide/AndroidStudio3/gradle/wrapper/gradle-wrapper.properties b/ide/AndroidStudio3/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index e023ccaff..000000000 --- a/ide/AndroidStudio3/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jan 04 18:34:29 CET 2019 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip diff --git a/ide/AndroidStudio3/gradlew b/ide/AndroidStudio3/gradlew deleted file mode 100755 index 91a7e269e..000000000 --- a/ide/AndroidStudio3/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/ide/AndroidStudio3/gradlew.bat b/ide/AndroidStudio3/gradlew.bat deleted file mode 100644 index 8a0b282aa..000000000 --- a/ide/AndroidStudio3/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/ide/AndroidStudio3/settings.gradle b/ide/AndroidStudio3/settings.gradle deleted file mode 100644 index c428c84b6..000000000 --- a/ide/AndroidStudio3/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ -include ':app' - -include ':FLTK' -project(':FLTK').projectDir = new File('../../') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0ffe3f881..41145d7a4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -39,7 +39,7 @@ include_directories( ) ####################################################################### -if(NOT ANDROID) +if(!ANDROID) CREATE_EXAMPLE(adjuster adjuster.cxx fltk) CREATE_EXAMPLE(arc arc.cxx fltk) CREATE_EXAMPLE(animated animated.cxx fltk) @@ -127,7 +127,7 @@ if(FLTK_HAVE_CAIRO) CREATE_EXAMPLE(cairo_test cairo_test.cxx "fltk;fltk_cairo") endif(FLTK_HAVE_CAIRO) -endif(NOT ANDROID) +endif(!ANDROID) # We need some support files for the demo programs: