diff --git a/scripts/templates/android2024/build.gradle b/scripts/templates/android2024/build.gradle new file mode 100644 index 00000000000..7cbc7eb6714 --- /dev/null +++ b/scripts/templates/android2024/build.gradle @@ -0,0 +1,22 @@ +ext { + //var = 'signExample.keystore' +}// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.4.2' + } +} + +allprojects { + repositories { + google() + mavenCentral() + } + ext { + + } +} diff --git a/scripts/templates/android2024/gradle.properties b/scripts/templates/android2024/gradle.properties new file mode 100644 index 00000000000..43f9ef9e1c3 --- /dev/null +++ b/scripts/templates/android2024/gradle.properties @@ -0,0 +1,10 @@ +android.useAndroidX=true +android.enableJetifier=false +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +kotlin.code.style=official +android.prefabVersion=1.0.+ +android.buildFeatures.prefab=true +#ndkBuild=false +# https://issuetracker.google.com/149575364 +android.enableParallelJsonGen=false +#googleplay=true \ No newline at end of file diff --git a/scripts/templates/android2024/gradle/wrapper/gradle-wrapper.jar b/scripts/templates/android2024/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000000..13372aef5e2 Binary files /dev/null and b/scripts/templates/android2024/gradle/wrapper/gradle-wrapper.jar differ diff --git a/scripts/templates/android2024/gradle/wrapper/gradle-wrapper.properties b/scripts/templates/android2024/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..2dd5ee8c795 --- /dev/null +++ b/scripts/templates/android2024/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Jun 12 01:17:57 AEST 2023 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/scripts/templates/android2024/local.properties b/scripts/templates/android2024/local.properties new file mode 100644 index 00000000000..5ba01764b38 --- /dev/null +++ b/scripts/templates/android2024/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Wed May 08 13:54:16 CEST 2024 +sdk.dir=/Users/thierry/Library/Android/sdk diff --git a/scripts/templates/android2024/ofApp/build.gradle b/scripts/templates/android2024/ofApp/build.gradle new file mode 100644 index 00000000000..635a3e27577 --- /dev/null +++ b/scripts/templates/android2024/ofApp/build.gradle @@ -0,0 +1,182 @@ +plugins { + id 'com.android.application' +} + +def CMAKELIST_PATH = './src/main/cpp' +def CPP_SOURCE = './src/main/cpp' +def JAVA_SOURCE = './src/main/java' + +// pointing to cmake's source code for the same project +def PRJ_SRC_ROOT = './src/main' +def ofRoot(){ return '../../../../' } +final ofSource = ofRoot() + 'libs/openFrameworks' +final ofLibs = ofRoot() + 'libs' +final addons = ofRoot() + 'addons' +final ofLibOutput = ofRoot() + 'libs/openFrameworksCompiled/lib/android' +def OFX_ANDROID = ofRoot() + 'addons/ofxAndroid' +//def OF_ADDONS_ARGUMENTS = "${OF_ADDONS}" +def enableProguardInReleaseBuilds = true +def enableProguardInDebugBuilds = false + +task wrapper(type: Wrapper) { + gradleVersion = '7.3.3' +} +tasks.register("prepareKotlinBuildScriptModel"){ +} + +evaluationDependsOn(':openFrameworksProject') + +tasks.whenTaskAdded { task -> + if (task.name == 'assemble') { + task.dependsOn(':openFrameworksProject:assemble') + } +} + + +android { + compileSdkVersion 34 + buildToolsVersion '32.0.0' + //ndkPath "/Users/x/android-ndk-r21e" // Point to your own NDK if needed + ndkVersion '24.0.8215888' // use android studio side loaded ndk + buildFeatures { + prefab true + } + signingConfigs { + debug { + } + release { + storeFile new File("${System.properties['user.home']}/.android/debug.keystore") + storePassword 'android' + storeType "jks" + keyAlias 'androiddebugkey' + keyPassword 'android' + } + } + defaultConfig { + applicationId "cc.openframeworks.emptyExample" // IMPORTANT : THIS DEFINES THE ID OF THE APK + minSdkVersion 21 + targetSdkVersion 34 + versionCode 12 + versionName '12.0' + ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' //, 'x86_64' + + externalNativeBuild { + if (!project.hasProperty("ndkBuild")) { + cmake { + arguments "-DANDROID_STL=c++_shared", + "-DANDROID_ARM_NEON=TRUE", + "-DANDROID_TOOLCHAIN=clang", + //"${OF_ADDONS_ARGUMENTS}", + "-DTARGET_OPENGLES=TRUE" + + version '3.22.1' + } + } + } + multiDexEnabled false + } + buildTypes { + release { + signingConfig signingConfigs.release + jniDebuggable false + debuggable false + minifyEnabled false + shrinkResources false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.release + } + debug { + jniDebuggable true + debuggable true + minifyEnabled false + shrinkResources false + signingConfig signingConfigs.debug + } + } + flavorDimensions "version" + productFlavors { + playstore { + applicationIdSuffix "" + signingConfig signingConfigs.release + } +// humble { +// applicationIdSuffix ".humble" +// } +// amazon { +// applicationIdSuffix ".amazon" +// } +// samsung { +// applicationIdSuffix ".samsung" +// } +// oppo { +// applicationIdSuffix ".oppo" +// } + } + sourceSets { + main { + manifest.srcFile "${PRJ_SRC_ROOT}/AndroidManifest.xml" + java.srcDirs = ["${PRJ_SRC_ROOT}/java", + "${OFX_ANDROID}/Java"] + res.srcDirs = ["${PRJ_SRC_ROOT}/res"] +// jniLibs.srcDirs = ["${OF_ANDROID_OUTPUT}", "lib"] // Pre Android Studio 2022.2.1 + assets { + srcDirs 'src/main/assets', 'src/main/bin/data' + } + } + } + externalNativeBuild { + if (!project.hasProperty("ndkBuild")) { + cmake { + path "${CMAKELIST_PATH}/CMakeLists.txt" + } + } else { + ndkBuild { + path "${CMAKELIST_PATH}/Android.mk" + } + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + androidResources { + noCompress '' + } + dependenciesInfo { + includeInApk false + includeInBundle false + } +// testOptions { +// devices { +// pixel2api29 (com.android.build.api.dsl.ManagedVirtualDevice) { +// // Use device profiles you typically see in +// // Android Studio +// device = "Pixel 2" +// apiLevel = 29 +// // You can also specify "aosp" if you don’t require +// // Google Play Services. +// systemImageSource = "google" +// abi = "x86" +// } +// } +// } +} + + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation "com.getkeepsafe.relinker:relinker:1.4.5" + implementation 'com.google.android.material:material:1.9.0' + if (project.hasProperty("googleplay")) { + implementation "com.google.android.gms:play-services-games:22.0.1" + implementation "com.google.android.gms:play-services-auth:20.0.1" + implementation "com.google.android.gms:play-services-base:18.0.1" + implementation "com.google.android.gms:play-services-basement:18.0.0" + implementation "com.google.android.gms:play-services-instantapps:18.0.1" + implementation "com.google.android.gms:play-services-appset:16.0.2" + } +} + diff --git a/scripts/templates/android2024/ofApp/gradle.properties b/scripts/templates/android2024/ofApp/gradle.properties new file mode 100644 index 00000000000..f96a9f246a0 --- /dev/null +++ b/scripts/templates/android2024/ofApp/gradle.properties @@ -0,0 +1,11 @@ +android.useAndroidX=true +android.enableJetifier=true +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +kotlin.code.style=official +android.prefabVersion=1.0.+ +# Workaround bug in AGP where the prefab dependency is being resolved from a +# non-Gradle thread when enableParallelJsonGen is enabled. +# https://issuetracker.google.com/149575364 +android.enableParallelJsonGen=false +android.buildFeatures.prefab = true +vectorDrawables.useSupportLibrary = true \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/proguard-rules.pro b/scripts/templates/android2024/ofApp/proguard-rules.pro new file mode 100644 index 00000000000..de8c62143ce --- /dev/null +++ b/scripts/templates/android2024/ofApp/proguard-rules.pro @@ -0,0 +1,127 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +-dontoptimize +-dontshrink +#-dontusemixedcaseclassnames +#-dontskipnonpubliclibraryclasses +#-dontpreverify +#-verbose +# +-optimizationpasses 7 # use for final build +-dontusemixedcaseclassnames +#-dontskipnonpubliclibraryclasses +#-dontpreverify +-verbose + +# custom app activity proguard +-keep public class cc.openframeworks.android.OFActivity { public ; } +-keep public class cc.openframeworks.android.R { public ; } + + +#-dontobfuscate android classes +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference + +#-dontobfuscate openFrameworks android classes +-keep public class cc.openframeworks.OFAndroid { public ; } +-keep public class cc.openframeworks.OFAndroidLifeCycleHelper { public ; } +-keep public class cc.openframeworks.OFAndroidWindow { public ; } +-keep public class cc.openframeworks.OFAndroidSoundPlayer { public ; } +-keep public class cc.openframeworks.OFGLSurfaceView { public ; } +-keep public class cc.openframeworks.OFAndroidLifeCycle { public ; } +-keep public class cc.openframeworks.OFActivity { public ; } +-keep public class cc.openframeworks.ContextFactory { public ; } +-keep public class cc.openframeworks.OFEGLConfigChooser { public ; } +-keep public class cc.openframeworks.OFGestureListener { public ; } +-keep public class cc.openframeworks.OFAndroidController { public ; } + +#-dontobfuscate GooglePlay Games android classes if used +-keep class com.google.android.gms.games.leaderboard.** { *; } +-keep class com.google.android.gms.games.snapshot.** { *; } +-keep class com.google.android.gms.games.achievement.** { *; } +-keep class com.google.android.gms.games.event.** { *; } +-keep class com.google.android.gms.games.stats.** { *; } +-keep class com.google.android.gms.games.video.** { *; } +-keep class com.google.android.gms.games.* { *; } +-keep class com.google.android.gms.signin.** { *; } +-keep class com.google.android.gms.dynamic.** { *; } +-keep class com.google.android.gms.dynamite.** { *; } +-keep class com.google.android.gms.tasks.** { *; } +-keep class com.google.android.gms.security.** { *; } +-keep class com.google.android.gms.base.** { *; } +-keep class com.google.android.gms.actions.** { *; } +-keep class com.google.games.bridge.** { *; } +-keep class com.google.android.gms.common.api.** { *; } +-keep class com.google.android.gms.games.quest.** { *; } +-keep class com.google.android.gms.nearby.** { *; } + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +# note that means any method +-keepclasseswithmembernames,includedescriptorclasses class * { + native ; +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} + + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/AndroidManifest.xml b/scripts/templates/android2024/ofApp/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..aae67ceba1b --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/AndroidManifest.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/cpp/CMakeLists.txt b/scripts/templates/android2024/ofApp/src/main/cpp/CMakeLists.txt new file mode 100644 index 00000000000..5b160ffa42d --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/cpp/CMakeLists.txt @@ -0,0 +1,142 @@ +# Sets the minimum version of CMake required to build the native +# library. +cmake_minimum_required(VERSION 3.22.1) + +project(ofapp LANGUAGES CXX) +set(TARGET_ANDROID TRUE) + +set(LOCAL_PATH ${CMAKE_SOURCE_DIR}) +set(PRJ_OF_ROOT ${LOCAL_PATH}/../../../../../../../) + +set(PURE_OF_ROOT ${LOCAL_PATH}/../../../../../../../) +set(CORE_OF_ROOT ${PURE_OF_ROOT}/libs/openFrameworks) +set(LIBS_ROOT ${PURE_OF_ROOT}/libs) + +set(PRJ_ADDONS_PATH ${PURE_OF_ROOT}/addons) +set(PRJ_SOURCE_PATH ${LIBS_ROOT}/openFrameworks) +set(PRJ_LIBS_ROOT ${PURE_OF_ROOT}/libs) + +set(OF_ANDROID ${PURE_OF_ROOT}/libs/openFrameworksCompiled/project/android) +set(OF_ANDROID_OUTPUT ${PURE_OF_ROOT}/libs/openFrameworksCompiled/lib/android) + +set(PRJ_OFX_ANDROID_PATH ${PRJ_ADDONS_PATH}/ofxAndroid) +set(PRJ_OFX_ANDROID_CPP_PATH ${PRJ_OFX_ANDROID_PATH}/src) + +macro(print_all_variables) + message(STATUS "print_all_variables------------------------------------------{") + get_cmake_property(_variableNames VARIABLES) + foreach (_variableName ${_variableNames}) + message(STATUS "${_variableName}=${${_variableName}}") + endforeach() + message(STATUS "print_all_variables------------------------------------------}") +endmacro() + +# Custom function to check if the library is built +function(check_library) + if (NOT TARGET openFrameworksAndroid) + message(STATUS "openFrameworksAndroid Library not found. Building library...") + + # Invoke the build process for the library + execute_process( + COMMAND ${CMAKE_COMMAND} --build ${OF_ANDROID}/ + RESULT_VARIABLE result + ) + if (result) + message(FATAL_ERROR "Failed to build the library.") + endif () + endif () +endfunction() + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS ON) +set(TARGET_ANDROID ON) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c17 -Oz -DNDEBUG -frtti --warn-uninitialized -fno-short-enums -Wextra -fPIE -fPIC -fuse-ld=gold -fexceptions -ffunction-sections -fdata-sections -Wall -Wextra -Wfloat-equal -Wundef -Werror -fverbose-asm -Wint-to-pointer-cast -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wcast-qual -Wmissing-prototypes -Wstrict-overflow=5 -Wwrite-strings -Wconversion --pedantic-errors") +set(CMAKE_CPP_FLAGS "${CMAKE_C_FLAGS} -std=c++17 -Oz -DNDEBUG -stdlib=libc++ --warn-uninitialized -frtti -Wextra -fno-short-enums -fPIE -fPIC -fuse-ld=gold -fexceptions -ffunction-sections -fdata-sections -Wall -Wextra -Wfloat-equal -Wundef -Werror -fverbose-asm -Wint-to-pointer-cast -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wcast-qual -Wmissing-prototypes -Wstrict-overflow=5 -Wwrite-strings -Wconversion --pedantic-errors") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-export-dynamic") + +print_all_variables() + +# Creates the project's shared lib: libnative-lib.so. +# The lib is loaded by this project's Java code in MainActivity.java: +# System.loadLibrary("native-lib"); +# The lib name in both places must match. +add_library( ofapp #name + SHARED # type of library + # src files for project (just c/cpp) + ${CMAKE_SOURCE_DIR}/main.cpp + ${CMAKE_SOURCE_DIR}/ofApp.cpp + ) + + +# Specifies a path to native header files +include_directories( + # openFrameworks headers + ${PRJ_SOURCE_PATH}/3d + ${PRJ_SOURCE_PATH}/app + ${PRJ_SOURCE_PATH}/communication + ${PRJ_SOURCE_PATH}/events + ${PRJ_SOURCE_PATH}/gl + ${PRJ_SOURCE_PATH}/graphics + ${PRJ_SOURCE_PATH}/math + ${PRJ_SOURCE_PATH}/sound + ${PRJ_SOURCE_PATH}/types + ${PRJ_SOURCE_PATH}/utils + ${PRJ_SOURCE_PATH}/video + ${PRJ_SOURCE_PATH} + # openFrameworks addons includes + ${PURE_OF_ROOT}/addons/ofxAndroid/src + ${PURE_OF_ROOT}/addons/ofxAccelerometer/src + ${PURE_OF_ROOT}/addons/ofxXmlSettings/src + ${PURE_OF_ROOT}/addons/ofxXmlSettings/libs + # openFrameworks Libs includes + ${PRJ_LIBS_ROOT}/FreeImage/include + ${PRJ_LIBS_ROOT}/freetype/include + ${PRJ_LIBS_ROOT}/freetype/include/freetype2 + ${PRJ_LIBS_ROOT}/freetype/include/freetype2/freetype/config + ${PRJ_LIBS_ROOT}/freetype/include/freetype2/freetype/internal + ${PRJ_LIBS_ROOT}/freetype/include/freetype2/freetype/internal/services + ${PRJ_LIBS_ROOT}/glm/include + ${PRJ_LIBS_ROOT}/pugixml/include + ${PRJ_LIBS_ROOT}/json/include + ${PRJ_LIBS_ROOT}/tess2/include + ${PRJ_LIBS_ROOT}/utf8/include + ${PRJ_LIBS_ROOT}/uriparser/include + ${CMAKE_SOURCE_DIR}/ + ${CMAKE_SOURCE_DIR}/ + ${OF_ANDROID} +) + +find_library(android-lib android) +find_library(log-lib log) +find_library(GLES2-lib GLESv2) + +#find_library(GLES1-lib GLESv1_CM) +#find_library(GLES3-lib GLESv3) + + +target_link_libraries(ofapp + EGL + GLESv2 + log + c + m + z + dl +# GLESv3 + ) + +target_link_libraries( ofapp + ${android-lib} ) +target_link_libraries( ofapp + ${GLES2-lib} ) +target_link_libraries( ofapp + ${log-lib} ) +#target_link_libraries( ofApp +# ${GLES3-lib} ) +#target_link_libraries( ofApp +# ${GLES1-lib} ) + +# Finally link in openFrameworks Library for each ABI +target_link_libraries( ofapp + ${OF_ANDROID_OUTPUT}/${ANDROID_ABI}/libopenFrameworksAndroid.so) diff --git a/scripts/templates/android2024/ofApp/src/main/cpp/main.cpp b/scripts/templates/android2024/ofApp/src/main/cpp/main.cpp new file mode 100644 index 00000000000..f98043c5a8c --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/cpp/main.cpp @@ -0,0 +1,49 @@ +#include "ofMain.h" +#include "ofApp.h" + +#ifdef TARGET_ANDROID + +#include "ofWindowSettings.h" +#include "ofGLProgrammableRenderer.h" + +shared_ptr *ofapp; +std::shared_ptr baseWindow; + +//-------------------------------------------------------------- +int main(int argc, char **argv) { + baseWindow = std::make_shared(); + ofxAndroidWindowSettings settings; + settings.glesVersion = 2; + settings.setSize(1920, 1080); + settings.windowMode = OF_WINDOW; + settings.preserveContextOnPause = true; + baseWindow = ofCreateWindow(settings); + ofapp = new shared_ptr(new ofApp()); + ofRunApp(baseWindow, *ofapp); + return 0; +} + +void ofAndroidApplicationInit() +{ + //application scope init +} +void ofAndroidActivityInit() +{ + //activity scope init - call main + main(0, nullptr); +} + +// Callbacks from Android Layer +extern "C" JNIEXPORT void JNICALL +Java_cc_openframeworks_OFAndroid_init( JNIEnv* env, jclass clazz) +{ + ofAndroidApplicationInit(); +} + +extern "C" JNIEXPORT void JNICALL +Java_cc_openframeworks_OFAndroid_onCreate( JNIEnv* env, jclass clazz) +{ + ofAndroidActivityInit(); +} + +#endif diff --git a/scripts/templates/android2024/ofApp/src/main/cpp/ofApp.cpp b/scripts/templates/android2024/ofApp/src/main/cpp/ofApp.cpp new file mode 100644 index 00000000000..bf44d44f0a9 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/cpp/ofApp.cpp @@ -0,0 +1,101 @@ +#include "ofApp.h" + +//-------------------------------------------------------------- +void ofApp::setup(){ +} + +//-------------------------------------------------------------- +void ofApp::update(){ +} + +//-------------------------------------------------------------- +void ofApp::draw(){ +} + +//-------------------------------------------------------------- +void ofApp::keyPressed(int key){ + +} + +//-------------------------------------------------------------- +void ofApp::keyReleased(int key){ +} + +//-------------------------------------------------------------- +void ofApp::windowResized(int w, int h){ +} + +//-------------------------------------------------------------- +void ofApp::touchDown(int x, int y, int id){ +} + +//-------------------------------------------------------------- +void ofApp::touchMoved(int x, int y, int id){ +} + +//-------------------------------------------------------------- +void ofApp::touchUp(int x, int y, int id){ +} + +//-------------------------------------------------------------- +void ofApp::touchDoubleTap(int x, int y, int id){ +} + +//-------------------------------------------------------------- +void ofApp::touchCancelled(int x, int y, int id){ +} + +//-------------------------------------------------------------- +void ofApp::swipe(ofxAndroidSwipeDir swipeDir, int id){ +} + +//-------------------------------------------------------------- +void ofApp::pause(){ +} + +//-------------------------------------------------------------- +void ofApp::stop(){ +} + +//-------------------------------------------------------------- +void ofApp::resume(){ +} + +//-------------------------------------------------------------- +void ofApp::reloadTextures(){ +} + +//-------------------------------------------------------------- +bool ofApp::backPressed(){ + return false; +} + +//-------------------------------------------------------------- +void ofApp::okPressed(){ +} + +//-------------------------------------------------------------- +void ofApp::cancelPressed(){ +} + +//-------------------------------------------------------------- +void ofApp::deviceRefreshRateChanged(int refreshRate) { +} + +//-------------------------------------------------------------- +void ofApp::deviceHighestRefreshRateChanged(int refreshRate) { +} + +//-------------------------------------------------------------- +void ofApp::deviceRefreshRateChangedEvent(int &refreshRate) { +} + +//-------------------------------------------------------------- +void ofApp::deviceHighestRefreshRateChangedEvent(int &refreshRate) { +} + +//-------------------------------------------------------------- +void ofApp::exit(){ + +} + diff --git a/scripts/templates/android2024/ofApp/src/main/cpp/ofApp.h b/scripts/templates/android2024/ofApp/src/main/cpp/ofApp.h new file mode 100644 index 00000000000..fab21d73585 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/cpp/ofApp.h @@ -0,0 +1,39 @@ +#pragma once + +#include "ofMain.h" +#include "ofxAndroid.h" + +class ofApp : public ofxAndroidApp{ + + public: + + void setup(); + void exit(); + void update(); + void draw(); + + void keyPressed(int key); + void keyReleased(int key); + void windowResized(int w, int h); + + void touchDown(int x, int y, int id); + void touchMoved(int x, int y, int id); + void touchUp(int x, int y, int id); + void touchDoubleTap(int x, int y, int id); + void touchCancelled(int x, int y, int id); + void swipe(ofxAndroidSwipeDir swipeDir, int id); + + void pause(); + void stop(); + void resume(); + void reloadTextures(); + + bool backPressed(); + void okPressed(); + void cancelPressed(); + + void deviceRefreshRateChanged(int refreshRate); + void deviceHighestRefreshRateChanged(int refreshRate); + void deviceRefreshRateChangedEvent(int &refreshRate); + void deviceHighestRefreshRateChangedEvent(int & refreshRate); +}; diff --git a/scripts/templates/android2024/ofApp/src/main/ic_launcher-playstore.png b/scripts/templates/android2024/ofApp/src/main/ic_launcher-playstore.png new file mode 100644 index 00000000000..2a0df19f5e0 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/ic_launcher-playstore.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/java/cc/openframeworks/android/OFActivity.java b/scripts/templates/android2024/ofApp/src/main/java/cc/openframeworks/android/OFActivity.java new file mode 100644 index 00000000000..598ee50bbf1 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/java/cc/openframeworks/android/OFActivity.java @@ -0,0 +1,201 @@ +package cc.openframeworks.android; + +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.view.WindowManager; + +import androidx.core.view.ViewCompat; +import androidx.core.view.WindowCompat; +import androidx.core.view.WindowInsetsCompat; +import androidx.core.view.WindowInsetsControllerCompat; + +import cc.openframeworks.OFAndroid; +import cc.openframeworks.OFAndroidLifeCycle; + +import com.getkeepsafe.relinker.ReLinker; + + + +public class OFActivity extends cc.openframeworks.OFActivity { + + private static final String appName = "ofapp"; // modify this to target appName (ofApp etc) + private static final String LOG_TAG = appName + "::OFActivity"; + + private ReLinker.Logger logcatLogger = new ReLinker.Logger() { + @Override + public void log(String message) { + Log.d("ReLinker", message); + } + }; + private OFActivity thisActivity; + + + // Extremely important + public OFActivity() { + OFAndroidLifeCycle.coreLibraryLoaded = true; + + OFAndroid.maxSamples = 4; + OFAndroid.maximumFrameRate = 144; + + thisActivity = this; + ReLinker.log(logcatLogger) + .force() + .recursively() + .loadLibrary(this, appName, new ReLinker.LoadListener() { + @Override + public void success() { + Log.i(LOG_TAG, "loadLibrary success"); + OFAndroidLifeCycle.appLibraryLoaded = true; + Setup(); // very important - this will in turn call main + } + + @Override + public void failure(Throwable t) { + /* Boo */ + Log.i(LOG_TAG, "loadLibrary failure" + t.getMessage()); + } + }); + } + + @Override + public void onCreate(Bundle savedInstanceState) + { + Log.i(LOG_TAG, "onCreate"); + super.onCreate(savedInstanceState); + + setFullscreen(); + hideSystemBars(); + } + + @Override + public void onStart() { + super.onStart(); + + } + + @Override + public void onDetachedFromWindow() { + + } + + // Menus + // http://developer.android.com/guide/topics/ui/menus.html + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Create settings menu options from here, one by one or infalting an xml + return super.onCreateOptionsMenu(menu); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // This passes the menu option string to OF + // you can add additional behavior from java modifying this method + // but keep the call to OFAndroid so OF is notified of menu events + if(OFAndroid.menuItemSelected(item.getItemId())){ + + return true; + } + return super.onOptionsItemSelected(item); + } + + + @Override + public boolean onPrepareOptionsMenu (Menu menu){ + // This method is called every time the menu is opened + // you can add or remove menu options from here + return super.onPrepareOptionsMenu(menu); + } + + public void onRestore() { + + if (!OFAndroidLifeCycle.appLibraryLoaded) return; + } + + private void hideSystemBars() { + WindowInsetsControllerCompat windowInsetsController = + ViewCompat.getWindowInsetsController(getWindow().getDecorView()); + if (windowInsetsController == null) { + return; + } + // Configure the behavior of the hidden system bars + windowInsetsController.setSystemBarsBehavior( + WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE + ); + // Hide both the status bar and the navigation bar + windowInsetsController.hide(WindowInsetsCompat.Type.systemBars()); + } + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + + if (hasFocus) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + + setFullscreen(); + } else { + setFullscreen(); + } + } else { + + } + } + + private void handleException(Exception e, String details) { + Log.e(LOG_TAG, "Exception:", e); + + } + + public void setFullscreen() { + try { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { + // No sticky immersive mode for devices pre-kitkat + getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, + WindowManager.LayoutParams.FLAG_FULLSCREEN); + } else { + View decorView = getWindow().getDecorView(); +// int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN; + int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; + decorView.setSystemUiVisibility(uiOptions); + } + + WindowCompat.setDecorFitsSystemWindows(getWindow(), false); + + } catch (Exception ex) { + handleException(ex, "setFullscreen exception"); + } + + try { + View decorView = getWindow().getDecorView(); + int[] locations = new int[2]; + decorView.getLocationInWindow(locations); + int[] locations2 = new int[2]; + decorView.getLocationOnScreen(locations2); + + } catch (Exception ex) { + handleException(ex, "setFullscreen exception"); + } + + WindowInsetsControllerCompat windowInsetsController = + ViewCompat.getWindowInsetsController(getWindow().getDecorView()); + if (windowInsetsController == null) { + return; + } + // Hide both the status bar and the navigation bar + windowInsetsController.hide(WindowInsetsCompat.Type.systemBars()); + windowInsetsController.hide(WindowInsetsCompat.Type.navigationBars()); + windowInsetsController.hide(WindowInsetsCompat.Type.statusBars()); + } + + +} + diff --git a/scripts/templates/android2024/ofApp/src/main/res/drawable-hdpi/icon.png b/scripts/templates/android2024/ofApp/src/main/res/drawable-hdpi/icon.png new file mode 100644 index 00000000000..70b562fba01 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/drawable-hdpi/icon.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/drawable-mdpi/icon.png b/scripts/templates/android2024/ofApp/src/main/res/drawable-mdpi/icon.png new file mode 100644 index 00000000000..70b562fba01 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/drawable-mdpi/icon.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/drawable-xhdpi/icon.png b/scripts/templates/android2024/ofApp/src/main/res/drawable-xhdpi/icon.png new file mode 100644 index 00000000000..70b562fba01 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/drawable-xhdpi/icon.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/drawable/icon.png b/scripts/templates/android2024/ofApp/src/main/res/drawable/icon.png new file mode 100644 index 00000000000..70b562fba01 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/drawable/icon.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/layout/main_layout.xml b/scripts/templates/android2024/ofApp/src/main/res/layout/main_layout.xml new file mode 100644 index 00000000000..d1da461f079 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/layout/main_layout.xml @@ -0,0 +1,24 @@ + + + + + + diff --git a/scripts/templates/android2024/ofApp/src/main/res/menu/main_layout.xml b/scripts/templates/android2024/ofApp/src/main/res/menu/main_layout.xml new file mode 100644 index 00000000000..7ddcfbee35e --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/menu/main_layout.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/scripts/templates/android2024/ofApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000000..036d09bc5fd --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/scripts/templates/android2024/ofApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000000..036d09bc5fd --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000000..42b40d2fbec Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000000..648779fe415 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher_round.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000000..a39d8826804 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000000..13e6dfef882 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000000..67b93c29890 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher_round.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000000..93401eaf855 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000000..018f9b90738 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000000..fc64ec1c838 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000000..486c62f1f2a Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000000..cf6c612f8b1 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000000..07b98443e1b Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000000..b4024c5aa00 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000000..60b1a9e8332 Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000000..45bd0178fee Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000000..1b64c2ce02d Binary files /dev/null and b/scripts/templates/android2024/ofApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/scripts/templates/android2024/ofApp/src/main/res/values-v11/strings.xml b/scripts/templates/android2024/ofApp/src/main/res/values-v11/strings.xml new file mode 100644 index 00000000000..5822f1306d1 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values-v11/strings.xml @@ -0,0 +1,5 @@ + + + ofEmptyEx + Menu + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/values-v11/styles.xml b/scripts/templates/android2024/ofApp/src/main/res/values-v11/styles.xml new file mode 100644 index 00000000000..febc4d0286b --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values-v11/styles.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/scripts/templates/android2024/ofApp/src/main/res/values-v14/strings.xml b/scripts/templates/android2024/ofApp/src/main/res/values-v14/strings.xml new file mode 100644 index 00000000000..5822f1306d1 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values-v14/strings.xml @@ -0,0 +1,5 @@ + + + ofEmptyEx + Menu + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/values-v14/styles.xml b/scripts/templates/android2024/ofApp/src/main/res/values-v14/styles.xml new file mode 100644 index 00000000000..928e0fd3d72 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values-v14/styles.xml @@ -0,0 +1,12 @@ + + + + + + diff --git a/scripts/templates/android2024/ofApp/src/main/res/values/ic_launcher_background.xml b/scripts/templates/android2024/ofApp/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000000..c5d5899fdf0 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/values/strings.xml b/scripts/templates/android2024/ofApp/src/main/res/values/strings.xml new file mode 100644 index 00000000000..5822f1306d1 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values/strings.xml @@ -0,0 +1,5 @@ + + + ofEmptyEx + Menu + \ No newline at end of file diff --git a/scripts/templates/android2024/ofApp/src/main/res/values/styles.xml b/scripts/templates/android2024/ofApp/src/main/res/values/styles.xml new file mode 100644 index 00000000000..766a2c3f143 --- /dev/null +++ b/scripts/templates/android2024/ofApp/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/scripts/templates/android2024/proguard.cfg b/scripts/templates/android2024/proguard.cfg new file mode 100644 index 00000000000..faee26e7f2b --- /dev/null +++ b/scripts/templates/android2024/proguard.cfg @@ -0,0 +1,59 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keep class com.google.android.gms.games.leaderboard.** { *; } +-keep class com.google.android.gms.games.snapshot.** { *; } +-keep class com.google.android.gms.games.achievement.** { *; } +-keep class com.google.android.gms.games.event.** { *; } +-keep class com.google.android.gms.games.stats.** { *; } +-keep class com.google.android.gms.games.video.** { *; } +-keep class com.google.android.gms.games.* { *; } + +-keep class com.google.android.gms.signin.** { *; } +-keep class com.google.android.gms.dynamic.** { *; } +-keep class com.google.android.gms.dynamite.** { *; } +-keep class com.google.android.gms.tasks.** { *; } +-keep class com.google.android.gms.security.** { *; } +-keep class com.google.android.gms.base.** { *; } +-keep class com.google.android.gms.actions.** { *; } +-keep class com.google.games.bridge.** { *; } +-keep class com.google.android.gms.common.api.** { *; } +-keep class com.google.android.gms.games.quest.** { *; } +-keep class com.google.android.gms.nearby.** { *; } +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/scripts/templates/android2024/settings.gradle b/scripts/templates/android2024/settings.gradle new file mode 100644 index 00000000000..cb352f426c0 --- /dev/null +++ b/scripts/templates/android2024/settings.gradle @@ -0,0 +1,11 @@ +include ':ofApp' + +// Define the relative path to the openFrameworks project +def openFrameworksProjectPath = '../../../libs/openFrameworksCompiled/project' + +// Convert the relative path to an absolute path +def openFrameworksProjectAbsolutePath = new File(rootDir, openFrameworksProjectPath).absolutePath + +// Include the openFrameworks project +include ':openFrameworksProject' +project(':openFrameworksProject').projectDir = new File(openFrameworksProjectAbsolutePath)