From 005a744d68839ea858a89f5c7268b108becead0c Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 3 Jan 2019 23:16:59 +0100 Subject: Android builds tested successfully after changeover to git --- ide/AndroidStudio3/README.md | 49 ++++++------ ide/AndroidStudio3/app/app.iml | 17 ++-- .../app/src/main/cpp/HelloAndroid.cxx | 2 +- ide/AndroidStudio3/gradlew.bat | 90 ++++++++++++++++++++++ ide/AndroidStudio3/gradlew.rename_to_bat | 90 ---------------------- 5 files changed, 123 insertions(+), 125 deletions(-) create mode 100644 ide/AndroidStudio3/gradlew.bat delete mode 100644 ide/AndroidStudio3/gradlew.rename_to_bat (limited to 'ide') diff --git a/ide/AndroidStudio3/README.md b/ide/AndroidStudio3/README.md index 3c27f64ea..60bdbcaf9 100644 --- a/ide/AndroidStudio3/README.md +++ b/ide/AndroidStudio3/README.md @@ -1,49 +1,46 @@ -Hello Android -============= +# 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. +## Pre-requisites +* Android Studio 3.0+ with [NDK](https://developer.android.com/ndk/) bundle. + + +## Getting Started -Getting Started ---------------- 1. [Download Android Studio](http://developer.android.com/sdk/index.html) 1. Launch Android Studio. -1. Open the Android directory inside the FLTK directory. -1. Open the AndroidStudio project by loading the HelloAndroid directory. +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'*. -Micrososft Windows Users ------------------------- -The file 'gradlew.zip' must be unzipped before you can use AndroidStudio. It contains the required file 'gradlew.bat'. This was neccessary because some svn setups block anything that looks like an executable file, including files that end in .bat . - +## Support -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 -------- +## 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 -------------- -> am start -n org.fltk.android_hello/android.app.NativeActivity -> am force-stop org.fltk.android_hello +## Android Shell + +List of short little helpers: -> stop -> setprop libc.debug.malloc 10 -> // setprop libc.debug.malloc.program org.fltk.android_hello -> setprop libc.debug.malloc.options "guard fill" -> start +```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 index 14dc6e9e9..916548171 100644 --- a/ide/AndroidStudio3/app/app.iml +++ b/ide/AndroidStudio3/app/app.iml @@ -56,14 +56,6 @@ - - - - - - - - @@ -72,6 +64,14 @@ + + + + + + + + @@ -104,6 +104,7 @@ + diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index ce1e8b37d..1d0524bac 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -135,4 +135,4 @@ * test/hello.cxx : + 'hello' works fine, italics, shadow, etc. * test/label.cxx : + 'label' works - */ \ No newline at end of file + */ diff --git a/ide/AndroidStudio3/gradlew.bat b/ide/AndroidStudio3/gradlew.bat new file mode 100644 index 000000000..8a0b282aa --- /dev/null +++ b/ide/AndroidStudio3/gradlew.bat @@ -0,0 +1,90 @@ +@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/gradlew.rename_to_bat b/ide/AndroidStudio3/gradlew.rename_to_bat deleted file mode 100644 index 8a0b282aa..000000000 --- a/ide/AndroidStudio3/gradlew.rename_to_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 -- cgit v1.2.3