diff --git a/.bitrise.yml b/.bitrise.yml new file mode 100644 index 0000000000..2a1964df60 --- /dev/null +++ b/.bitrise.yml @@ -0,0 +1,40 @@ +--- +format_version: '8' +default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git +project_type: macos +trigger_map: + - push_branch: "*" + workflow: primary + - pull_request_source_branch: "*" + workflow: primary +workflows: + primary: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - script@1: + title: Do anything with Script step + - certificate-and-profile-installer@1: {} + - recreate-user-schemes@1: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - xcode-archive-mac@1: + inputs: + - project_path: "$BITRISE_PROJECT_PATH" + - scheme: "$BITRISE_SCHEME" + - export_method: "$BITRISE_EXPORT_METHOD" + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} +app: + envs: + - opts: + is_expand: false + BITRISE_PROJECT_PATH: test/AppTest/xcode/AppTest.xcodeproj + - opts: + is_expand: false + BITRISE_SCHEME: AppTest + - opts: + is_expand: false + BITRISE_EXPORT_METHOD: app-store diff --git a/.gitignore b/.gitignore index eaa1ecef0e..9096b8a8ff 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,6 @@ blocks/ #ImGui stored settings imgui.ini +/gradlew +/gradlew.bat +/gradle/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 5836d0fc14..e17039ad4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) # Configure the Android toolchain before the project start @@ -8,7 +8,6 @@ if( CINDER_TARGET ) include( "${CMAKE_CURRENT_SOURCE_DIR}/proj/cmake/modules/cinderAndroidToolchain.cmake" ) endif() endif() - # Project start project( cinder ) diff --git a/bitrise.yml b/bitrise.yml new file mode 100644 index 0000000000..116456b387 --- /dev/null +++ b/bitrise.yml @@ -0,0 +1,67 @@ +--- +format_version: '8' +default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git' +project_type: macos +trigger_map: + - push_branch: '*' + workflow: primary + - pull_request_source_branch: '*' + workflow: primary +workflows: + deploy: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - script@1: + title: Do anything with Script step + - certificate-and-profile-installer@1: {} + - recreate-user-schemes@1: + inputs: + - project_path: $BITRISE_PROJECT_PATH + - cocoapods-install@1: {} + - xcode-test-mac@1: + inputs: + - project_path: $BITRISE_PROJECT_PATH + - scheme: $BITRISE_SCHEME + - xcode-archive-mac@1: + inputs: + - project_path: $BITRISE_PROJECT_PATH + - scheme: $BITRISE_SCHEME + - export_method: $BITRISE_EXPORT_METHOD + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} + primary: + steps: + - activate-ssh-key@4: + run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' + - git-clone@4: {} + - cache-pull@2: {} + - script@1: + title: Do anything with Script step + inputs: + - script_file_path: proj/xcode/fullbuild.sh + - is_debug: 'yes' + - certificate-and-profile-installer@1: {} + - recreate-user-schemes@1: + inputs: + - project_path: $BITRISE_PROJECT_PATH + - cocoapods-install@1: {} + - xcode-test-mac@1: + inputs: + - project_path: $BITRISE_PROJECT_PATH + - scheme: $BITRISE_SCHEME + - deploy-to-bitrise-io@1: {} + - cache-push@2: {} +app: + envs: + - opts: + is_expand: false + BITRISE_PROJECT_PATH: proj/xcode/cinder.xcodeproj + - opts: + is_expand: false + BITRISE_SCHEME: MacOS X + - opts: + is_expand: false + BITRISE_EXPORT_METHOD: development diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000..cdf4b7882d --- /dev/null +++ b/build.gradle @@ -0,0 +1,26 @@ +//top level gradle build file for Cinder Android API 26, NDK 21 +buildscript { + ext.kotlin_version = "1.3.72" + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:4.0.1" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..2d8d1e4dd1 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +android.useAndroidX=true \ No newline at end of file diff --git a/lib/android/android-19/armeabi-v7a/libboost_filesystem.a b/lib/android/android-19/armeabi-v7a/libboost_filesystem.a deleted file mode 100644 index c0c1b7994c..0000000000 Binary files a/lib/android/android-19/armeabi-v7a/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-19/armeabi-v7a/libboost_system.a b/lib/android/android-19/armeabi-v7a/libboost_system.a deleted file mode 100644 index c9b622f3c3..0000000000 Binary files a/lib/android/android-19/armeabi-v7a/libboost_system.a and /dev/null differ diff --git a/lib/android/android-19/armeabi/libboost_filesystem.a b/lib/android/android-19/armeabi/libboost_filesystem.a deleted file mode 100644 index f41c597c8d..0000000000 Binary files a/lib/android/android-19/armeabi/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-19/armeabi/libboost_system.a b/lib/android/android-19/armeabi/libboost_system.a deleted file mode 100644 index 7b6d4853ad..0000000000 Binary files a/lib/android/android-19/armeabi/libboost_system.a and /dev/null differ diff --git a/lib/android/android-19/mips/libboost_filesystem.a b/lib/android/android-19/mips/libboost_filesystem.a deleted file mode 100644 index 809554666c..0000000000 Binary files a/lib/android/android-19/mips/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-19/mips/libboost_system.a b/lib/android/android-19/mips/libboost_system.a deleted file mode 100644 index 598b168843..0000000000 Binary files a/lib/android/android-19/mips/libboost_system.a and /dev/null differ diff --git a/lib/android/android-19/x86/libboost_filesystem.a b/lib/android/android-19/x86/libboost_filesystem.a deleted file mode 100644 index f91212e92a..0000000000 Binary files a/lib/android/android-19/x86/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-19/x86/libboost_system.a b/lib/android/android-19/x86/libboost_system.a deleted file mode 100644 index 5b4b0c5188..0000000000 Binary files a/lib/android/android-19/x86/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/arm64-v8a/libboost_filesystem.a b/lib/android/android-21/arm64-v8a/libboost_filesystem.a deleted file mode 100644 index be020aa990..0000000000 Binary files a/lib/android/android-21/arm64-v8a/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/arm64-v8a/libboost_system.a b/lib/android/android-21/arm64-v8a/libboost_system.a deleted file mode 100644 index 2c949ac2ba..0000000000 Binary files a/lib/android/android-21/arm64-v8a/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/armeabi-v7a/libboost_filesystem.a b/lib/android/android-21/armeabi-v7a/libboost_filesystem.a deleted file mode 100644 index 0c6b8ada8c..0000000000 Binary files a/lib/android/android-21/armeabi-v7a/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/armeabi-v7a/libboost_system.a b/lib/android/android-21/armeabi-v7a/libboost_system.a deleted file mode 100644 index 1857481322..0000000000 Binary files a/lib/android/android-21/armeabi-v7a/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/armeabi/libboost_filesystem.a b/lib/android/android-21/armeabi/libboost_filesystem.a deleted file mode 100644 index a009c958dd..0000000000 Binary files a/lib/android/android-21/armeabi/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/armeabi/libboost_system.a b/lib/android/android-21/armeabi/libboost_system.a deleted file mode 100644 index 4b3ab3bf5f..0000000000 Binary files a/lib/android/android-21/armeabi/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/mips/libboost_filesystem.a b/lib/android/android-21/mips/libboost_filesystem.a deleted file mode 100644 index ba0f6c6223..0000000000 Binary files a/lib/android/android-21/mips/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/mips/libboost_system.a b/lib/android/android-21/mips/libboost_system.a deleted file mode 100644 index b22fc9a2c6..0000000000 Binary files a/lib/android/android-21/mips/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/mips64/libboost_filesystem.a b/lib/android/android-21/mips64/libboost_filesystem.a deleted file mode 100644 index b5c36e50d6..0000000000 Binary files a/lib/android/android-21/mips64/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/mips64/libboost_system.a b/lib/android/android-21/mips64/libboost_system.a deleted file mode 100644 index 938b9455ec..0000000000 Binary files a/lib/android/android-21/mips64/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/x86/libboost_filesystem.a b/lib/android/android-21/x86/libboost_filesystem.a deleted file mode 100644 index 60d6463729..0000000000 Binary files a/lib/android/android-21/x86/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/x86/libboost_system.a b/lib/android/android-21/x86/libboost_system.a deleted file mode 100644 index 26e9a3f45f..0000000000 Binary files a/lib/android/android-21/x86/libboost_system.a and /dev/null differ diff --git a/lib/android/android-21/x86_64/libboost_filesystem.a b/lib/android/android-21/x86_64/libboost_filesystem.a deleted file mode 100644 index 48696a250a..0000000000 Binary files a/lib/android/android-21/x86_64/libboost_filesystem.a and /dev/null differ diff --git a/lib/android/android-21/x86_64/libboost_system.a b/lib/android/android-21/x86_64/libboost_system.a deleted file mode 100644 index 16b2f3cfb9..0000000000 Binary files a/lib/android/android-21/x86_64/libboost_system.a and /dev/null differ diff --git a/lib/android/libcinder-debug.aar b/lib/android/libcinder-debug.aar deleted file mode 100644 index 2f06f69511..0000000000 Binary files a/lib/android/libcinder-debug.aar and /dev/null differ diff --git a/lib/android/libcinder-release.aar b/lib/android/libcinder-release.aar deleted file mode 100644 index 93c8260d04..0000000000 Binary files a/lib/android/libcinder-release.aar and /dev/null differ diff --git a/proj/android/CMakeLists.txt b/proj/android/CMakeLists.txt index 5215151d20..67f2d2b9f4 100644 --- a/proj/android/CMakeLists.txt +++ b/proj/android/CMakeLists.txt @@ -1,435 +1,11 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) # Suppress compiler checks. Why? CMake seems to be inconsistent -# with how it checks compilers on different platforms. +# with how it checks compilers on different platforms. set( CMAKE_C_COMPILER_WORKS 1 ) set( CMAKE_CXX_COMPILER_WORKS 1 ) -if(NOT WIN32) - string(ASCII 27 Esc) - set(ColorReset "${Esc}[m" ) - set(ColorBold "${Esc}[1m" ) - set(Red "${Esc}[31m" ) - set(Green "${Esc}[32m" ) - set(Yellow "${Esc}[33m" ) - set(Blue "${Esc}[34m" ) - set(Magenta "${Esc}[35m" ) - set(Cyan "${Esc}[36m" ) - set(White "${Esc}[37m" ) - set(BoldRed "${Esc}[1;31m" ) - set(BoldGreen "${Esc}[1;32m" ) - set(BoldYellow "${Esc}[1;33m" ) - set(BoldBlue "${Esc}[1;34m" ) - set(BoldMagenta "${Esc}[1;35m" ) - set(BoldCyan "${Esc}[1;36m" ) - set(BoldWhite "${Esc}[1;37m" ) -endif() - -# Default values -set( DEFAULT_NDK_PLATFORM 21 ) -set( DEFAULT_NDK_ARCH "armeabi-v7a" ) - -# ------------------------------------------------------------------------ -# NDK_ROOT -# ------------------------------------------------------------------------ -# If NDK_ROOT as not passed in as parameter - check environment variable. -if( NOT NDK_ROOT ) - if( DEFINED ENV{NDK_ROOT} ) - set( NDK_ROOT $ENV{NDK_ROOT} ) - endif() -endif() - -if( "" STREQUAL "${CMAKE_BUILD_TYPE}" ) - set( CMAKE_BUILD_TYPE "Debug" CACHE FILEPATH "" FORCE ) -endif() -message( "${BoldGreen}CMake Build Type: ${CMAKE_BUILD_TYPE} ${ColorReset}" ) - -# See if we can find the NDK located next to the Cinder directory -if( NOT NDK_ROOT ) - # Most recent first - set( _supported_ndks - "android-ndk" - "android-ndk-r10e" - "android-ndk-r10d" - "android-ndk-r9d" - "android-ndk-r9c" - ) - - set( _curDirStr "${CMAKE_CURRENT_SOURCE_DIR}" ) - # If string begins with "/" - remove the first "/" - string( SUBSTRING "${_curDirStr}" 0 1 _firstChar ) - if( "/" STREQUAL "${_firstChar}" ) - string( LENGTH "${_curDirStr}" strLen ) - string( SUBSTRING "${_curDirStr}" 1 -1 _curDirStr ) - endif() - - # Create list of path components - string( REPLACE "/" ";" _curDirList "${_curDirStr}" ) - list( LENGTH _curDirList _numToks ) - # Find Cinder directory - foreach( val RANGE ${_numToks} ) - #math( EXPR _index "${_numToks} - ${val}" ) - #list( GET _curDirList ${_index} item ) - - list( LENGTH _curDirList _listLen ) - - string( REPLACE ";" "/" _dirStr "${_curDirList}" ) - if( ${_listLen} GREATER 0 ) - set( _dirStr "/${_dirStr}" ) - endif() - - set( incDir "${_dirStr}/include/cinder/app/android" ) - if( IS_DIRECTORY "${incDir}" ) - set( CINDER_DIR "${_dirStr}" ) - break() - endif() - - if( ${_listLen} GREATER 0 ) - math( EXPR _lastIndex "${_listLen} - 1" ) - list( REMOVE_AT _curDirList ${_lastIndex} ) - endif() - endforeach() - - if( CINDER_DIR ) - foreach( val in ${_supported_ndks} ) - get_filename_component( ndk_dir "${CINDER_DIR}/../${val}" ABSOLUTE ) - if( IS_DIRECTORY "${ndk_dir}" ) - message( "${BoldGreen}Detected NDK, version: ${val}, at ${ndk_dir}${ColorReset}" ) - message( "" ) - set( NDK_ROOT "${ndk_dir}" ) - break() - endif() - endforeach() - endif() -endif() - -# Bail if we haven't set NDK_ROOT -if( NOT NDK_ROOT ) - set( _suggestedDir ${CMAKE_CURRENT_SOURCE_DIR}/../../android-ndk ) - get_filename_component( _suggestedDir "${_suggestedDir}" ABSOLUTE ) - message( FATAL_ERROR "${BoldRed}NDK_ROOT not set! Set using env var or -DNDK_ROOT= or install (r10d or later) to ${_suggestedDir} ${ColorReset}" ) -endif() -# ------------------------------------------------------------------------ - -# ------------------------------------------------------------------------ -# NDK_PLATFORM -# ------------------------------------------------------------------------ -if( NOT NDK_PLATFORM ) - set( NDK_PLATFORM ${DEFAULT_NDK_PLATFORM} ) -endif() - -if( "19" STREQUAL "${NDK_PLATFORM}" ) - set( NDK_PLATFORM_OUT "android-19" ) -elseif( "21" STREQUAL "${NDK_PLATFORM}" ) - set( NDK_PLATFORM_OUT "android-21" ) -else() - message( FATAL_ERROR "${BoldRed}Unsupported Platform (API Level) ${NDK_PLATFORM}${ColorReset}" ) -endif() - -if( NDK_GLES31 AND ( ${NDK_PLATFORM} LESS 21 ) ) - message( FATAL_ERROR "${BoldRed}OpenGL ES 3.1 requires Platform 21 or later${ColorReset}" ) -endif() - -# ------------------------------------------------------------------------ -# NDK_ARCH -# ------------------------------------------------------------------------ -if( NOT NDK_ARCH ) - set( NDK_ARCH ${DEFAULT_NDK_ARCH} ) -endif() - -set( _supported_archs "armeabi" "armeabi-v7a" "arm64-v8a" "x86" "x86_64" "mips" "mips64" ) -list( FIND _supported_archs "${NDK_ARCH}" _index ) -if( ${_index} LESS 0 ) - message( FATAL_ERROR "${BoldRed}NDK_ARCH specifies unsupported architecture: ${NDK_ARCH}${ColorReset}" ) -endif() - -# -- log to console -- -message( "${BoldBlue}NDK_ROOT : ${NDK_ROOT}${ColorReset}" ) -message( "${BoldBlue}NDK_PLATFORM : ${NDK_PLATFORM}${ColorReset}" ) -message( "${BoldBlue}NDK_ARCH : ${NDK_ARCH}${ColorReset}" ) -if( NDK_GLES2 ) - message( "${BoldBlue}NDK_GLES2 : TRUE${ColorReset}" ) - message( "${BoldBlue}NDK_GLES3 : FALSE${ColorReset}" ) - message( "${BoldBlue}NDK_GLES31 : FALSE${ColorReset}" ) -elseif( NDK_GLES31 ) - message( "${BoldBlue}NDK_GLES2 : FALSE${ColorReset}" ) - message( "${BoldBlue}NDK_GLES3 : FALSE${ColorReset}" ) - message( "${BoldBlue}NDK_GLES31 : TRUE${ColorReset}" ) -else() - message( "${BoldBlue}NDK_GLES2 : FALSE${ColorReset}" ) - message( "${BoldBlue}NDK_GLES3 : TRUE${ColorReset}" ) - message( "${BoldBlue}NDK_GLES31 : FALSE${ColorReset}" ) -endif() -message( "" ) - -# Toolchain, STL (gnustl, libc++) -if( NOT NDK_TOOLCHAIN ) - set( NDK_TOOLCHAIN "gcc49" ) -endif() - -if( NOT NDK_STL ) - set( NDK_STL "gnustl" ) -endif() -# Switch to gcc49 if on arm64-v8a or x86_64 -if( "gcc48" STREQUAL "${NDK_TOOLCHAIN}" ) - if(("arm64-v8a" STREQUAL "${NDK_ARCH}") OR ("x86_64" STREQUAL "${NDK_ARCH}") OR ("mips64" STREQUAL "${NDK_ARCH}")) - set( NDK_TOOLCHAIN "gcc49" ) - endif() -endif() - -# Process platform -set( NDK_PLATFORM_DIR "android-${NDK_PLATFORM}" ) - -# Process arch - find tool chain params -set( NDK_ARCH_DIR "arch-${NDK_ARCH}" ) -# >> armeabi << -if( "armeabi" STREQUAL "${NDK_ARCH}" ) - if( "gcc48" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "arm-linux-androideabi-4.8" ) - set( NDK_TOOLCHAIN_PREFIX "arm-linux-androideabi" ) - elseif( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "arm-linux-androideabi-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "arm-linux-androideabi" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "armeabi" ) - -# >> armeabi-v7a << -elseif( "armeabi-v7a" STREQUAL "${NDK_ARCH}" ) - if( "gcc48" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "arm-linux-androideabi-4.8" ) - set( NDK_TOOLCHAIN_PREFIX "arm-linux-androideabi" ) - elseif( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "arm-linux-androideabi-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "arm-linux-androideabi" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "armeabi-v7a" ) - -# >> arm64-v8a << -elseif( "arm64-v8a" STREQUAL "${NDK_ARCH}" ) - if( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "aarch64-linux-android-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "aarch64-linux-android" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "arm64-v8a" ) - -# >> x86 << -elseif( "x86" STREQUAL "${NDK_ARCH}" ) - if( "gcc48" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "x86-4.8" ) - set( NDK_TOOLCHAIN_PREFIX "i686-linux-android" ) - elseif( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "x86-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "i686-linux-android" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "x86" ) - -# >> x86_64 << -elseif( "x86_64" STREQUAL "${NDK_ARCH}" ) - if( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "x86_64-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "x86_64-linux-android" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "x86_64" ) - -# >> mips << -elseif( "mips" STREQUAL "${NDK_ARCH}" ) - if( "gcc48" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "mipsel-linux-android-4.8" ) - set( NDK_TOOLCHAIN_PREFIX "mipsel-linux-android" ) - elseif( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "mipsel-linux-android-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "mipsel-linux-android" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "mips" ) - -# >> mips64 << -elseif( "mips64" STREQUAL "${NDK_ARCH}" ) - if( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "mips64el-linux-android-4.9" ) - set( NDK_TOOLCHAIN_PREFIX "mips64el-linux-android" ) - elseif( "clang" STREQUAL "${NDK_TOOLCHAIN}" ) - set( NDK_TOOLCHAIN_DIR "llvm-3.6" ) - set( NDK_TOOLCHAIN_PREFIX "" ) - set( NDK_TOOLCHAIN_CLANG TRUE ) - endif() - # Library out dir - set( NKD_ARCH_OUT "mips64" ) -endif() - -if( NOT NDK_TOOLCHAIN_DIR ) - message( FATAL_ERROR "${BoldRed}Toolchain ${NDK_TOOLCHAIN} is not supported on ${NDK_ARCH}${ColorReset}" ) -endif() - -# STL -if( "gnustl" STREQUAL "${NDK_STL}" ) - if( "gcc48" STREQUAL "${NDK_TOOLCHAIN}" ) - include_directories( - ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/include - ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/include/backward - ) - # Architecture - if( "armeabi" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi/include ) - elseif( "armeabi-v7a" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include ) - elseif( "x86" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/x86/include ) - elseif( "mips" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.8/libs/mips/include ) - endif() - elseif( "gcc49" STREQUAL "${NDK_TOOLCHAIN}" ) - include_directories( - ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/include - ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/include/backward - ) - # Architecture - if( "armeabi" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include ) - elseif( "armeabi-v7a" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include ) - elseif( "arm64-v8a" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include ) - elseif( "x86" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include ) - elseif( "x86_64" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/include ) - elseif( "mips" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips/include ) - elseif( "mips64" STREQUAL "${NDK_ARCH}" ) - include_directories( ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/mips64/include ) - endif() - endif() -elseif( "libc++" STREQUAL "${NDK_STL}" ) - include_directories( - ${NDK_ROOT}/sources/cxx-stl/llvm-libc++/libcxx/include - ) -else() - message( FATAL_ERROR "${BoldRed}Unsupported STL library ${NDK_STL}${ColorReset}" ) -endif() - -# Toolchain host -if( APPLE ) - set( NDK_TOOLCHAIN_HOST "darwin-x86_64" ) -elseif( WINDOWS ) -elseif( UNIX ) - set( NDK_TOOLCHAIN_HOST "linux-x86_64" ) -endif() - -if( NOT NDK_TOOLCHAIN_HOST ) - message( FATAL_ERROR "${BoldRed}Unsupported host platform ${CMAKE_SYSTEM_NAME}{ColorReset}" ) -endif() - -# Toolchain prefix -set( NKD_TOOLCHAIN_ROOT "${NDK_ROOT}/toolchains/${NDK_TOOLCHAIN_DIR}/prebuilt/${NDK_TOOLCHAIN_HOST}" ) -message( "${BoldBlue}NKD_TOOLCHAIN_ROOT : ${NKD_TOOLCHAIN_ROOT}${ColorReset}" ) -if( NOT NDK_TOOLCHAIN_CLANG ) - message( "${BoldBlue}NDK_TOOLCHAIN_PREFIX : ${NDK_TOOLCHAIN_PREFIX}${ColorReset}" ) -endif() -message( "" ) - -# sysroot -#if( NOT NDK_TOOLCHAIN_CLANG) - if(("armeabi" STREQUAL "${NDK_ARCH}") OR ("armeabi-v7a" STREQUAL "${NDK_ARCH}")) - set( NDK_SYSROOT "${NDK_ROOT}/platforms/${NDK_PLATFORM_DIR}/arch-arm" ) - elseif( "arm64-v8a" STREQUAL "${NDK_ARCH}" ) - set( NDK_SYSROOT "${NDK_ROOT}/platforms/${NDK_PLATFORM_DIR}/arch-arm64" ) - elseif( "x86" STREQUAL "${NDK_ARCH}" ) - set( NDK_SYSROOT "${NDK_ROOT}/platforms/${NDK_PLATFORM_DIR}/arch-x86" ) - elseif( "x86_64" STREQUAL "${NDK_ARCH}" ) - set( NDK_SYSROOT "${NDK_ROOT}/platforms/${NDK_PLATFORM_DIR}/arch-x86_64" ) - elseif( "mips" STREQUAL "${NDK_ARCH}" ) - set( NDK_SYSROOT "${NDK_ROOT}/platforms/${NDK_PLATFORM_DIR}/arch-mips" ) - elseif( "mips64" STREQUAL "${NDK_ARCH}" ) - set( NDK_SYSROOT "${NDK_ROOT}/platforms/${NDK_PLATFORM_DIR}/arch-mips64" ) - endif() - # - if( NOT NDK_SYSROOT ) - message( FATAL_ERROR "${BoldRed}Unable to determine SYSROOT for ${NDK_ARCH} for platform android-${NDK_PLATFORM}${ColorReset}" ) - endif() - # - message( "${BoldBlue}NDK_SYSROOT : ${NDK_SYSROOT}${ColorReset}" ) - message( "" ) - - set( CMAKE_SYSROOT ${NDK_SYSROOT} CACHE FILEPATH "" FORCE ) -#endif() - -if( APPLE ) - set( CMAKE_OSX_SYSROOT "" CACHE FILEPATH "" FORCE ) -endif() - -# Compiler, build tool settings -if( NDK_TOOLCHAIN_CLANG ) - set( CMAKE_C_COMPILER ${NKD_TOOLCHAIN_ROOT}/bin/clang CACHE FILEPATH "" FORCE ) - set( CMAKE_CXX_COMPILER ${NKD_TOOLCHAIN_ROOT}/bin/clang++ CACHE FILEPATH "" FORCE ) - set( CMAKE_AR ${NKD_TOOLCHAIN_ROOT}/bin/llvm-ar CACHE FILEPATH "" FORCE ) - set( CMAKE_LINKER ${NKD_TOOLCHAIN_ROOT}/bin/clang++ CACHE FILEPATH "" FORCE ) - set( CMAKE_NM ${NKD_TOOLCHAIN_ROOT}/bin/ CACHE FILEPATH "" FORCE ) - #set( CMAKE_RANLIB ${NKD_TOOLCHAIN_ROOT}/bin/llvm-ar CACHE FILEPATH "" FORCE ) - set( CMAKE_RANLIB ${NDK_ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib CACHE FILEPATH "" FORCE ) - set( CMAKE_STRIP ${NKD_TOOLCHAIN_ROOT}/bin/ndk-strip CACHE FILEPATH "" FORCE ) -else() - set( CMAKE_C_COMPILER ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-gcc CACHE FILEPATH "" FORCE ) - set( CMAKE_CXX_COMPILER ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-g++ CACHE FILEPATH "" FORCE ) - set( CMAKE_AR ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-ar CACHE FILEPATH "" FORCE ) - set( CMAKE_LINKER ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-ld CACHE FILEPATH "" FORCE ) - set( CMAKE_NM ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-nm CACHE FILEPATH "" FORCE ) - set( CMAKE_RANLIB ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-ranlib CACHE FILEPATH "" FORCE ) - set( CMAKE_STRIP ${NKD_TOOLCHAIN_ROOT}/bin/${NDK_TOOLCHAIN_PREFIX}-strip CACHE FILEPATH "" FORCE ) -endif() - -get_filename_component( CINDER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE ) -set( CINDER_INC_DIR ${CINDER_DIR}/include ) -set( CINDER_SRC_DIR ${CINDER_DIR}/src ) -set( BOOST_INC_DIR ${CINDER_DIR}/boost ) - - -message( "${BoldGreen}CINDER_INC_DIR: ${CINDER_INC_DIR}${ColorReset}" ) -message( "${BoldGreen}CINDER_SRC_DIR: ${CINDER_SRC_DIR}${ColorReset}" ) -message( "" ) -message( "${BoldGreen}LIBRARY_OUTPUT_PATH: ${LIBRARY_OUTPUT_PATH}${ColorReset}" ) -message( "" ) -message( "${BoldGreen}CMAKE_C_COMPILER : ${CMAKE_C_COMPILER}${ColorReset}" ) -message( "${BoldGreen}CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}${ColorReset}" ) -message( "${BoldGreen}CMAKE_AR : ${CMAKE_AR}${ColorReset}" ) -message( "${BoldGreen}CMAKE_LINKER : ${CMAKE_LINKER}${ColorReset}" ) -message( "${BoldGreen}CMAKE_NM : ${CMAKE_NM}${ColorReset}" ) -message( "${BoldGreen}CMAKE_RANLIB : ${CMAKE_RANLIB}${ColorReset}" ) -message( "${BoldGreen}CMAKE_STRIP : ${CMAKE_STRIP}${ColorReset}" ) -message( "" ) -message( "${BoldGreen}CMAKE_SYSROOT : ${CMAKE_SYSROOT}${ColorReset}" ) -message( "" ) - project( cinder_android ) # Output path @@ -446,7 +22,6 @@ include_directories( ${CINDER_SRC_DIR}/oggvorbis/vorbis ${CINDER_SRC_DIR}/r8brain ${CINDER_INC_DIR}/tinyexr - ${BOOST_INC_DIR} ) # Arch flags @@ -502,12 +77,10 @@ set( CMAKE_C_FLAGS_RELEASE "${C_FLAGS} -Os -ffast-math ${C_FLAGS}" ) if( NDK_TOOLCHAIN_CLANG ) set( CXX_FLAGS "-gcc-toolchain ${NDK_ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/${NDK_TOOLCHAIN_HOST} ${ARCH_FLAGS} -fvisibility=default -std=c++11 -stdlib=libstdc++ -ffunction-sections -funwind-tables -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -fomit-frame-pointer -DANDROID -DFT2_BUILD_LIBRARY" ) include_directories( - ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/include - ${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${NDK_ARCH}/include + ${NDK_ROOT}/sources/cxx-stl/llvm-libc++/include + ${NDK_ROOT}/sources/cxx-stl/llvm-libc++/libs/${NDK_ARCH}/include ) -else() - set( CXX_FLAGS "${ARCH_FLAGS} -fvisibility=default -std=c++11 -DFT2_BUILD_LIBRARY" ) -endif() + if( NDK_GLES2 ) set( CXX_FLAGS "-DCINDER_GL_ES_2 ${CXX_FLAGS}") elseif( NDK_GLES31 ) @@ -780,3 +353,4 @@ if( NDK_GLES2 ) else() add_library( cinder STATIC ${CINDER_C_SRC_FILES} ${CINDER_CXX_SRC_FILES} ) endif() + endif() \ No newline at end of file diff --git a/proj/android/cbuilder b/proj/android/cbuilder deleted file mode 100755 index feacd37d08..0000000000 --- a/proj/android/cbuilder +++ /dev/null @@ -1,260 +0,0 @@ -#!/bin/bash - -if (( $# == 0 )); then - echo -e "cbuilder - Cinder for Android wrapper script" - echo -e "usage:" - echo -e "\tcbuilder -j 4 -p 19,21 -a armeabi,armeabi-v7a,x86,mips,arm64-v8a,x86_64,mips64 -b Debug -v" - echo -e "" - echo -e "options:" - echo -e "\t-p [str] Android platform, ex: -p 19" - echo -e "\t-a [str] Architecture, ex: -a armeabi,arm64-v8a" - echo -e "\t-b [str] Build type, ex: -b Debug,Release " - echo -e "\t-j [n] Number of compile processes, ex: -j 4" - echo -e "" - echo -e "flags:" - echo -e "\t-es2 Build for OpenGL ES 2.0 instead of OpenGL ES 3" - echo -e "\t-es31 Build for OpenGL ES 3.1 instead of OpenGL ES 3" - echo -e "\t-r Rebuild instead of full build" - echo -e "\t-v Turns on verbose mode" - echo -e "\t-clang Uses clang toolchain (experimental)" - echo -e "" - exit 0 -fi - - -PLATFORMS=(19 21) -ARCHS=(armeabi armeabi-v7a x86 mips arm64-v8a x86_64 mips64) -BUILDTYPES=(Debug Release) -GLES= -GLES_INFO= -FULLBUILD=true -VERBOSE= -TOOLCHAIN=gcc49 -STL=gnustl - -if [[ "$(uname -s)" == *"Linux"* ]]; then - NUMPROCS=$(nproc) -elif [[ "$(uname -s)" == *"Darwin"* ]]; then - NUMPROCS=$(sysctl -n hw.ncpu) -fi - -# Process arguments -while (( $# >= 1 )) -do - arg=$1 - - case $arg in - # Platforms - -p) - # Clear array - PLATFORMS=() - # Split string into tokens - tokens=(${2//,/ }) - # Parse platforms - for tok in ${tokens[@]}; do - if [[ $tok = *[[:digit:]]* ]]; then - PLATFORMS+=($tok) - else - echo "-p Should be comma separated numbers" - exit 1 - fi - done - ;; - - # Architectures - -a) - # Clear array - ARCHS=() - # Split string into tokens - tokens=(${2//,/ }) - # Parse archs - for arch in ${tokens[@]}; do - case $arch in - armeabi) - ARCHS+=(armeabi) - ;; - - armeabi-v7a|arm7) - ARCHS+=(armeabi-v7a) - ;; - - x86) - ARCHS+=(x86) - ;; - - mips) - ARCHS+=(mips) - ;; - - arm64-v8a|arm64) - ARCHS+=(arm64-v8a) - ;; - - x86_64) - ARCHS+=(x86_64) - ;; - - mips64) - ARCHS+=(mips64) - ;; - - *) - echo "-a Unknown architecture: $arch" - exit 1 - ;; - esac - done - ;; - - # Build types - -b) - # Clear array - BUILDTYPES=() - # Split string into tokens - tokens=(${2//,/ }) - # Parse build types - for tok in ${tokens[@]}; do - build=$(echo $tok | tr '[:upper:]' '[:lower:]') - case $build in - debug) - BUILDTYPES+=(Debug) - ;; - - release) - BUILDTYPES+=(Release) - ;; - - *) - echo "-b Unknown build type: $build" - exit 1 - ;; - esac - done - ;; - - # Number of build processes - -j) - # Make sure this is a number - if [[ $2 = *[[:digit:]]* ]]; then - NUMPROCS=$2 - else - echo "-j requires a number" - exit 1 - fi - ;; - - # OpenGL ES 2.0 - -es2) - GLES="-DNDK_GLES2=1" - GLES_INFO="GLES2: true" - ;; - - # OpenGL ES 3.1 - -es31) - GLES="-DNDK_GLES31=1" - GLES_INFO="GLES31: true" - ;; - - # Clang - -clang) - TOOLCHAIN=clang - #STL=libc++ - ;; - - # Rebuild - -r) - FULLBUILD=false - ;; - - # Verbosity - -v) - VERBOSE="VERBOSE=1" - ;; - esac - - # Shift - if [[ ${2:0:1} == '-' ]] || [ -z "$2" ]; then - shift 1 - else - shift 2 - fi -done - -# Remove duplicates -PLATFORMS=($(printf "%q\n" "${PLATFORMS[@]}" | sort -u)) -ARCHS=($(printf "%q\n" "${ARCHS[@]}" | sort -u)) -BUILDTYPES=($(printf "%q\n" "${BUILDTYPES[@]}" | sort -u)) - -# Save directory -pushd `dirname $0` > /dev/null -SAVED_DIR=`pwd -P` -popd > /dev/null - -# Process builds -for plat in ${PLATFORMS[@]}; do - for arch in ${ARCHS[@]}; do - for build in ${BUILDTYPES[@]}; do - # Skip 64-bit builds on android-19 - if (( $plat <= 19 )); then - case $arch in - arm64-v8a|x86_64|mips64) - echo -e "\n(CINDER-ANDROID): [ERROR] 64-bit require android-21 or later" - continue - ;; - esac - fi - - # Architecture directory - arch_dir=$arch - if [ "$GLES" == "-DNDK_GLES2=1" ]; then - arch_dir=$arch-es2 - elif [ "$GLES" == "-DNDK_GLES31=1" ]; then - arch_dir=$arch-es31 - else - arch_dir=$arch-es3 - fi - - # CMake build directory - cmake_build_dir=${SAVED_DIR}/${build}/${arch_dir}/${plat} - - # Build commands - echo -e "\n(CINDER-ANDROID): Building: android-${plat} ${arch} ${build}" - - cd $SAVED_DIR - echo "(CINDER-ANDROID): Changed dir: $(pwd)" - - # If rebuilding, don't remove the directory - if [ $FULLBUILD == true ]; then - echo "(CINDER-ANDROID): Full build - removing: ${cmake_build_dir}" - rm -rf ${cmake_build_dir} - else - echo "(CINDER-ANDROID): (SKIPPED) Full build - removing: ${cmake_build_dir}" - fi - - # Create any directories we need - mkdir -p ./${build}/$arch_dir/$plat - cd ./${build}/$arch_dir/$plat - echo "(CINDER-ANDROID): Changed dir: $(pwd)" - - # cmake - cmake ../../.. -DCMAKE_BUILD_TYPE=${build} -DNDK_ARCH=${arch} -DNDK_PLATFORM=${plat} -DNDK_TOOLCHAIN=${TOOLCHAIN} -DNDK_STL=${STL} ${GLES} - if [ $? -ne 0 ] - then - echo -e "\n(CINDER-ANDROID): CMake failed for PLATFORM: android-${plat}, ARCH: ${arch}, BUILD_TYPE: ${build}" - exit 1 - fi - - # make - make -j ${NUMPROCS} ${VERBOSE} - if [ $? -ne 0 ] - then - echo -e "\n(CINDER-ANDROID): Compile (make) failed for PLATFORM: android-${plat}, ARCH: ${arch}, BUILD_TYPE: $build ${GLES_INFO}" - exit 1 - fi - done - done -done - - -echo -e "\n(CINDER-ANDROID): Build complete\n" - diff --git a/proj/android/es2-fullbuild b/proj/android/es2-fullbuild deleted file mode 100755 index 0f54c7149b..0000000000 --- a/proj/android/es2-fullbuild +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -sh es2-fullbuild-armeabi -sh es2-fullbuild-armeabi-v7a -sh es2-fullbuild-x86 -sh es2-fullbuild-mips -sh es2-fullbuild-arm64-v8a -sh es2-fullbuild-x86_64 -sh es2-fullbuild-mips64 diff --git a/proj/android/es2-fullbuild-arm64-v8a b/proj/android/es2-fullbuild-arm64-v8a deleted file mode 100755 index 31f6c870e8..0000000000 --- a/proj/android/es2-fullbuild-arm64-v8a +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=arm64-v8a -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/es2-fullbuild-armeabi b/proj/android/es2-fullbuild-armeabi deleted file mode 100755 index 9807e139ac..0000000000 --- a/proj/android/es2-fullbuild-armeabi +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=armeabi -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/es2-fullbuild-armeabi-v7a b/proj/android/es2-fullbuild-armeabi-v7a deleted file mode 100755 index 82dfa64343..0000000000 --- a/proj/android/es2-fullbuild-armeabi-v7a +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=armeabi-v7a -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/es2-fullbuild-mips b/proj/android/es2-fullbuild-mips deleted file mode 100755 index a5c4de4810..0000000000 --- a/proj/android/es2-fullbuild-mips +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=mips -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/es2-fullbuild-mips64 b/proj/android/es2-fullbuild-mips64 deleted file mode 100755 index aa64f4ea25..0000000000 --- a/proj/android/es2-fullbuild-mips64 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=mips64 -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/es2-fullbuild-x86 b/proj/android/es2-fullbuild-x86 deleted file mode 100755 index bc18c099e7..0000000000 --- a/proj/android/es2-fullbuild-x86 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=x86 -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/es2-fullbuild-x86_64 b/proj/android/es2-fullbuild-x86_64 deleted file mode 100755 index d2dc7e3655..0000000000 --- a/proj/android/es2-fullbuild-x86_64 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=x86_64 -bash cbuilder "$@" -a ${ARCH} -es2 diff --git a/proj/android/fullbuild b/proj/android/fullbuild deleted file mode 100755 index b5b4bba88a..0000000000 --- a/proj/android/fullbuild +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -sh fullbuild-armeabi "$@" -sh fullbuild-armeabi-v7a "$@" -sh fullbuild-x86 "$@" -sh fullbuild-mips "$@" -sh fullbuild-arm64-v8a "$@" -sh fullbuild-x86_64 "$@" -sh fullbuild-mips64 "$@" diff --git a/proj/android/fullbuild-arm64-v8a b/proj/android/fullbuild-arm64-v8a deleted file mode 100755 index 05dfbd5f47..0000000000 --- a/proj/android/fullbuild-arm64-v8a +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=arm64-v8a -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/fullbuild-armeabi b/proj/android/fullbuild-armeabi deleted file mode 100755 index 89ba8c6511..0000000000 --- a/proj/android/fullbuild-armeabi +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=armeabi -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/fullbuild-armeabi-v7a b/proj/android/fullbuild-armeabi-v7a deleted file mode 100755 index a8f11ab460..0000000000 --- a/proj/android/fullbuild-armeabi-v7a +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=armeabi-v7a -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/fullbuild-mips b/proj/android/fullbuild-mips deleted file mode 100755 index e1fc1ce75a..0000000000 --- a/proj/android/fullbuild-mips +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=mips -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/fullbuild-mips64 b/proj/android/fullbuild-mips64 deleted file mode 100755 index 3588536ae3..0000000000 --- a/proj/android/fullbuild-mips64 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=mips64 -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/fullbuild-x86 b/proj/android/fullbuild-x86 deleted file mode 100755 index bb29c96a7c..0000000000 --- a/proj/android/fullbuild-x86 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=x86 -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/fullbuild-x86_64 b/proj/android/fullbuild-x86_64 deleted file mode 100755 index d7d0a3caf7..0000000000 --- a/proj/android/fullbuild-x86_64 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -ARCH=x86_64 -bash cbuilder "$@" -a ${ARCH} diff --git a/proj/android/libcinder_java/app/build.gradle b/proj/android/libcinder_java/app/build.gradle index 8618c0e19a..ed6ada5ded 100644 --- a/proj/android/libcinder_java/app/build.gradle +++ b/proj/android/libcinder_java/app/build.gradle @@ -1,18 +1,18 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 21 - buildToolsVersion "21.1.2" + compileSdkVersion 29 + buildToolsVersion "29.0.3" println "PROJECT DIR: ${projectDir}" println "BUILD DIR : ${buildDir}" defaultConfig { applicationId "org.libcinder.samples.libcinder_proj" - minSdkVersion 19 - targetSdkVersion 21 - versionCode 1 - versionName "1.0" + minSdkVersion 26 + targetSdkVersion 29 + versionCode 2 + versionName "2.0" } buildTypes { diff --git a/proj/android/libcinder_java/build.gradle b/proj/android/libcinder_java/build.gradle index 574631d5d2..5463e29c49 100644 --- a/proj/android/libcinder_java/build.gradle +++ b/proj/android/libcinder_java/build.gradle @@ -3,14 +3,10 @@ buildscript { repositories { jcenter() - flatDir { - dirs "${projectDir}/../../tools/android/CinderAppBuild/repo" - } + google() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - classpath 'org.libcinder.gradle:cinderappbuild:1.0' - + classpath 'com.android.tools.build:gradle:4.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/proj/android/libcinder_java/gradle/wrapper/gradle-wrapper.properties b/proj/android/libcinder_java/gradle/wrapper/gradle-wrapper.properties index 0c71e760dc..3ae1490c87 100644 --- a/proj/android/libcinder_java/gradle/wrapper/gradle-wrapper.properties +++ b/proj/android/libcinder_java/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/proj/android/libcinder_java/libcinder/build.gradle b/proj/android/libcinder_java/libcinder/build.gradle deleted file mode 100644 index fbbe046145..0000000000 --- a/proj/android/libcinder_java/libcinder/build.gradle +++ /dev/null @@ -1,72 +0,0 @@ -apply plugin: 'com.android.library' - -android { - compileSdkVersion 22 - buildToolsVersion "22.0.0" - - defaultConfig { - minSdkVersion 19 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - sourceSets { - main { - java { - srcDir "${projectDir}/../../../src/cinder/java" - } - } - } - - project.gradle.buildFinished { buildResult -> - def taskNames = buildResult.getGradle().getStartParameter().getTaskNames() - def srcFilePath = null - - if(taskNames.contains("assembleDebug")) { - srcFilePath = "${buildDir}/outputs/aar/libcinder-debug.aar" - } - else if(taskNames.contains("assembleRelease")) { - srcFilePath = "${buildDir}/outputs/aar/libcinder-release.aar" - } - - if(null != srcFilePath) { - def srcFile = new File( srcFilePath ); - def dstFile = new File( "${projectDir}/../../../lib/android/" + srcFile.getName() ) - - def srcInputStream = srcFile.newDataInputStream() - def srcOutputStream = dstFile.newDataOutputStream() - srcOutputStream << srcInputStream - - srcInputStream.close() - srcOutputStream.close() - - println "Copied ${srcFile.getCanonicalPath()} to ${dstFile.getCanonicalPath()}" - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:22.0.0' -} - - -/* -apply plugin: 'maven' - -uploadArchives { - repositories { - flatDir { - dirs "../../" - } - } -} -*/ diff --git a/proj/android/libcinder_java/libcinder/src/main/AndroidManifest.xml b/proj/android/libcinder_java/libcinder/src/main/AndroidManifest.xml deleted file mode 100644 index 9f57426dd9..0000000000 --- a/proj/android/libcinder_java/libcinder/src/main/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/proj/android/libcinder_java/libcinder/src/main/res/values/strings.xml b/proj/android/libcinder_java/libcinder/src/main/res/values/strings.xml deleted file mode 100644 index dcfc165a58..0000000000 --- a/proj/android/libcinder_java/libcinder/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - libcinder - diff --git a/samples/ArcballDemo/androidstudio/ArcballDemo/app/build.gradle b/samples/ArcballDemo/androidstudio/ArcballDemo/app/build.gradle index e8954288ab..2b47d0e12a 100644 --- a/samples/ArcballDemo/androidstudio/ArcballDemo/app/build.gradle +++ b/samples/ArcballDemo/androidstudio/ArcballDemo/app/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'com.android.application' -apply plugin: org.libcinder.gradle.CinderAppBuildPlugin +apply plugin: 'org.libcinder.gradle.CinderAppBuildPlugin' android { compileSdkVersion 21 @@ -10,8 +10,8 @@ android { defaultConfig { applicationId "org.libcinder.samples.arcballdemo" - minSdkVersion 19 - targetSdkVersion 21 + minSdkVersion 26 + targetSdkVersion 28 versionCode 1 versionName "1.0" } diff --git a/samples/ArcballDemo/androidstudio/ArcballDemo/build.gradle b/samples/ArcballDemo/androidstudio/ArcballDemo/build.gradle index 51a28a0053..753a6f8d18 100644 --- a/samples/ArcballDemo/androidstudio/ArcballDemo/build.gradle +++ b/samples/ArcballDemo/androidstudio/ArcballDemo/build.gradle @@ -3,12 +3,14 @@ buildscript { repositories { jcenter() + google() + mavenCentral() flatDir { dirs "${projectDir}/../../../../tools/android/CinderAppBuild/repo" } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/ArcballDemo/androidstudio/ArcballDemo/gradle/wrapper/gradle-wrapper.properties b/samples/ArcballDemo/androidstudio/ArcballDemo/gradle/wrapper/gradle-wrapper.properties index 0c71e760dc..bc5653d477 100644 --- a/samples/ArcballDemo/androidstudio/ArcballDemo/gradle/wrapper/gradle-wrapper.properties +++ b/samples/ArcballDemo/androidstudio/ArcballDemo/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip + diff --git a/samples/BasicApp/androidstudio/BasicApp/build.gradle b/samples/BasicApp/androidstudio/BasicApp/build.gradle index 51a28a0053..3c33331391 100644 --- a/samples/BasicApp/androidstudio/BasicApp/build.gradle +++ b/samples/BasicApp/androidstudio/BasicApp/build.gradle @@ -8,9 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - classpath 'org.libcinder.gradle:cinderappbuild:1.0' - + classpath 'com.android.tools.build:gradle:4.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/samples/CaptureBasic/androidstudio/CaptureBasic/build.gradle b/samples/CaptureBasic/androidstudio/CaptureBasic/build.gradle index 51a28a0053..155c2eaadf 100644 --- a/samples/CaptureBasic/androidstudio/CaptureBasic/build.gradle +++ b/samples/CaptureBasic/androidstudio/CaptureBasic/build.gradle @@ -8,8 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - classpath 'org.libcinder.gradle:cinderappbuild:1.0' + classpath 'com.android.tools.build:gradle:4.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/samples/FlickrTestMultithreaded/androidstudio/FlickrTestMultithreaded/build.gradle b/samples/FlickrTestMultithreaded/androidstudio/FlickrTestMultithreaded/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/FlickrTestMultithreaded/androidstudio/FlickrTestMultithreaded/build.gradle +++ b/samples/FlickrTestMultithreaded/androidstudio/FlickrTestMultithreaded/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/Geometry/androidstudio/Geometry/build.gradle b/samples/Geometry/androidstudio/Geometry/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/Geometry/androidstudio/Geometry/build.gradle +++ b/samples/Geometry/androidstudio/Geometry/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/MultiTouchBasic/androidstudio/MultiTouchBasic/build.gradle b/samples/MultiTouchBasic/androidstudio/MultiTouchBasic/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/MultiTouchBasic/androidstudio/MultiTouchBasic/build.gradle +++ b/samples/MultiTouchBasic/androidstudio/MultiTouchBasic/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/app/build.gradle b/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/app/build.gradle index f21cb3c875..3b5ffab568 100644 --- a/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/app/build.gradle +++ b/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/app/build.gradle @@ -1,114 +1,43 @@ apply plugin: 'com.android.application' -apply plugin: org.libcinder.gradle.CinderAppBuildPlugin android { - compileSdkVersion 21 - buildToolsVersion "21.1.2" - - println "PROJECT DIR: ${projectDir}" - println "BUILD DIR : ${buildDir}" - + compileSdkVersion 25 + buildToolsVersion "25.0.2" defaultConfig { applicationId "org.libcinder.samples.quicktimebasic" minSdkVersion 19 - targetSdkVersion 21 + targetSdkVersion 25 versionCode 1 versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + externalNativeBuild { + cmake { + arguments "-DCINDER_DIR=${projectDir}/../../../../..", + "-DNDK_PLATFORM=21", + "-DNDK_STL=gnustl" + cppFlags "-std=c++11 -fexceptions -frtti" + } + } + ndk { + abiFilters 'armeabi-v7a' + } } - buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - - sourceSets { - main { - jni.srcDirs = ['src/main/jni', '../../../src', '../../../include'] - jniLibs.srcDirs = ['src/main/jniLibs', '../../../../../lib'] - assets.srcDirs = ['src/main/assets', '../../../assets'] - } - } - - task cinderCleanNdk() << { - File cinderNdkDir = new File( "${project.buildDir}/cinder-ndk" ); - if( cinderNdkDir.exists() ) { - cinderNdkDir.delete(); - } - - tasks.each { - if(("cinderCompileDebugNdk" == it.name) || ("cinderCompileReleaseNdk" == it.name)) { - it.outputs.upToDateWhen {false} - } - } - } - - def cleanBuildTask = tasks.getByPath( ":app:clean" ); - if( cleanBuildTask ) { - cleanBuildTask.dependsOn cinderCleanNdk - } - - task disableDefaultNdkBuild() { - doFirst { - tasks.each { - if(("compileDebugNdk" == it.name) || ("compileReleaseNdk" == it.name)) { - it.enabled = false - } - } + externalNativeBuild { + cmake { + path "CMakeLists.txt" } } - def prebuildTask = tasks.getByPath( ":app:preBuild" ) - if( prebuildTask ) { - prebuildTask.dependsOn disableDefaultNdkBuild - } - - cinder { - ndkDir = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder().toString() - cinderDir = "${projectDir}/../../../../.." - verbose = false - moduleName = "QuickTimeBasic" - srcDirs = ["../../../src"] - cFlags { - "all_archs" { - debug = "-g" - release = "-Os" - } - } - cppFlags { - "all_archs" { - debug = "-g -std=c++11" - release = "-Os -std=c++11" - } + sourceSets { + main { + assets.srcDirs = ["${projectDir}/../../../assets"] } - includeDirs = ["${cinderDir}/include", "${cinderDir}/boost"] - ldLibs = ["log", "android", "EGL", "GLESv3", "OpenSLES", "z"] - libCinder = [ - "debug" : "${cinderDir}/lib/android/\$(TARGET_PLATFORM)/\$(TARGET_ARCH_ABI)/libcinder_d.a", - "release" : "${cinderDir}/lib/android/\$(TARGET_PLATFORM)/\$(TARGET_ARCH_ABI)/libcinder.a" - ] - staticLibs = [ - "${cinderDir}/lib/android/\$(TARGET_PLATFORM)/\$(TARGET_ARCH_ABI)/libboost_filesystem.a", - "${cinderDir}/lib/android/\$(TARGET_PLATFORM)/\$(TARGET_ARCH_ABI)/libboost_system.a" - ] - stl = "gnustl_static" - toolChainVersion = "4.9" - archs = ["armeabi-v7a"] - //archs = ["armeabi", "armeabi-v7a", "arm64-v8a", "mips", "mips64", "x86","x86_64"] - } - - task ndkBuildDebug(dependsOn: 'cinderCompileDebugNdk') {} - task ndkBuildRelease(dependsOn: 'cinderCompileReleaseNdk') {} - - tasks.withType(JavaCompile) { - compileTask -> - if("compileDebugJavaWithJavac" == compileTask.name) { - compileTask.dependsOn ndkBuildDebug - } - else if("compileReleaseJavaWithJavac" == compileTask.name) { - compileTask.dependsOn ndkBuildRelease - } } } @@ -121,7 +50,12 @@ repositories { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) + androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + exclude group: 'com.android.support', module: 'support-annotations' + }) + compile 'com.android.support:appcompat-v7:25.1.1' + testCompile 'junit:junit:4.12' + debugCompile 'org.libcinder:libcinder-debug:1.0@aar' releaseCompile 'org.libcinder:libcinder-release:1.0@aar' -} - +} \ No newline at end of file diff --git a/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/build.gradle b/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/build.gradle +++ b/samples/QuickTimeBasic/androidstudio/QuickTimeBasic/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/QuickTimeBasic/src/QuickTimeBasicApp.cpp b/samples/QuickTimeBasic/src/QuickTimeBasicApp.cpp index 7a8d6782ee..57b703f4d0 100644 --- a/samples/QuickTimeBasic/src/QuickTimeBasicApp.cpp +++ b/samples/QuickTimeBasic/src/QuickTimeBasicApp.cpp @@ -86,14 +86,16 @@ void QuickTimeSampleApp::fileDrop( FileDropEvent event ) void QuickTimeSampleApp::update() { - if( mMovie ) - mFrameTexture = mMovie->getTexture(); + if( mMovie ) { - static bool sPrintedDone = false; - if( ! sPrintedDone && mMovie->isDone() ) { - console() << "Done Playing" << std::endl; - sPrintedDone = true; - } + mFrameTexture = mMovie->getTexture(); + + static bool sPrintedDone = false; + if (!sPrintedDone && mMovie->isDone()) { + console() << "Done Playing" << std::endl; + sPrintedDone = true; + } + } } void QuickTimeSampleApp::draw() @@ -109,4 +111,4 @@ void QuickTimeSampleApp::draw() } } -CINDER_APP( QuickTimeSampleApp, RendererGl, QuickTimeSampleApp::prepareSettings ); +CINDER_APP( QuickTimeSampleApp, RendererGl, QuickTimeSampleApp::prepareSettings ); \ No newline at end of file diff --git a/samples/TextBox/androidstudio/TextBox/build.gradle b/samples/TextBox/androidstudio/TextBox/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/TextBox/androidstudio/TextBox/build.gradle +++ b/samples/TextBox/androidstudio/TextBox/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/TextTest/androidstudio/TextTest/build.gradle b/samples/TextTest/androidstudio/TextTest/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/TextTest/androidstudio/TextTest/build.gradle +++ b/samples/TextTest/androidstudio/TextTest/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/TextureFont/androidstudio/TextureFont/build.gradle b/samples/TextureFont/androidstudio/TextureFont/build.gradle index 51a28a0053..d2935c7014 100644 --- a/samples/TextureFont/androidstudio/TextureFont/build.gradle +++ b/samples/TextureFont/androidstudio/TextureFont/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_audio/BufferPlayer/androidstudio/BufferPlayer/build.gradle b/samples/_audio/BufferPlayer/androidstudio/BufferPlayer/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_audio/BufferPlayer/androidstudio/BufferPlayer/build.gradle +++ b/samples/_audio/BufferPlayer/androidstudio/BufferPlayer/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_audio/InputAnalyzer/androidstudio/InputAnalyzer/build.gradle b/samples/_audio/InputAnalyzer/androidstudio/InputAnalyzer/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_audio/InputAnalyzer/androidstudio/InputAnalyzer/build.gradle +++ b/samples/_audio/InputAnalyzer/androidstudio/InputAnalyzer/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_audio/NodeAdvanced/androidstudio/NodeAdvanced/build.gradle b/samples/_audio/NodeAdvanced/androidstudio/NodeAdvanced/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_audio/NodeAdvanced/androidstudio/NodeAdvanced/build.gradle +++ b/samples/_audio/NodeAdvanced/androidstudio/NodeAdvanced/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_audio/NodeBasic/androidstudio/NodeBasic/build.gradle b/samples/_audio/NodeBasic/androidstudio/NodeBasic/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_audio/NodeBasic/androidstudio/NodeBasic/build.gradle +++ b/samples/_audio/NodeBasic/androidstudio/NodeBasic/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/Cube/androidstudio/Cube/build.gradle b/samples/_opengl/Cube/androidstudio/Cube/build.gradle index 19b2626ce1..178feb1c28 100644 --- a/samples/_opengl/Cube/androidstudio/Cube/build.gradle +++ b/samples/_opengl/Cube/androidstudio/Cube/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/CubeMapping/androidstudio/CubeMapping/build.gradle b/samples/_opengl/CubeMapping/androidstudio/CubeMapping/build.gradle index 19b2626ce1..178feb1c28 100644 --- a/samples/_opengl/CubeMapping/androidstudio/CubeMapping/build.gradle +++ b/samples/_opengl/CubeMapping/androidstudio/CubeMapping/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/DeferredShading/androidstudio/DeferredShading/build.gradle b/samples/_opengl/DeferredShading/androidstudio/DeferredShading/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/DeferredShading/androidstudio/DeferredShading/build.gradle +++ b/samples/_opengl/DeferredShading/androidstudio/DeferredShading/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/DynamicCubeMapping/androidstudio/DynamicCubeMapping/build.gradle b/samples/_opengl/DynamicCubeMapping/androidstudio/DynamicCubeMapping/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/DynamicCubeMapping/androidstudio/DynamicCubeMapping/build.gradle +++ b/samples/_opengl/DynamicCubeMapping/androidstudio/DynamicCubeMapping/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/FboBasic/androidstudio/FBOBasic/build.gradle b/samples/_opengl/FboBasic/androidstudio/FBOBasic/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/FboBasic/androidstudio/FBOBasic/build.gradle +++ b/samples/_opengl/FboBasic/androidstudio/FBOBasic/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/HighDynamicRange/androidstudio/HighDynamicRange/build.gradle b/samples/_opengl/HighDynamicRange/androidstudio/HighDynamicRange/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/HighDynamicRange/androidstudio/HighDynamicRange/build.gradle +++ b/samples/_opengl/HighDynamicRange/androidstudio/HighDynamicRange/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/ImmediateMode/androidstudio/ImmediateMode/build.gradle b/samples/_opengl/ImmediateMode/androidstudio/ImmediateMode/build.gradle index 71287165a4..69b3ff8f68 100644 --- a/samples/_opengl/ImmediateMode/androidstudio/ImmediateMode/build.gradle +++ b/samples/_opengl/ImmediateMode/androidstudio/ImmediateMode/build.gradle @@ -8,8 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - classpath 'org.libcinder.gradle:cinderappbuild:1.0' + classpath 'com.android.tools.build:gradle:4.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/samples/_opengl/InstancedTeapots/androidstudio/InstancedTeapots/build.gradle b/samples/_opengl/InstancedTeapots/androidstudio/InstancedTeapots/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/InstancedTeapots/androidstudio/InstancedTeapots/build.gradle +++ b/samples/_opengl/InstancedTeapots/androidstudio/InstancedTeapots/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/MipMap/androidstudio/MipMap/build.gradle b/samples/_opengl/MipMap/androidstudio/MipMap/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/MipMap/androidstudio/MipMap/build.gradle +++ b/samples/_opengl/MipMap/androidstudio/MipMap/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/MotionBlurFbo/androidstudio/MotionBlurFbo/build.gradle b/samples/_opengl/MotionBlurFbo/androidstudio/MotionBlurFbo/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/MotionBlurFbo/androidstudio/MotionBlurFbo/build.gradle +++ b/samples/_opengl/MotionBlurFbo/androidstudio/MotionBlurFbo/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/MotionBlurVelocityBuffer/androidstudio/MotionBlurVelocityBuffer/build.gradle b/samples/_opengl/MotionBlurVelocityBuffer/androidstudio/MotionBlurVelocityBuffer/build.gradle index 71287165a4..472d93f551 100644 --- a/samples/_opengl/MotionBlurVelocityBuffer/androidstudio/MotionBlurVelocityBuffer/build.gradle +++ b/samples/_opengl/MotionBlurVelocityBuffer/androidstudio/MotionBlurVelocityBuffer/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/samples/_opengl/NormalMapping/androidstudio/NormalMapping/app/src/main/AndroidManifest.xml b/samples/_opengl/NormalMapping/androidstudio/NormalMapping/app/src/main/AndroidManifest.xml index d8f24af603..fa0bb6053b 100644 --- a/samples/_opengl/NormalMapping/androidstudio/NormalMapping/app/src/main/AndroidManifest.xml +++ b/samples/_opengl/NormalMapping/androidstudio/NormalMapping/app/src/main/AndroidManifest.xml @@ -6,7 +6,6 @@ getChildren().begin(); node != curNode->getChildren().end(); ++node, i++ ) { if ( i == index ) { diff --git a/src/cinder/android/app/build.gradle b/src/cinder/android/app/build.gradle new file mode 100644 index 0000000000..ba3bafe334 --- /dev/null +++ b/src/cinder/android/app/build.gradle @@ -0,0 +1,56 @@ +plugins { + id 'com.android.application' + id 'kotlin-android' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.1" + + defaultConfig { + applicationId "org.libcinder.android.app" + minSdkVersion 16 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + externalNativeBuild { + cmake { + cppFlags "-std=c++17" + } + } + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + externalNativeBuild { + cmake { + path "src/main/cpp/CMakeLists.txt" + version "3.10.2" + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation 'androidx.core:core-ktx:1.2.0' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'com.google.android.material:material:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + testImplementation 'junit:junit:4.+' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' +} \ No newline at end of file diff --git a/src/cinder/android/app/src/androidTest/java/ch/ufidstudios/androidcppskeleton/ExampleInstrumentedTest.kt b/src/cinder/android/app/src/androidTest/java/ch/ufidstudios/androidcppskeleton/ExampleInstrumentedTest.kt new file mode 100644 index 0000000000..beb330c767 --- /dev/null +++ b/src/cinder/android/app/src/androidTest/java/ch/ufidstudios/androidcppskeleton/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package ch.ufidstudios.androidcppskeleton + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("ch.ufidstudios.androidcppskeleton", appContext.packageName) + } +} \ No newline at end of file diff --git a/src/cinder/android/app/src/main/AndroidManifest.xml b/src/cinder/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..8cf4cb576b --- /dev/null +++ b/src/cinder/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/cpp/CMakeLists.txt b/src/cinder/android/app/src/main/cpp/CMakeLists.txt new file mode 100644 index 0000000000..c50dfdfa14 --- /dev/null +++ b/src/cinder/android/app/src/main/cpp/CMakeLists.txt @@ -0,0 +1,48 @@ +# For more information about using CMake with Android Studio, read the +# documentation: https://d.android.com/studio/projects/add-native-code.html + +# Sets the minimum version of CMake required to build the native library. + +cmake_minimum_required(VERSION 3.10.2) + +# Declares and names the project. + +project("androidcppskeleton") + +# Creates and names a library, sets it as either STATIC +# or SHARED, and provides the relative paths to its source code. +# You can define multiple libraries, and CMake builds them for you. +# Gradle automatically packages shared libraries with your APK. + +add_library( # Sets the name of the library. + native-lib + + # Sets the library as a shared library. + SHARED + + # Provides a relative path to your source file(s). + native-lib.cpp ) + +# Searches for a specified prebuilt library and stores the path as a +# variable. Because CMake includes system libraries in the search path by +# default, you only need to specify the name of the public NDK library +# you want to add. CMake verifies that the library exists before +# completing its build. + +find_library( # Sets the name of the path variable. + log-lib + + # Specifies the name of the NDK library that + # you want CMake to locate. + log ) + +# Specifies libraries CMake should link to your target library. You +# can link multiple libraries, such as libraries you define in this +# build script, prebuilt third-party libraries, or system libraries. + +target_link_libraries( # Specifies the target library. + native-lib + + # Links the target library to the log library + # included in the NDK. + ${log-lib} ) \ No newline at end of file diff --git a/src/cinder/android/app/src/main/cpp/native-lib.cpp b/src/cinder/android/app/src/main/cpp/native-lib.cpp new file mode 100644 index 0000000000..3d6161603a --- /dev/null +++ b/src/cinder/android/app/src/main/cpp/native-lib.cpp @@ -0,0 +1,10 @@ +#include +#include + +extern "C" JNIEXPORT jstring JNICALL +Java_ch_ufidstudios_androidcppskeleton_MainActivity_stringFromJNI( + JNIEnv* env, + jobject /* this */) { + std::string hello = "Hello from C++"; + return env->NewStringUTF(hello.c_str()); +} \ No newline at end of file diff --git a/src/cinder/android/app/src/main/java/ch/ufidstudios/androidcppskeleton/MainActivity.kt b/src/cinder/android/app/src/main/java/ch/ufidstudios/androidcppskeleton/MainActivity.kt new file mode 100644 index 0000000000..f879e20c67 --- /dev/null +++ b/src/cinder/android/app/src/main/java/ch/ufidstudios/androidcppskeleton/MainActivity.kt @@ -0,0 +1,28 @@ +package ch.ufidstudios.androidcppskeleton + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import android.widget.TextView + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + + // Example of a call to a native method + findViewById(R.id.sample_text).text = stringFromJNI() + } + + /** + * A native method that is implemented by the 'native-lib' native library, + * which is packaged with this application. + */ + external fun stringFromJNI(): String + + companion object { + // Used to load the 'native-lib' library on application startup. + init { + System.loadLibrary("native-lib") + } + } +} \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src/cinder/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000000..2b068d1146 --- /dev/null +++ b/src/cinder/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/drawable/ic_launcher_background.xml b/src/cinder/android/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000000..07d5da9cbf --- /dev/null +++ b/src/cinder/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cinder/android/app/src/main/res/layout/activity_main.xml b/src/cinder/android/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000000..a4e8d403ba --- /dev/null +++ b/src/cinder/android/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/cinder/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000000..eca70cfe52 --- /dev/null +++ b/src/cinder/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/src/cinder/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000000..eca70cfe52 --- /dev/null +++ b/src/cinder/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/src/cinder/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..a571e60098 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/src/cinder/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000000..61da551c55 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/src/cinder/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..c41dd28531 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/src/cinder/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000000..db5080a752 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/src/cinder/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..6dba46dab1 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/src/cinder/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000000..da31a871c8 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/src/cinder/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..15ac681720 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/src/cinder/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000..b216f2d313 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/src/cinder/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..f25a419744 Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/cinder/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/src/cinder/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000000..e96783ccce Binary files /dev/null and b/src/cinder/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/src/cinder/android/app/src/main/res/values-night/themes.xml b/src/cinder/android/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000000..cf625ba596 --- /dev/null +++ b/src/cinder/android/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/values/colors.xml b/src/cinder/android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000000..f8c6127d32 --- /dev/null +++ b/src/cinder/android/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/values/strings.xml b/src/cinder/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000..52b93ad9c1 --- /dev/null +++ b/src/cinder/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + AndroidCppSkeleton + \ No newline at end of file diff --git a/src/cinder/android/app/src/main/res/values/themes.xml b/src/cinder/android/app/src/main/res/values/themes.xml new file mode 100644 index 0000000000..859ffa2efc --- /dev/null +++ b/src/cinder/android/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/src/cinder/android/app/src/test/java/ch/ufidstudios/androidcppskeleton/ExampleUnitTest.kt b/src/cinder/android/app/src/test/java/ch/ufidstudios/androidcppskeleton/ExampleUnitTest.kt new file mode 100644 index 0000000000..a4de5940d8 --- /dev/null +++ b/src/cinder/android/app/src/test/java/ch/ufidstudios/androidcppskeleton/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package ch.ufidstudios.androidcppskeleton + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/src/cinder/gl/EnvironmentEs.cpp b/src/cinder/gl/EnvironmentEs.cpp index 9e548170cd..8b063cb837 100644 --- a/src/cinder/gl/EnvironmentEs.cpp +++ b/src/cinder/gl/EnvironmentEs.cpp @@ -489,7 +489,7 @@ std::string EnvironmentEs::generateFragmentShader( const ShaderDef &shader ) #if defined( CINDER_ANDROID ) if( shader.mTextureMappingExternalOes) { - ss << "#extension GL_OES_EGL_image_external : require"; + ss << "#extension GL_OES_EGL_image_external_essl3 : require"; } #endif @@ -556,7 +556,7 @@ std::string EnvironmentEs::generateFragmentShader( const ShaderDef &shader ) #if defined( CINDER_ANDROID ) if( shader.mTextureMappingExternalOes) { - ss << "#extension GL_OES_EGL_image_external : require"; + ss << "#extension GL_OES_EGL_image_external_essl3 : require"; } #endif diff --git a/test/Android/Backtrace/androidstudio/Backtrace/build.gradle b/test/Android/Backtrace/androidstudio/Backtrace/build.gradle index 71287165a4..472d93f551 100644 --- a/test/Android/Backtrace/androidstudio/Backtrace/build.gradle +++ b/test/Android/Backtrace/androidstudio/Backtrace/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/test/Android/CaptureTest/androidstudio/CaptureTest/build.gradle b/test/Android/CaptureTest/androidstudio/CaptureTest/build.gradle index 66927bcf1e..472d93f551 100644 --- a/test/Android/CaptureTest/androidstudio/CaptureTest/build.gradle +++ b/test/Android/CaptureTest/androidstudio/CaptureTest/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.0.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/test/Android/NormalizePathTest/androidstudio/NormalizePathTest/build.gradle b/test/Android/NormalizePathTest/androidstudio/NormalizePathTest/build.gradle index 71287165a4..472d93f551 100644 --- a/test/Android/NormalizePathTest/androidstudio/NormalizePathTest/build.gradle +++ b/test/Android/NormalizePathTest/androidstudio/NormalizePathTest/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/test/AppTest/src/AppTestApp.cpp b/test/AppTest/src/AppTestApp.cpp index f0a09edf5c..1d2a94bd93 100644 --- a/test/AppTest/src/AppTestApp.cpp +++ b/test/AppTest/src/AppTestApp.cpp @@ -10,8 +10,6 @@ #include "Resources.h" -#include - using namespace ci; using namespace ci::app; using namespace std; @@ -284,8 +282,7 @@ void AppTestApp::drawInfo() layout.setFont( Font( "Arial", 16 ) ); layout.setColor( ColorA::gray( 0.9f, 0.75f ) ); - auto fps = boost::format( "%0.2f" ) % getAverageFps(); - layout.addLine( "fps: " + fps.str() ); + layout.addLine( "fps: " + to_string( int( getAverageFps() ) ) ); layout.addLine( "v-sync enabled: " + string( gl::isVerticalSyncEnabled() ? "true" : "false" ) ); auto tex = gl::Texture::create( layout.render( true ) ); diff --git a/test/Linux/GstPlayerRefactorTest/proj/cmake/CMakeLists.txt b/test/Linux/GstPlayerRefactorTest/proj/cmake/CMakeLists.txt index f921eec993..37cb224c8a 100644 --- a/test/Linux/GstPlayerRefactorTest/proj/cmake/CMakeLists.txt +++ b/test/Linux/GstPlayerRefactorTest/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( GstPlayerTestApp ) diff --git a/test/Linux/PlatformTest/proj/cmake/CMakeLists.txt b/test/Linux/PlatformTest/proj/cmake/CMakeLists.txt index 4d0106b1a7..fd21875b0a 100644 --- a/test/Linux/PlatformTest/proj/cmake/CMakeLists.txt +++ b/test/Linux/PlatformTest/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.2.10 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( PlatformTest ) diff --git a/test/Video/VideoPlayerScrubTest/proj/cmake/CMakeLists.txt b/test/Video/VideoPlayerScrubTest/proj/cmake/CMakeLists.txt index e993939fe0..32b0bf7443 100644 --- a/test/Video/VideoPlayerScrubTest/proj/cmake/CMakeLists.txt +++ b/test/Video/VideoPlayerScrubTest/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( VideoPlayerScrubTestApp ) diff --git a/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt b/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt index b2b5c04216..92d6621557 100644 --- a/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt +++ b/test/_audio/DeviceTest/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( audio-DeviceTest ) diff --git a/test/_audio/SampleTest/proj/cmake/CMakeLists.txt b/test/_audio/SampleTest/proj/cmake/CMakeLists.txt index e1ff8c408b..5f2f8e3d59 100644 --- a/test/_audio/SampleTest/proj/cmake/CMakeLists.txt +++ b/test/_audio/SampleTest/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.0 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( audio-SampleTest ) diff --git a/test/_opengl/SamplerObject/proj/cmake/CMakeLists.txt b/test/_opengl/SamplerObject/proj/cmake/CMakeLists.txt index 898e0b422e..bff8511c38 100644 --- a/test/_opengl/SamplerObject/proj/cmake/CMakeLists.txt +++ b/test/_opengl/SamplerObject/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( SamplerObject ) diff --git a/test/eventTest/proj/cmake/CMakeLists.txt b/test/eventTest/proj/cmake/CMakeLists.txt index 8594bd8f12..17df619da5 100644 --- a/test/eventTest/proj/cmake/CMakeLists.txt +++ b/test/eventTest/proj/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required( VERSION 3.10 FATAL_ERROR ) +cmake_minimum_required( VERSION 3.10.2 FATAL_ERROR ) set( CMAKE_VERBOSE_MAKEFILE ON ) project( EventTest ) diff --git a/tools/android/asprojgen/template/CinderApp/androidstudio/CinderApp/build.gradle b/tools/android/asprojgen/template/CinderApp/androidstudio/CinderApp/build.gradle index 8e69b8acdc..dff0bbb922 100644 --- a/tools/android/asprojgen/template/CinderApp/androidstudio/CinderApp/build.gradle +++ b/tools/android/asprojgen/template/CinderApp/androidstudio/CinderApp/build.gradle @@ -8,7 +8,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'org.libcinder.gradle:cinderappbuild:1.0' // NOTE: Do not place your application dependencies here; they belong