diff --git a/.gitignore b/.gitignore index 0dae35b4d..073f9ee0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,5 @@ -mode/processing-core.zip -mode/mode/AndroidMode.jar -mode/mode/gradle-tooling-api* -mode/mode/slf4j* - -mode/mode/percent.jar -mode/mode/recyclerview-v7.jar -mode/mode/support-* -mode/mode/wearable.jar - -mode/libraries/vr/library -mode/libraries/ar/library -mode/tools/SDKUpdater/tool -mode/tools/SDKUpdater/lib - -debug/.gradle -debug/.idea +.gradle +.idea **/examples/**/AndroidManifest.xml diff --git a/apps/armarkers/build.gradle b/apps/armarkers/build.gradle new file mode 100644 index 000000000..bd89203e2 --- /dev/null +++ b/apps/armarkers/build.gradle @@ -0,0 +1,36 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 33 + defaultConfig { + applicationId "processing.tests.armarkers" + minSdkVersion 23 + targetSdkVersion 33 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + productFlavors { + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + namespace 'armarkers' +} + +dependencies { + implementation fileTree(include: ['*.jar'], dir: 'libs') + testImplementation 'junit:junit:4.13.2' + implementation project(':libs:processing-core') + implementation project(':libs:processing-ar') + implementation 'androidx.appcompat:appcompat:1.6.0' + implementation 'com.google.ar:core:1.35.0' +} \ No newline at end of file diff --git a/debug/apps/arscene/gradle.properties b/apps/armarkers/gradle.properties similarity index 100% rename from debug/apps/arscene/gradle.properties rename to apps/armarkers/gradle.properties diff --git a/debug/apps/arscene/src/main/AndroidManifest.xml b/apps/armarkers/src/main/AndroidManifest.xml similarity index 94% rename from debug/apps/arscene/src/main/AndroidManifest.xml rename to apps/armarkers/src/main/AndroidManifest.xml index a4adeca84..fcf1ffe6b 100644 --- a/debug/apps/arscene/src/main/AndroidManifest.xml +++ b/apps/armarkers/src/main/AndroidManifest.xml @@ -4,6 +4,7 @@ android:versionCode="1" android:versionName="1.0"> + + + + + + + + + + + + + + + + diff --git a/debug/apps/arscene/src/main/java/arscene/MainActivity.java b/apps/arscene/src/main/java/arscene/MainActivity.java similarity index 91% rename from debug/apps/arscene/src/main/java/arscene/MainActivity.java rename to apps/arscene/src/main/java/arscene/MainActivity.java index 3ad989d87..8e1837290 100644 --- a/debug/apps/arscene/src/main/java/arscene/MainActivity.java +++ b/apps/arscene/src/main/java/arscene/MainActivity.java @@ -20,6 +20,7 @@ public class MainActivity extends AppCompatActivity { private static final int CAMERA_PERMISSION_CODE = 0; + private static boolean CAMERA_PERMISSION_REQUESTED = false; private static final String CAMERA_PERMISSION = Manifest.permission.CAMERA; private static final String CAMERA_PERMISSION_MESSAGE = "Camera permission is needed to use AR"; @@ -58,6 +59,8 @@ public void onRequestPermissionsResult(int requestCode, String permissions[], in if (sketch != null) { sketch.onRequestPermissionsResult(requestCode, permissions, grantResults); } + + CAMERA_PERMISSION_REQUESTED = false; } @Override @@ -89,7 +92,10 @@ private boolean hasCameraPermission() { } private void requestCameraPermission() { - ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_CODE); + if (!CAMERA_PERMISSION_REQUESTED) { + CAMERA_PERMISSION_REQUESTED = true; + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_CODE); + } } private boolean shouldShowRequestPermissionRationale() { diff --git a/debug/apps/arscene/src/main/java/arscene/Sketch.java b/apps/arscene/src/main/java/arscene/Sketch.java similarity index 100% rename from debug/apps/arscene/src/main/java/arscene/Sketch.java rename to apps/arscene/src/main/java/arscene/Sketch.java diff --git a/debug/apps/vrcube/src/main/res/layout/main.xml b/apps/arscene/src/main/res/layout/main.xml similarity index 100% rename from debug/apps/vrcube/src/main/res/layout/main.xml rename to apps/arscene/src/main/res/layout/main.xml diff --git a/debug/apps/fast2d/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/arscene/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from debug/apps/fast2d/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/arscene/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/debug/apps/fast2d/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/arscene/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from debug/apps/fast2d/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/arscene/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/debug/apps/fast2d/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/arscene/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from debug/apps/fast2d/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/arscene/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/debug/apps/fast2d/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/arscene/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/fast2d/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/arscene/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/debug/apps/fast2d/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/arscene/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/fast2d/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to apps/arscene/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/apps/arscene/src/main/res/values/strings.xml b/apps/arscene/src/main/res/values/strings.xml new file mode 100644 index 000000000..f57f444bd --- /dev/null +++ b/apps/arscene/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + AR Test + diff --git a/apps/arscene/src/main/res/values/styles.xml b/apps/arscene/src/main/res/values/styles.xml new file mode 100644 index 000000000..375954d4a --- /dev/null +++ b/apps/arscene/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ + + + diff --git a/debug/apps/fast2d/build.gradle b/apps/fast2d/build.gradle similarity index 92% rename from debug/apps/fast2d/build.gradle rename to apps/fast2d/build.gradle index e9a8b3cde..9a69129be 100644 --- a/debug/apps/fast2d/build.gradle +++ b/apps/fast2d/build.gradle @@ -1,7 +1,8 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} android { - compileSdkVersion 33 defaultConfig { applicationId "processing.tests.fast2d" minSdkVersion 17 diff --git a/debug/apps/simple/gradle.properties b/apps/fast2d/gradle.properties similarity index 100% rename from debug/apps/simple/gradle.properties rename to apps/fast2d/gradle.properties diff --git a/debug/apps/fast2d/src/main/AndroidManifest.xml b/apps/fast2d/src/main/AndroidManifest.xml similarity index 100% rename from debug/apps/fast2d/src/main/AndroidManifest.xml rename to apps/fast2d/src/main/AndroidManifest.xml diff --git a/debug/apps/fast2d/src/main/assets/blur.glsl b/apps/fast2d/src/main/assets/blur.glsl similarity index 100% rename from debug/apps/fast2d/src/main/assets/blur.glsl rename to apps/fast2d/src/main/assets/blur.glsl diff --git a/debug/apps/fast2d/src/main/assets/bot1.svg b/apps/fast2d/src/main/assets/bot1.svg similarity index 100% rename from debug/apps/fast2d/src/main/assets/bot1.svg rename to apps/fast2d/src/main/assets/bot1.svg diff --git a/debug/apps/fast2d/src/main/assets/edges.glsl b/apps/fast2d/src/main/assets/edges.glsl similarity index 100% rename from debug/apps/fast2d/src/main/assets/edges.glsl rename to apps/fast2d/src/main/assets/edges.glsl diff --git a/debug/apps/fast2d/src/main/assets/frag.glsl b/apps/fast2d/src/main/assets/frag.glsl similarity index 100% rename from debug/apps/fast2d/src/main/assets/frag.glsl rename to apps/fast2d/src/main/assets/frag.glsl diff --git a/debug/apps/fast2d/src/main/assets/img.png b/apps/fast2d/src/main/assets/img.png similarity index 100% rename from debug/apps/fast2d/src/main/assets/img.png rename to apps/fast2d/src/main/assets/img.png diff --git a/debug/apps/fast2d/src/main/assets/leaves.jpg b/apps/fast2d/src/main/assets/leaves.jpg similarity index 100% rename from debug/apps/fast2d/src/main/assets/leaves.jpg rename to apps/fast2d/src/main/assets/leaves.jpg diff --git a/debug/apps/fast2d/src/main/assets/vert.glsl b/apps/fast2d/src/main/assets/vert.glsl similarity index 100% rename from debug/apps/fast2d/src/main/assets/vert.glsl rename to apps/fast2d/src/main/assets/vert.glsl diff --git a/debug/apps/fast2d/src/main/java/fast2d/MainActivity.java b/apps/fast2d/src/main/java/fast2d/MainActivity.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/MainActivity.java rename to apps/fast2d/src/main/java/fast2d/MainActivity.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/Sketch.java b/apps/fast2d/src/main/java/fast2d/Sketch.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/Sketch.java rename to apps/fast2d/src/main/java/fast2d/Sketch.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchArcTest.java b/apps/fast2d/src/main/java/fast2d/SketchArcTest.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchArcTest.java rename to apps/fast2d/src/main/java/fast2d/SketchArcTest.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchBasicPoly.java b/apps/fast2d/src/main/java/fast2d/SketchBasicPoly.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchBasicPoly.java rename to apps/fast2d/src/main/java/fast2d/SketchBasicPoly.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchCurveTest.java b/apps/fast2d/src/main/java/fast2d/SketchCurveTest.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchCurveTest.java rename to apps/fast2d/src/main/java/fast2d/SketchCurveTest.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchCustomShader.java b/apps/fast2d/src/main/java/fast2d/SketchCustomShader.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchCustomShader.java rename to apps/fast2d/src/main/java/fast2d/SketchCustomShader.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchDisplayText.java b/apps/fast2d/src/main/java/fast2d/SketchDisplayText.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchDisplayText.java rename to apps/fast2d/src/main/java/fast2d/SketchDisplayText.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchDuplicatedVert.java b/apps/fast2d/src/main/java/fast2d/SketchDuplicatedVert.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchDuplicatedVert.java rename to apps/fast2d/src/main/java/fast2d/SketchDuplicatedVert.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchFilterTest.java b/apps/fast2d/src/main/java/fast2d/SketchFilterTest.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchFilterTest.java rename to apps/fast2d/src/main/java/fast2d/SketchFilterTest.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchLoadDisplaySVG.java b/apps/fast2d/src/main/java/fast2d/SketchLoadDisplaySVG.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchLoadDisplaySVG.java rename to apps/fast2d/src/main/java/fast2d/SketchLoadDisplaySVG.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchMousePoly.java b/apps/fast2d/src/main/java/fast2d/SketchMousePoly.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchMousePoly.java rename to apps/fast2d/src/main/java/fast2d/SketchMousePoly.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchPrimitiveTypes.java b/apps/fast2d/src/main/java/fast2d/SketchPrimitiveTypes.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchPrimitiveTypes.java rename to apps/fast2d/src/main/java/fast2d/SketchPrimitiveTypes.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchShaderNoTex.java b/apps/fast2d/src/main/java/fast2d/SketchShaderNoTex.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchShaderNoTex.java rename to apps/fast2d/src/main/java/fast2d/SketchShaderNoTex.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchShapeBenchmark.java b/apps/fast2d/src/main/java/fast2d/SketchShapeBenchmark.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchShapeBenchmark.java rename to apps/fast2d/src/main/java/fast2d/SketchShapeBenchmark.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchTexturedPoly.java b/apps/fast2d/src/main/java/fast2d/SketchTexturedPoly.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchTexturedPoly.java rename to apps/fast2d/src/main/java/fast2d/SketchTexturedPoly.java diff --git a/debug/apps/fast2d/src/main/java/fast2d/SketchUserDefinedContours.java b/apps/fast2d/src/main/java/fast2d/SketchUserDefinedContours.java similarity index 100% rename from debug/apps/fast2d/src/main/java/fast2d/SketchUserDefinedContours.java rename to apps/fast2d/src/main/java/fast2d/SketchUserDefinedContours.java diff --git a/debug/apps/fast2d/src/main/res/layout/activity_main.xml b/apps/fast2d/src/main/res/layout/activity_main.xml similarity index 100% rename from debug/apps/fast2d/src/main/res/layout/activity_main.xml rename to apps/fast2d/src/main/res/layout/activity_main.xml diff --git a/debug/apps/simple/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/fast2d/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from debug/apps/simple/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/fast2d/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/debug/apps/simple/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/fast2d/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from debug/apps/simple/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/fast2d/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/debug/apps/simple/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/fast2d/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from debug/apps/simple/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/fast2d/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/debug/apps/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/fast2d/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/fast2d/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/debug/apps/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/fast2d/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to apps/fast2d/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/debug/apps/fast2d/src/main/res/values-w820dp/dimens.xml b/apps/fast2d/src/main/res/values-w820dp/dimens.xml similarity index 100% rename from debug/apps/fast2d/src/main/res/values-w820dp/dimens.xml rename to apps/fast2d/src/main/res/values-w820dp/dimens.xml diff --git a/debug/apps/fast2d/src/main/res/values/colors.xml b/apps/fast2d/src/main/res/values/colors.xml similarity index 100% rename from debug/apps/fast2d/src/main/res/values/colors.xml rename to apps/fast2d/src/main/res/values/colors.xml diff --git a/debug/apps/fast2d/src/main/res/values/dimens.xml b/apps/fast2d/src/main/res/values/dimens.xml similarity index 100% rename from debug/apps/fast2d/src/main/res/values/dimens.xml rename to apps/fast2d/src/main/res/values/dimens.xml diff --git a/debug/apps/fast2d/src/main/res/values/strings.xml b/apps/fast2d/src/main/res/values/strings.xml similarity index 100% rename from debug/apps/fast2d/src/main/res/values/strings.xml rename to apps/fast2d/src/main/res/values/strings.xml diff --git a/debug/apps/fast2d/src/main/res/values/styles.xml b/apps/fast2d/src/main/res/values/styles.xml similarity index 100% rename from debug/apps/fast2d/src/main/res/values/styles.xml rename to apps/fast2d/src/main/res/values/styles.xml diff --git a/debug/apps/simple/build.gradle b/apps/simple/build.gradle similarity index 71% rename from debug/apps/simple/build.gradle rename to apps/simple/build.gradle index 749a0801b..6310d85d3 100644 --- a/debug/apps/simple/build.gradle +++ b/apps/simple/build.gradle @@ -1,7 +1,11 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} android { + namespace 'processing.tests.simple' compileSdkVersion 33 + defaultConfig { applicationId "processing.tests.simple" minSdkVersion 17 @@ -9,24 +13,23 @@ android { versionCode 1 versionName "1.0" } + buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - productFlavors { - } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - namespace 'simple' } dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') testImplementation 'junit:junit:4.13.2' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation project(':libs:processing-core') - implementation 'androidx.appcompat:appcompat:1.6.0' } diff --git a/apps/simple/proguard-rules.pro b/apps/simple/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/apps/simple/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 + +# 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 diff --git a/debug/apps/simple/src/main/AndroidManifest.xml b/apps/simple/src/main/AndroidManifest.xml similarity index 93% rename from debug/apps/simple/src/main/AndroidManifest.xml rename to apps/simple/src/main/AndroidManifest.xml index 5204a615a..f4ca7c1cd 100644 --- a/debug/apps/simple/src/main/AndroidManifest.xml +++ b/apps/simple/src/main/AndroidManifest.xml @@ -8,7 +8,7 @@ android:theme="@style/AppTheme" android:hardwareAccelerated="true" android:largeHeap="true"> - diff --git a/debug/apps/simple/src/main/assets/leaf.png b/apps/simple/src/main/assets/leaf.png similarity index 100% rename from debug/apps/simple/src/main/assets/leaf.png rename to apps/simple/src/main/assets/leaf.png diff --git a/debug/apps/simple/src/main/java/simple/MainActivity.java b/apps/simple/src/main/java/simple/MainActivity.java similarity index 100% rename from debug/apps/simple/src/main/java/simple/MainActivity.java rename to apps/simple/src/main/java/simple/MainActivity.java diff --git a/debug/apps/simple/src/main/java/simple/Sketch.java b/apps/simple/src/main/java/simple/Sketch.java similarity index 100% rename from debug/apps/simple/src/main/java/simple/Sketch.java rename to apps/simple/src/main/java/simple/Sketch.java diff --git a/debug/apps/simple/src/main/res/layout/activity_main.xml b/apps/simple/src/main/res/layout/activity_main.xml similarity index 100% rename from debug/apps/simple/src/main/res/layout/activity_main.xml rename to apps/simple/src/main/res/layout/activity_main.xml diff --git a/debug/apps/vrcube/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/simple/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from debug/apps/vrcube/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/simple/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/debug/apps/vrcube/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/simple/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from debug/apps/vrcube/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/simple/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/debug/apps/vrcube/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/simple/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from debug/apps/vrcube/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/simple/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/debug/apps/vrcube/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/vrcube/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/simple/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/debug/apps/vrcube/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/vrcube/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to apps/simple/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/debug/apps/simple/src/main/res/values-w820dp/dimens.xml b/apps/simple/src/main/res/values-w820dp/dimens.xml similarity index 100% rename from debug/apps/simple/src/main/res/values-w820dp/dimens.xml rename to apps/simple/src/main/res/values-w820dp/dimens.xml diff --git a/debug/apps/simple/src/main/res/values/colors.xml b/apps/simple/src/main/res/values/colors.xml similarity index 100% rename from debug/apps/simple/src/main/res/values/colors.xml rename to apps/simple/src/main/res/values/colors.xml diff --git a/debug/apps/simple/src/main/res/values/dimens.xml b/apps/simple/src/main/res/values/dimens.xml similarity index 100% rename from debug/apps/simple/src/main/res/values/dimens.xml rename to apps/simple/src/main/res/values/dimens.xml diff --git a/debug/apps/simple/src/main/res/values/strings.xml b/apps/simple/src/main/res/values/strings.xml similarity index 100% rename from debug/apps/simple/src/main/res/values/strings.xml rename to apps/simple/src/main/res/values/strings.xml diff --git a/debug/apps/simple/src/main/res/values/styles.xml b/apps/simple/src/main/res/values/styles.xml similarity index 100% rename from debug/apps/simple/src/main/res/values/styles.xml rename to apps/simple/src/main/res/values/styles.xml diff --git a/debug/apps/vrcube/build.gradle b/apps/vrcube/build.gradle similarity index 88% rename from debug/apps/vrcube/build.gradle rename to apps/vrcube/build.gradle index 3c02e6788..b062a918f 100644 --- a/debug/apps/vrcube/build.gradle +++ b/apps/vrcube/build.gradle @@ -1,7 +1,8 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} android { - compileSdkVersion 33 defaultConfig { applicationId "processing.tests.vrcube" minSdkVersion 19 @@ -30,5 +31,6 @@ dependencies { implementation project(':libs:processing-core') implementation project(':libs:google-vr') implementation project(':libs:processing-vr') + implementation 'com.google.protobuf.nano:protobuf-javanano:3.1.0' implementation 'androidx.appcompat:appcompat:1.6.0' } diff --git a/debug/apps/vrcube/gradle.properties b/apps/vrcube/gradle.properties similarity index 100% rename from debug/apps/vrcube/gradle.properties rename to apps/vrcube/gradle.properties diff --git a/debug/apps/vrcube/src/main/AndroidManifest.xml b/apps/vrcube/src/main/AndroidManifest.xml similarity index 96% rename from debug/apps/vrcube/src/main/AndroidManifest.xml rename to apps/vrcube/src/main/AndroidManifest.xml index 152a3c5cc..03513aece 100644 --- a/debug/apps/vrcube/src/main/AndroidManifest.xml +++ b/apps/vrcube/src/main/AndroidManifest.xml @@ -12,7 +12,7 @@ android:label="@string/app_name" android:theme="@style/VrActivityTheme"> diff --git a/apps/vrcube/src/main/java/vrcube/MainActivity.java b/apps/vrcube/src/main/java/vrcube/MainActivity.java new file mode 100644 index 000000000..22ef6a835 --- /dev/null +++ b/apps/vrcube/src/main/java/vrcube/MainActivity.java @@ -0,0 +1,23 @@ +package vrcube; + +import android.os.Build; +import android.os.Bundle; +import android.view.WindowManager; + +import processing.vr.VRActivity; +import processing.core.PApplet; + +public class MainActivity extends VRActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + } + + PApplet sketch = new Sketch(); + setSketch(sketch); + } +} \ No newline at end of file diff --git a/debug/apps/vrcube/src/main/java/vrcube/Sketch.java b/apps/vrcube/src/main/java/vrcube/Sketch.java similarity index 100% rename from debug/apps/vrcube/src/main/java/vrcube/Sketch.java rename to apps/vrcube/src/main/java/vrcube/Sketch.java diff --git a/apps/vrcube/src/main/res/layout/main.xml b/apps/vrcube/src/main/res/layout/main.xml new file mode 100644 index 000000000..4b602d5f6 --- /dev/null +++ b/apps/vrcube/src/main/res/layout/main.xml @@ -0,0 +1,7 @@ + diff --git a/debug/apps/wallpaper/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/vrcube/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from debug/apps/wallpaper/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/vrcube/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/debug/apps/wallpaper/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/vrcube/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from debug/apps/wallpaper/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/vrcube/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/debug/apps/wallpaper/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/vrcube/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from debug/apps/wallpaper/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/vrcube/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/debug/apps/wallpaper/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/vrcube/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/wallpaper/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/vrcube/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/debug/apps/wallpaper/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/vrcube/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/wallpaper/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to apps/vrcube/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/debug/apps/vrcube/src/main/res/values/strings.xml b/apps/vrcube/src/main/res/values/strings.xml similarity index 100% rename from debug/apps/vrcube/src/main/res/values/strings.xml rename to apps/vrcube/src/main/res/values/strings.xml diff --git a/debug/apps/vrcube/src/main/res/values/styles.xml b/apps/vrcube/src/main/res/values/styles.xml similarity index 100% rename from debug/apps/vrcube/src/main/res/values/styles.xml rename to apps/vrcube/src/main/res/values/styles.xml diff --git a/debug/apps/wallpaper/build.gradle b/apps/wallpaper/build.gradle similarity index 92% rename from debug/apps/wallpaper/build.gradle rename to apps/wallpaper/build.gradle index 7870d99b1..aec131e52 100644 --- a/debug/apps/wallpaper/build.gradle +++ b/apps/wallpaper/build.gradle @@ -1,7 +1,8 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} android { - compileSdkVersion 33 defaultConfig { applicationId "processing.tests.wallpaper" minSdkVersion 17 diff --git a/debug/apps/wallpaper/gradle.properties b/apps/wallpaper/gradle.properties similarity index 100% rename from debug/apps/wallpaper/gradle.properties rename to apps/wallpaper/gradle.properties diff --git a/debug/apps/wallpaper/src/main/AndroidManifest.xml b/apps/wallpaper/src/main/AndroidManifest.xml similarity index 100% rename from debug/apps/wallpaper/src/main/AndroidManifest.xml rename to apps/wallpaper/src/main/AndroidManifest.xml diff --git a/debug/apps/wallpaper/src/main/java/wallpaper/DebuggerEntryPointActivity.java b/apps/wallpaper/src/main/java/wallpaper/DebuggerEntryPointActivity.java similarity index 100% rename from debug/apps/wallpaper/src/main/java/wallpaper/DebuggerEntryPointActivity.java rename to apps/wallpaper/src/main/java/wallpaper/DebuggerEntryPointActivity.java diff --git a/debug/apps/wallpaper/src/main/java/wallpaper/MainService.java b/apps/wallpaper/src/main/java/wallpaper/MainService.java similarity index 100% rename from debug/apps/wallpaper/src/main/java/wallpaper/MainService.java rename to apps/wallpaper/src/main/java/wallpaper/MainService.java diff --git a/debug/apps/wallpaper/src/main/java/wallpaper/Sketch.java b/apps/wallpaper/src/main/java/wallpaper/Sketch.java similarity index 100% rename from debug/apps/wallpaper/src/main/java/wallpaper/Sketch.java rename to apps/wallpaper/src/main/java/wallpaper/Sketch.java diff --git a/debug/apps/wallpaper/src/main/res/layout/main.xml b/apps/wallpaper/src/main/res/layout/main.xml similarity index 100% rename from debug/apps/wallpaper/src/main/res/layout/main.xml rename to apps/wallpaper/src/main/res/layout/main.xml diff --git a/debug/apps/watchface/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/wallpaper/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from debug/apps/watchface/src/main/res/mipmap-hdpi/ic_launcher.png rename to apps/wallpaper/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/debug/apps/watchface/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/wallpaper/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from debug/apps/watchface/src/main/res/mipmap-mdpi/ic_launcher.png rename to apps/wallpaper/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/debug/apps/watchface/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/wallpaper/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from debug/apps/watchface/src/main/res/mipmap-xhdpi/ic_launcher.png rename to apps/wallpaper/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/debug/apps/watchface/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/wallpaper/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from debug/apps/watchface/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to apps/wallpaper/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/apps/wallpaper/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/wallpaper/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..aee44e138 Binary files /dev/null and b/apps/wallpaper/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/debug/apps/wallpaper/src/main/res/values-w820dp/dimens.xml b/apps/wallpaper/src/main/res/values-w820dp/dimens.xml similarity index 78% rename from debug/apps/wallpaper/src/main/res/values-w820dp/dimens.xml rename to apps/wallpaper/src/main/res/values-w820dp/dimens.xml index 63fc81644..a2d24bc10 100644 --- a/debug/apps/wallpaper/src/main/res/values-w820dp/dimens.xml +++ b/apps/wallpaper/src/main/res/values-w820dp/dimens.xml @@ -2,5 +2,5 @@ - 64dp - + + \ No newline at end of file diff --git a/apps/wallpaper/src/main/res/values/dimens.xml b/apps/wallpaper/src/main/res/values/dimens.xml new file mode 100644 index 000000000..9cfe70043 --- /dev/null +++ b/apps/wallpaper/src/main/res/values/dimens.xml @@ -0,0 +1,3 @@ + + 16dp + \ No newline at end of file diff --git a/debug/apps/wallpaper/src/main/res/values/strings.xml b/apps/wallpaper/src/main/res/values/strings.xml similarity index 100% rename from debug/apps/wallpaper/src/main/res/values/strings.xml rename to apps/wallpaper/src/main/res/values/strings.xml diff --git a/debug/apps/wallpaper/src/main/res/xml/wallpaper.xml b/apps/wallpaper/src/main/res/xml/wallpaper.xml similarity index 100% rename from debug/apps/wallpaper/src/main/res/xml/wallpaper.xml rename to apps/wallpaper/src/main/res/xml/wallpaper.xml diff --git a/debug/apps/watchface/build.gradle b/apps/watchface/build.gradle similarity index 93% rename from debug/apps/watchface/build.gradle rename to apps/watchface/build.gradle index 215878d49..212b286f8 100644 --- a/debug/apps/watchface/build.gradle +++ b/apps/watchface/build.gradle @@ -1,7 +1,8 @@ -apply plugin: 'com.android.application' +plugins { + id 'com.android.application' +} android { - compileSdkVersion 33 defaultConfig { applicationId "processing.tests.watchface" minSdkVersion 25 diff --git a/debug/apps/watchface/gradle.properties b/apps/watchface/gradle.properties similarity index 100% rename from debug/apps/watchface/gradle.properties rename to apps/watchface/gradle.properties diff --git a/debug/apps/watchface/src/main/AndroidManifest.xml b/apps/watchface/src/main/AndroidManifest.xml similarity index 100% rename from debug/apps/watchface/src/main/AndroidManifest.xml rename to apps/watchface/src/main/AndroidManifest.xml diff --git a/debug/apps/watchface/src/main/java/watchface/MainService.java b/apps/watchface/src/main/java/watchface/MainService.java similarity index 100% rename from debug/apps/watchface/src/main/java/watchface/MainService.java rename to apps/watchface/src/main/java/watchface/MainService.java diff --git a/debug/apps/watchface/src/main/java/watchface/Sketch.java b/apps/watchface/src/main/java/watchface/Sketch.java similarity index 100% rename from debug/apps/watchface/src/main/java/watchface/Sketch.java rename to apps/watchface/src/main/java/watchface/Sketch.java diff --git a/debug/apps/watchface/src/main/res/drawable-nodpi/bg.png b/apps/watchface/src/main/res/drawable-nodpi/bg.png similarity index 100% rename from debug/apps/watchface/src/main/res/drawable-nodpi/bg.png rename to apps/watchface/src/main/res/drawable-nodpi/bg.png diff --git a/debug/apps/watchface/src/main/res/drawable-nodpi/preview_analog.png b/apps/watchface/src/main/res/drawable-nodpi/preview_analog.png similarity index 100% rename from debug/apps/watchface/src/main/res/drawable-nodpi/preview_analog.png rename to apps/watchface/src/main/res/drawable-nodpi/preview_analog.png diff --git a/debug/apps/watchface/src/main/res/layout/main.xml b/apps/watchface/src/main/res/layout/main.xml similarity index 100% rename from debug/apps/watchface/src/main/res/layout/main.xml rename to apps/watchface/src/main/res/layout/main.xml diff --git a/apps/watchface/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/watchface/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..cde69bccc Binary files /dev/null and b/apps/watchface/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/apps/watchface/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/watchface/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..c133a0cbd Binary files /dev/null and b/apps/watchface/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/apps/watchface/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/watchface/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..bfa42f0e7 Binary files /dev/null and b/apps/watchface/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/apps/watchface/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/watchface/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..324e72cdd Binary files /dev/null and b/apps/watchface/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/debug/apps/watchface/src/main/res/values/strings.xml b/apps/watchface/src/main/res/values/strings.xml similarity index 100% rename from debug/apps/watchface/src/main/res/values/strings.xml rename to apps/watchface/src/main/res/values/strings.xml diff --git a/debug/apps/watchface/src/main/res/xml/watch_face.xml b/apps/watchface/src/main/res/xml/watch_face.xml similarity index 100% rename from debug/apps/watchface/src/main/res/xml/watch_face.xml rename to apps/watchface/src/main/res/xml/watch_face.xml diff --git a/build.gradle b/build.gradle index a957961c0..5bb77278f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,173 +1,55 @@ -import java.nio.file.Files -import org.zeroturnaround.zip.ZipUtil -import org.apache.commons.io.FileUtils -import java.util.regex.Pattern -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; +// 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:4.1.3' - classpath group: 'commons-io', name: 'commons-io', version: '2.8.0' - classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.14' - } -} + dependencies { + classpath 'com.android.tools.build:gradle:8.0.2' -plugins { - id 'java' - id('io.github.gradle-nexus.publish-plugin') version '1.1.0' + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } } -apply from: "${rootDir}/scripts/publish-root.gradle" - allprojects { - apply plugin: 'java' - apply plugin: 'java-library' - - Properties versions = new Properties() - versions.load(project.rootProject.file("mode/version.properties").newDataInputStream()) - ext.targetSdkVersion = versions.getProperty("android-platform") - ext.appcompatVersion = versions.getProperty("androidx.appcompat%appcompat") - ext.v4legacyVersion = versions.getProperty("androidx.legacy%legacy-support-v4") - ext.wearVersion = versions.getProperty("com.google.android.support%wearable") - ext.gvrVersion = versions.getProperty("com.google.vr") - ext.garVersion = versions.getProperty("com.google.ar") - ext.processingVersion = versions.getProperty("org.processing") - ext.toolingVersion = versions.getProperty("org.gradle%gradle-tooling-api") - ext.slf4jVersion = versions.getProperty("org.slf4j") - ext.gradlewVersion = versions.getProperty("gradle-wrapper") - ext.toolsLibVersion = versions.getProperty("android-toolslib") - ext.jdtVersion = versions.getProperty("org.eclipse.jdt") - - Properties modeProperties = new Properties() - modeProperties.load(project.rootProject.file("mode/mode.properties").newDataInputStream()) - ext.modeVersion = modeProperties.getProperty("prettyVersion") + repositories { + // This was was added to address an issue in JCenter with some Android packages (https://stackoverflow.com/questions/50563338/could-not-find-runtime-jar-android-arch-lifecycleruntime1-0-0/50564224). + // JCenter is no longer used but keep it just in case. + maven { url "https://maven.google.com" } - Properties vrProperties = new Properties() - vrProperties.load(project.rootProject.file("mode/libraries/vr/library.properties").newDataInputStream()) - ext.vrLibVersion = vrProperties.getProperty("prettyVersion") + // Apparently needed by AndroidX dependencies + maven { url "https://jitpack.io" } - Properties arProperties = new Properties() - arProperties.load(project.rootProject.file("mode/libraries/ar/library.properties").newDataInputStream()) - ext.arLibVersion = arProperties.getProperty("prettyVersion") + // Needed to get google-vr dependencies + maven { url 'https://repo.gradle.org/gradle/libs-releases' } + mavenCentral() + google() + } - def fn = project.rootProject.file("local.properties") - if (!fn.exists()) { - if (System.env["ANDROID_SDK"] != null) { - def syspath = System.env["ANDROID_SDK"] - def parts = syspath.split(Pattern.quote(File.separator)) - def path = String.join("/", parts) - fn.withWriterAppend { w -> - w << "sdk.dir=${path}\n" + // Set Java compatibility for all projects + plugins.withType(JavaPlugin).configureEach { + java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) } - } else { - throw new GradleException( - "The file local.properties does not exist, and there is no ANDROID_SDK environmental variable defined in the system.\n" + - "Define ANDROID_SDK so it points to the location of the Android SDK, or create the local.properties file manually\n" + - "and add the following line to it:\n" + - "sdk.dir=") } } - - Properties localProperties = new Properties() - localProperties.load(project.rootProject.file("local.properties").newDataInputStream()) - def sdkDir = localProperties.getProperty("sdk.dir") - ext.androidPlatformPath = "${sdkDir}/platforms/android-${targetSdkVersion}" - ext.coreZipPath = "${rootDir}/mode/processing-core.zip" - - repositories { - google() - mavenCentral() - maven { url "https://maven.google.com" } - maven { url "https://jitpack.io" } - maven { url 'https://repo.gradle.org/gradle/libs-releases' } - flatDir dirs: androidPlatformPath - flatDir dirs: "${rootDir}/core/build/libs" - } - - compileJava { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - // Uncomment this option when building with Java 11+ - // https://github.com/processing/processing-android/issues/625 - // options.release = 8 + // Set Android compatibility for all Android projects + plugins.withType(com.android.build.gradle.BasePlugin).configureEach { + android { + compileSdkVersion 33 + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + } } } -clean.doFirst { - delete "dist" -} - -task dist { - dependsOn subprojects.build - doLast { - def root = "${buildDir}/zip/AndroidMode" - - // Copy assets to build dir - FileUtils.copyDirectory(file("mode/templates"), file("${root}/templates")) - FileUtils.copyDirectory(file("mode/examples"), file("${root}/examples")) - FileUtils.copyDirectory(file("mode/icons"), file("${root}/icons")) - FileUtils.copyDirectory(file("mode/theme"), file("${root}/theme")) - FileUtils.copyDirectory(file("mode/mode"), file("${root}/mode")) - delete "${root}/mode/core.jar" - delete "${root}/mode/pde.jar" - delete "${root}/mode/JavaMode.jar" - // delete "${root}/mode/jdi.jar" - // delete "${root}/mode/jdimodel.jar" - - Files.copy(file("mode/processing-core.zip").toPath(), - file("${root}/processing-core.zip").toPath(), REPLACE_EXISTING) - - Files.copy(file("mode/keywords.txt").toPath(), - file("${root}/keywords.txt").toPath(), REPLACE_EXISTING) - - Files.copy(file("mode/version.properties").toPath(), - file("${root}/version.properties").toPath(), REPLACE_EXISTING) - - Files.copy(file("mode/mode.properties").toPath(), - file("${root}/mode.properties").toPath(), REPLACE_EXISTING) - - FileUtils.copyDirectory(file("mode/languages"), - file("${root}/languages")) - - FileUtils.copyDirectory(file("mode/resources"), - file("${root}/resources")) - - FileUtils.copyDirectory(file("mode/tools/SDKUpdater/tool"), - file("${root}/tools/SDKUpdater/tool")) - FileUtils.copyDirectory(file("mode/tools/SDKUpdater/lib"), - file("${root}/tools/SDKUpdater/lib")) - FileUtils.copyDirectory(file("mode/tools/SDKUpdater/src"), - file("${root}/tools/SDKUpdater/src")) - - FileUtils.copyDirectory(file("mode/libraries/vr/examples"), - file("${root}/libraries/vr/examples")) - FileUtils.copyDirectory(file("mode/libraries/vr/library"), - file("${root}/libraries/vr/library")) - FileUtils.copyDirectory(file("mode/libraries/vr/src"), - file("${root}/libraries/vr/src")) - Files.copy(file("mode/libraries/vr/library.properties").toPath(), - file("${root}/libraries/vr/library.properties").toPath(), REPLACE_EXISTING) - - FileUtils.copyDirectory(file("mode/libraries/ar/examples"), - file("${root}/libraries/ar/examples")) - FileUtils.copyDirectory(file("mode/libraries/ar/library"), - file("${root}/libraries/ar/library")) - FileUtils.copyDirectory(file("mode/libraries/ar/src"), - file("${root}/libraries/ar/src")) - Files.copy(file("mode/libraries/ar/library.properties").toPath(), - file("${root}/libraries/ar/library.properties").toPath(), REPLACE_EXISTING) - - File distFolder = file("dist") - distFolder.mkdirs() - ZipUtil.pack(file("${buildDir}/zip"), new File("dist/AndroidMode.zip")) - Files.copy(file("mode/mode.properties").toPath(), - file("dist/AndroidMode.txt").toPath(), REPLACE_EXISTING) - } -} +tasks.register('clean', Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/buildSrc/src/main/groovy/processing/android/ImportAar.groovy b/buildSrc/src/main/groovy/processing/android/ImportAar.groovy deleted file mode 100644 index 8880ff931..000000000 --- a/buildSrc/src/main/groovy/processing/android/ImportAar.groovy +++ /dev/null @@ -1,125 +0,0 @@ -package processing.android - -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.plugins.PluginManager -import org.gradle.api.plugins.ExtensionContainer -import org.gradle.plugins.ide.idea.IdeaPlugin -import org.gradle.plugins.ide.idea.model.IdeaModel -import org.gradle.plugins.ide.idea.model.IdeaModule -import org.gradle.api.artifacts.Configuration -import org.gradle.api.artifacts.transform.ArtifactTransform - -import static org.gradle.api.internal.artifacts.ArtifactAttributes.ARTIFACT_FORMAT -import com.android.build.gradle.internal.dependency.AarTransform -import com.android.build.gradle.internal.dependency.ExtractAarTransform -import com.android.build.gradle.internal.publishing.AndroidArtifacts -import com.android.builder.aar.AarExtractor -import com.google.common.collect.ImmutableList -import java.util.regex.Pattern -import static com.android.SdkConstants.FD_JARS -import static com.android.SdkConstants.FN_CLASSES_JAR - -import java.io.File -import java.nio.file.Files -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING - -/** - * Build Gradle plgin needed to use aar files as dependencies in a pure java library project. - * Adapted from the following plugin by nekocode - * https://github.com/nekocode/Gradle-Import-Aar - * Ported to Groovy, and made specific to the needs of the Android mode build process (i.e.: this plugin - * is not meant to be used with other projects). - */ -class ImportAar implements Plugin { - - final String CONFIG_NAME_POSTFIX = "Aar" - - void apply(Project project) { - def aar = AndroidArtifacts.TYPE_AAR - def jar = AndroidArtifacts.TYPE_JAR - def exp = AndroidArtifacts.TYPE_EXPLODED_AAR - - // // Create aar configurations - Collection allConfigs = project.getConfigurations().toList() - for (Configuration config: allConfigs) { - Configuration aarConfig = project.configurations.maybeCreate(config.name + CONFIG_NAME_POSTFIX) - - // Add extracted jars to original configuration after project evaluating - aarConfig.getAttributes().attribute(ARTIFACT_FORMAT, jar) - project.afterEvaluate { - for (File jarFile: aarConfig) { - // print "================================================> FILE " - // println jarFile - // println jarFile.getName() - // for (String s: project.sourceSets.main.compileClasspath) { - // println s - // } - // project.getDependencies().add(config.name, project.files(jarFile)) - - // Add jar file to classpath - project.sourceSets.main.compileClasspath += project.files(jarFile) - - File libraryFolder = new File(System.getProperty("user.dir"), "build/libs") - libraryFolder.mkdirs() - - // Strip version number when copying - String name = jarFile.getName() - int p = name.lastIndexOf("-") - String libName = name.substring(0, p) + ".jar" - File libraryJar = new File(libraryFolder, libName) - Files.copy(jarFile.toPath(), libraryJar.toPath(), REPLACE_EXISTING) - } - - } - - // Tell Idea about our aar configuration - PluginManager pluginManager = project.getPluginManager() - pluginManager.apply(IdeaPlugin.class) - ExtensionContainer extensions = project.getExtensions() - // IdeaModel model = extensions.getByType​(IdeaModel.class) - IdeaModel model = extensions.getByName("idea") - IdeaModule module = model.getModule() - module.scopes.PROVIDED.plus += [aarConfig] - } - - // Register aar transform - project.dependencies { - registerTransform { - from.attribute(ARTIFACT_FORMAT, aar) - to.attribute(ARTIFACT_FORMAT, jar) - artifactTransform(AarJarArtifactTransform.class) - } - } - } - - static class AarJarArtifactTransform extends ArtifactTransform { - @Override - List transform(File file) { - // println "Transforming---------------------------------" - // println outputDirectory - // println file - File explodedDir = new File(getOutputDirectory(), "exploded") - // println explodedDir - - AarExtractor aarExtractor = new AarExtractor() - aarExtractor.extract(file, explodedDir) - File classesJar = new File(new File(explodedDir, FD_JARS), FN_CLASSES_JAR) - // println classesJar - - // String[] names = file.getPath().split(Pattern.quote(File.separator)) - // print "NAMES " - // println names - // print "NAME " - // println file.getName() - // String aarName = names[names.length - 4].replace(".aar", "") - String aarName = file.getName().replace(".aar", "") - // print "AAR NAME " - // println aarName - File renamedJar = new File(getOutputDirectory(), aarName + ".jar") - renamedJar << classesJar.bytes - - return ImmutableList.of(renamedJar) - } - } -} \ No newline at end of file diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/aar.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/aar.properties deleted file mode 100644 index 42d81af01..000000000 --- a/buildSrc/src/main/resources/META-INF/gradle-plugins/aar.properties +++ /dev/null @@ -1 +0,0 @@ -implementation-class=processing.android.ImportAar \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle deleted file mode 100644 index 4aadfdd44..000000000 --- a/core/build.gradle +++ /dev/null @@ -1,96 +0,0 @@ -import org.apache.tools.ant.Project -import java.nio.file.Files -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; - -plugins { - id 'aar' -} - -dependencies { - implementation name: "android" - implementationAar "androidx.legacy:legacy-support-v4:${v4legacyVersion}" - implementationAar "com.google.android.support:wearable:${wearVersion}" -} - -sourceSets { - main { - java { - srcDirs = ["src/"] - } - resources { - srcDirs = ["src/"] - } - } -} - -task sourceJar(type: Jar, dependsOn: classes) { - duplicatesStrategy = DuplicatesStrategy.INCLUDE - classifier = "sources" - from sourceSets.main.allSource -} - -// Does not work because of Processing-specific tags in source code, such as @webref -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = "javadoc" - from javadoc.destinationDir -} - -artifacts { -// archives javadocJar - archives sourceJar -} - -jar.doLast { task -> - ant.checksum file: task.archivePath -} - -clean.doFirst { - delete "dist" - delete "${coreZipPath}" -} - -compileJava.doFirst { - String[] deps = ["wearable.jar"] - for (String fn : deps) { - Files.copy(file("${rootDir}/build/libs/" + fn).toPath(), - file("${rootDir}/mode/mode/" + fn).toPath(), REPLACE_EXISTING) - } -} - -build.doLast { - - // Need to check the existance of the files before using as the files - // will get generated only if Task :core:jar is not being skipped - // Task :core:jar will be skipped if source files are unchanged or jar task is UP-TO-DATE - - if (file("${buildDir}/libs/core.jar").exists()) { - // Copying core jar as zip inside the mode folder - Files.copy(file("${buildDir}/libs/core.jar").toPath(), - file("${coreZipPath}").toPath(), REPLACE_EXISTING) - } - // Renaming artifacts for maven publishing - if (file("${buildDir}/libs/core.jar").exists()) { - Files.move(file("${buildDir}/libs/core.jar").toPath(), - file("$buildDir/libs/processing-core-${modeVersion}.jar").toPath(), REPLACE_EXISTING); - } - if (file("${buildDir}/libs/core-sources.jar").exists()) { - Files.move(file("${buildDir}/libs/core-sources.jar").toPath(), - file("$buildDir/libs/processing-core-${modeVersion}-sources.jar").toPath(), REPLACE_EXISTING); - } - if (file("${buildDir}/libs/core.jar.MD5").exists()) { - Files.move(file("${buildDir}/libs/core.jar.MD5").toPath(), - file("$buildDir/libs/processing-core-${modeVersion}.jar.md5").toPath(), REPLACE_EXISTING); - } -} - -ext { - libName = 'processing-core' - libVersion = modeVersion - libJar = "${buildDir}/libs/${libName}-${libVersion}.jar" - libSrc = "${buildDir}/libs/${libName}-${libVersion}-sources.jar" - libMd5 = "${buildDir}/libs/${libName}-${libVersion}-sources.jar.md5" - libDependencies = [[name: 'legacy-support-v4', group: 'androidx.legacy', version: v4legacyVersion], - [name: 'wearable', group: 'com.google.android.support', version: wearVersion], - [name: 'android']] -} -apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" diff --git a/debug/apps/vrcube/src/main/java/vrcube/MainActivity.java b/debug/apps/vrcube/src/main/java/vrcube/MainActivity.java deleted file mode 100644 index 073189db3..000000000 --- a/debug/apps/vrcube/src/main/java/vrcube/MainActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package vrcube; - -import android.os.Bundle; - -import processing.vr.VRActivity; -import processing.core.PApplet; - -public class MainActivity extends VRActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - PApplet sketch = new Sketch(); - setSketch(sketch); - } -} \ No newline at end of file diff --git a/debug/build.gradle b/debug/build.gradle deleted file mode 100644 index 78b7a12c1..000000000 --- a/debug/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -// 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.3.1' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - // This was was added to address an issue in JCenter with some Android packages (https://stackoverflow.com/questions/50563338/could-not-find-runtime-jar-android-arch-lifecycleruntime1-0-0/50564224). - // JCenter is no longer used but keep it just in case. - maven { url "https://maven.google.com" } - - // Apparently needed by AndroidX dependencies - maven { url "https://jitpack.io" } - - // Needed to get google-vr dependencies - maven { url 'https://repo.gradle.org/gradle/libs-releases' } - - // Using the legacy Google VR libs included in the mode's VR library, since they are no - // longer available online -// flatDir { -// dirs '../mode/libraries/vr/libs' -// } - - mavenCentral() - google() - - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/debug/gradle.properties b/debug/gradle.properties deleted file mode 100644 index 278e9e7db..000000000 --- a/debug/gradle.properties +++ /dev/null @@ -1,21 +0,0 @@ -## For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx1024m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -# -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -#Wed Dec 30 11:02:34 EST 2020 -android.enableJetifier=true -android.useAndroidX=true - -# Line to fix the ''module java.base does not "opens java.io" to unnamed module '' error in Android Studio: -# https://stackoverflow.com/questions/67782975/how-to-fix-the-module-java-base-does-not-opens-java-io-to-unnamed-module -# Probably not needed if using a version of the Android Gradle Plugin compatible with the JDK: -# https://docs.gradle.org/current/userguide/compatibility.html -org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED \ No newline at end of file diff --git a/debug/libs/google-vr/protobuf-javanano-3.1.0.jar b/debug/libs/google-vr/protobuf-javanano-3.1.0.jar deleted file mode 100644 index 8aac9068d..000000000 Binary files a/debug/libs/google-vr/protobuf-javanano-3.1.0.jar and /dev/null differ diff --git a/debug/libs/processing-ar/AndroidManifest.xml b/debug/libs/processing-ar/AndroidManifest.xml deleted file mode 100755 index 8c707a40f..000000000 --- a/debug/libs/processing-ar/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/debug/libs/processing-ar/gradle.properties b/debug/libs/processing-ar/gradle.properties deleted file mode 100755 index 0b8af424f..000000000 --- a/debug/libs/processing-ar/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -POM_NAME=Processing for Android AR Library -POM_ARTIFACT_ID=processing-ar -POM_PACKAGING=aar -android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file diff --git a/debug/libs/processing-ar/project.properties b/debug/libs/processing-ar/project.properties deleted file mode 100755 index 91d2b0246..000000000 --- a/debug/libs/processing-ar/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 -android.library=true diff --git a/debug/libs/processing-core/AndroidManifest.xml b/debug/libs/processing-core/AndroidManifest.xml deleted file mode 100755 index 5587f2ed2..000000000 --- a/debug/libs/processing-core/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/debug/libs/processing-core/gradle.properties b/debug/libs/processing-core/gradle.properties deleted file mode 100755 index 7420d96aa..000000000 --- a/debug/libs/processing-core/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -POM_NAME=Processing for Android Core Library -POM_ARTIFACT_ID=processing-core -POM_PACKAGING=aar -android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file diff --git a/debug/libs/processing-core/project.properties b/debug/libs/processing-core/project.properties deleted file mode 100755 index 36f15941e..000000000 --- a/debug/libs/processing-core/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-15 -android.library=true diff --git a/debug/libs/processing-vr/AndroidManifest.xml b/debug/libs/processing-vr/AndroidManifest.xml deleted file mode 100755 index bd9f8c46f..000000000 --- a/debug/libs/processing-vr/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/debug/libs/processing-vr/gradle.properties b/debug/libs/processing-vr/gradle.properties deleted file mode 100755 index 66fa090a2..000000000 --- a/debug/libs/processing-vr/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -POM_NAME=Processing for Android VR Library -POM_ARTIFACT_ID=processing-vr -POM_PACKAGING=aar -android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file diff --git a/debug/libs/processing-vr/project.properties b/debug/libs/processing-vr/project.properties deleted file mode 100755 index 91d2b0246..000000000 --- a/debug/libs/processing-vr/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-19 -android.library=true diff --git a/debug/settings.gradle b/debug/settings.gradle deleted file mode 100644 index 649bcc56e..000000000 --- a/debug/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':apps:simple', ':apps:wallpaper', ':apps:vrcube', ':apps:arscene', ':apps:watchface', ':apps:fast2d', ':libs:processing-core', 'libs:google-vr',':libs:processing-vr', ':libs:processing-ar' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fcea..d6e308a63 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..f5feea6d6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,12 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +134,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +217,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/debug/libs/google-vr/build.gradle b/libs/google-vr/build.gradle similarity index 67% rename from debug/libs/google-vr/build.gradle rename to libs/google-vr/build.gradle index ad6fe686d..9d7c8f77b 100644 --- a/debug/libs/google-vr/build.gradle +++ b/libs/google-vr/build.gradle @@ -2,9 +2,6 @@ // https://stackoverflow.com/a/60888941 configurations.maybeCreate("default") -artifacts.add("default", file('sdk-audio-1.180.0.aar')) artifacts.add("default", file('sdk-base-1.180.0.aar')) artifacts.add("default", file('sdk-common-1.180.0.aar')) - -// https://mvnrepository.com/artifact/com.google.protobuf.nano/protobuf-javanano/3.1.0 -//artifacts.add("default", file('protobuf-javanano-3.1.0.jar')) +artifacts.add("default", file('sdk-audio-1.180.0.aar')) diff --git a/debug/libs/google-vr/sdk-audio-1.180.0.aar b/libs/google-vr/sdk-audio-1.180.0.aar similarity index 100% rename from debug/libs/google-vr/sdk-audio-1.180.0.aar rename to libs/google-vr/sdk-audio-1.180.0.aar diff --git a/debug/libs/google-vr/sdk-base-1.180.0.aar b/libs/google-vr/sdk-base-1.180.0.aar similarity index 100% rename from debug/libs/google-vr/sdk-base-1.180.0.aar rename to libs/google-vr/sdk-base-1.180.0.aar diff --git a/debug/libs/google-vr/sdk-common-1.180.0.aar b/libs/google-vr/sdk-common-1.180.0.aar similarity index 100% rename from debug/libs/google-vr/sdk-common-1.180.0.aar rename to libs/google-vr/sdk-common-1.180.0.aar diff --git a/debug/libs/processing-ar/build.gradle b/libs/processing-ar/build.gradle similarity index 53% rename from debug/libs/processing-ar/build.gradle rename to libs/processing-ar/build.gradle index fab391e4d..f0681e6de 100755 --- a/debug/libs/processing-ar/build.gradle +++ b/libs/processing-ar/build.gradle @@ -1,23 +1,25 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' +} android { - compileSdkVersion 33 + namespace "processing.ar" + defaultConfig { minSdkVersion 19 targetSdkVersion 33 } - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['../../../mode/libraries/ar/src'] - assets.srcDirs = ['../../../mode/libraries/ar/src/assets'] - } - } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - productFlavors { + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } } } diff --git a/libs/processing-ar/proguard-rules.pro b/libs/processing-ar/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/libs/processing-ar/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 + +# 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 diff --git a/libs/processing-ar/src/main/AndroidManifest.xml b/libs/processing-ar/src/main/AndroidManifest.xml new file mode 100755 index 000000000..97330b776 --- /dev/null +++ b/libs/processing-ar/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mode/libraries/ar/src/assets/shaders/ARLightFrag.glsl b/libs/processing-ar/src/main/assets/shaders/ARLightFrag.glsl similarity index 100% rename from mode/libraries/ar/src/assets/shaders/ARLightFrag.glsl rename to libs/processing-ar/src/main/assets/shaders/ARLightFrag.glsl diff --git a/mode/libraries/ar/src/assets/shaders/ARLightVert.glsl b/libs/processing-ar/src/main/assets/shaders/ARLightVert.glsl similarity index 100% rename from mode/libraries/ar/src/assets/shaders/ARLightVert.glsl rename to libs/processing-ar/src/main/assets/shaders/ARLightVert.glsl diff --git a/mode/libraries/ar/src/assets/shaders/ARTexLightFrag.glsl b/libs/processing-ar/src/main/assets/shaders/ARTexLightFrag.glsl similarity index 100% rename from mode/libraries/ar/src/assets/shaders/ARTexLightFrag.glsl rename to libs/processing-ar/src/main/assets/shaders/ARTexLightFrag.glsl diff --git a/mode/libraries/ar/src/assets/shaders/ARTexLightVert.glsl b/libs/processing-ar/src/main/assets/shaders/ARTexLightVert.glsl similarity index 100% rename from mode/libraries/ar/src/assets/shaders/ARTexLightVert.glsl rename to libs/processing-ar/src/main/assets/shaders/ARTexLightVert.glsl diff --git a/mode/libraries/ar/src/assets/shaders/BackgroundFrag.glsl b/libs/processing-ar/src/main/assets/shaders/BackgroundFrag.glsl similarity index 100% rename from mode/libraries/ar/src/assets/shaders/BackgroundFrag.glsl rename to libs/processing-ar/src/main/assets/shaders/BackgroundFrag.glsl diff --git a/mode/libraries/ar/src/assets/shaders/BackgroundVert.glsl b/libs/processing-ar/src/main/assets/shaders/BackgroundVert.glsl similarity index 100% rename from mode/libraries/ar/src/assets/shaders/BackgroundVert.glsl rename to libs/processing-ar/src/main/assets/shaders/BackgroundVert.glsl diff --git a/mode/libraries/ar/src/processing/ar/ARAnchor.java b/libs/processing-ar/src/main/java/processing/ar/ARAnchor.java similarity index 100% rename from mode/libraries/ar/src/processing/ar/ARAnchor.java rename to libs/processing-ar/src/main/java/processing/ar/ARAnchor.java diff --git a/mode/libraries/ar/src/processing/ar/ARGraphics.java b/libs/processing-ar/src/main/java/processing/ar/ARGraphics.java similarity index 60% rename from mode/libraries/ar/src/processing/ar/ARGraphics.java rename to libs/processing-ar/src/main/java/processing/ar/ARGraphics.java index fc31e12ae..3cdfba0b9 100644 --- a/mode/libraries/ar/src/processing/ar/ARGraphics.java +++ b/libs/processing-ar/src/main/java/processing/ar/ARGraphics.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2019 The Processing Foundation + Copyright (c) 2019-23 The Processing Foundation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -25,11 +25,14 @@ import android.view.SurfaceHolder; import com.google.ar.core.Anchor; +import com.google.ar.core.AugmentedImage; import com.google.ar.core.HitResult; import com.google.ar.core.Plane; import com.google.ar.core.Pose; import com.google.ar.core.Trackable; import com.google.ar.core.TrackingState; +import com.google.ar.core.Config; +import com.google.ar.core.Session; import java.net.URL; import java.nio.FloatBuffer; @@ -54,6 +57,7 @@ public class ARGraphics extends PGraphics3D { static protected final int PLANE_CEILING = 1; static protected final int PLANE_WALL = 2; static protected final int POINT = 3; + static protected final int IMAGE = 4; static protected final int TRACKING = 0; static protected final int PAUSED = 1; @@ -70,12 +74,12 @@ public class ARGraphics extends PGraphics3D { protected float[] colorCorrection = new float[4]; protected ArrayList trackers = new ArrayList(); - protected ArrayList trackPlanes = new ArrayList(); - protected HashMap trackMatrices = new HashMap(); - protected HashMap trackIds = new HashMap(); + protected ArrayList trackObjects = new ArrayList(); + protected HashMap trackMatrices = new HashMap(); + protected HashMap trackIds = new HashMap(); protected HashMap trackIdx = new HashMap(); - protected ArrayList newPlanes = new ArrayList(); + protected ArrayList newObjects = new ArrayList(); protected ArrayList delAnchors = new ArrayList(); protected HashMap anchors = new HashMap(); @@ -98,6 +102,7 @@ public class ARGraphics extends PGraphics3D { protected PShader arLightShader; protected PShader arTexlightShader; + public ARGraphics() { } @@ -120,6 +125,14 @@ protected PGL createPGL(PGraphicsOpenGL pGraphicsOpenGL) { } + @Override + public void eye() { + super.ortho(0, width, -height, 0, -1, +1); + + eyeDist = 1; + resetMatrix(); + } + @Override public void beginDraw() { super.beginDraw(); @@ -210,13 +223,12 @@ public void removeTracker(ARTracker tracker) { public int trackableCount() { - return trackPlanes.size(); + return trackObjects.size(); } - public int trackableId(int i) { - return trackIds.get(trackPlanes.get(i)); + return trackIds.get(trackObjects.get(i)); } @@ -224,45 +236,72 @@ public int trackableIndex(int id) { return trackIdx.get(id); } + + public String trackableName(int i) { + Trackable track = trackObjects.get(i); + if (track instanceof AugmentedImage) { + AugmentedImage img = ((AugmentedImage)track); + return img.getName(); + } + return null; + } + + public int trackableType(int i) { - Plane plane = trackPlanes.get(i); - if (plane.getType() == Plane.Type.HORIZONTAL_UPWARD_FACING) { - return PLANE_FLOOR; - } else if (plane.getType() == Plane.Type.HORIZONTAL_DOWNWARD_FACING) { - return PLANE_CEILING; - } else if (plane.getType() == Plane.Type.VERTICAL) { - return PLANE_WALL; + Trackable track = trackObjects.get(i); + if (track instanceof Plane) { + Plane plane = (Plane)track; + if (plane.getType() == Plane.Type.HORIZONTAL_UPWARD_FACING) { + return PLANE_FLOOR; + } else if (plane.getType() == Plane.Type.HORIZONTAL_DOWNWARD_FACING) { + return PLANE_CEILING; + } else if (plane.getType() == Plane.Type.VERTICAL) { + return PLANE_WALL; + } + } else if (track instanceof AugmentedImage) { + return IMAGE; } return UNKNOWN; } + public int trackableStatus(int i) { - Plane plane = trackPlanes.get(i); - if (plane.getTrackingState() == TrackingState.PAUSED) { + Trackable track = trackObjects.get(i); + if (track.getTrackingState() == TrackingState.PAUSED) { return PAUSED; - } else if (plane.getTrackingState() == TrackingState.TRACKING) { + } else if (track.getTrackingState() == TrackingState.TRACKING) { return TRACKING; - } else if (plane.getTrackingState() == TrackingState.STOPPED) { + } else if (track.getTrackingState() == TrackingState.STOPPED) { return STOPPED; } return UNKNOWN; } + public boolean trackableNew(int i) { - Plane plane = trackPlanes.get(i); - return newPlanes.contains(plane); + Trackable track = trackObjects.get(i); + return newObjects.contains(track); } + public boolean trackableSelected(int i, int mx, int my) { - Plane planei = trackPlanes.get(i); + Trackable tracki = trackObjects.get(i); for (HitResult hit : surfar.frame.hitTest(mx, my)) { Trackable trackable = hit.getTrackable(); + Pose hitPose = hit.getHitPose(); if (trackable instanceof Plane) { Plane plane = (Plane)trackable; - if (planei.equals(plane) && plane.isPoseInPolygon(hit.getHitPose())) { + if (tracki.equals(plane) && plane.isPoseInPolygon(hitPose)) { return true; } - } + } else if (trackable instanceof AugmentedImage) { + AugmentedImage image = (AugmentedImage)trackable; + Pose anchorPose = image.getCenterPose(); + Pose localHitPose = anchorPose.compose(hitPose); + if (tracki.equals(image) && isPoseInsideAugmentedImage(localHitPose, image)) { + return true; + } + } } return false; } @@ -271,49 +310,114 @@ public boolean trackableSelected(int i, int mx, int my) { protected HitResult getHitResult(int mx, int my) { for (HitResult hit : surfar.frame.hitTest(mx, my)) { Trackable trackable = hit.getTrackable(); + Pose hitPose = hit.getHitPose(); if (trackable instanceof Plane) { Plane plane = (Plane)trackable; - if (trackPlanes.contains(plane) && plane.isPoseInPolygon(hit.getHitPose())) { + if (trackObjects.contains(plane) && plane.isPoseInPolygon(hitPose)) { return hit; } + } else if (trackable instanceof AugmentedImage) { + AugmentedImage image = (AugmentedImage)trackable; + Pose anchorPose = image.getCenterPose(); + Pose localHitPose = anchorPose.compose(hitPose); + if (trackObjects.contains(image) && isPoseInsideAugmentedImage(localHitPose, image)) { + return hit; + } } } return null; } + + private boolean isPoseInsideAugmentedImage(Pose pose, AugmentedImage image) { + // Get the four corners of the AugmentedImage's defining rectangle + float[] corners = new float[16]; + image.getCenterPose().toMatrix(corners, 0); + + // Define the vertices of the rectangle in 2D (assuming the image is flat on the XZ plane) + float imageMinX = Float.POSITIVE_INFINITY; + float imageMaxX = Float.NEGATIVE_INFINITY; + float imageMinZ = Float.POSITIVE_INFINITY; + float imageMaxZ = Float.NEGATIVE_INFINITY; + + // Extract the X and Z coordinates of the corners + for (int i = 0; i < 8; i += 2) { + float cornerX = corners[i]; + float cornerZ = corners[i + 2]; + + if (cornerX < imageMinX) { + imageMinX = cornerX; + } + if (cornerX > imageMaxX) { + imageMaxX = cornerX; + } + if (cornerZ < imageMinZ) { + imageMinZ = cornerZ; + } + if (cornerZ > imageMaxZ) { + imageMaxZ = cornerZ; + } + } + + // Check if the Pose's position (X, Z) is within the bounds of the AugmentedImage's rectangle + float poseX = pose.tx(); + float poseZ = pose.tz(); + return (imageMinX <= poseX && poseX <= imageMaxX && imageMinZ <= poseZ && poseZ <= imageMaxZ); + } + + protected int getTrackable(HitResult hit) { - Plane plane = (Plane) hit.getTrackable(); - return trackPlanes.indexOf(plane); + Trackable track = hit.getTrackable(); + return trackObjects.indexOf(track); } + public float[] getTrackablePolygon(int i) { return getTrackablePolygon(i, null); } public float[] getTrackablePolygon(int i, float[] points) { - Plane plane = trackPlanes.get(i); - FloatBuffer buffer = plane.getPolygon(); - buffer.rewind(); - if (points == null || points.length < buffer.capacity()) { - points = new float[buffer.capacity()]; + Trackable track = trackObjects.get(i); + if (track instanceof Plane) { + Plane plane = (Plane)track; + FloatBuffer buffer = plane.getPolygon(); + buffer.rewind(); + if (points == null || points.length < buffer.capacity()) { + points = new float[buffer.capacity()]; + } + buffer.get(points, 0, buffer.capacity()); + } else if (track instanceof AugmentedImage) { + AugmentedImage image = (AugmentedImage)track; + points = new float[8]; + image.getCenterPose().toMatrix(points, 0); } - buffer.get(points, 0, buffer.capacity()); return points; } public float getTrackableExtentX(int i) { - Plane plane = trackPlanes.get(i); - return plane.getExtentX(); + Trackable track = trackObjects.get(i); + if (track instanceof Plane) { + return ((Plane)track).getExtentX(); + } else if (track instanceof AugmentedImage) { + return ((AugmentedImage)track).getExtentX(); + } + return -1; } public float getTrackableExtentZ(int i) { - Plane plane = trackPlanes.get(i); - return plane.getExtentZ(); + Trackable track = trackObjects.get(i); + if (track instanceof Plane) { + return ((Plane)track).getExtentZ(); + } else if (track instanceof AugmentedImage) { + return ((AugmentedImage)track).getExtentZ(); + } + return -1; } + public PMatrix3D getTrackableMatrix(int i) { return getTrackableMatrix(i, null); } @@ -324,7 +428,7 @@ public PMatrix3D getTrackableMatrix(int i, PMatrix3D target) { target = new PMatrix3D(); } - Plane plane = trackPlanes.get(i); + Plane plane = (Plane)trackObjects.get(i); float[] mat = trackMatrices.get(plane); target.set(mat[0], mat[4], mat[8], mat[12], mat[1], mat[5], mat[9], mat[13], @@ -336,27 +440,45 @@ public PMatrix3D getTrackableMatrix(int i, PMatrix3D target) { public int createAnchor(int i, float x, float y, float z) { - Plane plane = trackPlanes.get(i); - Pose planePose = plane.getCenterPose(); - pointIn[0] = x; - pointIn[1] = y; - pointIn[2] = z; - planePose.transformPoint(pointIn, 0, pointOut, 0); - Pose anchorPose = Pose.makeTranslation(pointOut); - Anchor anchor = plane.createAnchor(anchorPose); - anchors.put(++lastAnchorId, anchor); - return lastAnchorId; + Trackable track = trackObjects.get(i); + Pose centerPose = null; + if (track instanceof Plane) { + Plane plane = (Plane)track; + centerPose = plane.getCenterPose(); + } else if (track instanceof AugmentedImage) { + AugmentedImage img = (AugmentedImage)track; + centerPose = img.getCenterPose(); + } + if (centerPose != null) { + pointIn[0] = x; + pointIn[1] = y; + pointIn[2] = z; + centerPose.transformPoint(pointIn, 0, pointOut, 0); + Pose anchorPose = Pose.makeTranslation(pointOut); + Anchor anchor = track.createAnchor(anchorPose); + anchors.put(++lastAnchorId, anchor); + return lastAnchorId; + } + return -1; } public int createAnchor(int mx, int my) { for (HitResult hit : surfar.frame.hitTest(mx, my)) { Trackable trackable = hit.getTrackable(); + Pose hitPose = hit.getHitPose(); if (trackable instanceof Plane) { Plane plane = (Plane)trackable; - if (trackPlanes.contains(plane) && plane.isPoseInPolygon(hit.getHitPose())) { + if (trackObjects.contains(plane) && plane.isPoseInPolygon(hitPose)) { return createAnchor(hit); } + } else if (trackable instanceof AugmentedImage) { + AugmentedImage image = (AugmentedImage)trackable; + Pose anchorPose = image.getCenterPose(); + Pose localHitPose = anchorPose.compose(hitPose); + if (trackObjects.contains(image) && isPoseInsideAugmentedImage(localHitPose, image)) { + return createAnchor(hit); + } } } return 0; @@ -428,10 +550,12 @@ protected void createBackgroundRenderer() { backgroundRenderer = new BackgroundRenderer(surfar.getActivity()); } + protected void setCameraTexture() { surfar.session.setCameraTextureName(backgroundRenderer.getTextureId()); } + protected void updateMatrices() { surfar.camera.getProjectionMatrix(projMatrix, 0, 0.1f, 100.0f); surfar.camera.getViewMatrix(viewMatrix, 0); @@ -442,48 +566,73 @@ protected void updateMatrices() { protected void updateTrackables() { Collection planes = surfar.frame.getUpdatedTrackables(Plane.class); for (Plane plane: planes) { - if (plane.getSubsumedBy() != null) continue; - float[] mat; - if (trackMatrices.containsKey(plane)) { - mat = trackMatrices.get(plane); - } else { - mat = new float[16]; - trackMatrices.put(plane, mat); - trackPlanes.add(plane); - trackIds.put(plane, ++lastTrackableId); - newPlanes.add(plane); - } - Pose pose = plane.getCenterPose(); - pose.toMatrix(mat, 0); + addNewPlane(plane); + } + + Collection images = surfar.frame.getUpdatedTrackables(AugmentedImage.class); + for (AugmentedImage image: images) { + addNewImage(image); } // Remove stopped and subsummed trackables - for (int i = trackPlanes.size() - 1; i >= 0; i--) { - Plane plane = trackPlanes.get(i); - if (plane.getTrackingState() == TrackingState.STOPPED || plane.getSubsumedBy() != null) { - trackPlanes.remove(i); - trackMatrices.remove(plane); - int pid = trackIds.remove(plane); - trackIdx.remove(pid); - for (ARTracker t: trackers) t.remove(pid); + for (int i = trackObjects.size() - 1; i >= 0; i--) { + Trackable track = trackObjects.get(i); + if (track instanceof Plane) { + Plane plane = (Plane)track; + if (plane.getTrackingState() == TrackingState.STOPPED || plane.getSubsumedBy() != null) { + trackObjects.remove(i); + trackMatrices.remove(plane); + int pid = trackIds.remove(plane); + trackIdx.remove(pid); + for (ARTracker t: trackers) t.remove(pid); + } } } // Update indices - for (int i = 0; i < trackPlanes.size(); i++) { - Plane plane = trackPlanes.get(i); - int pid = trackIds.get(plane); + for (int i = 0; i < trackObjects.size(); i++) { + Trackable track = trackObjects.get(i); + int pid = trackIds.get(track); trackIdx.put(pid, i); - if (newPlanes.contains(plane)) { + if (newObjects.contains(track)) { for (ARTracker t: trackers) t.create(i); } } } - protected void cleanup() { - newPlanes.clear(); + protected void addNewPlane(Plane plane) { + if (plane.getSubsumedBy() != null) return; + float[] mat = addNewMatrix(plane); + Pose pose = plane.getCenterPose(); + if (pose != null) pose.toMatrix(mat, 0); + } + + + protected void addNewImage(AugmentedImage image) { + float[] mat = addNewMatrix(image); + Pose pose = image.getCenterPose(); + if (pose != null) pose.toMatrix(mat, 0); + } + + protected float[] addNewMatrix(Trackable obj) { + float[] mat; + if (trackMatrices.containsKey(obj)) { + mat = trackMatrices.get(obj); + } else { + mat = new float[16]; + trackMatrices.put(obj, mat); + trackObjects.add(obj); + trackIds.put(obj, ++lastTrackableId); + newObjects.add(obj); + } + return mat; + } + + + protected void cleanup() { + newObjects.clear(); for (int id: delAnchors) { Anchor anchor = anchors.remove(id); anchor.detach(); diff --git a/mode/libraries/ar/src/processing/ar/ARSurface.java b/libs/processing-ar/src/main/java/processing/ar/ARSurface.java similarity index 100% rename from mode/libraries/ar/src/processing/ar/ARSurface.java rename to libs/processing-ar/src/main/java/processing/ar/ARSurface.java diff --git a/mode/libraries/ar/src/processing/ar/ARTrackable.java b/libs/processing-ar/src/main/java/processing/ar/ARTrackable.java similarity index 91% rename from mode/libraries/ar/src/processing/ar/ARTrackable.java rename to libs/processing-ar/src/main/java/processing/ar/ARTrackable.java index cddf64147..c939b95d8 100644 --- a/mode/libraries/ar/src/processing/ar/ARTrackable.java +++ b/libs/processing-ar/src/main/java/processing/ar/ARTrackable.java @@ -30,15 +30,17 @@ public class ARTrackable { protected ARGraphics g; protected HitResult hit; + private String name; private int id; private PMatrix3D m; private float[] points; - public ARTrackable(ARGraphics g, int id) { + public ARTrackable(ARGraphics g, int id, String name) { this.g = g; this.id = id; + this.name = name; } - + public String id() { return String.valueOf(id); } @@ -48,7 +50,7 @@ public PMatrix3D matrix() { m = g.getTrackableMatrix(idx, m); return m; } - + public void transform() { g.applyMatrix(matrix()); } @@ -59,23 +61,23 @@ public float[] getPolygon() { return points; } - public float lengthX() { int idx = g.trackableIndex(id); return g.getTrackableExtentX(idx); } - public float lengthY() { return 0; } - public float lengthZ() { int idx = g.trackableIndex(id); return g.getTrackableExtentZ(idx); } + public String getName() { + return name; + } public boolean isSelected(int mx, int my) { int idx = g.trackableIndex(id); @@ -115,6 +117,11 @@ public boolean isFloorPlane() { return g.trackableType(idx) == ARGraphics.PLANE_FLOOR; } + public boolean isImage(){ + int idx = g.trackableIndex(id); + return g.trackableType(idx)== ARGraphics.IMAGE; + } + public boolean isCeilingPlane() { int idx = g.trackableIndex(id); return g.trackableType(idx) == ARGraphics.PLANE_CEILING; diff --git a/mode/libraries/ar/src/processing/ar/ARTracker.java b/libs/processing-ar/src/main/java/processing/ar/ARTracker.java similarity index 77% rename from mode/libraries/ar/src/processing/ar/ARTracker.java rename to libs/processing-ar/src/main/java/processing/ar/ARTracker.java index 9a27fdfda..9beb70bd7 100644 --- a/mode/libraries/ar/src/processing/ar/ARTracker.java +++ b/libs/processing-ar/src/main/java/processing/ar/ARTracker.java @@ -22,7 +22,12 @@ package processing.ar; +import android.graphics.Bitmap; + import com.google.ar.core.HitResult; +import com.google.ar.core.AugmentedImageDatabase; +import com.google.ar.core.Config; +import com.google.ar.core.Session; import java.lang.reflect.Method; import java.util.ArrayList; @@ -31,10 +36,12 @@ import java.util.Set; import processing.core.PApplet; +import processing.core.PImage; public class ARTracker { protected PApplet p; protected ARGraphics g; + protected AugmentedImageDatabase db; private HashMap trackables = new HashMap(); private ArrayList toRemove = new ArrayList(); @@ -42,10 +49,37 @@ public class ARTracker { public ARTracker(PApplet parent) { this.p = parent; - this.g = (ARGraphics) p.g; + this.g = (ARGraphics)p.g; setEventHandler(); } + public void addImage(String name, PImage img) { + addImageImp(name, img, null); + } + + public void addImage(String name, PImage img, float size) { + addImageImp(name, img, size); + } + + private void addImageImp(String name, PImage img, Float size) { + if (db == null) { + // Creating a new database of augmented images. + db = new AugmentedImageDatabase(g.surfar.session); + } + + Bitmap bitmap = (Bitmap)img.getNative(); + if (size != null) { + db.addImage(name, bitmap, size); + } else { + db.addImage(name, bitmap); + } + + // Reset the session config with the updated image database + Config config = new Config(g.surfar.session); + config.setAugmentedImageDatabase(db); + g.surfar.session.configure(config); + } + public void start() { cleanup(); g.addTracker(this); @@ -61,9 +95,10 @@ public int count() { public ARTrackable get(int idx) { int id = g.trackableId(idx); + String name = g.trackableName(idx); String sid = String.valueOf(id); if (!trackables.containsKey(sid)) { - ARTrackable t = new ARTrackable(g, id); + ARTrackable t = new ARTrackable(g, id, name); trackables.put(sid, t); } return get(sid); @@ -128,7 +163,6 @@ protected void remove(String id) { trackables.remove(id); } - protected void setEventHandler() { try { trackableEventMethod = p.getClass().getMethod("trackableEvent", ARTrackable.class); diff --git a/mode/libraries/ar/src/processing/ar/BackgroundRenderer.java b/libs/processing-ar/src/main/java/processing/ar/BackgroundRenderer.java similarity index 100% rename from mode/libraries/ar/src/processing/ar/BackgroundRenderer.java rename to libs/processing-ar/src/main/java/processing/ar/BackgroundRenderer.java diff --git a/mode/libraries/ar/src/processing/ar/RotationHandler.java b/libs/processing-ar/src/main/java/processing/ar/RotationHandler.java similarity index 77% rename from mode/libraries/ar/src/processing/ar/RotationHandler.java rename to libs/processing-ar/src/main/java/processing/ar/RotationHandler.java index cece970cc..e11c4b8e3 100644 --- a/mode/libraries/ar/src/processing/ar/RotationHandler.java +++ b/libs/processing-ar/src/main/java/processing/ar/RotationHandler.java @@ -18,15 +18,16 @@ public class RotationHandler implements DisplayManager.DisplayListener { public RotationHandler(Context context) { this.context = context; - display = context.getSystemService(WindowManager.class).getDefaultDisplay(); + WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); + display = windowManager.getDefaultDisplay(); } public void onResume() { - context.getSystemService(DisplayManager.class).registerDisplayListener(this, null); + ((DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE)).registerDisplayListener(this, null); } public void onPause() { - context.getSystemService(DisplayManager.class).unregisterDisplayListener(this); + ((DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE)).unregisterDisplayListener(this); } public void onSurfaceChanged(int width, int height) { @@ -59,4 +60,4 @@ public void onDisplayRemoved(int displayId) { public void onDisplayChanged(int displayId) { viewportChanged = true; } -} +} \ No newline at end of file diff --git a/mode/libraries/ar/src/processing/ar/ShaderUtils.java b/libs/processing-ar/src/main/java/processing/ar/ShaderUtils.java similarity index 100% rename from mode/libraries/ar/src/processing/ar/ShaderUtils.java rename to libs/processing-ar/src/main/java/processing/ar/ShaderUtils.java diff --git a/debug/libs/processing-core/build.gradle b/libs/processing-core/build.gradle similarity index 59% rename from debug/libs/processing-core/build.gradle rename to libs/processing-core/build.gradle index 89fd0764e..b7952ec4d 100644 --- a/debug/libs/processing-core/build.gradle +++ b/libs/processing-core/build.gradle @@ -1,27 +1,32 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' +} android { - compileSdkVersion 33 + + namespace "processing.core" + defaultConfig { minSdkVersion 17 targetSdkVersion 33 } - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['../../../core/src'] - assets.srcDirs = ['../../../core/src/assets'] - } - } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } - productFlavors { + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } } } dependencies { + testImplementation 'junit:junit:4.13.2' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'com.google.android.support:wearable:2.9.0' compileOnly 'com.google.android.wearable:wearable:2.9.0' diff --git a/libs/processing-core/proguard-rules.pro b/libs/processing-core/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/libs/processing-core/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 + +# 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 diff --git a/libs/processing-core/src/main/AndroidManifest.xml b/libs/processing-core/src/main/AndroidManifest.xml new file mode 100755 index 000000000..97330b776 --- /dev/null +++ b/libs/processing-core/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/src/assets/shaders/ColorFrag.glsl b/libs/processing-core/src/main/assets/shaders/ColorFrag.glsl similarity index 100% rename from core/src/assets/shaders/ColorFrag.glsl rename to libs/processing-core/src/main/assets/shaders/ColorFrag.glsl diff --git a/core/src/assets/shaders/ColorVert.glsl b/libs/processing-core/src/main/assets/shaders/ColorVert.glsl similarity index 100% rename from core/src/assets/shaders/ColorVert.glsl rename to libs/processing-core/src/main/assets/shaders/ColorVert.glsl diff --git a/core/src/assets/shaders/LightFrag.glsl b/libs/processing-core/src/main/assets/shaders/LightFrag.glsl similarity index 100% rename from core/src/assets/shaders/LightFrag.glsl rename to libs/processing-core/src/main/assets/shaders/LightFrag.glsl diff --git a/core/src/assets/shaders/LightVert.glsl b/libs/processing-core/src/main/assets/shaders/LightVert.glsl similarity index 100% rename from core/src/assets/shaders/LightVert.glsl rename to libs/processing-core/src/main/assets/shaders/LightVert.glsl diff --git a/core/src/assets/shaders/LineFrag.glsl b/libs/processing-core/src/main/assets/shaders/LineFrag.glsl similarity index 100% rename from core/src/assets/shaders/LineFrag.glsl rename to libs/processing-core/src/main/assets/shaders/LineFrag.glsl diff --git a/core/src/assets/shaders/LineVert.glsl b/libs/processing-core/src/main/assets/shaders/LineVert.glsl similarity index 100% rename from core/src/assets/shaders/LineVert.glsl rename to libs/processing-core/src/main/assets/shaders/LineVert.glsl diff --git a/core/src/assets/shaders/MaskFrag.glsl b/libs/processing-core/src/main/assets/shaders/MaskFrag.glsl similarity index 100% rename from core/src/assets/shaders/MaskFrag.glsl rename to libs/processing-core/src/main/assets/shaders/MaskFrag.glsl diff --git a/core/src/assets/shaders/P2DFrag.glsl b/libs/processing-core/src/main/assets/shaders/P2DFrag.glsl similarity index 100% rename from core/src/assets/shaders/P2DFrag.glsl rename to libs/processing-core/src/main/assets/shaders/P2DFrag.glsl diff --git a/core/src/assets/shaders/P2DVert.glsl b/libs/processing-core/src/main/assets/shaders/P2DVert.glsl similarity index 100% rename from core/src/assets/shaders/P2DVert.glsl rename to libs/processing-core/src/main/assets/shaders/P2DVert.glsl diff --git a/core/src/assets/shaders/PointFrag.glsl b/libs/processing-core/src/main/assets/shaders/PointFrag.glsl similarity index 100% rename from core/src/assets/shaders/PointFrag.glsl rename to libs/processing-core/src/main/assets/shaders/PointFrag.glsl diff --git a/core/src/assets/shaders/PointVert.glsl b/libs/processing-core/src/main/assets/shaders/PointVert.glsl similarity index 100% rename from core/src/assets/shaders/PointVert.glsl rename to libs/processing-core/src/main/assets/shaders/PointVert.glsl diff --git a/core/src/assets/shaders/TexFrag.glsl b/libs/processing-core/src/main/assets/shaders/TexFrag.glsl similarity index 100% rename from core/src/assets/shaders/TexFrag.glsl rename to libs/processing-core/src/main/assets/shaders/TexFrag.glsl diff --git a/core/src/assets/shaders/TexLightFrag.glsl b/libs/processing-core/src/main/assets/shaders/TexLightFrag.glsl similarity index 100% rename from core/src/assets/shaders/TexLightFrag.glsl rename to libs/processing-core/src/main/assets/shaders/TexLightFrag.glsl diff --git a/core/src/assets/shaders/TexLightVert.glsl b/libs/processing-core/src/main/assets/shaders/TexLightVert.glsl similarity index 100% rename from core/src/assets/shaders/TexLightVert.glsl rename to libs/processing-core/src/main/assets/shaders/TexLightVert.glsl diff --git a/core/src/assets/shaders/TexVert.glsl b/libs/processing-core/src/main/assets/shaders/TexVert.glsl similarity index 100% rename from core/src/assets/shaders/TexVert.glsl rename to libs/processing-core/src/main/assets/shaders/TexVert.glsl diff --git a/core/src/processing/a2d/PGraphicsAndroid2D.java b/libs/processing-core/src/main/java/processing/a2d/PGraphicsAndroid2D.java similarity index 100% rename from core/src/processing/a2d/PGraphicsAndroid2D.java rename to libs/processing-core/src/main/java/processing/a2d/PGraphicsAndroid2D.java diff --git a/core/src/processing/a2d/PShapeAndroid2D.java b/libs/processing-core/src/main/java/processing/a2d/PShapeAndroid2D.java similarity index 100% rename from core/src/processing/a2d/PShapeAndroid2D.java rename to libs/processing-core/src/main/java/processing/a2d/PShapeAndroid2D.java diff --git a/core/src/processing/a2d/PSurfaceAndroid2D.java b/libs/processing-core/src/main/java/processing/a2d/PSurfaceAndroid2D.java similarity index 100% rename from core/src/processing/a2d/PSurfaceAndroid2D.java rename to libs/processing-core/src/main/java/processing/a2d/PSurfaceAndroid2D.java diff --git a/core/src/processing/android/ActivityAPI.java b/libs/processing-core/src/main/java/processing/android/ActivityAPI.java similarity index 100% rename from core/src/processing/android/ActivityAPI.java rename to libs/processing-core/src/main/java/processing/android/ActivityAPI.java diff --git a/core/src/processing/android/AppComponent.java b/libs/processing-core/src/main/java/processing/android/AppComponent.java similarity index 100% rename from core/src/processing/android/AppComponent.java rename to libs/processing-core/src/main/java/processing/android/AppComponent.java diff --git a/core/src/processing/android/CompatUtils.java b/libs/processing-core/src/main/java/processing/android/CompatUtils.java similarity index 100% rename from core/src/processing/android/CompatUtils.java rename to libs/processing-core/src/main/java/processing/android/CompatUtils.java diff --git a/core/src/processing/android/PFragment.java b/libs/processing-core/src/main/java/processing/android/PFragment.java similarity index 100% rename from core/src/processing/android/PFragment.java rename to libs/processing-core/src/main/java/processing/android/PFragment.java diff --git a/core/src/processing/android/PWallpaper.java b/libs/processing-core/src/main/java/processing/android/PWallpaper.java similarity index 100% rename from core/src/processing/android/PWallpaper.java rename to libs/processing-core/src/main/java/processing/android/PWallpaper.java diff --git a/core/src/processing/android/PWatchFaceCanvas.java b/libs/processing-core/src/main/java/processing/android/PWatchFaceCanvas.java similarity index 100% rename from core/src/processing/android/PWatchFaceCanvas.java rename to libs/processing-core/src/main/java/processing/android/PWatchFaceCanvas.java diff --git a/core/src/processing/android/PWatchFaceGLES.java b/libs/processing-core/src/main/java/processing/android/PWatchFaceGLES.java similarity index 100% rename from core/src/processing/android/PWatchFaceGLES.java rename to libs/processing-core/src/main/java/processing/android/PWatchFaceGLES.java diff --git a/core/src/processing/android/PermissionRequestor.java b/libs/processing-core/src/main/java/processing/android/PermissionRequestor.java similarity index 96% rename from core/src/processing/android/PermissionRequestor.java rename to libs/processing-core/src/main/java/processing/android/PermissionRequestor.java index 0754badc3..deac0d852 100644 --- a/core/src/processing/android/PermissionRequestor.java +++ b/libs/processing-core/src/main/java/processing/android/PermissionRequestor.java @@ -27,6 +27,7 @@ import android.support.v4.os.ResultReceiver; import androidx.core.app.ActivityCompat; +import androidx.annotation.RestrictTo; // A simple utility activity to request permissions in a service. public class PermissionRequestor extends Activity { @@ -49,6 +50,7 @@ protected void onStart() { } @Override + @SuppressWarnings("RestrictedApi") public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) { Bundle resultData = new Bundle(); resultData.putStringArray(KEY_PERMISSIONS, permissions); diff --git a/core/src/processing/android/ServiceEngine.java b/libs/processing-core/src/main/java/processing/android/ServiceEngine.java similarity index 100% rename from core/src/processing/android/ServiceEngine.java rename to libs/processing-core/src/main/java/processing/android/ServiceEngine.java diff --git a/core/src/processing/core/PApplet.java b/libs/processing-core/src/main/java/processing/core/PApplet.java similarity index 100% rename from core/src/processing/core/PApplet.java rename to libs/processing-core/src/main/java/processing/core/PApplet.java diff --git a/core/src/processing/core/PConstants.java b/libs/processing-core/src/main/java/processing/core/PConstants.java similarity index 100% rename from core/src/processing/core/PConstants.java rename to libs/processing-core/src/main/java/processing/core/PConstants.java diff --git a/core/src/processing/core/PFont.java b/libs/processing-core/src/main/java/processing/core/PFont.java similarity index 100% rename from core/src/processing/core/PFont.java rename to libs/processing-core/src/main/java/processing/core/PFont.java diff --git a/core/src/processing/core/PGraphics.java b/libs/processing-core/src/main/java/processing/core/PGraphics.java similarity index 100% rename from core/src/processing/core/PGraphics.java rename to libs/processing-core/src/main/java/processing/core/PGraphics.java diff --git a/core/src/processing/core/PImage.java b/libs/processing-core/src/main/java/processing/core/PImage.java similarity index 100% rename from core/src/processing/core/PImage.java rename to libs/processing-core/src/main/java/processing/core/PImage.java diff --git a/core/src/processing/core/PMatrix.java b/libs/processing-core/src/main/java/processing/core/PMatrix.java similarity index 100% rename from core/src/processing/core/PMatrix.java rename to libs/processing-core/src/main/java/processing/core/PMatrix.java diff --git a/core/src/processing/core/PMatrix2D.java b/libs/processing-core/src/main/java/processing/core/PMatrix2D.java similarity index 100% rename from core/src/processing/core/PMatrix2D.java rename to libs/processing-core/src/main/java/processing/core/PMatrix2D.java diff --git a/core/src/processing/core/PMatrix3D.java b/libs/processing-core/src/main/java/processing/core/PMatrix3D.java similarity index 100% rename from core/src/processing/core/PMatrix3D.java rename to libs/processing-core/src/main/java/processing/core/PMatrix3D.java diff --git a/core/src/processing/core/PShape.java b/libs/processing-core/src/main/java/processing/core/PShape.java similarity index 100% rename from core/src/processing/core/PShape.java rename to libs/processing-core/src/main/java/processing/core/PShape.java diff --git a/core/src/processing/core/PShapeOBJ.java b/libs/processing-core/src/main/java/processing/core/PShapeOBJ.java similarity index 100% rename from core/src/processing/core/PShapeOBJ.java rename to libs/processing-core/src/main/java/processing/core/PShapeOBJ.java diff --git a/core/src/processing/core/PShapeSVG.java b/libs/processing-core/src/main/java/processing/core/PShapeSVG.java similarity index 100% rename from core/src/processing/core/PShapeSVG.java rename to libs/processing-core/src/main/java/processing/core/PShapeSVG.java diff --git a/core/src/processing/core/PStyle.java b/libs/processing-core/src/main/java/processing/core/PStyle.java similarity index 100% rename from core/src/processing/core/PStyle.java rename to libs/processing-core/src/main/java/processing/core/PStyle.java diff --git a/core/src/processing/core/PSurface.java b/libs/processing-core/src/main/java/processing/core/PSurface.java similarity index 100% rename from core/src/processing/core/PSurface.java rename to libs/processing-core/src/main/java/processing/core/PSurface.java diff --git a/core/src/processing/core/PSurfaceNone.java b/libs/processing-core/src/main/java/processing/core/PSurfaceNone.java similarity index 98% rename from core/src/processing/core/PSurfaceNone.java rename to libs/processing-core/src/main/java/processing/core/PSurfaceNone.java index d6b3ebc70..5858ed1f7 100644 --- a/core/src/processing/core/PSurfaceNone.java +++ b/libs/processing-core/src/main/java/processing/core/PSurfaceNone.java @@ -40,7 +40,7 @@ import android.view.ViewGroup.LayoutParams; import android.widget.LinearLayout; import android.widget.RelativeLayout; -import android.support.v4.os.ResultReceiver; +import android.os.ResultReceiver; import android.service.wallpaper.WallpaperService; import android.support.wearable.watchface.WatchFaceService; @@ -77,7 +77,7 @@ public class PSurfaceNone implements PSurface, PConstants { protected boolean requestedThreadStart = false; protected Thread thread; protected boolean paused; - protected Object pauseObject = new Object(); + protected final Object pauseObject = new Object(); protected float frameRateTarget = 60; protected long frameRatePeriod = 1000000000L / 60L; @@ -332,8 +332,7 @@ public InputStream openFileInput(String filename) { try { return activity.openFileInput(filename); } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + System.err.println("Cannot open file " + filename); } } return null; @@ -531,7 +530,9 @@ public void run() { // not good to make this synchronized, locks things up try { Thread.sleep(sleepTime / 1000000L, (int) (sleepTime % 1000000L)); noDelays = 0; // Got some sleep, not delaying anymore - } catch (InterruptedException ex) { } + } catch (InterruptedException ex) { + System.err.println("Cannot properly set the timing for the draw animation."); + } overSleepTime = (System.nanoTime() - afterTime) - sleepTime; diff --git a/core/src/processing/core/PVector.java b/libs/processing-core/src/main/java/processing/core/PVector.java similarity index 100% rename from core/src/processing/core/PVector.java rename to libs/processing-core/src/main/java/processing/core/PVector.java diff --git a/core/src/processing/data/DoubleDict.java b/libs/processing-core/src/main/java/processing/data/DoubleDict.java similarity index 100% rename from core/src/processing/data/DoubleDict.java rename to libs/processing-core/src/main/java/processing/data/DoubleDict.java diff --git a/core/src/processing/data/DoubleList.java b/libs/processing-core/src/main/java/processing/data/DoubleList.java similarity index 100% rename from core/src/processing/data/DoubleList.java rename to libs/processing-core/src/main/java/processing/data/DoubleList.java diff --git a/core/src/processing/data/FloatDict.java b/libs/processing-core/src/main/java/processing/data/FloatDict.java similarity index 100% rename from core/src/processing/data/FloatDict.java rename to libs/processing-core/src/main/java/processing/data/FloatDict.java diff --git a/core/src/processing/data/FloatList.java b/libs/processing-core/src/main/java/processing/data/FloatList.java similarity index 100% rename from core/src/processing/data/FloatList.java rename to libs/processing-core/src/main/java/processing/data/FloatList.java diff --git a/core/src/processing/data/IntDict.java b/libs/processing-core/src/main/java/processing/data/IntDict.java similarity index 100% rename from core/src/processing/data/IntDict.java rename to libs/processing-core/src/main/java/processing/data/IntDict.java diff --git a/core/src/processing/data/IntList.java b/libs/processing-core/src/main/java/processing/data/IntList.java similarity index 100% rename from core/src/processing/data/IntList.java rename to libs/processing-core/src/main/java/processing/data/IntList.java diff --git a/core/src/processing/data/JSONArray.java b/libs/processing-core/src/main/java/processing/data/JSONArray.java similarity index 100% rename from core/src/processing/data/JSONArray.java rename to libs/processing-core/src/main/java/processing/data/JSONArray.java diff --git a/core/src/processing/data/JSONObject.java b/libs/processing-core/src/main/java/processing/data/JSONObject.java similarity index 100% rename from core/src/processing/data/JSONObject.java rename to libs/processing-core/src/main/java/processing/data/JSONObject.java diff --git a/core/src/processing/data/JSONTokener.java b/libs/processing-core/src/main/java/processing/data/JSONTokener.java similarity index 100% rename from core/src/processing/data/JSONTokener.java rename to libs/processing-core/src/main/java/processing/data/JSONTokener.java diff --git a/core/src/processing/data/LongDict.java b/libs/processing-core/src/main/java/processing/data/LongDict.java similarity index 100% rename from core/src/processing/data/LongDict.java rename to libs/processing-core/src/main/java/processing/data/LongDict.java diff --git a/core/src/processing/data/LongList.java b/libs/processing-core/src/main/java/processing/data/LongList.java similarity index 100% rename from core/src/processing/data/LongList.java rename to libs/processing-core/src/main/java/processing/data/LongList.java diff --git a/core/src/processing/data/Sort.java b/libs/processing-core/src/main/java/processing/data/Sort.java similarity index 100% rename from core/src/processing/data/Sort.java rename to libs/processing-core/src/main/java/processing/data/Sort.java diff --git a/core/src/processing/data/StringDict.java b/libs/processing-core/src/main/java/processing/data/StringDict.java similarity index 100% rename from core/src/processing/data/StringDict.java rename to libs/processing-core/src/main/java/processing/data/StringDict.java diff --git a/core/src/processing/data/StringList.java b/libs/processing-core/src/main/java/processing/data/StringList.java similarity index 100% rename from core/src/processing/data/StringList.java rename to libs/processing-core/src/main/java/processing/data/StringList.java diff --git a/core/src/processing/data/Table.java b/libs/processing-core/src/main/java/processing/data/Table.java similarity index 100% rename from core/src/processing/data/Table.java rename to libs/processing-core/src/main/java/processing/data/Table.java diff --git a/core/src/processing/data/TableRow.java b/libs/processing-core/src/main/java/processing/data/TableRow.java similarity index 100% rename from core/src/processing/data/TableRow.java rename to libs/processing-core/src/main/java/processing/data/TableRow.java diff --git a/core/src/processing/data/XML.java b/libs/processing-core/src/main/java/processing/data/XML.java similarity index 100% rename from core/src/processing/data/XML.java rename to libs/processing-core/src/main/java/processing/data/XML.java diff --git a/core/src/processing/event/Event.java b/libs/processing-core/src/main/java/processing/event/Event.java similarity index 100% rename from core/src/processing/event/Event.java rename to libs/processing-core/src/main/java/processing/event/Event.java diff --git a/core/src/processing/event/KeyEvent.java b/libs/processing-core/src/main/java/processing/event/KeyEvent.java similarity index 100% rename from core/src/processing/event/KeyEvent.java rename to libs/processing-core/src/main/java/processing/event/KeyEvent.java diff --git a/core/src/processing/event/MouseEvent.java b/libs/processing-core/src/main/java/processing/event/MouseEvent.java similarity index 100% rename from core/src/processing/event/MouseEvent.java rename to libs/processing-core/src/main/java/processing/event/MouseEvent.java diff --git a/core/src/processing/event/TouchEvent.java b/libs/processing-core/src/main/java/processing/event/TouchEvent.java similarity index 100% rename from core/src/processing/event/TouchEvent.java rename to libs/processing-core/src/main/java/processing/event/TouchEvent.java diff --git a/core/src/processing/opengl/FontTexture.java b/libs/processing-core/src/main/java/processing/opengl/FontTexture.java similarity index 100% rename from core/src/processing/opengl/FontTexture.java rename to libs/processing-core/src/main/java/processing/opengl/FontTexture.java diff --git a/core/src/processing/opengl/FrameBuffer.java b/libs/processing-core/src/main/java/processing/opengl/FrameBuffer.java similarity index 100% rename from core/src/processing/opengl/FrameBuffer.java rename to libs/processing-core/src/main/java/processing/opengl/FrameBuffer.java diff --git a/core/src/processing/opengl/LinePath.java b/libs/processing-core/src/main/java/processing/opengl/LinePath.java similarity index 100% rename from core/src/processing/opengl/LinePath.java rename to libs/processing-core/src/main/java/processing/opengl/LinePath.java diff --git a/core/src/processing/opengl/LineStroker.java b/libs/processing-core/src/main/java/processing/opengl/LineStroker.java similarity index 100% rename from core/src/processing/opengl/LineStroker.java rename to libs/processing-core/src/main/java/processing/opengl/LineStroker.java diff --git a/core/src/processing/opengl/PGL.java b/libs/processing-core/src/main/java/processing/opengl/PGL.java similarity index 100% rename from core/src/processing/opengl/PGL.java rename to libs/processing-core/src/main/java/processing/opengl/PGL.java diff --git a/core/src/processing/opengl/PGLES.java b/libs/processing-core/src/main/java/processing/opengl/PGLES.java similarity index 100% rename from core/src/processing/opengl/PGLES.java rename to libs/processing-core/src/main/java/processing/opengl/PGLES.java diff --git a/core/src/processing/opengl/PGraphics2D.java b/libs/processing-core/src/main/java/processing/opengl/PGraphics2D.java similarity index 100% rename from core/src/processing/opengl/PGraphics2D.java rename to libs/processing-core/src/main/java/processing/opengl/PGraphics2D.java diff --git a/core/src/processing/opengl/PGraphics2DX.java b/libs/processing-core/src/main/java/processing/opengl/PGraphics2DX.java similarity index 100% rename from core/src/processing/opengl/PGraphics2DX.java rename to libs/processing-core/src/main/java/processing/opengl/PGraphics2DX.java diff --git a/core/src/processing/opengl/PGraphics3D.java b/libs/processing-core/src/main/java/processing/opengl/PGraphics3D.java similarity index 100% rename from core/src/processing/opengl/PGraphics3D.java rename to libs/processing-core/src/main/java/processing/opengl/PGraphics3D.java diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/libs/processing-core/src/main/java/processing/opengl/PGraphicsOpenGL.java similarity index 100% rename from core/src/processing/opengl/PGraphicsOpenGL.java rename to libs/processing-core/src/main/java/processing/opengl/PGraphicsOpenGL.java diff --git a/core/src/processing/opengl/PShader.java b/libs/processing-core/src/main/java/processing/opengl/PShader.java similarity index 100% rename from core/src/processing/opengl/PShader.java rename to libs/processing-core/src/main/java/processing/opengl/PShader.java diff --git a/core/src/processing/opengl/PShapeOpenGL.java b/libs/processing-core/src/main/java/processing/opengl/PShapeOpenGL.java similarity index 100% rename from core/src/processing/opengl/PShapeOpenGL.java rename to libs/processing-core/src/main/java/processing/opengl/PShapeOpenGL.java diff --git a/core/src/processing/opengl/PSurfaceGLES.java b/libs/processing-core/src/main/java/processing/opengl/PSurfaceGLES.java similarity index 100% rename from core/src/processing/opengl/PSurfaceGLES.java rename to libs/processing-core/src/main/java/processing/opengl/PSurfaceGLES.java diff --git a/core/src/processing/opengl/Texture.java b/libs/processing-core/src/main/java/processing/opengl/Texture.java similarity index 100% rename from core/src/processing/opengl/Texture.java rename to libs/processing-core/src/main/java/processing/opengl/Texture.java diff --git a/core/src/processing/opengl/VertexBuffer.java b/libs/processing-core/src/main/java/processing/opengl/VertexBuffer.java similarity index 100% rename from core/src/processing/opengl/VertexBuffer.java rename to libs/processing-core/src/main/java/processing/opengl/VertexBuffer.java diff --git a/core/src/processing/opengl/tess/ActiveRegion.java b/libs/processing-core/src/main/java/processing/opengl/tess/ActiveRegion.java similarity index 100% rename from core/src/processing/opengl/tess/ActiveRegion.java rename to libs/processing-core/src/main/java/processing/opengl/tess/ActiveRegion.java diff --git a/core/src/processing/opengl/tess/CachedVertex.java b/libs/processing-core/src/main/java/processing/opengl/tess/CachedVertex.java similarity index 100% rename from core/src/processing/opengl/tess/CachedVertex.java rename to libs/processing-core/src/main/java/processing/opengl/tess/CachedVertex.java diff --git a/core/src/processing/opengl/tess/Dict.java b/libs/processing-core/src/main/java/processing/opengl/tess/Dict.java similarity index 100% rename from core/src/processing/opengl/tess/Dict.java rename to libs/processing-core/src/main/java/processing/opengl/tess/Dict.java diff --git a/core/src/processing/opengl/tess/DictNode.java b/libs/processing-core/src/main/java/processing/opengl/tess/DictNode.java similarity index 100% rename from core/src/processing/opengl/tess/DictNode.java rename to libs/processing-core/src/main/java/processing/opengl/tess/DictNode.java diff --git a/core/src/processing/opengl/tess/GLUface.java b/libs/processing-core/src/main/java/processing/opengl/tess/GLUface.java similarity index 100% rename from core/src/processing/opengl/tess/GLUface.java rename to libs/processing-core/src/main/java/processing/opengl/tess/GLUface.java diff --git a/core/src/processing/opengl/tess/GLUhalfEdge.java b/libs/processing-core/src/main/java/processing/opengl/tess/GLUhalfEdge.java similarity index 100% rename from core/src/processing/opengl/tess/GLUhalfEdge.java rename to libs/processing-core/src/main/java/processing/opengl/tess/GLUhalfEdge.java diff --git a/core/src/processing/opengl/tess/GLUmesh.java b/libs/processing-core/src/main/java/processing/opengl/tess/GLUmesh.java similarity index 100% rename from core/src/processing/opengl/tess/GLUmesh.java rename to libs/processing-core/src/main/java/processing/opengl/tess/GLUmesh.java diff --git a/core/src/processing/opengl/tess/GLUtessellatorImpl.java b/libs/processing-core/src/main/java/processing/opengl/tess/GLUtessellatorImpl.java similarity index 100% rename from core/src/processing/opengl/tess/GLUtessellatorImpl.java rename to libs/processing-core/src/main/java/processing/opengl/tess/GLUtessellatorImpl.java diff --git a/core/src/processing/opengl/tess/GLUvertex.java b/libs/processing-core/src/main/java/processing/opengl/tess/GLUvertex.java similarity index 100% rename from core/src/processing/opengl/tess/GLUvertex.java rename to libs/processing-core/src/main/java/processing/opengl/tess/GLUvertex.java diff --git a/core/src/processing/opengl/tess/Geom.java b/libs/processing-core/src/main/java/processing/opengl/tess/Geom.java similarity index 100% rename from core/src/processing/opengl/tess/Geom.java rename to libs/processing-core/src/main/java/processing/opengl/tess/Geom.java diff --git a/core/src/processing/opengl/tess/Mesh.java b/libs/processing-core/src/main/java/processing/opengl/tess/Mesh.java similarity index 100% rename from core/src/processing/opengl/tess/Mesh.java rename to libs/processing-core/src/main/java/processing/opengl/tess/Mesh.java diff --git a/core/src/processing/opengl/tess/Normal.java b/libs/processing-core/src/main/java/processing/opengl/tess/Normal.java similarity index 100% rename from core/src/processing/opengl/tess/Normal.java rename to libs/processing-core/src/main/java/processing/opengl/tess/Normal.java diff --git a/core/src/processing/opengl/tess/PGLU.java b/libs/processing-core/src/main/java/processing/opengl/tess/PGLU.java similarity index 100% rename from core/src/processing/opengl/tess/PGLU.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PGLU.java diff --git a/core/src/processing/opengl/tess/PGLUtessellator.java b/libs/processing-core/src/main/java/processing/opengl/tess/PGLUtessellator.java similarity index 100% rename from core/src/processing/opengl/tess/PGLUtessellator.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PGLUtessellator.java diff --git a/core/src/processing/opengl/tess/PGLUtessellatorCallback.java b/libs/processing-core/src/main/java/processing/opengl/tess/PGLUtessellatorCallback.java similarity index 100% rename from core/src/processing/opengl/tess/PGLUtessellatorCallback.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PGLUtessellatorCallback.java diff --git a/core/src/processing/opengl/tess/PGLUtessellatorCallbackAdapter.java b/libs/processing-core/src/main/java/processing/opengl/tess/PGLUtessellatorCallbackAdapter.java similarity index 100% rename from core/src/processing/opengl/tess/PGLUtessellatorCallbackAdapter.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PGLUtessellatorCallbackAdapter.java diff --git a/core/src/processing/opengl/tess/PriorityQ.java b/libs/processing-core/src/main/java/processing/opengl/tess/PriorityQ.java similarity index 100% rename from core/src/processing/opengl/tess/PriorityQ.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PriorityQ.java diff --git a/core/src/processing/opengl/tess/PriorityQHeap.java b/libs/processing-core/src/main/java/processing/opengl/tess/PriorityQHeap.java similarity index 100% rename from core/src/processing/opengl/tess/PriorityQHeap.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PriorityQHeap.java diff --git a/core/src/processing/opengl/tess/PriorityQSort.java b/libs/processing-core/src/main/java/processing/opengl/tess/PriorityQSort.java similarity index 100% rename from core/src/processing/opengl/tess/PriorityQSort.java rename to libs/processing-core/src/main/java/processing/opengl/tess/PriorityQSort.java diff --git a/core/src/processing/opengl/tess/Render.java b/libs/processing-core/src/main/java/processing/opengl/tess/Render.java similarity index 100% rename from core/src/processing/opengl/tess/Render.java rename to libs/processing-core/src/main/java/processing/opengl/tess/Render.java diff --git a/core/src/processing/opengl/tess/Sweep.java b/libs/processing-core/src/main/java/processing/opengl/tess/Sweep.java similarity index 100% rename from core/src/processing/opengl/tess/Sweep.java rename to libs/processing-core/src/main/java/processing/opengl/tess/Sweep.java diff --git a/core/src/processing/opengl/tess/TessMono.java b/libs/processing-core/src/main/java/processing/opengl/tess/TessMono.java similarity index 100% rename from core/src/processing/opengl/tess/TessMono.java rename to libs/processing-core/src/main/java/processing/opengl/tess/TessMono.java diff --git a/core/src/processing/opengl/tess/TessState.java b/libs/processing-core/src/main/java/processing/opengl/tess/TessState.java similarity index 100% rename from core/src/processing/opengl/tess/TessState.java rename to libs/processing-core/src/main/java/processing/opengl/tess/TessState.java diff --git a/debug/libs/processing-vr/build.gradle b/libs/processing-vr/build.gradle similarity index 62% rename from debug/libs/processing-vr/build.gradle rename to libs/processing-vr/build.gradle index 82ef75198..06328948e 100644 --- a/debug/libs/processing-vr/build.gradle +++ b/libs/processing-vr/build.gradle @@ -1,17 +1,15 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' +} android { - compileSdkVersion 33 + namespace "processing.vr" + defaultConfig { minSdkVersion 19 targetSdkVersion 33 } - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['../../../mode/libraries/vr/src'] - } - } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/libs/processing-vr/proguard-rules.pro b/libs/processing-vr/proguard-rules.pro new file mode 100644 index 000000000..f1b424510 --- /dev/null +++ b/libs/processing-vr/proguard-rules.pro @@ -0,0 +1,21 @@ +# 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 + +# 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 diff --git a/libs/processing-vr/src/main/AndroidManifest.xml b/libs/processing-vr/src/main/AndroidManifest.xml new file mode 100755 index 000000000..97330b776 --- /dev/null +++ b/libs/processing-vr/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mode/libraries/vr/src/processing/vr/VRActivity.java b/libs/processing-vr/src/main/java/processing/vr/VRActivity.java similarity index 94% rename from mode/libraries/vr/src/processing/vr/VRActivity.java rename to libs/processing-vr/src/main/java/processing/vr/VRActivity.java index d3433bfba..28e199585 100644 --- a/mode/libraries/vr/src/processing/vr/VRActivity.java +++ b/libs/processing-vr/src/main/java/processing/vr/VRActivity.java @@ -22,10 +22,13 @@ package processing.vr; -import com.google.vr.sdk.base.GvrActivity; - import android.content.Intent; import android.util.DisplayMetrics; + +// This will give a "Cannot resolve symbol 'base'" error in Android Studio because it cannot get +// the classes from inside the local .aar files for google-vr. But any VR app runs and can also be debugged. +import com.google.vr.sdk.base.GvrActivity; + import processing.android.AppComponent; import processing.android.ServiceEngine; import processing.core.PApplet; diff --git a/mode/libraries/vr/src/processing/vr/VRCamera.java b/libs/processing-vr/src/main/java/processing/vr/VRCamera.java similarity index 100% rename from mode/libraries/vr/src/processing/vr/VRCamera.java rename to libs/processing-vr/src/main/java/processing/vr/VRCamera.java diff --git a/mode/libraries/vr/src/processing/vr/VRGraphics.java b/libs/processing-vr/src/main/java/processing/vr/VRGraphics.java similarity index 100% rename from mode/libraries/vr/src/processing/vr/VRGraphics.java rename to libs/processing-vr/src/main/java/processing/vr/VRGraphics.java diff --git a/mode/libraries/vr/src/processing/vr/VRGraphicsMono.java b/libs/processing-vr/src/main/java/processing/vr/VRGraphicsMono.java similarity index 100% rename from mode/libraries/vr/src/processing/vr/VRGraphicsMono.java rename to libs/processing-vr/src/main/java/processing/vr/VRGraphicsMono.java diff --git a/mode/libraries/vr/src/processing/vr/VRGraphicsStereo.java b/libs/processing-vr/src/main/java/processing/vr/VRGraphicsStereo.java similarity index 100% rename from mode/libraries/vr/src/processing/vr/VRGraphicsStereo.java rename to libs/processing-vr/src/main/java/processing/vr/VRGraphicsStereo.java diff --git a/mode/libraries/vr/src/processing/vr/VRSurface.java b/libs/processing-vr/src/main/java/processing/vr/VRSurface.java similarity index 100% rename from mode/libraries/vr/src/processing/vr/VRSurface.java rename to libs/processing-vr/src/main/java/processing/vr/VRSurface.java diff --git a/mode/build.gradle b/mode/build.gradle deleted file mode 100644 index fefd9c866..000000000 --- a/mode/build.gradle +++ /dev/null @@ -1,106 +0,0 @@ -import java.nio.file.Files -import org.zeroturnaround.zip.ZipUtil -import org.apache.commons.io.FileUtils -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; - - -// Extend compile to copy the jars from gradle-tooling and slf4j: -// https://stackoverflow.com/a/43602463 -configurations { - implementation.extendsFrom implementationCopy - implementation.extendsFrom implementationExtract -} - -dependencies { - // implementation group: "org.processing", name: "core", version: "${processingVersion}" - // implementation group: "org.processing", name: "pde", version: "${processingVersion}" - // implementation group: "org.processing", name: "java-mode", version: "${processingVersion}" - - implementationExtract "org.eclipse.jdt:org.eclipse.jdt.debug:${jdtVersion}" - - implementationCopy "org.gradle:gradle-tooling-api:${toolingVersion}" - implementationCopy "org.slf4j:slf4j-api:${slf4jVersion}" - implementationCopy "org.slf4j:slf4j-simple:${slf4jVersion}" - - implementation fileTree(include: ["jdi.jar", "jdimodel.jar", "core.jar", "pde.jar", "JavaMode.jar"], dir: 'mode') -} - -// This task copies the gradle tooling jar into the mode folder -task copyToLib(type: Copy) { - from configurations.implementationCopy.files - into "mode" -} -build.dependsOn(copyToLib) -compileJava.dependsOn(copyToLib) - -sourceSets { - main { - java { - srcDirs = ["src/"] - } - } -} - -task getjdi(type: Copy) { - // This task extracts the jar files inside org.eclipse.jdt.debug, which are - // jdi.jar and jdimodel.jar and needed to build the debugger. - from(zipTree(configurations.implementationExtract.files[0])) { - include '**/*.jar' - exclude 'META-INF' - } - into "mode" -} - -task permissions(type:Exec) { - // This task retrieves the latest list of Android permissions and adds them - // to the Permissions.java file. The python scripts requries BeautifulSoup - workingDir "scripts" - commandLine "python", "permissions.py" -} - -task wrapper(type: Wrapper) { - gradleVersion = "${gradlewVersion}" // version required for gradle wrapper -} - -wrapper.doLast { - File wrapperFolder = file("mode/gradlew"); - wrapperFolder.mkdirs(); - file("gradle").renameTo(file("mode/gradlew/gradle")) - file("gradlew").renameTo(file("mode/gradlew/gradlew")) - file("gradlew.bat").renameTo(file("mode/gradlew/gradlew.bat")) - FileUtils.copyDirectory(file("gradle"), file("../debug/gradle")) - delete "gradle" - ZipUtil.pack(file("mode/gradlew"), new File("mode/mode/gradlew.zip")); - delete "mode/gradlew" -} - -clean.doFirst { - delete fileTree("mode") { - include "**/*.jar" - exclude "jdi.jar" - exclude "jdimodel.jar" - exclude "istack-commons-runtime.jar" - exclude "javax.activation-api.jar" - exclude "jaxb-api.jar" - exclude "jaxb-jxc.jar" - exclude "jaxb-runtime.jar" - exclude "jaxb-xjc.jar" - exclude "core.jar" - exclude "pde.jar" - exclude "JavaMode.jar" - exclude "org.eclipse.core.contenttype.jar" - exclude "org.eclipse.core.jobs.jar" - exclude "org.eclipse.core.resources.jar" - exclude "org.eclipse.core.runtime.jar" - exclude "org.eclipse.equinox.common.jar" - exclude "org.eclipse.equinox.preferences.jar" - exclude "org.eclipse.jdt.core.jar" - exclude "org.eclipse.osgi.jar" - exclude "org.eclipse.text.jar" - } -} - -build.doLast { - Files.copy(file("$buildDir/libs/mode.jar").toPath(), - file("mode/AndroidMode.jar").toPath(), REPLACE_EXISTING); -} diff --git a/mode/icons/launcher_144.png b/mode/icons/launcher_144.png deleted file mode 100644 index ebc41bc8d..000000000 Binary files a/mode/icons/launcher_144.png and /dev/null differ diff --git a/mode/icons/launcher_192.png b/mode/icons/launcher_192.png deleted file mode 100644 index 40932779b..000000000 Binary files a/mode/icons/launcher_192.png and /dev/null differ diff --git a/mode/icons/launcher_36.png b/mode/icons/launcher_36.png deleted file mode 100644 index 4412d4f69..000000000 Binary files a/mode/icons/launcher_36.png and /dev/null differ diff --git a/mode/icons/launcher_48.png b/mode/icons/launcher_48.png deleted file mode 100644 index 0359b7c88..000000000 Binary files a/mode/icons/launcher_48.png and /dev/null differ diff --git a/mode/icons/launcher_72.png b/mode/icons/launcher_72.png deleted file mode 100644 index 8f19510ff..000000000 Binary files a/mode/icons/launcher_72.png and /dev/null differ diff --git a/mode/icons/launcher_96.png b/mode/icons/launcher_96.png deleted file mode 100644 index c9016cf0c..000000000 Binary files a/mode/icons/launcher_96.png and /dev/null differ diff --git a/mode/icons/preview_circular.png b/mode/icons/preview_circular.png deleted file mode 100644 index 940afd811..000000000 Binary files a/mode/icons/preview_circular.png and /dev/null differ diff --git a/mode/icons/preview_rectangular.png b/mode/icons/preview_rectangular.png deleted file mode 100644 index 277a466e4..000000000 Binary files a/mode/icons/preview_rectangular.png and /dev/null differ diff --git a/mode/libraries/ar/build.gradle b/mode/libraries/ar/build.gradle deleted file mode 100644 index bbc2c2a72..000000000 --- a/mode/libraries/ar/build.gradle +++ /dev/null @@ -1,97 +0,0 @@ -import java.nio.file.Files -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; - -plugins { - id 'aar' -} - -dependencies { - compileOnly name: "android" - compileOnly "org.p5android:processing-core:${modeVersion}" - implementationAar "com.google.ar:core:${garVersion}" -} - -task sourceJar(type: Jar) { - from sourceSets.main.allJava - archiveClassifier = "sources" -} - -sourceSets { - main { - java { - srcDirs = ["src/"] - } - resources { - srcDirs = ["src/"] - } - } -} - -// Does not work because of Processing-specific tags in source code, such as @webref -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = "javadoc" - from javadoc.destinationDir -} - -artifacts { -// archives javadocJar - archives sourceJar -} - -jar.doLast { task -> - ant.checksum file: task.archivePath -} - -clean.doFirst { - delete "dist" - delete "library/ar.jar" -} - -compileJava.doFirst { - String[] deps = ["core.jar"] - File libFolder = file("library") - libFolder.mkdirs() - for (String fn : deps) { - Files.copy(file("${rootDir}/build/libs/" + fn).toPath(), - file("library/" + fn).toPath(), REPLACE_EXISTING); - } -} - -build.doLast { - // Copying ar jar to library folder - File arJar = file("library/ar.jar") - arJar.mkdirs(); - - // Need to check the existance of the files before using as the files - // will get generated only if Task ':mode:libraries:ar:jar' is not being skipped - // Task ':mode:libraries:ar:jar' will be skipped if source files are unchanged or jar task is UP-TO-DATE - - if (file("$buildDir/libs/ar.jar").exists()) { - Files.copy(file("$buildDir/libs/ar.jar").toPath(), - arJar.toPath(), REPLACE_EXISTING); - } - // Renaming artifacts for maven publishing - if (file("$buildDir/libs/ar.jar").exists()) { - Files.move(file("$buildDir/libs/ar.jar").toPath(), - file("$buildDir/libs/processing-ar-${arLibVersion}.jar").toPath(), REPLACE_EXISTING); - } - if (file("$buildDir/libs/ar-sources.jar").exists()) { - Files.move(file("$buildDir/libs/ar-sources.jar").toPath(), - file("$buildDir/libs/processing-ar-${arLibVersion}-sources.jar").toPath(), REPLACE_EXISTING); - } - if (file("$buildDir/libs/ar.jar.MD5").exists()) { - Files.move(file("$buildDir/libs/ar.jar.MD5").toPath(), - file("$buildDir/libs/processing-ar-${arLibVersion}.jar.md5").toPath(), REPLACE_EXISTING); - } -} - -ext { - libName = 'processing-ar' - libVersion = arLibVersion - libJar = "${buildDir}/libs/${libName}-${libVersion}.jar" - libSrc = "${buildDir}/libs/${libName}-${libVersion}-sources.jar" - libMd5 = "${buildDir}/libs/${libName}-${libVersion}-sources.jar.md5" - libDependencies = [[group: 'org.p5android', name: 'processing-core', version: modeVersion], - [group: 'com.google.ar', name: 'core', version: garVersion]] -} -apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" diff --git a/mode/libraries/vr/build.gradle b/mode/libraries/vr/build.gradle deleted file mode 100644 index 55a20e0ae..000000000 --- a/mode/libraries/vr/build.gradle +++ /dev/null @@ -1,103 +0,0 @@ -import java.nio.file.Files -import static java.nio.file.StandardCopyOption.REPLACE_EXISTING - -plugins { - id 'aar' -} - -dependencies { - compileOnly name: "android" - compileOnly "org.p5android:processing-core:${modeVersion}" - -// commenting due to issue #718 -// implementationAar "com.google.vr:sdk-audio:${gvrVersion}" -// implementationAar "com.google.vr:sdk-base:${gvrVersion}" - -// fix for Issue #718 - implementationAar fileTree(dir: "libs", include: ["*.aar"]) -} - -task sourceJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource -} - -sourceSets { - main { - java { - srcDirs = ["src/"] - } - } -} - -// Does not work because of Processing-specific tags in source code, such as @webref -task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = "javadoc" - from javadoc.destinationDir -} - -artifacts { -// archives javadocJar - archives sourceJar -} - -jar.doLast { task -> - ant.checksum file: task.archivePath -} - -clean.doFirst { - delete "dist" - delete "library/vr.jar" -} - -compileJava.doFirst { - String[] deps = ["sdk-audio.jar", - "sdk-base.jar", - "sdk-common.jar"] - File libFolder = file("library") - libFolder.mkdirs() - for (String fn : deps) { - Files.copy(file("${rootDir}/build/libs/" + fn).toPath(), - file("library/" + fn).toPath(), REPLACE_EXISTING); - } -} - -build.doLast { - // Copying vr jar to library folder - File vrJar = file("library/vr.jar") - vrJar.mkdirs(); - - // Need to check the existance of the files before using as the files - // will get generated only if Task ':mode:libraries:vr:jar' is not being skipped - // Task ':mode:libraries:vr:jar' will be skipped if source files are unchanged or jar task is UP-TO-DATE - - if (file("$buildDir/libs/vr.jar").exists()) { - Files.copy(file("$buildDir/libs/vr.jar").toPath(), - vrJar.toPath(), REPLACE_EXISTING); - } - // Renaming artifacts for maven publishing - if (file("$buildDir/libs/vr.jar").exists()) { - Files.move(file("$buildDir/libs/vr.jar").toPath(), - file("$buildDir/libs/processing-vr-${vrLibVersion}.jar").toPath(), REPLACE_EXISTING); - } - if (file("$buildDir/libs/vr-sources.jar").exists()) { - Files.move(file("$buildDir/libs/vr-sources.jar").toPath(), - file("$buildDir/libs/processing-vr-${vrLibVersion}-sources.jar").toPath(), REPLACE_EXISTING); - } - if (file("$buildDir/libs/vr.jar.MD5").exists()) { - Files.move(file("$buildDir/libs/vr.jar.MD5").toPath(), - file("$buildDir/libs/processing-vr-${vrLibVersion}.jar.md5").toPath(), REPLACE_EXISTING); - } -} - -ext { - libName = 'processing-vr' - libVersion = vrLibVersion - libJar = "${buildDir}/libs/${libName}-${libVersion}.jar" - libSrc = "${buildDir}/libs/${libName}-${libVersion}-sources.jar" - libMd5 = "${buildDir}/libs/${libName}-${libVersion}-sources.jar.md5" - libDependencies = [[group: 'org.p5android', name: 'processing-core', version: modeVersion], - [group: 'com.google.vr', name: 'sdk-base', version: gvrVersion], - [group: 'com.google.vr', name: 'sdk-audio', version: gvrVersion]] -} -apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" diff --git a/mode/libraries/vr/libs/sdk-audio-1.180.0.aar b/mode/libraries/vr/libs/sdk-audio-1.180.0.aar deleted file mode 100644 index 007485cf4..000000000 Binary files a/mode/libraries/vr/libs/sdk-audio-1.180.0.aar and /dev/null differ diff --git a/mode/libraries/vr/libs/sdk-base-1.180.0.aar b/mode/libraries/vr/libs/sdk-base-1.180.0.aar deleted file mode 100644 index e9047d226..000000000 Binary files a/mode/libraries/vr/libs/sdk-base-1.180.0.aar and /dev/null differ diff --git a/mode/libraries/vr/libs/sdk-common-1.180.0.aar b/mode/libraries/vr/libs/sdk-common-1.180.0.aar deleted file mode 100644 index 7ba5cff92..000000000 Binary files a/mode/libraries/vr/libs/sdk-common-1.180.0.aar and /dev/null differ diff --git a/mode/mode/gradlew.zip b/mode/mode/gradlew.zip deleted file mode 100644 index e782e5b17..000000000 Binary files a/mode/mode/gradlew.zip and /dev/null differ diff --git a/mode/templates/VRActivity.java.tmpl b/mode/templates/VRActivity.java.tmpl deleted file mode 100644 index 304996a34..000000000 --- a/mode/templates/VRActivity.java.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -package @@package_name@@; - -import android.os.Bundle; - -import processing.vr.VRActivity; -import processing.core.PApplet; - -public class MainActivity extends VRActivity { - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - PApplet sketch = new @@sketch_class_name@@(); - @@external@@ - setSketch(sketch); - } -} \ No newline at end of file diff --git a/processing/.gitignore b/processing/.gitignore new file mode 100644 index 000000000..9c6eb9d40 --- /dev/null +++ b/processing/.gitignore @@ -0,0 +1,14 @@ +mode/processing-core.zip +mode/mode/AndroidMode.jar +mode/mode/gradle-tooling-api* +mode/mode/slf4j* + +mode/mode/percent.jar +mode/mode/recyclerview-v7.jar +mode/mode/support-* +mode/mode/wearable.jar + +mode/libraries/vr/library +mode/libraries/ar/library +mode/tools/SDKUpdater/tool +mode/tools/SDKUpdater/lib diff --git a/processing/README.md b/processing/README.md new file mode 100644 index 000000000..743c8422c --- /dev/null +++ b/processing/README.md @@ -0,0 +1,6 @@ +Processing for Android +====================== + +This is the main repository for Processing for Android. It includes the core library inside the core folder, and the mode itself in the root. See the [wiki](https://github.com/processing/processing-android/wiki) for build instructions. + + diff --git a/processing/build.gradle b/processing/build.gradle new file mode 100644 index 000000000..9823664a5 --- /dev/null +++ b/processing/build.gradle @@ -0,0 +1,175 @@ +import java.nio.file.Files +import org.zeroturnaround.zip.ZipUtil +import org.apache.commons.io.FileUtils +import java.util.regex.Pattern +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; + +buildscript { + repositories { + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.3.1' + classpath group: 'commons-io', name: 'commons-io', version: '2.12.0' + classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.15' + } +} + +plugins { + id 'java' + id('io.github.gradle-nexus.publish-plugin') version '1.1.0' +} + +apply from: "${rootDir}/scripts/publish-root.gradle" + +allprojects { + apply plugin: 'java' + apply plugin: 'java-library' + + Properties versions = new Properties() + versions.load(project.rootProject.file("mode/version.properties").newDataInputStream()) + ext.targetSdkVersion = versions.getProperty("android-platform") + ext.appcompatVersion = versions.getProperty("androidx.appcompat%appcompat") + ext.v4legacyVersion = versions.getProperty("androidx.legacy%legacy-support-v4") + ext.wearVersion = versions.getProperty("com.google.android.support%wearable") + ext.gvrVersion = versions.getProperty("com.google.vr") + ext.garVersion = versions.getProperty("com.google.ar") + ext.processingVersion = versions.getProperty("org.processing") + ext.toolingVersion = versions.getProperty("org.gradle%gradle-tooling-api") + ext.slf4jVersion = versions.getProperty("org.slf4j") + ext.gradlewVersion = versions.getProperty("gradle-wrapper") + ext.toolsLibVersion = versions.getProperty("android-toolslib") + ext.jdtVersion = versions.getProperty("org.eclipse.jdt") + + Properties modeProperties = new Properties() + modeProperties.load(project.rootProject.file("mode/mode.properties").newDataInputStream()) + ext.modeVersion = modeProperties.getProperty("prettyVersion") + + Properties vrProperties = new Properties() + vrProperties.load(project.rootProject.file("mode/libraries/vr/library.properties").newDataInputStream()) + ext.vrLibVersion = vrProperties.getProperty("prettyVersion") + + Properties arProperties = new Properties() + arProperties.load(project.rootProject.file("mode/libraries/ar/library.properties").newDataInputStream()) + ext.arLibVersion = arProperties.getProperty("prettyVersion") + + + def fn = project.rootProject.file("local.properties") + if (!fn.exists()) { + if (System.env["ANDROID_SDK"] != null) { + def syspath = System.env["ANDROID_SDK"] + def parts = syspath.split(Pattern.quote(File.separator)) + def path = String.join("/", parts) + fn.withWriterAppend { w -> + w << "sdk.dir=${path}\n" + } + } else { + throw new GradleException( + "The file local.properties does not exist, and there is no ANDROID_SDK environmental variable defined in the system.\n" + + "Define ANDROID_SDK so it points to the location of the Android SDK, or create the local.properties file manually\n" + + "and add the following line to it:\n" + + "sdk.dir=") + } + } + + + Properties localProperties = new Properties() + localProperties.load(project.rootProject.file("local.properties").newDataInputStream()) + def sdkDir = localProperties.getProperty("sdk.dir") + ext.androidPlatformPath = "${sdkDir}/platforms/android-${targetSdkVersion}" + ext.coreZipPath = "${rootDir}/mode/processing-core.zip" + + repositories { + google() + mavenCentral() + maven { url "https://maven.google.com" } + maven { url "https://jitpack.io" } + maven { url 'https://repo.gradle.org/gradle/libs-releases' } + flatDir dirs: androidPlatformPath + flatDir dirs: "${rootDir}/core/build/libs" + } + + compileJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + // Uncomment this option when building with Java 11+ + // https://github.com/processing/processing-android/issues/625 + // options.release = 8 + } +} + +clean.doFirst { + delete "dist" +} + +task dist { + dependsOn subprojects.build + doLast { + def root = "${buildDir}/zip/AndroidMode" + + // Copy assets to build dir + FileUtils.copyDirectory(file("mode/templates"), file("${root}/templates")) + FileUtils.copyDirectory(file("mode/examples"), file("${root}/examples")) + FileUtils.copyDirectory(file("mode/icons"), file("${root}/icons")) + FileUtils.copyDirectory(file("mode/theme"), file("${root}/theme")) + FileUtils.copyDirectory(file("mode/mode"), file("${root}/mode")) + delete "${root}/mode/core.jar" + delete "${root}/mode/pde.jar" + delete "${root}/mode/JavaMode.jar" + // delete "${root}/mode/jdi.jar" + // delete "${root}/mode/jdimodel.jar" + + Files.copy(file("mode/processing-core.zip").toPath(), + file("${root}/processing-core.zip").toPath(), REPLACE_EXISTING) + + Files.copy(file("mode/keywords.txt").toPath(), + file("${root}/keywords.txt").toPath(), REPLACE_EXISTING) + + Files.copy(file("mode/version.properties").toPath(), + file("${root}/version.properties").toPath(), REPLACE_EXISTING) + + Files.copy(file("mode/mode.properties").toPath(), + file("${root}/mode.properties").toPath(), REPLACE_EXISTING) + + FileUtils.copyDirectory(file("mode/languages"), + file("${root}/languages")) + + FileUtils.copyDirectory(file("mode/resources"), + file("${root}/resources")) + + FileUtils.copyDirectory(file("mode/tools/SDKUpdater/tool"), + file("${root}/tools/SDKUpdater/tool")) + FileUtils.copyDirectory(file("mode/tools/SDKUpdater/lib"), + file("${root}/tools/SDKUpdater/lib")) + FileUtils.copyDirectory(file("mode/tools/SDKUpdater/src"), + file("${root}/tools/SDKUpdater/src")) + + FileUtils.copyDirectory(file("mode/libraries/vr/examples"), + file("${root}/libraries/vr/examples")) + FileUtils.copyDirectory(file("mode/libraries/vr/library"), + file("${root}/libraries/vr/library")) + FileUtils.copyDirectory(file("mode/libraries/vr/libs"), + file("${root}/libraries/vr/libs")) + FileUtils.copyDirectory(file("../libs/processing-vr/src/main/java/"), + file("${root}/libraries/vr/src")) + Files.copy(file("mode/libraries/vr/library.properties").toPath(), + file("${root}/libraries/vr/library.properties").toPath(), REPLACE_EXISTING) + + FileUtils.copyDirectory(file("mode/libraries/ar/examples"), + file("${root}/libraries/ar/examples")) + FileUtils.copyDirectory(file("mode/libraries/ar/library"), + file("${root}/libraries/ar/library")) + FileUtils.copyDirectory(file("../libs/processing-ar/src/main/java/"), + file("${root}/libraries/ar/src")) + Files.copy(file("mode/libraries/ar/library.properties").toPath(), + file("${root}/libraries/ar/library.properties").toPath(), REPLACE_EXISTING) + + File distFolder = file("dist") + distFolder.mkdirs() + ZipUtil.pack(file("${buildDir}/zip"), new File("dist/AndroidMode.zip")) + Files.copy(file("mode/mode.properties").toPath(), + file("dist/AndroidMode.txt").toPath(), REPLACE_EXISTING) + } +} diff --git a/buildSrc/build.gradle b/processing/buildSrc/build.gradle similarity index 53% rename from buildSrc/build.gradle rename to processing/buildSrc/build.gradle index a95a3cb68..e6ffdbeb9 100644 --- a/buildSrc/build.gradle +++ b/processing/buildSrc/build.gradle @@ -11,5 +11,7 @@ repositories { dependencies { implementation gradleApi() implementation localGroovy() - implementation 'com.android.tools.build:gradle:4.1.1' + implementation 'com.android.tools.build:gradle:7.3.1' + implementation 'com.google.guava:guava:32.0.0-jre' + implementation 'com.android.tools:common:25.3.0' } \ No newline at end of file diff --git a/processing/buildSrc/src/main/groovy/ImportAar.groovy b/processing/buildSrc/src/main/groovy/ImportAar.groovy new file mode 100644 index 000000000..fc20588f1 --- /dev/null +++ b/processing/buildSrc/src/main/groovy/ImportAar.groovy @@ -0,0 +1,237 @@ +// import org.gradle.api.Plugin +// import org.gradle.api.Project +// import org.gradle.api.artifacts.Configuration +// import org.gradle.api.artifacts.transform.TransformAction +// import org.gradle.api.artifacts.transform.TransformParameters +// import org.gradle.api.artifacts.transform.InputArtifact +// import org.gradle.api.artifacts.transform.TransformOutputs +// import org.gradle.api.file.FileSystemLocation +// import org.gradle.api.provider.Provider +// import org.gradle.api.tasks.PathSensitive +// import org.gradle.api.tasks.PathSensitivity + +// import org.gradle.api.attributes.LibraryElements +// import org.gradle.api.attributes.Usage +// import org.gradle.api.attributes.Category + +// import com.android.build.gradle.internal.dependency.AarTransform +// import com.android.build.gradle.internal.dependency.ExtractAarTransform +// import com.android.build.gradle.internal.publishing.AndroidArtifacts +// import com.android.builder.aar.AarExtractor +// import com.google.common.collect.ImmutableList + +// import java.nio.file.Files +// import static java.nio.file.StandardCopyOption.REPLACE_EXISTING + + +// import org.gradle.api.Plugin +// import org.gradle.api.Project +// import org.gradle.api.artifacts.Configuration +// import org.gradle.api.artifacts.ResolvedArtifact +// import java.util.zip.ZipFile + +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.tasks.TaskAction +import java.util.zip.ZipFile + +/** + * Build Gradle plgin needed to use aar files as dependencies in a pure java library project. + * Adapted from the following plugin by nekocode + * https://github.com/nekocode/Gradle-Import-Aar + * Ported to Groovy, and made specific to the needs of the Android mode build process (i.e.: this plugin + * is not meant to be used with other projects). + * Ported to Gradle 8 replacing the deprecated ArtifactTransform with the new TransformAction API. + */ +class ImportAar implements Plugin { + final String CONFIG_NAME_POSTFIX = "Aar" + + @Override + void apply(Project project) { + // def aar = AndroidArtifacts.TYPE_AAR + // def jar = AndroidArtifacts.TYPE_JAR + + println ">>> Calling ImportAar" + + // Create a custom resolvable configuration + project.configurations.create('aarExtractorResolvable') { + canBeResolved = true + canBeConsumed = false + extendsFrom project.configurations.implementation + } + + project.tasks.register('extractAarJars', ExtractAarJarsTask) { + group = 'build' + description = 'Extracts JAR files from AAR dependencies and places them in build/libs.' + } + + + // project.task('extractAarJars') { + // doLast { + // println "=======> Calling extractAarJars task" + + // project.configurations.each { Configuration config -> + // config.resolvedConfiguration.resolvedArtifacts.each { ResolvedArtifact artifact -> + // println "Resolved artifact: ${artifact}" + // if (artifact.type == 'aar') { + // extractJarFromAar(artifact, project) + // } + // } + // } + // } + // } + + + +/* + // Create AAR configurations + Collection allConfigs = project.getConfigurations().toList() + for (Configuration config: allConfigs) { + println config + Configuration aarConfig = project.configurations.maybeCreate(config.name + CONFIG_NAME_POSTFIX) + println aarConfig + + // Add extracted jars to original configuration after project evaluating + aarConfig.attributes { + attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements, LibraryElements.JAR)) + attribute(Usage.USAGE_ATTRIBUTE, project.objects.named(Usage, Usage.JAVA_RUNTIME)) + attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category, Category.LIBRARY)) + } + + project.afterEvaluate { + println "-> In afterEvaluate" + aarConfig.resolvedConfiguration.resolvedArtifacts.each { artifact -> + File jarFile = artifact.file + print "================================================> FILE " + println jarFile + println jarFile.getName() + + // Add jar file to classpath + project.sourceSets.main.compileClasspath += project.files(jarFile) + + File libraryFolder = new File(project.buildDir, "libs") + libraryFolder.mkdirs() + + // Strip version number when copying + String name = jarFile.name + int p = name.lastIndexOf("-") + String libName = name.substring(0, p) + ".jar" + File libraryJar = new File(libraryFolder, libName) + Files.copy(jarFile.toPath(), libraryJar.toPath(), REPLACE_EXISTING) + } + } + } + + // Register aar transform + project.dependencies { + registerTransform(AarToJarTransform) { + from.attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements, aar)) + to.attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements, jar)) + } + } + */ + } + + // void extractJarFromAar(ResolvedArtifact artifact, Project project) { + // println "Input AAR: ${aarFile}" + // def aarFile = artifact.file + // def zipFile = new ZipFile(aarFile) + // def entry = zipFile.getEntry('classes.jar') + // if (entry) { + // project.copy { + // from project.zipTree(aarFile) + // include 'classes.jar' + // into "${project.buildDir}/libs" + // rename { "${artifact.name}-${artifact.moduleVersion.id.version}.jar" } + // } + // } + // zipFile.close() + // } + + + // abstract static class AarToJarTransform implements TransformAction { + // AarToJarTransform() { + // println "AarToJarTransform instantiated" + // } + + // @InputArtifact + // @PathSensitive(PathSensitivity.NAME_ONLY) + // abstract Provider getInputArtifact() + + // @Override + // void transform(TransformOutputs outputs) { + // File inputFile = inputArtifact.get().asFile + // println "Input AAR: ${inputFile}" + // File explodedDir = new File(outputs.getOutputDirectory(), "exploded") + // println "Exploded Directory: ${explodedDir}" + + // AarExtractor aarExtractor = new AarExtractor() + // aarExtractor.extract(inputFile, explodedDir) + // File classesJar = new File(new File(explodedDir, "jars"), "classes.jar") + // if (classesJar.exists()) { + // println "Classes JAR found: ${classesJar}" + // String aarName = inputFile.name.replace(".aar", "") + // File renamedJar = outputs.file("${aarName}.jar") + // Files.copy(classesJar.toPath(), renamedJar.toPath(), REPLACE_EXISTING) + // println "Transformed JAR: ${renamedJar}" + // } else { + // println "Error: classes.jar not found in ${explodedDir}" + // } + // } + // } +} + + +class ExtractAarJarsTask extends org.gradle.api.DefaultTask { + @TaskAction + void extractJars() { + //File outputDir = new File(project.buildDir, 'libs') + File outputDir = new File(System.getProperty("user.dir"), "build/libs") + outputDir.mkdirs() + + // Configuration compileClasspath = project.configurations.getByName('implementation') + Configuration aarExtractorResolvable = project.configurations.getByName('aarExtractorResolvable') + + // compileClasspath.resolvedConfiguration.resolvedArtifacts.each { artifact -> + aarExtractorResolvable.resolvedConfiguration.resolvedArtifacts.each { artifact -> + if (artifact.type == 'aar') { + File aarFile = artifact.file + println "Processing AAR: ${aarFile.name}" + + // Extract the AAR file + ZipFile zipFile = new ZipFile(aarFile) + zipFile.entries().each { entry -> + if (entry.name.endsWith('.jar')) { + println "Classes JAR found: ${entry}" + String aarName = aarFile.name.replace(".aar", "") + String jarName = "${aarName}.jar".replaceFirst(/-\d+(\.\d+)*(?=\.jar$)/, '') + + File jarOutput = new File(outputDir, jarName) + jarOutput.parentFile.mkdirs() + + // Write the JAR file to the output directory + zipFile.getInputStream(entry).withCloseable { inputStream -> + jarOutput.withOutputStream { outputStream -> + copyStream(inputStream, outputStream) + } + } + println "Extracted JAR: ${jarOutput.absolutePath}" + } + } + } + } + } + + /** + * Copies data from an InputStream to an OutputStream. + */ + void copyStream(InputStream input, OutputStream output) { + byte[] buffer = new byte[1024] + int bytesRead + while ((bytesRead = input.read(buffer)) != -1) { + output.write(buffer, 0, bytesRead) + } + } +} + diff --git a/processing/buildSrc/src/main/resources/META-INF/gradle-plugins/ImportAar.properties b/processing/buildSrc/src/main/resources/META-INF/gradle-plugins/ImportAar.properties new file mode 100644 index 000000000..f41e15936 --- /dev/null +++ b/processing/buildSrc/src/main/resources/META-INF/gradle-plugins/ImportAar.properties @@ -0,0 +1 @@ +implementation-class=ImportAar \ No newline at end of file diff --git a/processing/core/build.gradle b/processing/core/build.gradle new file mode 100644 index 000000000..07a8b8b73 --- /dev/null +++ b/processing/core/build.gradle @@ -0,0 +1,110 @@ +import org.apache.tools.ant.Project +import java.nio.file.Files +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; + +plugins { + id 'ImportAar' + id 'java-library' + id 'maven-publish' +} + +dependencies { + implementation name: "android" + implementation "androidx.legacy:legacy-support-v4:${v4legacyVersion}" + implementation "com.google.android.support:wearable:${wearVersion}" +} + +sourceSets.main { + java.srcDir("../../libs/processing-core/src/main/java/") + resources.srcDir("../../libs/processing-core/src/main/") + resources.exclude("AndroidManifest.xml", "**/java/**") +} + +tasks.register('sourceJar', Jar) { + dependsOn classes + duplicatesStrategy = DuplicatesStrategy.INCLUDE + archiveClassifier.set("sources") + from sourceSets.main.allSource +} + +// Does not work because of Processing-specific tags in source code, such as @webref +tasks.register('javadocJar', Jar) { + dependsOn javadoc + archiveClassifier.set("javadoc") + from javadoc.destinationDir +} + +// project.afterEvaluate { +// tasks.named('extractAarJars').configure { +// dependsOn configurations.runtimeClasspath +// } +// } + +// project.tasks.named('build').configure { +// finalizedBy('extractAarJars') +// } + +artifacts { +// archives javadocJar + archives sourceJar +} + +jar.doLast { task -> + ant.checksum file: task.archiveFile.get().asFile +} + +tasks.named('clean').configure { + doFirst { + delete "dist" + delete "${coreZipPath}" + } +} + +tasks.named('compileJava').configure { + doFirst { + String[] deps = ["wearable.jar"] + deps.each { fn -> + Files.copy(file("${rootDir}/build/libs/${fn}").toPath(), + file("${rootDir}/mode/mode/${fn}").toPath(), REPLACE_EXISTING) + } + } +} + +tasks.named('build').configure { + doLast { + // Need to check the existance of the files before using as the files + // will get generated only if Task :core:jar is not being skipped + // Task :core:jar will be skipped if source files are unchanged or jar task is UP-TO-DATE + if (file("${buildDir}/libs/core.jar").exists()) { + // Copying core jar as zip inside the mode folder + Files.copy(file("${buildDir}/libs/core.jar").toPath(), + file("${coreZipPath}").toPath(), REPLACE_EXISTING) + } + // Renaming artifacts for maven publishing + if (file("${buildDir}/libs/core.jar").exists()) { + Files.move(file("${buildDir}/libs/core.jar").toPath(), + file("$buildDir/libs/processing-core-${modeVersion}.jar").toPath(), REPLACE_EXISTING) + } + if (file("${buildDir}/libs/core-sources.jar").exists()) { + Files.move(file("${buildDir}/libs/core-sources.jar").toPath(), + file("$buildDir/libs/processing-core-${modeVersion}-sources.jar").toPath(), REPLACE_EXISTING) + } + if (file("${buildDir}/libs/core.jar.MD5").exists()) { + Files.move(file("${buildDir}/libs/core.jar.MD5").toPath(), + file("$buildDir/libs/processing-core-${modeVersion}.jar.md5").toPath(), REPLACE_EXISTING) + } + } +} + +ext { + libName = 'processing-core' + libVersion = modeVersion + libJar = "${buildDir}/libs/${libName}-${libVersion}.jar" + libSrc = "${buildDir}/libs/${libName}-${libVersion}-sources.jar" + libMd5 = "${buildDir}/libs/${libName}-${libVersion}-sources.jar.md5" + libDependencies = [[name: 'legacy-support-v4', group: 'androidx.legacy', version: v4legacyVersion], + [name: 'wearable', group: 'com.google.android.support', version: wearVersion], + [name: 'android']] +} + +apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" diff --git a/processing/gradle.properties b/processing/gradle.properties new file mode 100644 index 000000000..5465fec0e --- /dev/null +++ b/processing/gradle.properties @@ -0,0 +1,2 @@ +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file diff --git a/debug/gradle/wrapper/gradle-wrapper.jar b/processing/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from debug/gradle/wrapper/gradle-wrapper.jar rename to processing/gradle/wrapper/gradle-wrapper.jar diff --git a/debug/gradle/wrapper/gradle-wrapper.properties b/processing/gradle/wrapper/gradle-wrapper.properties similarity index 92% rename from debug/gradle/wrapper/gradle-wrapper.properties rename to processing/gradle/wrapper/gradle-wrapper.properties index aa991fcea..d6e308a63 100644 --- a/debug/gradle/wrapper/gradle-wrapper.properties +++ b/processing/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/processing/gradlew b/processing/gradlew new file mode 100755 index 000000000..1b6c78733 --- /dev/null +++ b/processing/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/processing/gradlew.bat similarity index 100% rename from gradlew.bat rename to processing/gradlew.bat diff --git a/mode/.classpath b/processing/mode/.classpath similarity index 100% rename from mode/.classpath rename to processing/mode/.classpath diff --git a/mode/.project b/processing/mode/.project similarity index 87% rename from mode/.project rename to processing/mode/.project index a1e217daa..e89bdfe07 100644 --- a/mode/.project +++ b/processing/mode/.project @@ -22,12 +22,12 @@ - 1650246874247 + 1675640664215 30 org.eclipse.core.resources.regexFilterMatcher - node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ diff --git a/mode/.settings/org.eclipse.buildship.core.prefs b/processing/mode/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from mode/.settings/org.eclipse.buildship.core.prefs rename to processing/mode/.settings/org.eclipse.buildship.core.prefs diff --git a/mode/.settings/org.eclipse.jdt.core.prefs b/processing/mode/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from mode/.settings/org.eclipse.jdt.core.prefs rename to processing/mode/.settings/org.eclipse.jdt.core.prefs diff --git a/processing/mode/build.gradle b/processing/mode/build.gradle new file mode 100644 index 000000000..0f34a95d9 --- /dev/null +++ b/processing/mode/build.gradle @@ -0,0 +1,102 @@ +import java.nio.file.Files +import org.zeroturnaround.zip.ZipUtil +import org.apache.commons.io.FileUtils +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; + +plugins { + id 'java' +} + +// Extend compile to copy the jars from gradle-tooling and slf4j: +// https://stackoverflow.com/a/43602463 +configurations { + implementationCopy + implementationExtract +} + +dependencies { + // implementation group: "org.processing", name: "core", version: "${processingVersion}" + // implementation group: "org.processing", name: "pde", version: "${processingVersion}" + // implementation group: "org.processing", name: "java-mode", version: "${processingVersion}" + + implementationExtract "org.eclipse.jdt:org.eclipse.jdt.debug:${jdtVersion}" + + implementationCopy "org.gradle:gradle-tooling-api:${toolingVersion}" + implementationCopy "org.slf4j:slf4j-api:${slf4jVersion}" + implementationCopy "org.slf4j:slf4j-simple:${slf4jVersion}" + + implementation fileTree(include: ["jdi.jar", "jdimodel.jar", "core.jar", "pde.jar", "JavaMode.jar"], dir: 'mode') +} + +// This task copies the gradle tooling jar into the mode folder +tasks.register("copyToLib", Copy) { + from(configurations.implementationCopy) + into("mode") +} + +tasks.named('build') { + dependsOn 'copyToLib' +} + +tasks.named('compileJava') { + dependsOn 'copyToLib' +} + +sourceSets.main.java.srcDir("src/") + +tasks.register('getjdi', Copy) { + // This task extracts the jar files inside org.eclipse.jdt.debug, which are + // jdi.jar and jdimodel.jar and needed to build the debugger. + from(zipTree(configurations.implementationExtract.singleFile)) { + include '**/*.jar' + exclude 'META-INF' + } + into "mode" +} + +tasks.register('permissions', Exec) { + // This task retrieves the latest list of Android permissions and adds them + // to the Permissions.java file. The python scripts requries BeautifulSoup + workingDir "scripts" + commandLine "python", "permissions.py" +} + + +tasks.register("wrapper", Wrapper) { + gradleVersion = "${gradlewVersion}" // version required for gradle wrapper +} + +tasks.named("wrapper").configure { + doLast { + def wrapperFolder = file("mode/gradlew") + wrapperFolder.mkdirs() + file("gradle").renameTo(file("mode/gradlew/gradle")) + file("gradlew").renameTo(file("mode/gradlew/gradlew")) + file("gradlew.bat").renameTo(file("mode/gradlew/gradlew.bat")) + FileUtils.copyDirectory(file("gradle"), file("../debug/gradle")) + delete("gradle") + ZipUtil.pack(file("mode/gradlew"), new File("mode/mode/gradlew.zip")) + delete("mode/gradlew") + } +} + +tasks.named('clean') { + doFirst { + delete fileTree("mode") { + include "**/*.jar" + exclude "jdi.jar", "jdimodel.jar", "istack-commons-runtime.jar", "javax.activation-api.jar", + "jaxb-api.jar", "jaxb-jxc.jar", "jaxb-runtime.jar", "jaxb-xjc.jar", "core.jar", + "pde.jar", "JavaMode.jar", "org.eclipse.core.contenttype.jar", "org.eclipse.core.jobs.jar", + "org.eclipse.core.resources.jar", "org.eclipse.core.runtime.jar", "org.eclipse.equinox.common.jar", + "org.eclipse.equinox.preferences.jar", "org.eclipse.jdt.core.jar", "org.eclipse.osgi.jar", + "org.eclipse.text.jar" + } + } +} + +tasks.named('build') { + doLast { + Files.copy(file("$buildDir/libs/mode.jar").toPath(), + file("mode/AndroidMode.jar").toPath(), REPLACE_EXISTING) + } +} \ No newline at end of file diff --git a/mode/examples/Basics/Arrays/Array/Array.pde b/processing/mode/examples/Basics/Arrays/Array/Array.pde similarity index 100% rename from mode/examples/Basics/Arrays/Array/Array.pde rename to processing/mode/examples/Basics/Arrays/Array/Array.pde diff --git a/mode/examples/Basics/Arrays/Array2D/Array2D.pde b/processing/mode/examples/Basics/Arrays/Array2D/Array2D.pde similarity index 100% rename from mode/examples/Basics/Arrays/Array2D/Array2D.pde rename to processing/mode/examples/Basics/Arrays/Array2D/Array2D.pde diff --git a/mode/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde b/processing/mode/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde similarity index 100% rename from mode/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde rename to processing/mode/examples/Basics/Arrays/ArrayObjects/ArrayObjects.pde diff --git a/mode/examples/Basics/Arrays/ArrayObjects/Module.pde b/processing/mode/examples/Basics/Arrays/ArrayObjects/Module.pde similarity index 100% rename from mode/examples/Basics/Arrays/ArrayObjects/Module.pde rename to processing/mode/examples/Basics/Arrays/ArrayObjects/Module.pde diff --git a/mode/examples/Basics/Camera/MoveEye/MoveEye.pde b/processing/mode/examples/Basics/Camera/MoveEye/MoveEye.pde similarity index 100% rename from mode/examples/Basics/Camera/MoveEye/MoveEye.pde rename to processing/mode/examples/Basics/Camera/MoveEye/MoveEye.pde diff --git a/mode/examples/Basics/Camera/Perspective/Perspective.pde b/processing/mode/examples/Basics/Camera/Perspective/Perspective.pde similarity index 100% rename from mode/examples/Basics/Camera/Perspective/Perspective.pde rename to processing/mode/examples/Basics/Camera/Perspective/Perspective.pde diff --git a/mode/examples/Basics/Color/Brightness/Brightness.pde b/processing/mode/examples/Basics/Color/Brightness/Brightness.pde similarity index 100% rename from mode/examples/Basics/Color/Brightness/Brightness.pde rename to processing/mode/examples/Basics/Color/Brightness/Brightness.pde diff --git a/mode/examples/Basics/Color/ColorWheel/ColorWheel.pde b/processing/mode/examples/Basics/Color/ColorWheel/ColorWheel.pde similarity index 100% rename from mode/examples/Basics/Color/ColorWheel/ColorWheel.pde rename to processing/mode/examples/Basics/Color/ColorWheel/ColorWheel.pde diff --git a/mode/examples/Basics/Color/Creating/Creating.pde b/processing/mode/examples/Basics/Color/Creating/Creating.pde similarity index 100% rename from mode/examples/Basics/Color/Creating/Creating.pde rename to processing/mode/examples/Basics/Color/Creating/Creating.pde diff --git a/mode/examples/Basics/Color/Hue/Hue.pde b/processing/mode/examples/Basics/Color/Hue/Hue.pde similarity index 100% rename from mode/examples/Basics/Color/Hue/Hue.pde rename to processing/mode/examples/Basics/Color/Hue/Hue.pde diff --git a/mode/examples/Basics/Color/LinearGradient/LinearGradient.pde b/processing/mode/examples/Basics/Color/LinearGradient/LinearGradient.pde similarity index 100% rename from mode/examples/Basics/Color/LinearGradient/LinearGradient.pde rename to processing/mode/examples/Basics/Color/LinearGradient/LinearGradient.pde diff --git a/mode/examples/Basics/Color/RadialGradient/RadialGradient.pde b/processing/mode/examples/Basics/Color/RadialGradient/RadialGradient.pde similarity index 100% rename from mode/examples/Basics/Color/RadialGradient/RadialGradient.pde rename to processing/mode/examples/Basics/Color/RadialGradient/RadialGradient.pde diff --git a/mode/examples/Basics/Color/RadialGradient2/RadialGradient2.pde b/processing/mode/examples/Basics/Color/RadialGradient2/RadialGradient2.pde similarity index 100% rename from mode/examples/Basics/Color/RadialGradient2/RadialGradient2.pde rename to processing/mode/examples/Basics/Color/RadialGradient2/RadialGradient2.pde diff --git a/mode/examples/Basics/Color/Reading/Reading.pde b/processing/mode/examples/Basics/Color/Reading/Reading.pde similarity index 100% rename from mode/examples/Basics/Color/Reading/Reading.pde rename to processing/mode/examples/Basics/Color/Reading/Reading.pde diff --git a/mode/examples/Basics/Color/Reading/data/cait.jpg b/processing/mode/examples/Basics/Color/Reading/data/cait.jpg similarity index 100% rename from mode/examples/Basics/Color/Reading/data/cait.jpg rename to processing/mode/examples/Basics/Color/Reading/data/cait.jpg diff --git a/mode/examples/Basics/Color/Relativity/Relativity.pde b/processing/mode/examples/Basics/Color/Relativity/Relativity.pde similarity index 100% rename from mode/examples/Basics/Color/Relativity/Relativity.pde rename to processing/mode/examples/Basics/Color/Relativity/Relativity.pde diff --git a/mode/examples/Basics/Color/Saturation/Saturation.pde b/processing/mode/examples/Basics/Color/Saturation/Saturation.pde similarity index 100% rename from mode/examples/Basics/Color/Saturation/Saturation.pde rename to processing/mode/examples/Basics/Color/Saturation/Saturation.pde diff --git a/mode/examples/Basics/Color/WaveGradient/WaveGradient.pde b/processing/mode/examples/Basics/Color/WaveGradient/WaveGradient.pde similarity index 100% rename from mode/examples/Basics/Color/WaveGradient/WaveGradient.pde rename to processing/mode/examples/Basics/Color/WaveGradient/WaveGradient.pde diff --git a/mode/examples/Basics/Control/Conditionals1/Conditionals1.pde b/processing/mode/examples/Basics/Control/Conditionals1/Conditionals1.pde similarity index 100% rename from mode/examples/Basics/Control/Conditionals1/Conditionals1.pde rename to processing/mode/examples/Basics/Control/Conditionals1/Conditionals1.pde diff --git a/mode/examples/Basics/Control/Conditionals2/Conditionals2.pde b/processing/mode/examples/Basics/Control/Conditionals2/Conditionals2.pde similarity index 100% rename from mode/examples/Basics/Control/Conditionals2/Conditionals2.pde rename to processing/mode/examples/Basics/Control/Conditionals2/Conditionals2.pde diff --git a/mode/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde b/processing/mode/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde similarity index 100% rename from mode/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde rename to processing/mode/examples/Basics/Control/EmbeddedIteration/EmbeddedIteration.pde diff --git a/mode/examples/Basics/Control/Iteration/Iteration.pde b/processing/mode/examples/Basics/Control/Iteration/Iteration.pde similarity index 100% rename from mode/examples/Basics/Control/Iteration/Iteration.pde rename to processing/mode/examples/Basics/Control/Iteration/Iteration.pde diff --git a/mode/examples/Basics/Control/LogicalOperators/LogicalOperators.pde b/processing/mode/examples/Basics/Control/LogicalOperators/LogicalOperators.pde similarity index 100% rename from mode/examples/Basics/Control/LogicalOperators/LogicalOperators.pde rename to processing/mode/examples/Basics/Control/LogicalOperators/LogicalOperators.pde diff --git a/mode/examples/Basics/Data/CharactersStrings/CharactersStrings.pde b/processing/mode/examples/Basics/Data/CharactersStrings/CharactersStrings.pde similarity index 100% rename from mode/examples/Basics/Data/CharactersStrings/CharactersStrings.pde rename to processing/mode/examples/Basics/Data/CharactersStrings/CharactersStrings.pde diff --git a/mode/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw b/processing/mode/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw similarity index 100% rename from mode/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw rename to processing/mode/examples/Basics/Data/CharactersStrings/data/Eureka-90.vlw diff --git a/mode/examples/Basics/Data/CharactersStrings/data/rathausFrog.jpg b/processing/mode/examples/Basics/Data/CharactersStrings/data/rathausFrog.jpg similarity index 100% rename from mode/examples/Basics/Data/CharactersStrings/data/rathausFrog.jpg rename to processing/mode/examples/Basics/Data/CharactersStrings/data/rathausFrog.jpg diff --git a/mode/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde b/processing/mode/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde similarity index 100% rename from mode/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde rename to processing/mode/examples/Basics/Data/DatatypeConversion/DatatypeConversion.pde diff --git a/mode/examples/Basics/Data/IntegersFloats/IntegersFloats.pde b/processing/mode/examples/Basics/Data/IntegersFloats/IntegersFloats.pde similarity index 100% rename from mode/examples/Basics/Data/IntegersFloats/IntegersFloats.pde rename to processing/mode/examples/Basics/Data/IntegersFloats/IntegersFloats.pde diff --git a/mode/examples/Basics/Data/TrueFalse/TrueFalse.pde b/processing/mode/examples/Basics/Data/TrueFalse/TrueFalse.pde similarity index 100% rename from mode/examples/Basics/Data/TrueFalse/TrueFalse.pde rename to processing/mode/examples/Basics/Data/TrueFalse/TrueFalse.pde diff --git a/mode/examples/Basics/Data/VariableScope/VariableScope.pde b/processing/mode/examples/Basics/Data/VariableScope/VariableScope.pde similarity index 100% rename from mode/examples/Basics/Data/VariableScope/VariableScope.pde rename to processing/mode/examples/Basics/Data/VariableScope/VariableScope.pde diff --git a/mode/examples/Basics/Data/Variables/Variables.pde b/processing/mode/examples/Basics/Data/Variables/Variables.pde similarity index 100% rename from mode/examples/Basics/Data/Variables/Variables.pde rename to processing/mode/examples/Basics/Data/Variables/Variables.pde diff --git a/mode/examples/Basics/Form/Bezier/Bezier.pde b/processing/mode/examples/Basics/Form/Bezier/Bezier.pde similarity index 100% rename from mode/examples/Basics/Form/Bezier/Bezier.pde rename to processing/mode/examples/Basics/Form/Bezier/Bezier.pde diff --git a/mode/examples/Basics/Form/BezierEllipse/BezierEllipse.pde b/processing/mode/examples/Basics/Form/BezierEllipse/BezierEllipse.pde similarity index 100% rename from mode/examples/Basics/Form/BezierEllipse/BezierEllipse.pde rename to processing/mode/examples/Basics/Form/BezierEllipse/BezierEllipse.pde diff --git a/mode/examples/Basics/Form/PieChart/PieChart.pde b/processing/mode/examples/Basics/Form/PieChart/PieChart.pde similarity index 100% rename from mode/examples/Basics/Form/PieChart/PieChart.pde rename to processing/mode/examples/Basics/Form/PieChart/PieChart.pde diff --git a/mode/examples/Basics/Form/PointsLines/PointsLines.pde b/processing/mode/examples/Basics/Form/PointsLines/PointsLines.pde similarity index 100% rename from mode/examples/Basics/Form/PointsLines/PointsLines.pde rename to processing/mode/examples/Basics/Form/PointsLines/PointsLines.pde diff --git a/mode/examples/Basics/Form/Primitives3D/Primitives3D.pde b/processing/mode/examples/Basics/Form/Primitives3D/Primitives3D.pde similarity index 100% rename from mode/examples/Basics/Form/Primitives3D/Primitives3D.pde rename to processing/mode/examples/Basics/Form/Primitives3D/Primitives3D.pde diff --git a/mode/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde b/processing/mode/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde similarity index 100% rename from mode/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde rename to processing/mode/examples/Basics/Form/ShapePrimitives/ShapePrimitives.pde diff --git a/mode/examples/Basics/Form/SimpleCurves/SimpleCurves.pde b/processing/mode/examples/Basics/Form/SimpleCurves/SimpleCurves.pde similarity index 100% rename from mode/examples/Basics/Form/SimpleCurves/SimpleCurves.pde rename to processing/mode/examples/Basics/Form/SimpleCurves/SimpleCurves.pde diff --git a/mode/examples/Basics/Form/TriangleStrip/TriangleStrip.pde b/processing/mode/examples/Basics/Form/TriangleStrip/TriangleStrip.pde similarity index 100% rename from mode/examples/Basics/Form/TriangleStrip/TriangleStrip.pde rename to processing/mode/examples/Basics/Form/TriangleStrip/TriangleStrip.pde diff --git a/mode/examples/Basics/Form/Vertices/Vertices.pde b/processing/mode/examples/Basics/Form/Vertices/Vertices.pde similarity index 100% rename from mode/examples/Basics/Form/Vertices/Vertices.pde rename to processing/mode/examples/Basics/Form/Vertices/Vertices.pde diff --git a/mode/examples/Basics/Image/Alphamask/Alphamask.pde b/processing/mode/examples/Basics/Image/Alphamask/Alphamask.pde similarity index 100% rename from mode/examples/Basics/Image/Alphamask/Alphamask.pde rename to processing/mode/examples/Basics/Image/Alphamask/Alphamask.pde diff --git a/mode/examples/Basics/Image/Alphamask/data/mask.jpg b/processing/mode/examples/Basics/Image/Alphamask/data/mask.jpg similarity index 100% rename from mode/examples/Basics/Image/Alphamask/data/mask.jpg rename to processing/mode/examples/Basics/Image/Alphamask/data/mask.jpg diff --git a/mode/examples/Basics/Image/Alphamask/data/test.jpg b/processing/mode/examples/Basics/Image/Alphamask/data/test.jpg similarity index 100% rename from mode/examples/Basics/Image/Alphamask/data/test.jpg rename to processing/mode/examples/Basics/Image/Alphamask/data/test.jpg diff --git a/mode/examples/Basics/Image/BackgroundImage/BackgroundImage.pde b/processing/mode/examples/Basics/Image/BackgroundImage/BackgroundImage.pde similarity index 100% rename from mode/examples/Basics/Image/BackgroundImage/BackgroundImage.pde rename to processing/mode/examples/Basics/Image/BackgroundImage/BackgroundImage.pde diff --git a/mode/examples/Basics/Image/BackgroundImage/data/milan_rubbish.jpg b/processing/mode/examples/Basics/Image/BackgroundImage/data/milan_rubbish.jpg similarity index 100% rename from mode/examples/Basics/Image/BackgroundImage/data/milan_rubbish.jpg rename to processing/mode/examples/Basics/Image/BackgroundImage/data/milan_rubbish.jpg diff --git a/mode/examples/Basics/Image/CreateImage/CreateImage.pde b/processing/mode/examples/Basics/Image/CreateImage/CreateImage.pde similarity index 100% rename from mode/examples/Basics/Image/CreateImage/CreateImage.pde rename to processing/mode/examples/Basics/Image/CreateImage/CreateImage.pde diff --git a/mode/examples/Basics/Image/CreateImage/data/mask.jpg b/processing/mode/examples/Basics/Image/CreateImage/data/mask.jpg similarity index 100% rename from mode/examples/Basics/Image/CreateImage/data/mask.jpg rename to processing/mode/examples/Basics/Image/CreateImage/data/mask.jpg diff --git a/mode/examples/Basics/Image/CreateImage/data/test.jpg b/processing/mode/examples/Basics/Image/CreateImage/data/test.jpg similarity index 100% rename from mode/examples/Basics/Image/CreateImage/data/test.jpg rename to processing/mode/examples/Basics/Image/CreateImage/data/test.jpg diff --git a/mode/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde b/processing/mode/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde similarity index 93% rename from mode/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde rename to processing/mode/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde index 8252c5cbc..495d1f124 100644 --- a/mode/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde +++ b/processing/mode/examples/Basics/Image/LoadDisplayImage/LoadDisplayImage.pde @@ -12,7 +12,6 @@ void setup() { // The file "jelly.jpg" must be in the data folder // of the current sketch to load successfully a = loadImage("jelly.jpg"); // Load the image into the program - noLoop(); // Makes draw() only run once } void draw() { diff --git a/mode/examples/Basics/Image/LoadDisplayImage/data/jelly.jpg b/processing/mode/examples/Basics/Image/LoadDisplayImage/data/jelly.jpg similarity index 100% rename from mode/examples/Basics/Image/LoadDisplayImage/data/jelly.jpg rename to processing/mode/examples/Basics/Image/LoadDisplayImage/data/jelly.jpg diff --git a/mode/examples/Basics/Image/Pointillism/Pointillism.pde b/processing/mode/examples/Basics/Image/Pointillism/Pointillism.pde similarity index 100% rename from mode/examples/Basics/Image/Pointillism/Pointillism.pde rename to processing/mode/examples/Basics/Image/Pointillism/Pointillism.pde diff --git a/mode/examples/Basics/Image/Pointillism/data/eames.jpg b/processing/mode/examples/Basics/Image/Pointillism/data/eames.jpg similarity index 100% rename from mode/examples/Basics/Image/Pointillism/data/eames.jpg rename to processing/mode/examples/Basics/Image/Pointillism/data/eames.jpg diff --git a/mode/examples/Basics/Image/Pointillism/data/sunflower.jpg b/processing/mode/examples/Basics/Image/Pointillism/data/sunflower.jpg similarity index 100% rename from mode/examples/Basics/Image/Pointillism/data/sunflower.jpg rename to processing/mode/examples/Basics/Image/Pointillism/data/sunflower.jpg diff --git a/mode/examples/Basics/Image/RequestImage/RequestImage.pde b/processing/mode/examples/Basics/Image/RequestImage/RequestImage.pde similarity index 100% rename from mode/examples/Basics/Image/RequestImage/RequestImage.pde rename to processing/mode/examples/Basics/Image/RequestImage/RequestImage.pde diff --git a/mode/examples/Basics/Image/Sprite/Sprite.pde b/processing/mode/examples/Basics/Image/Sprite/Sprite.pde similarity index 100% rename from mode/examples/Basics/Image/Sprite/Sprite.pde rename to processing/mode/examples/Basics/Image/Sprite/Sprite.pde diff --git a/mode/examples/Basics/Image/Sprite/data/teddy.gif b/processing/mode/examples/Basics/Image/Sprite/data/teddy.gif similarity index 100% rename from mode/examples/Basics/Image/Sprite/data/teddy.gif rename to processing/mode/examples/Basics/Image/Sprite/data/teddy.gif diff --git a/mode/examples/Basics/Image/Sprite2/Sprite2.pde b/processing/mode/examples/Basics/Image/Sprite2/Sprite2.pde similarity index 100% rename from mode/examples/Basics/Image/Sprite2/Sprite2.pde rename to processing/mode/examples/Basics/Image/Sprite2/Sprite2.pde diff --git a/mode/examples/Basics/Image/Sprite2/data/sky.jpg b/processing/mode/examples/Basics/Image/Sprite2/data/sky.jpg similarity index 100% rename from mode/examples/Basics/Image/Sprite2/data/sky.jpg rename to processing/mode/examples/Basics/Image/Sprite2/data/sky.jpg diff --git a/mode/examples/Basics/Image/Sprite2/data/teddy.gif b/processing/mode/examples/Basics/Image/Sprite2/data/teddy.gif similarity index 100% rename from mode/examples/Basics/Image/Sprite2/data/teddy.gif rename to processing/mode/examples/Basics/Image/Sprite2/data/teddy.gif diff --git a/mode/examples/Basics/Image/Transparency/Transparency.pde b/processing/mode/examples/Basics/Image/Transparency/Transparency.pde similarity index 100% rename from mode/examples/Basics/Image/Transparency/Transparency.pde rename to processing/mode/examples/Basics/Image/Transparency/Transparency.pde diff --git a/mode/examples/Basics/Image/Transparency/data/construct.jpg b/processing/mode/examples/Basics/Image/Transparency/data/construct.jpg similarity index 100% rename from mode/examples/Basics/Image/Transparency/data/construct.jpg rename to processing/mode/examples/Basics/Image/Transparency/data/construct.jpg diff --git a/mode/examples/Basics/Image/Transparency/data/wash.jpg b/processing/mode/examples/Basics/Image/Transparency/data/wash.jpg similarity index 100% rename from mode/examples/Basics/Image/Transparency/data/wash.jpg rename to processing/mode/examples/Basics/Image/Transparency/data/wash.jpg diff --git a/mode/examples/Basics/Input/Clock/Clock.pde b/processing/mode/examples/Basics/Input/Clock/Clock.pde similarity index 100% rename from mode/examples/Basics/Input/Clock/Clock.pde rename to processing/mode/examples/Basics/Input/Clock/Clock.pde diff --git a/mode/examples/Basics/Input/Constrain/Constrain.pde b/processing/mode/examples/Basics/Input/Constrain/Constrain.pde similarity index 100% rename from mode/examples/Basics/Input/Constrain/Constrain.pde rename to processing/mode/examples/Basics/Input/Constrain/Constrain.pde diff --git a/mode/examples/Basics/Input/Easing/Easing.pde b/processing/mode/examples/Basics/Input/Easing/Easing.pde similarity index 100% rename from mode/examples/Basics/Input/Easing/Easing.pde rename to processing/mode/examples/Basics/Input/Easing/Easing.pde diff --git a/mode/examples/Basics/Input/Keyboard/Keyboard.pde b/processing/mode/examples/Basics/Input/Keyboard/Keyboard.pde similarity index 100% rename from mode/examples/Basics/Input/Keyboard/Keyboard.pde rename to processing/mode/examples/Basics/Input/Keyboard/Keyboard.pde diff --git a/mode/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde b/processing/mode/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde similarity index 100% rename from mode/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde rename to processing/mode/examples/Basics/Input/KeyboardFunctions/KeyboardFunctions.pde diff --git a/mode/examples/Basics/Input/KeyboardFunctions/data/brugges.jpg b/processing/mode/examples/Basics/Input/KeyboardFunctions/data/brugges.jpg similarity index 100% rename from mode/examples/Basics/Input/KeyboardFunctions/data/brugges.jpg rename to processing/mode/examples/Basics/Input/KeyboardFunctions/data/brugges.jpg diff --git a/mode/examples/Basics/Input/Milliseconds/Milliseconds.pde b/processing/mode/examples/Basics/Input/Milliseconds/Milliseconds.pde similarity index 100% rename from mode/examples/Basics/Input/Milliseconds/Milliseconds.pde rename to processing/mode/examples/Basics/Input/Milliseconds/Milliseconds.pde diff --git a/mode/examples/Basics/Input/Mouse1D/Mouse1D.pde b/processing/mode/examples/Basics/Input/Mouse1D/Mouse1D.pde similarity index 100% rename from mode/examples/Basics/Input/Mouse1D/Mouse1D.pde rename to processing/mode/examples/Basics/Input/Mouse1D/Mouse1D.pde diff --git a/mode/examples/Basics/Input/Mouse2D/Mouse2D.pde b/processing/mode/examples/Basics/Input/Mouse2D/Mouse2D.pde similarity index 100% rename from mode/examples/Basics/Input/Mouse2D/Mouse2D.pde rename to processing/mode/examples/Basics/Input/Mouse2D/Mouse2D.pde diff --git a/mode/examples/Basics/Input/MouseFunctions/MouseFunctions.pde b/processing/mode/examples/Basics/Input/MouseFunctions/MouseFunctions.pde similarity index 100% rename from mode/examples/Basics/Input/MouseFunctions/MouseFunctions.pde rename to processing/mode/examples/Basics/Input/MouseFunctions/MouseFunctions.pde diff --git a/mode/examples/Basics/Input/MousePress/MousePress.pde b/processing/mode/examples/Basics/Input/MousePress/MousePress.pde similarity index 100% rename from mode/examples/Basics/Input/MousePress/MousePress.pde rename to processing/mode/examples/Basics/Input/MousePress/MousePress.pde diff --git a/mode/examples/Basics/Input/MouseSignals/MouseSignals.pde b/processing/mode/examples/Basics/Input/MouseSignals/MouseSignals.pde similarity index 100% rename from mode/examples/Basics/Input/MouseSignals/MouseSignals.pde rename to processing/mode/examples/Basics/Input/MouseSignals/MouseSignals.pde diff --git a/mode/examples/Basics/Input/StoringInput/StoringInput.pde b/processing/mode/examples/Basics/Input/StoringInput/StoringInput.pde similarity index 100% rename from mode/examples/Basics/Input/StoringInput/StoringInput.pde rename to processing/mode/examples/Basics/Input/StoringInput/StoringInput.pde diff --git a/mode/examples/Basics/Lights/Directional/Directional.pde b/processing/mode/examples/Basics/Lights/Directional/Directional.pde similarity index 100% rename from mode/examples/Basics/Lights/Directional/Directional.pde rename to processing/mode/examples/Basics/Lights/Directional/Directional.pde diff --git a/mode/examples/Basics/Lights/Mixture/Mixture.pde b/processing/mode/examples/Basics/Lights/Mixture/Mixture.pde similarity index 100% rename from mode/examples/Basics/Lights/Mixture/Mixture.pde rename to processing/mode/examples/Basics/Lights/Mixture/Mixture.pde diff --git a/mode/examples/Basics/Lights/MixtureGrid/MixtureGrid.pde b/processing/mode/examples/Basics/Lights/MixtureGrid/MixtureGrid.pde similarity index 100% rename from mode/examples/Basics/Lights/MixtureGrid/MixtureGrid.pde rename to processing/mode/examples/Basics/Lights/MixtureGrid/MixtureGrid.pde diff --git a/mode/examples/Basics/Lights/OnOff/OnOff.pde b/processing/mode/examples/Basics/Lights/OnOff/OnOff.pde similarity index 100% rename from mode/examples/Basics/Lights/OnOff/OnOff.pde rename to processing/mode/examples/Basics/Lights/OnOff/OnOff.pde diff --git a/mode/examples/Basics/Lights/Reflection/Reflection.pde b/processing/mode/examples/Basics/Lights/Reflection/Reflection.pde similarity index 100% rename from mode/examples/Basics/Lights/Reflection/Reflection.pde rename to processing/mode/examples/Basics/Lights/Reflection/Reflection.pde diff --git a/mode/examples/Basics/Lights/Spot/Spot.pde b/processing/mode/examples/Basics/Lights/Spot/Spot.pde similarity index 100% rename from mode/examples/Basics/Lights/Spot/Spot.pde rename to processing/mode/examples/Basics/Lights/Spot/Spot.pde diff --git a/mode/examples/Basics/Math/AdditiveWave/AdditiveWave.pde b/processing/mode/examples/Basics/Math/AdditiveWave/AdditiveWave.pde similarity index 100% rename from mode/examples/Basics/Math/AdditiveWave/AdditiveWave.pde rename to processing/mode/examples/Basics/Math/AdditiveWave/AdditiveWave.pde diff --git a/mode/examples/Basics/Math/Arctangent/Arctangent.pde b/processing/mode/examples/Basics/Math/Arctangent/Arctangent.pde similarity index 100% rename from mode/examples/Basics/Math/Arctangent/Arctangent.pde rename to processing/mode/examples/Basics/Math/Arctangent/Arctangent.pde diff --git a/mode/examples/Basics/Math/Distance1D/Distance1D.pde b/processing/mode/examples/Basics/Math/Distance1D/Distance1D.pde similarity index 100% rename from mode/examples/Basics/Math/Distance1D/Distance1D.pde rename to processing/mode/examples/Basics/Math/Distance1D/Distance1D.pde diff --git a/mode/examples/Basics/Math/Distance2D/Distance2D.pde b/processing/mode/examples/Basics/Math/Distance2D/Distance2D.pde similarity index 100% rename from mode/examples/Basics/Math/Distance2D/Distance2D.pde rename to processing/mode/examples/Basics/Math/Distance2D/Distance2D.pde diff --git a/mode/examples/Basics/Math/DoubleRandom/DoubleRandom.pde b/processing/mode/examples/Basics/Math/DoubleRandom/DoubleRandom.pde similarity index 100% rename from mode/examples/Basics/Math/DoubleRandom/DoubleRandom.pde rename to processing/mode/examples/Basics/Math/DoubleRandom/DoubleRandom.pde diff --git a/mode/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde b/processing/mode/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde similarity index 100% rename from mode/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde rename to processing/mode/examples/Basics/Math/Graphing2DEquation/Graphing2DEquation.pde diff --git a/mode/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde b/processing/mode/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde similarity index 100% rename from mode/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde rename to processing/mode/examples/Basics/Math/IncrementDecrement/IncrementDecrement.pde diff --git a/mode/examples/Basics/Math/Modulo/Modulo.pde b/processing/mode/examples/Basics/Math/Modulo/Modulo.pde similarity index 100% rename from mode/examples/Basics/Math/Modulo/Modulo.pde rename to processing/mode/examples/Basics/Math/Modulo/Modulo.pde diff --git a/mode/examples/Basics/Math/Noise1D/Noise1D.pde b/processing/mode/examples/Basics/Math/Noise1D/Noise1D.pde similarity index 100% rename from mode/examples/Basics/Math/Noise1D/Noise1D.pde rename to processing/mode/examples/Basics/Math/Noise1D/Noise1D.pde diff --git a/mode/examples/Basics/Math/Noise2D/Noise2D.pde b/processing/mode/examples/Basics/Math/Noise2D/Noise2D.pde similarity index 100% rename from mode/examples/Basics/Math/Noise2D/Noise2D.pde rename to processing/mode/examples/Basics/Math/Noise2D/Noise2D.pde diff --git a/mode/examples/Basics/Math/Noise3D/Noise3D.pde b/processing/mode/examples/Basics/Math/Noise3D/Noise3D.pde similarity index 100% rename from mode/examples/Basics/Math/Noise3D/Noise3D.pde rename to processing/mode/examples/Basics/Math/Noise3D/Noise3D.pde diff --git a/mode/examples/Basics/Math/NoiseWave/NoiseWave.pde b/processing/mode/examples/Basics/Math/NoiseWave/NoiseWave.pde similarity index 100% rename from mode/examples/Basics/Math/NoiseWave/NoiseWave.pde rename to processing/mode/examples/Basics/Math/NoiseWave/NoiseWave.pde diff --git a/mode/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde b/processing/mode/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde similarity index 100% rename from mode/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde rename to processing/mode/examples/Basics/Math/OperatorPrecedence/OperatorPrecedence.pde diff --git a/mode/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde b/processing/mode/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde similarity index 100% rename from mode/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde rename to processing/mode/examples/Basics/Math/PolarToCartesian/PolarToCartesian.pde diff --git a/mode/examples/Basics/Math/Random/Random.pde b/processing/mode/examples/Basics/Math/Random/Random.pde similarity index 100% rename from mode/examples/Basics/Math/Random/Random.pde rename to processing/mode/examples/Basics/Math/Random/Random.pde diff --git a/mode/examples/Basics/Math/Sine/Sine.pde b/processing/mode/examples/Basics/Math/Sine/Sine.pde similarity index 100% rename from mode/examples/Basics/Math/Sine/Sine.pde rename to processing/mode/examples/Basics/Math/Sine/Sine.pde diff --git a/mode/examples/Basics/Math/SineCosine/SineCosine.pde b/processing/mode/examples/Basics/Math/SineCosine/SineCosine.pde similarity index 100% rename from mode/examples/Basics/Math/SineCosine/SineCosine.pde rename to processing/mode/examples/Basics/Math/SineCosine/SineCosine.pde diff --git a/mode/examples/Basics/Math/SineWave/SineWave.pde b/processing/mode/examples/Basics/Math/SineWave/SineWave.pde similarity index 100% rename from mode/examples/Basics/Math/SineWave/SineWave.pde rename to processing/mode/examples/Basics/Math/SineWave/SineWave.pde diff --git a/mode/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde b/processing/mode/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde similarity index 100% rename from mode/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde rename to processing/mode/examples/Basics/Objects/CompositeObjects/CompositeObjects.pde diff --git a/mode/examples/Basics/Objects/CompositeObjects/Egg.pde b/processing/mode/examples/Basics/Objects/CompositeObjects/Egg.pde similarity index 100% rename from mode/examples/Basics/Objects/CompositeObjects/Egg.pde rename to processing/mode/examples/Basics/Objects/CompositeObjects/Egg.pde diff --git a/mode/examples/Basics/Objects/CompositeObjects/EggRing.pde b/processing/mode/examples/Basics/Objects/CompositeObjects/EggRing.pde similarity index 100% rename from mode/examples/Basics/Objects/CompositeObjects/EggRing.pde rename to processing/mode/examples/Basics/Objects/CompositeObjects/EggRing.pde diff --git a/mode/examples/Basics/Objects/CompositeObjects/Ring.pde b/processing/mode/examples/Basics/Objects/CompositeObjects/Ring.pde similarity index 100% rename from mode/examples/Basics/Objects/CompositeObjects/Ring.pde rename to processing/mode/examples/Basics/Objects/CompositeObjects/Ring.pde diff --git a/mode/examples/Basics/Objects/Inheritance/Inheritance.pde b/processing/mode/examples/Basics/Objects/Inheritance/Inheritance.pde similarity index 100% rename from mode/examples/Basics/Objects/Inheritance/Inheritance.pde rename to processing/mode/examples/Basics/Objects/Inheritance/Inheritance.pde diff --git a/mode/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde b/processing/mode/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde similarity index 100% rename from mode/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde rename to processing/mode/examples/Basics/Objects/MultipleConstructors/MultipleConstructors.pde diff --git a/mode/examples/Basics/Objects/Neighborhood/Neighborhood.pde b/processing/mode/examples/Basics/Objects/Neighborhood/Neighborhood.pde similarity index 100% rename from mode/examples/Basics/Objects/Neighborhood/Neighborhood.pde rename to processing/mode/examples/Basics/Objects/Neighborhood/Neighborhood.pde diff --git a/mode/examples/Basics/Objects/Objects/Objects.pde b/processing/mode/examples/Basics/Objects/Objects/Objects.pde similarity index 100% rename from mode/examples/Basics/Objects/Objects/Objects.pde rename to processing/mode/examples/Basics/Objects/Objects/Objects.pde diff --git a/mode/examples/Basics/Shape/DisableStyle/DisableStyle.pde b/processing/mode/examples/Basics/Shape/DisableStyle/DisableStyle.pde similarity index 100% rename from mode/examples/Basics/Shape/DisableStyle/DisableStyle.pde rename to processing/mode/examples/Basics/Shape/DisableStyle/DisableStyle.pde diff --git a/mode/examples/Basics/Shape/DisableStyle/data/bot1.svg b/processing/mode/examples/Basics/Shape/DisableStyle/data/bot1.svg similarity index 100% rename from mode/examples/Basics/Shape/DisableStyle/data/bot1.svg rename to processing/mode/examples/Basics/Shape/DisableStyle/data/bot1.svg diff --git a/mode/examples/Basics/Shape/GetChild/GetChild.pde b/processing/mode/examples/Basics/Shape/GetChild/GetChild.pde similarity index 100% rename from mode/examples/Basics/Shape/GetChild/GetChild.pde rename to processing/mode/examples/Basics/Shape/GetChild/GetChild.pde diff --git a/mode/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg b/processing/mode/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg similarity index 100% rename from mode/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg rename to processing/mode/examples/Basics/Shape/GetChild/data/usa-wikipedia.svg diff --git a/mode/examples/Basics/Shape/LoadDisplayOBJ/LoadDisplayOBJ.pde b/processing/mode/examples/Basics/Shape/LoadDisplayOBJ/LoadDisplayOBJ.pde similarity index 100% rename from mode/examples/Basics/Shape/LoadDisplayOBJ/LoadDisplayOBJ.pde rename to processing/mode/examples/Basics/Shape/LoadDisplayOBJ/LoadDisplayOBJ.pde diff --git a/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.mtl b/processing/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.mtl similarity index 100% rename from mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.mtl rename to processing/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.mtl diff --git a/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.obj b/processing/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.obj similarity index 100% rename from mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.obj rename to processing/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.obj diff --git a/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.png b/processing/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.png similarity index 100% rename from mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.png rename to processing/mode/examples/Basics/Shape/LoadDisplayOBJ/data/rocket.png diff --git a/mode/examples/Basics/Shape/LoadDisplaySVG/LoadDisplaySVG.pde b/processing/mode/examples/Basics/Shape/LoadDisplaySVG/LoadDisplaySVG.pde similarity index 100% rename from mode/examples/Basics/Shape/LoadDisplaySVG/LoadDisplaySVG.pde rename to processing/mode/examples/Basics/Shape/LoadDisplaySVG/LoadDisplaySVG.pde diff --git a/mode/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg b/processing/mode/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg similarity index 100% rename from mode/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg rename to processing/mode/examples/Basics/Shape/LoadDisplaySVG/data/bot1.svg diff --git a/mode/examples/Basics/Shape/ScaleShape/ScaleShape.pde b/processing/mode/examples/Basics/Shape/ScaleShape/ScaleShape.pde similarity index 100% rename from mode/examples/Basics/Shape/ScaleShape/ScaleShape.pde rename to processing/mode/examples/Basics/Shape/ScaleShape/ScaleShape.pde diff --git a/mode/examples/Basics/Shape/ScaleShape/data/bot1.svg b/processing/mode/examples/Basics/Shape/ScaleShape/data/bot1.svg similarity index 100% rename from mode/examples/Basics/Shape/ScaleShape/data/bot1.svg rename to processing/mode/examples/Basics/Shape/ScaleShape/data/bot1.svg diff --git a/mode/examples/Basics/Structure/Coordinates/Coordinates.pde b/processing/mode/examples/Basics/Structure/Coordinates/Coordinates.pde similarity index 100% rename from mode/examples/Basics/Structure/Coordinates/Coordinates.pde rename to processing/mode/examples/Basics/Structure/Coordinates/Coordinates.pde diff --git a/mode/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde b/processing/mode/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde similarity index 100% rename from mode/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde rename to processing/mode/examples/Basics/Structure/CreateGraphics/CreateGraphics.pde diff --git a/mode/examples/Basics/Structure/CreateGraphics/data/mask.jpg b/processing/mode/examples/Basics/Structure/CreateGraphics/data/mask.jpg similarity index 100% rename from mode/examples/Basics/Structure/CreateGraphics/data/mask.jpg rename to processing/mode/examples/Basics/Structure/CreateGraphics/data/mask.jpg diff --git a/mode/examples/Basics/Structure/CreateGraphics/data/test.jpg b/processing/mode/examples/Basics/Structure/CreateGraphics/data/test.jpg similarity index 100% rename from mode/examples/Basics/Structure/CreateGraphics/data/test.jpg rename to processing/mode/examples/Basics/Structure/CreateGraphics/data/test.jpg diff --git a/mode/examples/Basics/Structure/Functions/Functions.pde b/processing/mode/examples/Basics/Structure/Functions/Functions.pde similarity index 100% rename from mode/examples/Basics/Structure/Functions/Functions.pde rename to processing/mode/examples/Basics/Structure/Functions/Functions.pde diff --git a/mode/examples/Basics/Structure/Loop/Loop.pde b/processing/mode/examples/Basics/Structure/Loop/Loop.pde similarity index 100% rename from mode/examples/Basics/Structure/Loop/Loop.pde rename to processing/mode/examples/Basics/Structure/Loop/Loop.pde diff --git a/mode/examples/Basics/Structure/NoLoop/NoLoop.pde b/processing/mode/examples/Basics/Structure/NoLoop/NoLoop.pde similarity index 100% rename from mode/examples/Basics/Structure/NoLoop/NoLoop.pde rename to processing/mode/examples/Basics/Structure/NoLoop/NoLoop.pde diff --git a/mode/examples/Basics/Structure/Recursion/Recursion.pde b/processing/mode/examples/Basics/Structure/Recursion/Recursion.pde similarity index 100% rename from mode/examples/Basics/Structure/Recursion/Recursion.pde rename to processing/mode/examples/Basics/Structure/Recursion/Recursion.pde diff --git a/mode/examples/Basics/Structure/Recursion2/Recursion2.pde b/processing/mode/examples/Basics/Structure/Recursion2/Recursion2.pde similarity index 100% rename from mode/examples/Basics/Structure/Recursion2/Recursion2.pde rename to processing/mode/examples/Basics/Structure/Recursion2/Recursion2.pde diff --git a/mode/examples/Basics/Structure/Redraw/Redraw.pde b/processing/mode/examples/Basics/Structure/Redraw/Redraw.pde similarity index 100% rename from mode/examples/Basics/Structure/Redraw/Redraw.pde rename to processing/mode/examples/Basics/Structure/Redraw/Redraw.pde diff --git a/mode/examples/Basics/Structure/SetupDraw/SetupDraw.pde b/processing/mode/examples/Basics/Structure/SetupDraw/SetupDraw.pde similarity index 100% rename from mode/examples/Basics/Structure/SetupDraw/SetupDraw.pde rename to processing/mode/examples/Basics/Structure/SetupDraw/SetupDraw.pde diff --git a/mode/examples/Basics/Structure/StatementsComments/StatementsComments.pde b/processing/mode/examples/Basics/Structure/StatementsComments/StatementsComments.pde similarity index 100% rename from mode/examples/Basics/Structure/StatementsComments/StatementsComments.pde rename to processing/mode/examples/Basics/Structure/StatementsComments/StatementsComments.pde diff --git a/mode/examples/Basics/Structure/WidthHeight/WidthHeight.pde b/processing/mode/examples/Basics/Structure/WidthHeight/WidthHeight.pde similarity index 100% rename from mode/examples/Basics/Structure/WidthHeight/WidthHeight.pde rename to processing/mode/examples/Basics/Structure/WidthHeight/WidthHeight.pde diff --git a/mode/examples/Basics/Transform/Arm/Arm.pde b/processing/mode/examples/Basics/Transform/Arm/Arm.pde similarity index 100% rename from mode/examples/Basics/Transform/Arm/Arm.pde rename to processing/mode/examples/Basics/Transform/Arm/Arm.pde diff --git a/mode/examples/Basics/Transform/Rotate/Rotate.pde b/processing/mode/examples/Basics/Transform/Rotate/Rotate.pde similarity index 100% rename from mode/examples/Basics/Transform/Rotate/Rotate.pde rename to processing/mode/examples/Basics/Transform/Rotate/Rotate.pde diff --git a/mode/examples/Basics/Transform/RotatePushPop/RotatePushPop.pde b/processing/mode/examples/Basics/Transform/RotatePushPop/RotatePushPop.pde similarity index 100% rename from mode/examples/Basics/Transform/RotatePushPop/RotatePushPop.pde rename to processing/mode/examples/Basics/Transform/RotatePushPop/RotatePushPop.pde diff --git a/mode/examples/Basics/Transform/RotateXY/RotateXY.pde b/processing/mode/examples/Basics/Transform/RotateXY/RotateXY.pde similarity index 100% rename from mode/examples/Basics/Transform/RotateXY/RotateXY.pde rename to processing/mode/examples/Basics/Transform/RotateXY/RotateXY.pde diff --git a/mode/examples/Basics/Transform/Scale/Scale.pde b/processing/mode/examples/Basics/Transform/Scale/Scale.pde similarity index 100% rename from mode/examples/Basics/Transform/Scale/Scale.pde rename to processing/mode/examples/Basics/Transform/Scale/Scale.pde diff --git a/mode/examples/Basics/Transform/Translate/Translate.pde b/processing/mode/examples/Basics/Transform/Translate/Translate.pde similarity index 100% rename from mode/examples/Basics/Transform/Translate/Translate.pde rename to processing/mode/examples/Basics/Transform/Translate/Translate.pde diff --git a/mode/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde b/processing/mode/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde similarity index 100% rename from mode/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde rename to processing/mode/examples/Basics/Transform/TriangleFlower/TriangleFlower.pde diff --git a/mode/examples/Basics/Typography/Letters/Letters.pde b/processing/mode/examples/Basics/Typography/Letters/Letters.pde similarity index 100% rename from mode/examples/Basics/Typography/Letters/Letters.pde rename to processing/mode/examples/Basics/Typography/Letters/Letters.pde diff --git a/mode/examples/Basics/Typography/Letters/data/CourierNew36.vlw b/processing/mode/examples/Basics/Typography/Letters/data/CourierNew36.vlw similarity index 100% rename from mode/examples/Basics/Typography/Letters/data/CourierNew36.vlw rename to processing/mode/examples/Basics/Typography/Letters/data/CourierNew36.vlw diff --git a/mode/examples/Basics/Typography/Words/Words.pde b/processing/mode/examples/Basics/Typography/Words/Words.pde similarity index 100% rename from mode/examples/Basics/Typography/Words/Words.pde rename to processing/mode/examples/Basics/Typography/Words/Words.pde diff --git a/mode/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw b/processing/mode/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw similarity index 100% rename from mode/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw rename to processing/mode/examples/Basics/Typography/Words/data/Ziggurat-HTF-Black-32.vlw diff --git a/mode/examples/Basics/Web/EmbeddedLinks/EmbeddedLinks.pde b/processing/mode/examples/Basics/Web/EmbeddedLinks/EmbeddedLinks.pde similarity index 100% rename from mode/examples/Basics/Web/EmbeddedLinks/EmbeddedLinks.pde rename to processing/mode/examples/Basics/Web/EmbeddedLinks/EmbeddedLinks.pde diff --git a/mode/examples/Basics/Web/LoadingImages/LoadingImages.pde b/processing/mode/examples/Basics/Web/LoadingImages/LoadingImages.pde similarity index 100% rename from mode/examples/Basics/Web/LoadingImages/LoadingImages.pde rename to processing/mode/examples/Basics/Web/LoadingImages/LoadingImages.pde diff --git a/mode/examples/Demos/Graphics/Particles/Particle.pde b/processing/mode/examples/Demos/Graphics/Particles/Particle.pde similarity index 100% rename from mode/examples/Demos/Graphics/Particles/Particle.pde rename to processing/mode/examples/Demos/Graphics/Particles/Particle.pde diff --git a/mode/examples/Demos/Graphics/Particles/ParticleSystem.pde b/processing/mode/examples/Demos/Graphics/Particles/ParticleSystem.pde similarity index 100% rename from mode/examples/Demos/Graphics/Particles/ParticleSystem.pde rename to processing/mode/examples/Demos/Graphics/Particles/ParticleSystem.pde diff --git a/mode/examples/Demos/Graphics/Particles/Particles.pde b/processing/mode/examples/Demos/Graphics/Particles/Particles.pde similarity index 100% rename from mode/examples/Demos/Graphics/Particles/Particles.pde rename to processing/mode/examples/Demos/Graphics/Particles/Particles.pde diff --git a/mode/examples/Demos/Graphics/Particles/data/sprite.png b/processing/mode/examples/Demos/Graphics/Particles/data/sprite.png similarity index 100% rename from mode/examples/Demos/Graphics/Particles/data/sprite.png rename to processing/mode/examples/Demos/Graphics/Particles/data/sprite.png diff --git a/mode/examples/Demos/Graphics/Patch/Patch.pde b/processing/mode/examples/Demos/Graphics/Patch/Patch.pde similarity index 100% rename from mode/examples/Demos/Graphics/Patch/Patch.pde rename to processing/mode/examples/Demos/Graphics/Patch/Patch.pde diff --git a/mode/examples/Demos/Graphics/Planets/Perlin.pde b/processing/mode/examples/Demos/Graphics/Planets/Perlin.pde similarity index 100% rename from mode/examples/Demos/Graphics/Planets/Perlin.pde rename to processing/mode/examples/Demos/Graphics/Planets/Perlin.pde diff --git a/mode/examples/Demos/Graphics/Planets/Planets.pde b/processing/mode/examples/Demos/Graphics/Planets/Planets.pde similarity index 100% rename from mode/examples/Demos/Graphics/Planets/Planets.pde rename to processing/mode/examples/Demos/Graphics/Planets/Planets.pde diff --git a/mode/examples/Demos/Graphics/Planets/data/mercury.jpg b/processing/mode/examples/Demos/Graphics/Planets/data/mercury.jpg similarity index 100% rename from mode/examples/Demos/Graphics/Planets/data/mercury.jpg rename to processing/mode/examples/Demos/Graphics/Planets/data/mercury.jpg diff --git a/mode/examples/Demos/Graphics/Planets/data/planet.jpg b/processing/mode/examples/Demos/Graphics/Planets/data/planet.jpg similarity index 100% rename from mode/examples/Demos/Graphics/Planets/data/planet.jpg rename to processing/mode/examples/Demos/Graphics/Planets/data/planet.jpg diff --git a/mode/examples/Demos/Graphics/Planets/data/starfield.jpg b/processing/mode/examples/Demos/Graphics/Planets/data/starfield.jpg similarity index 100% rename from mode/examples/Demos/Graphics/Planets/data/starfield.jpg rename to processing/mode/examples/Demos/Graphics/Planets/data/starfield.jpg diff --git a/mode/examples/Demos/Graphics/Planets/data/sun.jpg b/processing/mode/examples/Demos/Graphics/Planets/data/sun.jpg similarity index 100% rename from mode/examples/Demos/Graphics/Planets/data/sun.jpg rename to processing/mode/examples/Demos/Graphics/Planets/data/sun.jpg diff --git a/mode/examples/Demos/Graphics/Ribbons/ArcBall.pde b/processing/mode/examples/Demos/Graphics/Ribbons/ArcBall.pde similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/ArcBall.pde rename to processing/mode/examples/Demos/Graphics/Ribbons/ArcBall.pde diff --git a/mode/examples/Demos/Graphics/Ribbons/BSpline.pde b/processing/mode/examples/Demos/Graphics/Ribbons/BSpline.pde similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/BSpline.pde rename to processing/mode/examples/Demos/Graphics/Ribbons/BSpline.pde diff --git a/mode/examples/Demos/Graphics/Ribbons/Geometry.pde b/processing/mode/examples/Demos/Graphics/Ribbons/Geometry.pde similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/Geometry.pde rename to processing/mode/examples/Demos/Graphics/Ribbons/Geometry.pde diff --git a/mode/examples/Demos/Graphics/Ribbons/PDB.pde b/processing/mode/examples/Demos/Graphics/Ribbons/PDB.pde similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/PDB.pde rename to processing/mode/examples/Demos/Graphics/Ribbons/PDB.pde diff --git a/mode/examples/Demos/Graphics/Ribbons/Ribbons.pde b/processing/mode/examples/Demos/Graphics/Ribbons/Ribbons.pde similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/Ribbons.pde rename to processing/mode/examples/Demos/Graphics/Ribbons/Ribbons.pde diff --git a/mode/examples/Demos/Graphics/Ribbons/data/1CBS.pdb b/processing/mode/examples/Demos/Graphics/Ribbons/data/1CBS.pdb similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/data/1CBS.pdb rename to processing/mode/examples/Demos/Graphics/Ribbons/data/1CBS.pdb diff --git a/mode/examples/Demos/Graphics/Ribbons/data/2POR.pdb b/processing/mode/examples/Demos/Graphics/Ribbons/data/2POR.pdb similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/data/2POR.pdb rename to processing/mode/examples/Demos/Graphics/Ribbons/data/2POR.pdb diff --git a/mode/examples/Demos/Graphics/Ribbons/data/4HHB.pdb b/processing/mode/examples/Demos/Graphics/Ribbons/data/4HHB.pdb similarity index 100% rename from mode/examples/Demos/Graphics/Ribbons/data/4HHB.pdb rename to processing/mode/examples/Demos/Graphics/Ribbons/data/4HHB.pdb diff --git a/mode/examples/Demos/Graphics/RotatingArcs/RotatingArcs.pde b/processing/mode/examples/Demos/Graphics/RotatingArcs/RotatingArcs.pde similarity index 100% rename from mode/examples/Demos/Graphics/RotatingArcs/RotatingArcs.pde rename to processing/mode/examples/Demos/Graphics/RotatingArcs/RotatingArcs.pde diff --git a/mode/examples/Demos/Graphics/Trefoil/Surface.pde b/processing/mode/examples/Demos/Graphics/Trefoil/Surface.pde similarity index 100% rename from mode/examples/Demos/Graphics/Trefoil/Surface.pde rename to processing/mode/examples/Demos/Graphics/Trefoil/Surface.pde diff --git a/mode/examples/Demos/Graphics/Trefoil/Trefoil.pde b/processing/mode/examples/Demos/Graphics/Trefoil/Trefoil.pde similarity index 100% rename from mode/examples/Demos/Graphics/Trefoil/Trefoil.pde rename to processing/mode/examples/Demos/Graphics/Trefoil/Trefoil.pde diff --git a/mode/examples/Demos/Graphics/Trefoil/data/particle.png b/processing/mode/examples/Demos/Graphics/Trefoil/data/particle.png similarity index 100% rename from mode/examples/Demos/Graphics/Trefoil/data/particle.png rename to processing/mode/examples/Demos/Graphics/Trefoil/data/particle.png diff --git a/mode/examples/Demos/Graphics/Wiggling/Wiggling.pde b/processing/mode/examples/Demos/Graphics/Wiggling/Wiggling.pde similarity index 100% rename from mode/examples/Demos/Graphics/Wiggling/Wiggling.pde rename to processing/mode/examples/Demos/Graphics/Wiggling/Wiggling.pde diff --git a/mode/examples/Demos/Graphics/Yellowtail/Gesture.pde b/processing/mode/examples/Demos/Graphics/Yellowtail/Gesture.pde similarity index 100% rename from mode/examples/Demos/Graphics/Yellowtail/Gesture.pde rename to processing/mode/examples/Demos/Graphics/Yellowtail/Gesture.pde diff --git a/mode/examples/Demos/Graphics/Yellowtail/Polygon.pde b/processing/mode/examples/Demos/Graphics/Yellowtail/Polygon.pde similarity index 100% rename from mode/examples/Demos/Graphics/Yellowtail/Polygon.pde rename to processing/mode/examples/Demos/Graphics/Yellowtail/Polygon.pde diff --git a/mode/examples/Demos/Graphics/Yellowtail/Vec3f.pde b/processing/mode/examples/Demos/Graphics/Yellowtail/Vec3f.pde similarity index 100% rename from mode/examples/Demos/Graphics/Yellowtail/Vec3f.pde rename to processing/mode/examples/Demos/Graphics/Yellowtail/Vec3f.pde diff --git a/mode/examples/Demos/Graphics/Yellowtail/Yellowtail.pde b/processing/mode/examples/Demos/Graphics/Yellowtail/Yellowtail.pde similarity index 100% rename from mode/examples/Demos/Graphics/Yellowtail/Yellowtail.pde rename to processing/mode/examples/Demos/Graphics/Yellowtail/Yellowtail.pde diff --git a/mode/examples/Demos/Performance/CubicGridImmediate/CubicGridImmediate.pde b/processing/mode/examples/Demos/Performance/CubicGridImmediate/CubicGridImmediate.pde similarity index 100% rename from mode/examples/Demos/Performance/CubicGridImmediate/CubicGridImmediate.pde rename to processing/mode/examples/Demos/Performance/CubicGridImmediate/CubicGridImmediate.pde diff --git a/mode/examples/Demos/Performance/CubicGridRetained/CubicGridRetained.pde b/processing/mode/examples/Demos/Performance/CubicGridRetained/CubicGridRetained.pde similarity index 100% rename from mode/examples/Demos/Performance/CubicGridRetained/CubicGridRetained.pde rename to processing/mode/examples/Demos/Performance/CubicGridRetained/CubicGridRetained.pde diff --git a/mode/examples/Demos/Performance/DynamicParticlesImmediate/DynamicParticlesImmediate.pde b/processing/mode/examples/Demos/Performance/DynamicParticlesImmediate/DynamicParticlesImmediate.pde similarity index 100% rename from mode/examples/Demos/Performance/DynamicParticlesImmediate/DynamicParticlesImmediate.pde rename to processing/mode/examples/Demos/Performance/DynamicParticlesImmediate/DynamicParticlesImmediate.pde diff --git a/mode/examples/Demos/Performance/DynamicParticlesImmediate/data/sprite.png b/processing/mode/examples/Demos/Performance/DynamicParticlesImmediate/data/sprite.png similarity index 100% rename from mode/examples/Demos/Performance/DynamicParticlesImmediate/data/sprite.png rename to processing/mode/examples/Demos/Performance/DynamicParticlesImmediate/data/sprite.png diff --git a/mode/examples/Demos/Performance/DynamicParticlesRetained/DynamicParticlesRetained.pde b/processing/mode/examples/Demos/Performance/DynamicParticlesRetained/DynamicParticlesRetained.pde similarity index 100% rename from mode/examples/Demos/Performance/DynamicParticlesRetained/DynamicParticlesRetained.pde rename to processing/mode/examples/Demos/Performance/DynamicParticlesRetained/DynamicParticlesRetained.pde diff --git a/mode/examples/Demos/Performance/DynamicParticlesRetained/data/sprite.png b/processing/mode/examples/Demos/Performance/DynamicParticlesRetained/data/sprite.png similarity index 100% rename from mode/examples/Demos/Performance/DynamicParticlesRetained/data/sprite.png rename to processing/mode/examples/Demos/Performance/DynamicParticlesRetained/data/sprite.png diff --git a/mode/examples/Demos/Performance/Esfera/Esfera.pde b/processing/mode/examples/Demos/Performance/Esfera/Esfera.pde similarity index 100% rename from mode/examples/Demos/Performance/Esfera/Esfera.pde rename to processing/mode/examples/Demos/Performance/Esfera/Esfera.pde diff --git a/mode/examples/Demos/Performance/LineRendering/LineRendering.pde b/processing/mode/examples/Demos/Performance/LineRendering/LineRendering.pde similarity index 100% rename from mode/examples/Demos/Performance/LineRendering/LineRendering.pde rename to processing/mode/examples/Demos/Performance/LineRendering/LineRendering.pde diff --git a/mode/examples/Demos/Performance/P2DXDemo/P2DXDemo.pde b/processing/mode/examples/Demos/Performance/P2DXDemo/P2DXDemo.pde similarity index 100% rename from mode/examples/Demos/Performance/P2DXDemo/P2DXDemo.pde rename to processing/mode/examples/Demos/Performance/P2DXDemo/P2DXDemo.pde diff --git a/mode/examples/Demos/Performance/QuadRendering/QuadRendering.pde b/processing/mode/examples/Demos/Performance/QuadRendering/QuadRendering.pde similarity index 100% rename from mode/examples/Demos/Performance/QuadRendering/QuadRendering.pde rename to processing/mode/examples/Demos/Performance/QuadRendering/QuadRendering.pde diff --git a/mode/examples/Demos/Performance/StaticParticlesImmediate/StaticParticlesImmediate.pde b/processing/mode/examples/Demos/Performance/StaticParticlesImmediate/StaticParticlesImmediate.pde similarity index 100% rename from mode/examples/Demos/Performance/StaticParticlesImmediate/StaticParticlesImmediate.pde rename to processing/mode/examples/Demos/Performance/StaticParticlesImmediate/StaticParticlesImmediate.pde diff --git a/mode/examples/Demos/Performance/StaticParticlesImmediate/data/sprite.png b/processing/mode/examples/Demos/Performance/StaticParticlesImmediate/data/sprite.png similarity index 100% rename from mode/examples/Demos/Performance/StaticParticlesImmediate/data/sprite.png rename to processing/mode/examples/Demos/Performance/StaticParticlesImmediate/data/sprite.png diff --git a/mode/examples/Demos/Performance/StaticParticlesRetained/StaticParticlesRetained.pde b/processing/mode/examples/Demos/Performance/StaticParticlesRetained/StaticParticlesRetained.pde similarity index 100% rename from mode/examples/Demos/Performance/StaticParticlesRetained/StaticParticlesRetained.pde rename to processing/mode/examples/Demos/Performance/StaticParticlesRetained/StaticParticlesRetained.pde diff --git a/mode/examples/Demos/Performance/StaticParticlesRetained/data/sprite.png b/processing/mode/examples/Demos/Performance/StaticParticlesRetained/data/sprite.png similarity index 100% rename from mode/examples/Demos/Performance/StaticParticlesRetained/data/sprite.png rename to processing/mode/examples/Demos/Performance/StaticParticlesRetained/data/sprite.png diff --git a/mode/examples/Demos/Performance/TextRendering/TextRendering.pde b/processing/mode/examples/Demos/Performance/TextRendering/TextRendering.pde similarity index 100% rename from mode/examples/Demos/Performance/TextRendering/TextRendering.pde rename to processing/mode/examples/Demos/Performance/TextRendering/TextRendering.pde diff --git a/mode/examples/Demos/Tests/NoBackgroundTest/NoBackgroundTest.pde b/processing/mode/examples/Demos/Tests/NoBackgroundTest/NoBackgroundTest.pde similarity index 100% rename from mode/examples/Demos/Tests/NoBackgroundTest/NoBackgroundTest.pde rename to processing/mode/examples/Demos/Tests/NoBackgroundTest/NoBackgroundTest.pde diff --git a/mode/examples/Demos/Tests/OffscreenTest/OffscreenTest.pde b/processing/mode/examples/Demos/Tests/OffscreenTest/OffscreenTest.pde similarity index 100% rename from mode/examples/Demos/Tests/OffscreenTest/OffscreenTest.pde rename to processing/mode/examples/Demos/Tests/OffscreenTest/OffscreenTest.pde diff --git a/mode/examples/Demos/Tests/RedrawTest/RedrawTest.pde b/processing/mode/examples/Demos/Tests/RedrawTest/RedrawTest.pde similarity index 100% rename from mode/examples/Demos/Tests/RedrawTest/RedrawTest.pde rename to processing/mode/examples/Demos/Tests/RedrawTest/RedrawTest.pde diff --git a/mode/examples/Sensors/Accelerometer/Accelerometer.pde b/processing/mode/examples/Sensors/Accelerometer/Accelerometer.pde similarity index 100% rename from mode/examples/Sensors/Accelerometer/Accelerometer.pde rename to processing/mode/examples/Sensors/Accelerometer/Accelerometer.pde diff --git a/mode/examples/Sensors/Accelerometer/AccelerometerManager.java b/processing/mode/examples/Sensors/Accelerometer/AccelerometerManager.java similarity index 100% rename from mode/examples/Sensors/Accelerometer/AccelerometerManager.java rename to processing/mode/examples/Sensors/Accelerometer/AccelerometerManager.java diff --git a/mode/examples/Sensors/Compass/Compass.pde b/processing/mode/examples/Sensors/Compass/Compass.pde similarity index 100% rename from mode/examples/Sensors/Compass/Compass.pde rename to processing/mode/examples/Sensors/Compass/Compass.pde diff --git a/mode/examples/Sensors/Compass/CompassManager.java b/processing/mode/examples/Sensors/Compass/CompassManager.java similarity index 100% rename from mode/examples/Sensors/Compass/CompassManager.java rename to processing/mode/examples/Sensors/Compass/CompassManager.java diff --git a/mode/examples/Topics/Advanced Data/ArrayListClass/ArrayListClass.pde b/processing/mode/examples/Topics/Advanced Data/ArrayListClass/ArrayListClass.pde similarity index 100% rename from mode/examples/Topics/Advanced Data/ArrayListClass/ArrayListClass.pde rename to processing/mode/examples/Topics/Advanced Data/ArrayListClass/ArrayListClass.pde diff --git a/mode/examples/Topics/Advanced Data/ArrayListClass/Ball.pde b/processing/mode/examples/Topics/Advanced Data/ArrayListClass/Ball.pde similarity index 100% rename from mode/examples/Topics/Advanced Data/ArrayListClass/Ball.pde rename to processing/mode/examples/Topics/Advanced Data/ArrayListClass/Ball.pde diff --git a/mode/examples/Topics/Advanced Data/DirectoryList/DirectoryList.pde b/processing/mode/examples/Topics/Advanced Data/DirectoryList/DirectoryList.pde similarity index 100% rename from mode/examples/Topics/Advanced Data/DirectoryList/DirectoryList.pde rename to processing/mode/examples/Topics/Advanced Data/DirectoryList/DirectoryList.pde diff --git a/mode/examples/Topics/Advanced Data/HashMapClass/HashMapClass.pde b/processing/mode/examples/Topics/Advanced Data/HashMapClass/HashMapClass.pde similarity index 100% rename from mode/examples/Topics/Advanced Data/HashMapClass/HashMapClass.pde rename to processing/mode/examples/Topics/Advanced Data/HashMapClass/HashMapClass.pde diff --git a/mode/examples/Topics/Advanced Data/HashMapClass/Word.pde b/processing/mode/examples/Topics/Advanced Data/HashMapClass/Word.pde similarity index 100% rename from mode/examples/Topics/Advanced Data/HashMapClass/Word.pde rename to processing/mode/examples/Topics/Advanced Data/HashMapClass/Word.pde diff --git a/mode/examples/Topics/Advanced Data/HashMapClass/data/dracula.txt b/processing/mode/examples/Topics/Advanced Data/HashMapClass/data/dracula.txt similarity index 100% rename from mode/examples/Topics/Advanced Data/HashMapClass/data/dracula.txt rename to processing/mode/examples/Topics/Advanced Data/HashMapClass/data/dracula.txt diff --git a/mode/examples/Topics/Advanced Data/HashMapClass/data/hamlet.txt b/processing/mode/examples/Topics/Advanced Data/HashMapClass/data/hamlet.txt similarity index 100% rename from mode/examples/Topics/Advanced Data/HashMapClass/data/hamlet.txt rename to processing/mode/examples/Topics/Advanced Data/HashMapClass/data/hamlet.txt diff --git a/mode/examples/Topics/Animation/AnimatedSprite/AnimatedSprite.pde b/processing/mode/examples/Topics/Animation/AnimatedSprite/AnimatedSprite.pde similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/AnimatedSprite.pde rename to processing/mode/examples/Topics/Animation/AnimatedSprite/AnimatedSprite.pde diff --git a/mode/examples/Topics/Animation/AnimatedSprite/Animation.pde b/processing/mode/examples/Topics/Animation/AnimatedSprite/Animation.pde similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/Animation.pde rename to processing/mode/examples/Topics/Animation/AnimatedSprite/Animation.pde diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0000.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0000.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0000.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0000.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0001.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0001.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0001.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0001.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0002.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0002.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0002.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0002.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0003.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0003.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0003.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0003.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0004.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0004.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0004.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0004.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0005.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0005.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0005.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0005.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0006.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0006.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0006.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0006.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0007.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0007.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0007.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0007.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0008.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0008.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0008.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0008.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0009.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0009.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0009.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0009.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0010.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0010.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0010.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0010.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0011.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0011.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0011.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0011.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0012.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0012.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0012.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0012.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0013.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0013.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0013.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0013.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0014.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0014.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0014.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0014.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0015.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0015.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0015.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0015.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0016.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0016.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0016.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0016.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0017.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0017.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0017.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0017.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0018.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0018.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0018.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0018.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0019.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0019.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0019.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0019.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0020.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0020.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0020.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0020.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0021.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0021.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0021.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0021.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0022.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0022.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0022.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0022.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0023.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0023.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0023.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0023.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0024.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0024.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0024.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0024.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0025.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0025.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0025.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0025.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0026.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0026.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0026.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0026.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0027.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0027.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0027.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0027.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0028.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0028.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0028.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0028.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0029.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0029.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0029.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0029.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0030.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0030.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0030.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0030.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0031.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0031.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0031.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0031.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0032.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0032.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0032.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0032.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0033.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0033.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0033.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0033.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0034.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0034.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0034.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0034.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0035.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0035.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0035.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0035.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0036.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0036.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0036.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0036.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0037.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0037.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0037.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Shifty_0037.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0000.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0000.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0000.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0000.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0001.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0001.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0001.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0001.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0002.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0002.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0002.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0002.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0003.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0003.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0003.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0003.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0004.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0004.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0004.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0004.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0005.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0005.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0005.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0005.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0006.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0006.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0006.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0006.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0007.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0007.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0007.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0007.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0008.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0008.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0008.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0008.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0009.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0009.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0009.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0009.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0010.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0010.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0010.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0010.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0011.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0011.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0011.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0011.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0012.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0012.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0012.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0012.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0013.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0013.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0013.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0013.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0014.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0014.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0014.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0014.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0015.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0015.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0015.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0015.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0016.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0016.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0016.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0016.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0017.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0017.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0017.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0017.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0018.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0018.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0018.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0018.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0019.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0019.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0019.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0019.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0020.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0020.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0020.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0020.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0021.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0021.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0021.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0021.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0022.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0022.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0022.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0022.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0023.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0023.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0023.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0023.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0024.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0024.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0024.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0024.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0025.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0025.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0025.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0025.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0026.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0026.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0026.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0026.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0027.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0027.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0027.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0027.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0028.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0028.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0028.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0028.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0029.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0029.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0029.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0029.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0030.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0030.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0030.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0030.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0031.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0031.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0031.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0031.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0032.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0032.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0032.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0032.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0033.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0033.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0033.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0033.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0034.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0034.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0034.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0034.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0035.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0035.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0035.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0035.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0036.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0036.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0036.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0036.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0037.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0037.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0037.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0037.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0038.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0038.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0038.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0038.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0039.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0039.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0039.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0039.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0040.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0040.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0040.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0040.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0041.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0041.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0041.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0041.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0042.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0042.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0042.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0042.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0043.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0043.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0043.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0043.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0044.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0044.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0044.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0044.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0045.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0045.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0045.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0045.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0046.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0046.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0046.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0046.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0047.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0047.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0047.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0047.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0048.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0048.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0048.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0048.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0049.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0049.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0049.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0049.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0050.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0050.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0050.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0050.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0051.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0051.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0051.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0051.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0052.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0052.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0052.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0052.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0053.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0053.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0053.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0053.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0054.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0054.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0054.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0054.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0055.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0055.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0055.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0055.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0056.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0056.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0056.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0056.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0057.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0057.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0057.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0057.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0058.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0058.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0058.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0058.gif diff --git a/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0059.gif b/processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0059.gif similarity index 100% rename from mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0059.gif rename to processing/mode/examples/Topics/Animation/AnimatedSprite/data/PT_Teddy_0059.gif diff --git a/mode/examples/Topics/Animation/Sequential/Sequential.pde b/processing/mode/examples/Topics/Animation/Sequential/Sequential.pde similarity index 100% rename from mode/examples/Topics/Animation/Sequential/Sequential.pde rename to processing/mode/examples/Topics/Animation/Sequential/Sequential.pde diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0000.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0000.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0000.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0000.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0001.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0001.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0001.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0001.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0002.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0002.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0002.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0002.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0003.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0003.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0003.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0003.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0004.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0004.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0004.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0004.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0005.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0005.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0005.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0005.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0006.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0006.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0006.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0006.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0007.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0007.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0007.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0007.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0008.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0008.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0008.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0008.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0009.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0009.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0009.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0009.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0010.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0010.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0010.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0010.gif diff --git a/mode/examples/Topics/Animation/Sequential/data/PT_anim0011.gif b/processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0011.gif similarity index 100% rename from mode/examples/Topics/Animation/Sequential/data/PT_anim0011.gif rename to processing/mode/examples/Topics/Animation/Sequential/data/PT_anim0011.gif diff --git a/mode/examples/Topics/Cellular Automata/Conway/Conway.pde b/processing/mode/examples/Topics/Cellular Automata/Conway/Conway.pde similarity index 100% rename from mode/examples/Topics/Cellular Automata/Conway/Conway.pde rename to processing/mode/examples/Topics/Cellular Automata/Conway/Conway.pde diff --git a/mode/examples/Topics/Cellular Automata/Spore1/Spore1.pde b/processing/mode/examples/Topics/Cellular Automata/Spore1/Spore1.pde similarity index 100% rename from mode/examples/Topics/Cellular Automata/Spore1/Spore1.pde rename to processing/mode/examples/Topics/Cellular Automata/Spore1/Spore1.pde diff --git a/mode/examples/Topics/Cellular Automata/Spore2/Spore2.pde b/processing/mode/examples/Topics/Cellular Automata/Spore2/Spore2.pde similarity index 100% rename from mode/examples/Topics/Cellular Automata/Spore2/Spore2.pde rename to processing/mode/examples/Topics/Cellular Automata/Spore2/Spore2.pde diff --git a/mode/examples/Topics/Cellular Automata/Wolfram/CA.pde b/processing/mode/examples/Topics/Cellular Automata/Wolfram/CA.pde similarity index 100% rename from mode/examples/Topics/Cellular Automata/Wolfram/CA.pde rename to processing/mode/examples/Topics/Cellular Automata/Wolfram/CA.pde diff --git a/mode/examples/Topics/Cellular Automata/Wolfram/Wolfram.pde b/processing/mode/examples/Topics/Cellular Automata/Wolfram/Wolfram.pde similarity index 100% rename from mode/examples/Topics/Cellular Automata/Wolfram/Wolfram.pde rename to processing/mode/examples/Topics/Cellular Automata/Wolfram/Wolfram.pde diff --git a/mode/examples/Topics/Create Shapes/BeginEndContour/BeginEndContour.pde b/processing/mode/examples/Topics/Create Shapes/BeginEndContour/BeginEndContour.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/BeginEndContour/BeginEndContour.pde rename to processing/mode/examples/Topics/Create Shapes/BeginEndContour/BeginEndContour.pde diff --git a/mode/examples/Topics/Create Shapes/GroupPShape/GroupPShape.pde b/processing/mode/examples/Topics/Create Shapes/GroupPShape/GroupPShape.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/GroupPShape/GroupPShape.pde rename to processing/mode/examples/Topics/Create Shapes/GroupPShape/GroupPShape.pde diff --git a/mode/examples/Topics/Create Shapes/ParticleSystemPShape/Particle.pde b/processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/Particle.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/ParticleSystemPShape/Particle.pde rename to processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/Particle.pde diff --git a/mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystem.pde b/processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystem.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystem.pde rename to processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystem.pde diff --git a/mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystemPShape.pde b/processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystemPShape.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystemPShape.pde rename to processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/ParticleSystemPShape.pde diff --git a/mode/examples/Topics/Create Shapes/ParticleSystemPShape/data/sprite.png b/processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/data/sprite.png similarity index 100% rename from mode/examples/Topics/Create Shapes/ParticleSystemPShape/data/sprite.png rename to processing/mode/examples/Topics/Create Shapes/ParticleSystemPShape/data/sprite.png diff --git a/mode/examples/Topics/Create Shapes/PathPShape/PathPShape.pde b/processing/mode/examples/Topics/Create Shapes/PathPShape/PathPShape.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PathPShape/PathPShape.pde rename to processing/mode/examples/Topics/Create Shapes/PathPShape/PathPShape.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShape/PolygonPShape.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShapeOOP/PolygonPShapeOOP.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP/PolygonPShapeOOP.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShapeOOP/PolygonPShapeOOP.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP/PolygonPShapeOOP.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShapeOOP/Star.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP/Star.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShapeOOP/Star.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP/Star.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/Polygon.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/Polygon.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/Polygon.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/Polygon.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/Polygon.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/Polygon.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/Polygon.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/Polygon.pde diff --git a/mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/PolygonPShapeOOP3.pde b/processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/PolygonPShapeOOP3.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/PolygonPShapeOOP3.pde rename to processing/mode/examples/Topics/Create Shapes/PolygonPShapeOOP3/PolygonPShapeOOP3.pde diff --git a/mode/examples/Topics/Create Shapes/PrimitivePShape/PrimitivePShape.pde b/processing/mode/examples/Topics/Create Shapes/PrimitivePShape/PrimitivePShape.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/PrimitivePShape/PrimitivePShape.pde rename to processing/mode/examples/Topics/Create Shapes/PrimitivePShape/PrimitivePShape.pde diff --git a/mode/examples/Topics/Create Shapes/WigglePShape/WigglePShape.pde b/processing/mode/examples/Topics/Create Shapes/WigglePShape/WigglePShape.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/WigglePShape/WigglePShape.pde rename to processing/mode/examples/Topics/Create Shapes/WigglePShape/WigglePShape.pde diff --git a/mode/examples/Topics/Create Shapes/WigglePShape/Wiggler.pde b/processing/mode/examples/Topics/Create Shapes/WigglePShape/Wiggler.pde similarity index 100% rename from mode/examples/Topics/Create Shapes/WigglePShape/Wiggler.pde rename to processing/mode/examples/Topics/Create Shapes/WigglePShape/Wiggler.pde diff --git a/mode/examples/Topics/Drawing/Animator/Animator.pde b/processing/mode/examples/Topics/Drawing/Animator/Animator.pde similarity index 100% rename from mode/examples/Topics/Drawing/Animator/Animator.pde rename to processing/mode/examples/Topics/Drawing/Animator/Animator.pde diff --git a/mode/examples/Topics/Drawing/ContinuousLines/ContinuousLines.pde b/processing/mode/examples/Topics/Drawing/ContinuousLines/ContinuousLines.pde similarity index 100% rename from mode/examples/Topics/Drawing/ContinuousLines/ContinuousLines.pde rename to processing/mode/examples/Topics/Drawing/ContinuousLines/ContinuousLines.pde diff --git a/mode/examples/Topics/Drawing/CustomTool/CustomTool.pde b/processing/mode/examples/Topics/Drawing/CustomTool/CustomTool.pde similarity index 100% rename from mode/examples/Topics/Drawing/CustomTool/CustomTool.pde rename to processing/mode/examples/Topics/Drawing/CustomTool/CustomTool.pde diff --git a/mode/examples/Topics/Drawing/CustomTool/data/milan.jpg b/processing/mode/examples/Topics/Drawing/CustomTool/data/milan.jpg similarity index 100% rename from mode/examples/Topics/Drawing/CustomTool/data/milan.jpg rename to processing/mode/examples/Topics/Drawing/CustomTool/data/milan.jpg diff --git a/mode/examples/Topics/Drawing/CustomTool/data/paris.jpg b/processing/mode/examples/Topics/Drawing/CustomTool/data/paris.jpg similarity index 100% rename from mode/examples/Topics/Drawing/CustomTool/data/paris.jpg rename to processing/mode/examples/Topics/Drawing/CustomTool/data/paris.jpg diff --git a/mode/examples/Topics/Drawing/Pattern/Pattern.pde b/processing/mode/examples/Topics/Drawing/Pattern/Pattern.pde similarity index 100% rename from mode/examples/Topics/Drawing/Pattern/Pattern.pde rename to processing/mode/examples/Topics/Drawing/Pattern/Pattern.pde diff --git a/mode/examples/Topics/Drawing/Pulses/Pulses.pde b/processing/mode/examples/Topics/Drawing/Pulses/Pulses.pde similarity index 100% rename from mode/examples/Topics/Drawing/Pulses/Pulses.pde rename to processing/mode/examples/Topics/Drawing/Pulses/Pulses.pde diff --git a/mode/examples/Topics/Drawing/ScribblePlotter/ScribblePlotter.pde b/processing/mode/examples/Topics/Drawing/ScribblePlotter/ScribblePlotter.pde similarity index 100% rename from mode/examples/Topics/Drawing/ScribblePlotter/ScribblePlotter.pde rename to processing/mode/examples/Topics/Drawing/ScribblePlotter/ScribblePlotter.pde diff --git a/mode/examples/Topics/Effects/FireCube/FireCube.pde b/processing/mode/examples/Topics/Effects/FireCube/FireCube.pde similarity index 100% rename from mode/examples/Topics/Effects/FireCube/FireCube.pde rename to processing/mode/examples/Topics/Effects/FireCube/FireCube.pde diff --git a/mode/examples/Topics/Effects/Lens/Lens.pde b/processing/mode/examples/Topics/Effects/Lens/Lens.pde similarity index 100% rename from mode/examples/Topics/Effects/Lens/Lens.pde rename to processing/mode/examples/Topics/Effects/Lens/Lens.pde diff --git a/mode/examples/Topics/Effects/Lens/data/red_smoke.jpg b/processing/mode/examples/Topics/Effects/Lens/data/red_smoke.jpg similarity index 100% rename from mode/examples/Topics/Effects/Lens/data/red_smoke.jpg rename to processing/mode/examples/Topics/Effects/Lens/data/red_smoke.jpg diff --git a/mode/examples/Topics/Effects/Metaball/Metaball.pde b/processing/mode/examples/Topics/Effects/Metaball/Metaball.pde similarity index 100% rename from mode/examples/Topics/Effects/Metaball/Metaball.pde rename to processing/mode/examples/Topics/Effects/Metaball/Metaball.pde diff --git a/mode/examples/Topics/Effects/Plasma/Plasma.pde b/processing/mode/examples/Topics/Effects/Plasma/Plasma.pde similarity index 100% rename from mode/examples/Topics/Effects/Plasma/Plasma.pde rename to processing/mode/examples/Topics/Effects/Plasma/Plasma.pde diff --git a/mode/examples/Topics/Effects/Tunnel/Tunnel.pde b/processing/mode/examples/Topics/Effects/Tunnel/Tunnel.pde similarity index 100% rename from mode/examples/Topics/Effects/Tunnel/Tunnel.pde rename to processing/mode/examples/Topics/Effects/Tunnel/Tunnel.pde diff --git a/mode/examples/Topics/Effects/Tunnel/data/red_smoke.jpg b/processing/mode/examples/Topics/Effects/Tunnel/data/red_smoke.jpg similarity index 100% rename from mode/examples/Topics/Effects/Tunnel/data/red_smoke.jpg rename to processing/mode/examples/Topics/Effects/Tunnel/data/red_smoke.jpg diff --git a/mode/examples/Topics/Effects/UnlimitedSprites/UnlimitedSprites.pde b/processing/mode/examples/Topics/Effects/UnlimitedSprites/UnlimitedSprites.pde similarity index 100% rename from mode/examples/Topics/Effects/UnlimitedSprites/UnlimitedSprites.pde rename to processing/mode/examples/Topics/Effects/UnlimitedSprites/UnlimitedSprites.pde diff --git a/mode/examples/Topics/Effects/UnlimitedSprites/data/Aqua-Ball-48x48.png b/processing/mode/examples/Topics/Effects/UnlimitedSprites/data/Aqua-Ball-48x48.png similarity index 100% rename from mode/examples/Topics/Effects/UnlimitedSprites/data/Aqua-Ball-48x48.png rename to processing/mode/examples/Topics/Effects/UnlimitedSprites/data/Aqua-Ball-48x48.png diff --git a/mode/examples/Topics/Effects/Wormhole/Wormhole.pde b/processing/mode/examples/Topics/Effects/Wormhole/Wormhole.pde similarity index 100% rename from mode/examples/Topics/Effects/Wormhole/Wormhole.pde rename to processing/mode/examples/Topics/Effects/Wormhole/Wormhole.pde diff --git a/mode/examples/Topics/Effects/Wormhole/data/texture.gif b/processing/mode/examples/Topics/Effects/Wormhole/data/texture.gif similarity index 100% rename from mode/examples/Topics/Effects/Wormhole/data/texture.gif rename to processing/mode/examples/Topics/Effects/Wormhole/data/texture.gif diff --git a/mode/examples/Topics/Effects/Wormhole/data/wormhole.png b/processing/mode/examples/Topics/Effects/Wormhole/data/wormhole.png similarity index 100% rename from mode/examples/Topics/Effects/Wormhole/data/wormhole.png rename to processing/mode/examples/Topics/Effects/Wormhole/data/wormhole.png diff --git a/mode/examples/Topics/File IO/LoadFile1/LoadFile1.pde b/processing/mode/examples/Topics/File IO/LoadFile1/LoadFile1.pde similarity index 100% rename from mode/examples/Topics/File IO/LoadFile1/LoadFile1.pde rename to processing/mode/examples/Topics/File IO/LoadFile1/LoadFile1.pde diff --git a/mode/examples/Topics/File IO/LoadFile1/data/positions.txt b/processing/mode/examples/Topics/File IO/LoadFile1/data/positions.txt similarity index 100% rename from mode/examples/Topics/File IO/LoadFile1/data/positions.txt rename to processing/mode/examples/Topics/File IO/LoadFile1/data/positions.txt diff --git a/mode/examples/Topics/File IO/LoadFile2/LoadFile2.pde b/processing/mode/examples/Topics/File IO/LoadFile2/LoadFile2.pde similarity index 100% rename from mode/examples/Topics/File IO/LoadFile2/LoadFile2.pde rename to processing/mode/examples/Topics/File IO/LoadFile2/LoadFile2.pde diff --git a/mode/examples/Topics/File IO/LoadFile2/Record.pde b/processing/mode/examples/Topics/File IO/LoadFile2/Record.pde similarity index 100% rename from mode/examples/Topics/File IO/LoadFile2/Record.pde rename to processing/mode/examples/Topics/File IO/LoadFile2/Record.pde diff --git a/mode/examples/Topics/File IO/LoadFile2/data/TheSans-Plain-12.vlw b/processing/mode/examples/Topics/File IO/LoadFile2/data/TheSans-Plain-12.vlw similarity index 100% rename from mode/examples/Topics/File IO/LoadFile2/data/TheSans-Plain-12.vlw rename to processing/mode/examples/Topics/File IO/LoadFile2/data/TheSans-Plain-12.vlw diff --git a/mode/examples/Topics/File IO/LoadFile2/data/cars2.tsv b/processing/mode/examples/Topics/File IO/LoadFile2/data/cars2.tsv similarity index 100% rename from mode/examples/Topics/File IO/LoadFile2/data/cars2.tsv rename to processing/mode/examples/Topics/File IO/LoadFile2/data/cars2.tsv diff --git a/mode/examples/Topics/File IO/SaveFile1/SaveFile1.pde b/processing/mode/examples/Topics/File IO/SaveFile1/SaveFile1.pde similarity index 100% rename from mode/examples/Topics/File IO/SaveFile1/SaveFile1.pde rename to processing/mode/examples/Topics/File IO/SaveFile1/SaveFile1.pde diff --git a/mode/examples/Topics/File IO/SaveFile2/SaveFile2.pde b/processing/mode/examples/Topics/File IO/SaveFile2/SaveFile2.pde similarity index 100% rename from mode/examples/Topics/File IO/SaveFile2/SaveFile2.pde rename to processing/mode/examples/Topics/File IO/SaveFile2/SaveFile2.pde diff --git a/mode/examples/Topics/File IO/SaveManyImages/SaveManyImages.pde b/processing/mode/examples/Topics/File IO/SaveManyImages/SaveManyImages.pde similarity index 100% rename from mode/examples/Topics/File IO/SaveManyImages/SaveManyImages.pde rename to processing/mode/examples/Topics/File IO/SaveManyImages/SaveManyImages.pde diff --git a/mode/examples/Topics/File IO/SaveOneImage/SaveOneImage.pde b/processing/mode/examples/Topics/File IO/SaveOneImage/SaveOneImage.pde similarity index 100% rename from mode/examples/Topics/File IO/SaveOneImage/SaveOneImage.pde rename to processing/mode/examples/Topics/File IO/SaveOneImage/SaveOneImage.pde diff --git a/mode/examples/Topics/File IO/TileImages/TileImages.pde b/processing/mode/examples/Topics/File IO/TileImages/TileImages.pde similarity index 100% rename from mode/examples/Topics/File IO/TileImages/TileImages.pde rename to processing/mode/examples/Topics/File IO/TileImages/TileImages.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/Koch/Koch.pde b/processing/mode/examples/Topics/Fractals and L-Systems/Koch/Koch.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/Koch/Koch.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/Koch/Koch.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde b/processing/mode/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/Mandelbrot/Mandelbrot.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/LSystem.pde b/processing/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/LSystem.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/LSystem.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/LSystem.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflake.pde b/processing/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflake.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflake.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflake.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflakeLSystem.pde b/processing/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflakeLSystem.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflakeLSystem.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/PenroseSnowflake/PenroseSnowflakeLSystem.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/PenroseTile/LSystem.pde b/processing/mode/examples/Topics/Fractals and L-Systems/PenroseTile/LSystem.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/PenroseTile/LSystem.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/PenroseTile/LSystem.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseLSystem.pde b/processing/mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseLSystem.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseLSystem.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseLSystem.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseTile.pde b/processing/mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseTile.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseTile.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/PenroseTile/PenroseTile.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/Pentigree/LSystem.pde b/processing/mode/examples/Topics/Fractals and L-Systems/Pentigree/LSystem.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/Pentigree/LSystem.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/Pentigree/LSystem.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/Pentigree/Pentigree.pde b/processing/mode/examples/Topics/Fractals and L-Systems/Pentigree/Pentigree.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/Pentigree/Pentigree.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/Pentigree/Pentigree.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/Pentigree/PentigreeLSystem.pde b/processing/mode/examples/Topics/Fractals and L-Systems/Pentigree/PentigreeLSystem.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/Pentigree/PentigreeLSystem.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/Pentigree/PentigreeLSystem.pde diff --git a/mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pde b/processing/mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pde similarity index 100% rename from mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pde rename to processing/mode/examples/Topics/Fractals and L-Systems/Tree/Tree.pde diff --git a/mode/examples/Topics/GUI/Button/Button.pde b/processing/mode/examples/Topics/GUI/Button/Button.pde similarity index 100% rename from mode/examples/Topics/GUI/Button/Button.pde rename to processing/mode/examples/Topics/GUI/Button/Button.pde diff --git a/mode/examples/Topics/GUI/Buttons/Buttons.pde b/processing/mode/examples/Topics/GUI/Buttons/Buttons.pde similarity index 100% rename from mode/examples/Topics/GUI/Buttons/Buttons.pde rename to processing/mode/examples/Topics/GUI/Buttons/Buttons.pde diff --git a/mode/examples/Topics/GUI/Handles/Handles.pde b/processing/mode/examples/Topics/GUI/Handles/Handles.pde similarity index 100% rename from mode/examples/Topics/GUI/Handles/Handles.pde rename to processing/mode/examples/Topics/GUI/Handles/Handles.pde diff --git a/mode/examples/Topics/GUI/ImageButton/ImageButton.pde b/processing/mode/examples/Topics/GUI/ImageButton/ImageButton.pde similarity index 100% rename from mode/examples/Topics/GUI/ImageButton/ImageButton.pde rename to processing/mode/examples/Topics/GUI/ImageButton/ImageButton.pde diff --git a/mode/examples/Topics/GUI/ImageButton/data/base.gif b/processing/mode/examples/Topics/GUI/ImageButton/data/base.gif similarity index 100% rename from mode/examples/Topics/GUI/ImageButton/data/base.gif rename to processing/mode/examples/Topics/GUI/ImageButton/data/base.gif diff --git a/mode/examples/Topics/GUI/ImageButton/data/down.gif b/processing/mode/examples/Topics/GUI/ImageButton/data/down.gif similarity index 100% rename from mode/examples/Topics/GUI/ImageButton/data/down.gif rename to processing/mode/examples/Topics/GUI/ImageButton/data/down.gif diff --git a/mode/examples/Topics/GUI/ImageButton/data/roll.gif b/processing/mode/examples/Topics/GUI/ImageButton/data/roll.gif similarity index 100% rename from mode/examples/Topics/GUI/ImageButton/data/roll.gif rename to processing/mode/examples/Topics/GUI/ImageButton/data/roll.gif diff --git a/mode/examples/Topics/GUI/Rollover/Rollover.pde b/processing/mode/examples/Topics/GUI/Rollover/Rollover.pde similarity index 100% rename from mode/examples/Topics/GUI/Rollover/Rollover.pde rename to processing/mode/examples/Topics/GUI/Rollover/Rollover.pde diff --git a/mode/examples/Topics/GUI/Scrollbar/Scrollbar.pde b/processing/mode/examples/Topics/GUI/Scrollbar/Scrollbar.pde similarity index 100% rename from mode/examples/Topics/GUI/Scrollbar/Scrollbar.pde rename to processing/mode/examples/Topics/GUI/Scrollbar/Scrollbar.pde diff --git a/mode/examples/Topics/GUI/Scrollbar/data/seedBottom.jpg b/processing/mode/examples/Topics/GUI/Scrollbar/data/seedBottom.jpg similarity index 100% rename from mode/examples/Topics/GUI/Scrollbar/data/seedBottom.jpg rename to processing/mode/examples/Topics/GUI/Scrollbar/data/seedBottom.jpg diff --git a/mode/examples/Topics/GUI/Scrollbar/data/seedTop.jpg b/processing/mode/examples/Topics/GUI/Scrollbar/data/seedTop.jpg similarity index 100% rename from mode/examples/Topics/GUI/Scrollbar/data/seedTop.jpg rename to processing/mode/examples/Topics/GUI/Scrollbar/data/seedTop.jpg diff --git a/mode/examples/Topics/Geometry/Icosahedra/Dimension3D.pde b/processing/mode/examples/Topics/Geometry/Icosahedra/Dimension3D.pde similarity index 100% rename from mode/examples/Topics/Geometry/Icosahedra/Dimension3D.pde rename to processing/mode/examples/Topics/Geometry/Icosahedra/Dimension3D.pde diff --git a/mode/examples/Topics/Geometry/Icosahedra/Icosahedra.pde b/processing/mode/examples/Topics/Geometry/Icosahedra/Icosahedra.pde similarity index 100% rename from mode/examples/Topics/Geometry/Icosahedra/Icosahedra.pde rename to processing/mode/examples/Topics/Geometry/Icosahedra/Icosahedra.pde diff --git a/mode/examples/Topics/Geometry/Icosahedra/Icosahedron.pde b/processing/mode/examples/Topics/Geometry/Icosahedra/Icosahedron.pde similarity index 100% rename from mode/examples/Topics/Geometry/Icosahedra/Icosahedron.pde rename to processing/mode/examples/Topics/Geometry/Icosahedra/Icosahedron.pde diff --git a/mode/examples/Topics/Geometry/Icosahedra/Shape3D.pde b/processing/mode/examples/Topics/Geometry/Icosahedra/Shape3D.pde similarity index 100% rename from mode/examples/Topics/Geometry/Icosahedra/Shape3D.pde rename to processing/mode/examples/Topics/Geometry/Icosahedra/Shape3D.pde diff --git a/mode/examples/Topics/Geometry/NoiseSphere/NoiseSphere.pde b/processing/mode/examples/Topics/Geometry/NoiseSphere/NoiseSphere.pde similarity index 100% rename from mode/examples/Topics/Geometry/NoiseSphere/NoiseSphere.pde rename to processing/mode/examples/Topics/Geometry/NoiseSphere/NoiseSphere.pde diff --git a/mode/examples/Topics/Geometry/RGBCube/RGBCube.pde b/processing/mode/examples/Topics/Geometry/RGBCube/RGBCube.pde similarity index 100% rename from mode/examples/Topics/Geometry/RGBCube/RGBCube.pde rename to processing/mode/examples/Topics/Geometry/RGBCube/RGBCube.pde diff --git a/mode/examples/Topics/Geometry/ShapeTransform/ShapeTransform.pde b/processing/mode/examples/Topics/Geometry/ShapeTransform/ShapeTransform.pde similarity index 100% rename from mode/examples/Topics/Geometry/ShapeTransform/ShapeTransform.pde rename to processing/mode/examples/Topics/Geometry/ShapeTransform/ShapeTransform.pde diff --git a/mode/examples/Topics/Geometry/SpaceJunk/Cube.pde b/processing/mode/examples/Topics/Geometry/SpaceJunk/Cube.pde similarity index 100% rename from mode/examples/Topics/Geometry/SpaceJunk/Cube.pde rename to processing/mode/examples/Topics/Geometry/SpaceJunk/Cube.pde diff --git a/mode/examples/Topics/Geometry/SpaceJunk/SpaceJunk.pde b/processing/mode/examples/Topics/Geometry/SpaceJunk/SpaceJunk.pde similarity index 100% rename from mode/examples/Topics/Geometry/SpaceJunk/SpaceJunk.pde rename to processing/mode/examples/Topics/Geometry/SpaceJunk/SpaceJunk.pde diff --git a/mode/examples/Topics/Geometry/Toroid/Toroid.pde b/processing/mode/examples/Topics/Geometry/Toroid/Toroid.pde similarity index 100% rename from mode/examples/Topics/Geometry/Toroid/Toroid.pde rename to processing/mode/examples/Topics/Geometry/Toroid/Toroid.pde diff --git a/mode/examples/Topics/Geometry/Vertices/Vertices.pde b/processing/mode/examples/Topics/Geometry/Vertices/Vertices.pde similarity index 100% rename from mode/examples/Topics/Geometry/Vertices/Vertices.pde rename to processing/mode/examples/Topics/Geometry/Vertices/Vertices.pde diff --git a/mode/examples/Topics/Image Processing/Blur/Blur.pde b/processing/mode/examples/Topics/Image Processing/Blur/Blur.pde similarity index 100% rename from mode/examples/Topics/Image Processing/Blur/Blur.pde rename to processing/mode/examples/Topics/Image Processing/Blur/Blur.pde diff --git a/mode/examples/Topics/Image Processing/Blur/data/trees.jpg b/processing/mode/examples/Topics/Image Processing/Blur/data/trees.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/Blur/data/trees.jpg rename to processing/mode/examples/Topics/Image Processing/Blur/data/trees.jpg diff --git a/mode/examples/Topics/Image Processing/Brightness/Brightness.pde b/processing/mode/examples/Topics/Image Processing/Brightness/Brightness.pde similarity index 100% rename from mode/examples/Topics/Image Processing/Brightness/Brightness.pde rename to processing/mode/examples/Topics/Image Processing/Brightness/Brightness.pde diff --git a/mode/examples/Topics/Image Processing/Brightness/data/wires.jpg b/processing/mode/examples/Topics/Image Processing/Brightness/data/wires.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/Brightness/data/wires.jpg rename to processing/mode/examples/Topics/Image Processing/Brightness/data/wires.jpg diff --git a/mode/examples/Topics/Image Processing/Convolution/Convolution.pde b/processing/mode/examples/Topics/Image Processing/Convolution/Convolution.pde similarity index 100% rename from mode/examples/Topics/Image Processing/Convolution/Convolution.pde rename to processing/mode/examples/Topics/Image Processing/Convolution/Convolution.pde diff --git a/mode/examples/Topics/Image Processing/Convolution/data/end.jpg b/processing/mode/examples/Topics/Image Processing/Convolution/data/end.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/Convolution/data/end.jpg rename to processing/mode/examples/Topics/Image Processing/Convolution/data/end.jpg diff --git a/mode/examples/Topics/Image Processing/Convolution/data/sunflower.jpg b/processing/mode/examples/Topics/Image Processing/Convolution/data/sunflower.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/Convolution/data/sunflower.jpg rename to processing/mode/examples/Topics/Image Processing/Convolution/data/sunflower.jpg diff --git a/mode/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde b/processing/mode/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde similarity index 100% rename from mode/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde rename to processing/mode/examples/Topics/Image Processing/EdgeDetection/EdgeDetection.pde diff --git a/mode/examples/Topics/Image Processing/EdgeDetection/data/house.jpg b/processing/mode/examples/Topics/Image Processing/EdgeDetection/data/house.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/EdgeDetection/data/house.jpg rename to processing/mode/examples/Topics/Image Processing/EdgeDetection/data/house.jpg diff --git a/mode/examples/Topics/Image Processing/Histogram/Histogram.pde b/processing/mode/examples/Topics/Image Processing/Histogram/Histogram.pde similarity index 100% rename from mode/examples/Topics/Image Processing/Histogram/Histogram.pde rename to processing/mode/examples/Topics/Image Processing/Histogram/Histogram.pde diff --git a/mode/examples/Topics/Image Processing/Histogram/data/cdi01_g.jpg b/processing/mode/examples/Topics/Image Processing/Histogram/data/cdi01_g.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/Histogram/data/cdi01_g.jpg rename to processing/mode/examples/Topics/Image Processing/Histogram/data/cdi01_g.jpg diff --git a/mode/examples/Topics/Image Processing/Histogram/data/ystone08.jpg b/processing/mode/examples/Topics/Image Processing/Histogram/data/ystone08.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/Histogram/data/ystone08.jpg rename to processing/mode/examples/Topics/Image Processing/Histogram/data/ystone08.jpg diff --git a/mode/examples/Topics/Image Processing/LinearImage/LinearImage.pde b/processing/mode/examples/Topics/Image Processing/LinearImage/LinearImage.pde similarity index 100% rename from mode/examples/Topics/Image Processing/LinearImage/LinearImage.pde rename to processing/mode/examples/Topics/Image Processing/LinearImage/LinearImage.pde diff --git a/mode/examples/Topics/Image Processing/LinearImage/data/florence03.jpg b/processing/mode/examples/Topics/Image Processing/LinearImage/data/florence03.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/LinearImage/data/florence03.jpg rename to processing/mode/examples/Topics/Image Processing/LinearImage/data/florence03.jpg diff --git a/mode/examples/Topics/Image Processing/PixelArray/PixelArray.pde b/processing/mode/examples/Topics/Image Processing/PixelArray/PixelArray.pde similarity index 100% rename from mode/examples/Topics/Image Processing/PixelArray/PixelArray.pde rename to processing/mode/examples/Topics/Image Processing/PixelArray/PixelArray.pde diff --git a/mode/examples/Topics/Image Processing/PixelArray/data/ystone08.jpg b/processing/mode/examples/Topics/Image Processing/PixelArray/data/ystone08.jpg similarity index 100% rename from mode/examples/Topics/Image Processing/PixelArray/data/ystone08.jpg rename to processing/mode/examples/Topics/Image Processing/PixelArray/data/ystone08.jpg diff --git a/mode/examples/Topics/Interaction/Follow1/Follow1.pde b/processing/mode/examples/Topics/Interaction/Follow1/Follow1.pde similarity index 100% rename from mode/examples/Topics/Interaction/Follow1/Follow1.pde rename to processing/mode/examples/Topics/Interaction/Follow1/Follow1.pde diff --git a/mode/examples/Topics/Interaction/Follow2/Follow2.pde b/processing/mode/examples/Topics/Interaction/Follow2/Follow2.pde similarity index 100% rename from mode/examples/Topics/Interaction/Follow2/Follow2.pde rename to processing/mode/examples/Topics/Interaction/Follow2/Follow2.pde diff --git a/mode/examples/Topics/Interaction/Follow3/Follow3.pde b/processing/mode/examples/Topics/Interaction/Follow3/Follow3.pde similarity index 100% rename from mode/examples/Topics/Interaction/Follow3/Follow3.pde rename to processing/mode/examples/Topics/Interaction/Follow3/Follow3.pde diff --git a/mode/examples/Topics/Interaction/Multitouch/Multitouch.pde b/processing/mode/examples/Topics/Interaction/Multitouch/Multitouch.pde similarity index 100% rename from mode/examples/Topics/Interaction/Multitouch/Multitouch.pde rename to processing/mode/examples/Topics/Interaction/Multitouch/Multitouch.pde diff --git a/mode/examples/Topics/Interaction/Reach1/Reach1.pde b/processing/mode/examples/Topics/Interaction/Reach1/Reach1.pde similarity index 100% rename from mode/examples/Topics/Interaction/Reach1/Reach1.pde rename to processing/mode/examples/Topics/Interaction/Reach1/Reach1.pde diff --git a/mode/examples/Topics/Interaction/Reach2/Reach2.pde b/processing/mode/examples/Topics/Interaction/Reach2/Reach2.pde similarity index 100% rename from mode/examples/Topics/Interaction/Reach2/Reach2.pde rename to processing/mode/examples/Topics/Interaction/Reach2/Reach2.pde diff --git a/mode/examples/Topics/Interaction/Reach3/Reach3.pde b/processing/mode/examples/Topics/Interaction/Reach3/Reach3.pde similarity index 100% rename from mode/examples/Topics/Interaction/Reach3/Reach3.pde rename to processing/mode/examples/Topics/Interaction/Reach3/Reach3.pde diff --git a/mode/examples/Topics/Interaction/Tickle/Tickle.pde b/processing/mode/examples/Topics/Interaction/Tickle/Tickle.pde similarity index 100% rename from mode/examples/Topics/Interaction/Tickle/Tickle.pde rename to processing/mode/examples/Topics/Interaction/Tickle/Tickle.pde diff --git a/mode/examples/Topics/Interaction/Tickle/data/AmericanTypewriter-24.vlw b/processing/mode/examples/Topics/Interaction/Tickle/data/AmericanTypewriter-24.vlw similarity index 100% rename from mode/examples/Topics/Interaction/Tickle/data/AmericanTypewriter-24.vlw rename to processing/mode/examples/Topics/Interaction/Tickle/data/AmericanTypewriter-24.vlw diff --git a/mode/examples/Topics/Motion/Bounce/Bounce.pde b/processing/mode/examples/Topics/Motion/Bounce/Bounce.pde similarity index 100% rename from mode/examples/Topics/Motion/Bounce/Bounce.pde rename to processing/mode/examples/Topics/Motion/Bounce/Bounce.pde diff --git a/mode/examples/Topics/Motion/BouncyBubbles/BouncyBubbles.pde b/processing/mode/examples/Topics/Motion/BouncyBubbles/BouncyBubbles.pde similarity index 100% rename from mode/examples/Topics/Motion/BouncyBubbles/BouncyBubbles.pde rename to processing/mode/examples/Topics/Motion/BouncyBubbles/BouncyBubbles.pde diff --git a/mode/examples/Topics/Motion/Brownian/Brownian.pde b/processing/mode/examples/Topics/Motion/Brownian/Brownian.pde similarity index 100% rename from mode/examples/Topics/Motion/Brownian/Brownian.pde rename to processing/mode/examples/Topics/Motion/Brownian/Brownian.pde diff --git a/mode/examples/Topics/Motion/CircleCollision/Ball.pde b/processing/mode/examples/Topics/Motion/CircleCollision/Ball.pde similarity index 100% rename from mode/examples/Topics/Motion/CircleCollision/Ball.pde rename to processing/mode/examples/Topics/Motion/CircleCollision/Ball.pde diff --git a/mode/examples/Topics/Motion/CircleCollision/CircleCollision.pde b/processing/mode/examples/Topics/Motion/CircleCollision/CircleCollision.pde similarity index 100% rename from mode/examples/Topics/Motion/CircleCollision/CircleCollision.pde rename to processing/mode/examples/Topics/Motion/CircleCollision/CircleCollision.pde diff --git a/mode/examples/Topics/Motion/Collision/Collision.pde b/processing/mode/examples/Topics/Motion/Collision/Collision.pde similarity index 100% rename from mode/examples/Topics/Motion/Collision/Collision.pde rename to processing/mode/examples/Topics/Motion/Collision/Collision.pde diff --git a/mode/examples/Topics/Motion/Linear/Linear.pde b/processing/mode/examples/Topics/Motion/Linear/Linear.pde similarity index 100% rename from mode/examples/Topics/Motion/Linear/Linear.pde rename to processing/mode/examples/Topics/Motion/Linear/Linear.pde diff --git a/mode/examples/Topics/Motion/MovingOnCurves/MovingOnCurves.pde b/processing/mode/examples/Topics/Motion/MovingOnCurves/MovingOnCurves.pde similarity index 100% rename from mode/examples/Topics/Motion/MovingOnCurves/MovingOnCurves.pde rename to processing/mode/examples/Topics/Motion/MovingOnCurves/MovingOnCurves.pde diff --git a/mode/examples/Topics/Motion/Puff/Puff.pde b/processing/mode/examples/Topics/Motion/Puff/Puff.pde similarity index 100% rename from mode/examples/Topics/Motion/Puff/Puff.pde rename to processing/mode/examples/Topics/Motion/Puff/Puff.pde diff --git a/mode/examples/Topics/Motion/Reflection1/Reflection1.pde b/processing/mode/examples/Topics/Motion/Reflection1/Reflection1.pde similarity index 100% rename from mode/examples/Topics/Motion/Reflection1/Reflection1.pde rename to processing/mode/examples/Topics/Motion/Reflection1/Reflection1.pde diff --git a/mode/examples/Topics/Motion/Reflection2/Ground.pde b/processing/mode/examples/Topics/Motion/Reflection2/Ground.pde similarity index 100% rename from mode/examples/Topics/Motion/Reflection2/Ground.pde rename to processing/mode/examples/Topics/Motion/Reflection2/Ground.pde diff --git a/mode/examples/Topics/Motion/Reflection2/Orb.pde b/processing/mode/examples/Topics/Motion/Reflection2/Orb.pde similarity index 100% rename from mode/examples/Topics/Motion/Reflection2/Orb.pde rename to processing/mode/examples/Topics/Motion/Reflection2/Orb.pde diff --git a/mode/examples/Topics/Motion/Reflection2/Reflection2.pde b/processing/mode/examples/Topics/Motion/Reflection2/Reflection2.pde similarity index 100% rename from mode/examples/Topics/Motion/Reflection2/Reflection2.pde rename to processing/mode/examples/Topics/Motion/Reflection2/Reflection2.pde diff --git a/mode/examples/Topics/Shaders/BlurFilter/BlurFilter.pde b/processing/mode/examples/Topics/Shaders/BlurFilter/BlurFilter.pde similarity index 100% rename from mode/examples/Topics/Shaders/BlurFilter/BlurFilter.pde rename to processing/mode/examples/Topics/Shaders/BlurFilter/BlurFilter.pde diff --git a/mode/examples/Topics/Shaders/BlurFilter/data/blur.glsl b/processing/mode/examples/Topics/Shaders/BlurFilter/data/blur.glsl similarity index 100% rename from mode/examples/Topics/Shaders/BlurFilter/data/blur.glsl rename to processing/mode/examples/Topics/Shaders/BlurFilter/data/blur.glsl diff --git a/mode/examples/Topics/Shaders/EdgeDetect/EdgeDetect.pde b/processing/mode/examples/Topics/Shaders/EdgeDetect/EdgeDetect.pde similarity index 100% rename from mode/examples/Topics/Shaders/EdgeDetect/EdgeDetect.pde rename to processing/mode/examples/Topics/Shaders/EdgeDetect/EdgeDetect.pde diff --git a/mode/examples/Topics/Shaders/EdgeDetect/data/edges.glsl b/processing/mode/examples/Topics/Shaders/EdgeDetect/data/edges.glsl similarity index 100% rename from mode/examples/Topics/Shaders/EdgeDetect/data/edges.glsl rename to processing/mode/examples/Topics/Shaders/EdgeDetect/data/edges.glsl diff --git a/mode/examples/Topics/Shaders/EdgeDetect/data/leaves.jpg b/processing/mode/examples/Topics/Shaders/EdgeDetect/data/leaves.jpg similarity index 100% rename from mode/examples/Topics/Shaders/EdgeDetect/data/leaves.jpg rename to processing/mode/examples/Topics/Shaders/EdgeDetect/data/leaves.jpg diff --git a/mode/examples/Topics/Shaders/EdgeFilter/EdgeFilter.pde b/processing/mode/examples/Topics/Shaders/EdgeFilter/EdgeFilter.pde similarity index 100% rename from mode/examples/Topics/Shaders/EdgeFilter/EdgeFilter.pde rename to processing/mode/examples/Topics/Shaders/EdgeFilter/EdgeFilter.pde diff --git a/mode/examples/Topics/Shaders/EdgeFilter/data/edges.glsl b/processing/mode/examples/Topics/Shaders/EdgeFilter/data/edges.glsl similarity index 100% rename from mode/examples/Topics/Shaders/EdgeFilter/data/edges.glsl rename to processing/mode/examples/Topics/Shaders/EdgeFilter/data/edges.glsl diff --git a/mode/examples/Topics/Shaders/LowLevelGL/LowLevelGL.pde b/processing/mode/examples/Topics/Shaders/LowLevelGL/LowLevelGL.pde similarity index 100% rename from mode/examples/Topics/Shaders/LowLevelGL/LowLevelGL.pde rename to processing/mode/examples/Topics/Shaders/LowLevelGL/LowLevelGL.pde diff --git a/mode/examples/Topics/Shaders/LowLevelGL/data/frag.glsl b/processing/mode/examples/Topics/Shaders/LowLevelGL/data/frag.glsl similarity index 100% rename from mode/examples/Topics/Shaders/LowLevelGL/data/frag.glsl rename to processing/mode/examples/Topics/Shaders/LowLevelGL/data/frag.glsl diff --git a/mode/examples/Topics/Shaders/LowLevelGL/data/vert.glsl b/processing/mode/examples/Topics/Shaders/LowLevelGL/data/vert.glsl similarity index 100% rename from mode/examples/Topics/Shaders/LowLevelGL/data/vert.glsl rename to processing/mode/examples/Topics/Shaders/LowLevelGL/data/vert.glsl diff --git a/mode/examples/Topics/Shaders/ToonShading/ToonShading.pde b/processing/mode/examples/Topics/Shaders/ToonShading/ToonShading.pde similarity index 100% rename from mode/examples/Topics/Shaders/ToonShading/ToonShading.pde rename to processing/mode/examples/Topics/Shaders/ToonShading/ToonShading.pde diff --git a/mode/examples/Topics/Shaders/ToonShading/data/ToonFrag.glsl b/processing/mode/examples/Topics/Shaders/ToonShading/data/ToonFrag.glsl similarity index 100% rename from mode/examples/Topics/Shaders/ToonShading/data/ToonFrag.glsl rename to processing/mode/examples/Topics/Shaders/ToonShading/data/ToonFrag.glsl diff --git a/mode/examples/Topics/Shaders/ToonShading/data/ToonVert.glsl b/processing/mode/examples/Topics/Shaders/ToonShading/data/ToonVert.glsl similarity index 100% rename from mode/examples/Topics/Shaders/ToonShading/data/ToonVert.glsl rename to processing/mode/examples/Topics/Shaders/ToonShading/data/ToonVert.glsl diff --git a/mode/examples/Topics/Simulate/Chain/Chain.pde b/processing/mode/examples/Topics/Simulate/Chain/Chain.pde similarity index 100% rename from mode/examples/Topics/Simulate/Chain/Chain.pde rename to processing/mode/examples/Topics/Simulate/Chain/Chain.pde diff --git a/mode/examples/Topics/Simulate/Flocking/Boid.pde b/processing/mode/examples/Topics/Simulate/Flocking/Boid.pde similarity index 100% rename from mode/examples/Topics/Simulate/Flocking/Boid.pde rename to processing/mode/examples/Topics/Simulate/Flocking/Boid.pde diff --git a/mode/examples/Topics/Simulate/Flocking/Flock.pde b/processing/mode/examples/Topics/Simulate/Flocking/Flock.pde similarity index 100% rename from mode/examples/Topics/Simulate/Flocking/Flock.pde rename to processing/mode/examples/Topics/Simulate/Flocking/Flock.pde diff --git a/mode/examples/Topics/Simulate/Flocking/Flocking.pde b/processing/mode/examples/Topics/Simulate/Flocking/Flocking.pde similarity index 100% rename from mode/examples/Topics/Simulate/Flocking/Flocking.pde rename to processing/mode/examples/Topics/Simulate/Flocking/Flocking.pde diff --git a/mode/examples/Topics/Simulate/ForcesWithVectors/ForcesWithVectors.pde b/processing/mode/examples/Topics/Simulate/ForcesWithVectors/ForcesWithVectors.pde similarity index 100% rename from mode/examples/Topics/Simulate/ForcesWithVectors/ForcesWithVectors.pde rename to processing/mode/examples/Topics/Simulate/ForcesWithVectors/ForcesWithVectors.pde diff --git a/mode/examples/Topics/Simulate/ForcesWithVectors/Liquid.pde b/processing/mode/examples/Topics/Simulate/ForcesWithVectors/Liquid.pde similarity index 100% rename from mode/examples/Topics/Simulate/ForcesWithVectors/Liquid.pde rename to processing/mode/examples/Topics/Simulate/ForcesWithVectors/Liquid.pde diff --git a/mode/examples/Topics/Simulate/ForcesWithVectors/Mover.pde b/processing/mode/examples/Topics/Simulate/ForcesWithVectors/Mover.pde similarity index 100% rename from mode/examples/Topics/Simulate/ForcesWithVectors/Mover.pde rename to processing/mode/examples/Topics/Simulate/ForcesWithVectors/Mover.pde diff --git a/mode/examples/Topics/Simulate/GravitationalAttraction3D/GravitationalAttraction3D.pde b/processing/mode/examples/Topics/Simulate/GravitationalAttraction3D/GravitationalAttraction3D.pde similarity index 100% rename from mode/examples/Topics/Simulate/GravitationalAttraction3D/GravitationalAttraction3D.pde rename to processing/mode/examples/Topics/Simulate/GravitationalAttraction3D/GravitationalAttraction3D.pde diff --git a/mode/examples/Topics/Simulate/GravitationalAttraction3D/Planet.pde b/processing/mode/examples/Topics/Simulate/GravitationalAttraction3D/Planet.pde similarity index 100% rename from mode/examples/Topics/Simulate/GravitationalAttraction3D/Planet.pde rename to processing/mode/examples/Topics/Simulate/GravitationalAttraction3D/Planet.pde diff --git a/mode/examples/Topics/Simulate/GravitationalAttraction3D/Sun.pde b/processing/mode/examples/Topics/Simulate/GravitationalAttraction3D/Sun.pde similarity index 100% rename from mode/examples/Topics/Simulate/GravitationalAttraction3D/Sun.pde rename to processing/mode/examples/Topics/Simulate/GravitationalAttraction3D/Sun.pde diff --git a/mode/examples/Topics/Simulate/MultipleParticleSystems/CrazyParticle.pde b/processing/mode/examples/Topics/Simulate/MultipleParticleSystems/CrazyParticle.pde similarity index 100% rename from mode/examples/Topics/Simulate/MultipleParticleSystems/CrazyParticle.pde rename to processing/mode/examples/Topics/Simulate/MultipleParticleSystems/CrazyParticle.pde diff --git a/mode/examples/Topics/Simulate/MultipleParticleSystems/MultipleParticleSystems.pde b/processing/mode/examples/Topics/Simulate/MultipleParticleSystems/MultipleParticleSystems.pde similarity index 100% rename from mode/examples/Topics/Simulate/MultipleParticleSystems/MultipleParticleSystems.pde rename to processing/mode/examples/Topics/Simulate/MultipleParticleSystems/MultipleParticleSystems.pde diff --git a/mode/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde b/processing/mode/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde similarity index 100% rename from mode/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde rename to processing/mode/examples/Topics/Simulate/MultipleParticleSystems/Particle.pde diff --git a/mode/examples/Topics/Simulate/MultipleParticleSystems/ParticleSystem.pde b/processing/mode/examples/Topics/Simulate/MultipleParticleSystems/ParticleSystem.pde similarity index 100% rename from mode/examples/Topics/Simulate/MultipleParticleSystems/ParticleSystem.pde rename to processing/mode/examples/Topics/Simulate/MultipleParticleSystems/ParticleSystem.pde diff --git a/mode/examples/Topics/Simulate/SimpleParticleSystem/Particle.pde b/processing/mode/examples/Topics/Simulate/SimpleParticleSystem/Particle.pde similarity index 100% rename from mode/examples/Topics/Simulate/SimpleParticleSystem/Particle.pde rename to processing/mode/examples/Topics/Simulate/SimpleParticleSystem/Particle.pde diff --git a/mode/examples/Topics/Simulate/SimpleParticleSystem/ParticleSystem.pde b/processing/mode/examples/Topics/Simulate/SimpleParticleSystem/ParticleSystem.pde similarity index 100% rename from mode/examples/Topics/Simulate/SimpleParticleSystem/ParticleSystem.pde rename to processing/mode/examples/Topics/Simulate/SimpleParticleSystem/ParticleSystem.pde diff --git a/mode/examples/Topics/Simulate/SimpleParticleSystem/SimpleParticleSystem.pde b/processing/mode/examples/Topics/Simulate/SimpleParticleSystem/SimpleParticleSystem.pde similarity index 100% rename from mode/examples/Topics/Simulate/SimpleParticleSystem/SimpleParticleSystem.pde rename to processing/mode/examples/Topics/Simulate/SimpleParticleSystem/SimpleParticleSystem.pde diff --git a/mode/examples/Topics/Simulate/SmokeParticleSystem/Particle.pde b/processing/mode/examples/Topics/Simulate/SmokeParticleSystem/Particle.pde similarity index 100% rename from mode/examples/Topics/Simulate/SmokeParticleSystem/Particle.pde rename to processing/mode/examples/Topics/Simulate/SmokeParticleSystem/Particle.pde diff --git a/mode/examples/Topics/Simulate/SmokeParticleSystem/ParticleSystem.pde b/processing/mode/examples/Topics/Simulate/SmokeParticleSystem/ParticleSystem.pde similarity index 100% rename from mode/examples/Topics/Simulate/SmokeParticleSystem/ParticleSystem.pde rename to processing/mode/examples/Topics/Simulate/SmokeParticleSystem/ParticleSystem.pde diff --git a/mode/examples/Topics/Simulate/SmokeParticleSystem/SmokeParticleSystem.pde b/processing/mode/examples/Topics/Simulate/SmokeParticleSystem/SmokeParticleSystem.pde similarity index 100% rename from mode/examples/Topics/Simulate/SmokeParticleSystem/SmokeParticleSystem.pde rename to processing/mode/examples/Topics/Simulate/SmokeParticleSystem/SmokeParticleSystem.pde diff --git a/mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.gif b/processing/mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.gif similarity index 100% rename from mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.gif rename to processing/mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.gif diff --git a/mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.png b/processing/mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.png similarity index 100% rename from mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.png rename to processing/mode/examples/Topics/Simulate/SmokeParticleSystem/data/texture.png diff --git a/mode/examples/Topics/Simulate/SoftBody/SoftBody.pde b/processing/mode/examples/Topics/Simulate/SoftBody/SoftBody.pde similarity index 100% rename from mode/examples/Topics/Simulate/SoftBody/SoftBody.pde rename to processing/mode/examples/Topics/Simulate/SoftBody/SoftBody.pde diff --git a/mode/examples/Topics/Simulate/Spring/Spring.pde b/processing/mode/examples/Topics/Simulate/Spring/Spring.pde similarity index 100% rename from mode/examples/Topics/Simulate/Spring/Spring.pde rename to processing/mode/examples/Topics/Simulate/Spring/Spring.pde diff --git a/mode/examples/Topics/Simulate/Springs/Springs.pde b/processing/mode/examples/Topics/Simulate/Springs/Springs.pde similarity index 100% rename from mode/examples/Topics/Simulate/Springs/Springs.pde rename to processing/mode/examples/Topics/Simulate/Springs/Springs.pde diff --git a/mode/examples/Topics/Textures/TextureCube/TextureCube.pde b/processing/mode/examples/Topics/Textures/TextureCube/TextureCube.pde similarity index 100% rename from mode/examples/Topics/Textures/TextureCube/TextureCube.pde rename to processing/mode/examples/Topics/Textures/TextureCube/TextureCube.pde diff --git a/mode/examples/Topics/Textures/TextureCube/data/berlin-1.jpg b/processing/mode/examples/Topics/Textures/TextureCube/data/berlin-1.jpg similarity index 100% rename from mode/examples/Topics/Textures/TextureCube/data/berlin-1.jpg rename to processing/mode/examples/Topics/Textures/TextureCube/data/berlin-1.jpg diff --git a/mode/examples/Topics/Textures/TextureCube/data/uvtex.jpg b/processing/mode/examples/Topics/Textures/TextureCube/data/uvtex.jpg similarity index 100% rename from mode/examples/Topics/Textures/TextureCube/data/uvtex.jpg rename to processing/mode/examples/Topics/Textures/TextureCube/data/uvtex.jpg diff --git a/mode/examples/Topics/Textures/TextureCylinder/TextureCylinder.pde b/processing/mode/examples/Topics/Textures/TextureCylinder/TextureCylinder.pde similarity index 100% rename from mode/examples/Topics/Textures/TextureCylinder/TextureCylinder.pde rename to processing/mode/examples/Topics/Textures/TextureCylinder/TextureCylinder.pde diff --git a/mode/examples/Topics/Textures/TextureCylinder/data/berlin-1.jpg b/processing/mode/examples/Topics/Textures/TextureCylinder/data/berlin-1.jpg similarity index 100% rename from mode/examples/Topics/Textures/TextureCylinder/data/berlin-1.jpg rename to processing/mode/examples/Topics/Textures/TextureCylinder/data/berlin-1.jpg diff --git a/mode/examples/Topics/Textures/TextureQuad/TextureQuad.pde b/processing/mode/examples/Topics/Textures/TextureQuad/TextureQuad.pde similarity index 100% rename from mode/examples/Topics/Textures/TextureQuad/TextureQuad.pde rename to processing/mode/examples/Topics/Textures/TextureQuad/TextureQuad.pde diff --git a/mode/examples/Topics/Textures/TextureQuad/data/berlin-1.jpg b/processing/mode/examples/Topics/Textures/TextureQuad/data/berlin-1.jpg similarity index 100% rename from mode/examples/Topics/Textures/TextureQuad/data/berlin-1.jpg rename to processing/mode/examples/Topics/Textures/TextureQuad/data/berlin-1.jpg diff --git a/mode/examples/Topics/Textures/TextureSphere/TextureSphere.pde b/processing/mode/examples/Topics/Textures/TextureSphere/TextureSphere.pde similarity index 100% rename from mode/examples/Topics/Textures/TextureSphere/TextureSphere.pde rename to processing/mode/examples/Topics/Textures/TextureSphere/TextureSphere.pde diff --git a/mode/examples/Topics/Textures/TextureSphere/data/world32k.jpg b/processing/mode/examples/Topics/Textures/TextureSphere/data/world32k.jpg similarity index 100% rename from mode/examples/Topics/Textures/TextureSphere/data/world32k.jpg rename to processing/mode/examples/Topics/Textures/TextureSphere/data/world32k.jpg diff --git a/mode/examples/Topics/Textures/TextureTriangle/TextureTriangle.pde b/processing/mode/examples/Topics/Textures/TextureTriangle/TextureTriangle.pde similarity index 100% rename from mode/examples/Topics/Textures/TextureTriangle/TextureTriangle.pde rename to processing/mode/examples/Topics/Textures/TextureTriangle/TextureTriangle.pde diff --git a/mode/examples/Topics/Textures/TextureTriangle/data/berlin-1.jpg b/processing/mode/examples/Topics/Textures/TextureTriangle/data/berlin-1.jpg similarity index 100% rename from mode/examples/Topics/Textures/TextureTriangle/data/berlin-1.jpg rename to processing/mode/examples/Topics/Textures/TextureTriangle/data/berlin-1.jpg diff --git a/mode/examples/Topics/Vectors/AccelerationWithVectors/AccelerationWithVectors.pde b/processing/mode/examples/Topics/Vectors/AccelerationWithVectors/AccelerationWithVectors.pde similarity index 100% rename from mode/examples/Topics/Vectors/AccelerationWithVectors/AccelerationWithVectors.pde rename to processing/mode/examples/Topics/Vectors/AccelerationWithVectors/AccelerationWithVectors.pde diff --git a/mode/examples/Topics/Vectors/AccelerationWithVectors/Mover.pde b/processing/mode/examples/Topics/Vectors/AccelerationWithVectors/Mover.pde similarity index 100% rename from mode/examples/Topics/Vectors/AccelerationWithVectors/Mover.pde rename to processing/mode/examples/Topics/Vectors/AccelerationWithVectors/Mover.pde diff --git a/mode/examples/Topics/Vectors/BouncingBall/BouncingBall.pde b/processing/mode/examples/Topics/Vectors/BouncingBall/BouncingBall.pde similarity index 100% rename from mode/examples/Topics/Vectors/BouncingBall/BouncingBall.pde rename to processing/mode/examples/Topics/Vectors/BouncingBall/BouncingBall.pde diff --git a/mode/examples/Topics/Vectors/Normalize/Normalize.pde b/processing/mode/examples/Topics/Vectors/Normalize/Normalize.pde similarity index 100% rename from mode/examples/Topics/Vectors/Normalize/Normalize.pde rename to processing/mode/examples/Topics/Vectors/Normalize/Normalize.pde diff --git a/mode/examples/Topics/Vectors/VectorMath/VectorMath.pde b/processing/mode/examples/Topics/Vectors/VectorMath/VectorMath.pde similarity index 100% rename from mode/examples/Topics/Vectors/VectorMath/VectorMath.pde rename to processing/mode/examples/Topics/Vectors/VectorMath/VectorMath.pde diff --git a/mode/examples/Topics/Wallpapers/Circles/Circles.pde b/processing/mode/examples/Topics/Wallpapers/Circles/Circles.pde similarity index 100% rename from mode/examples/Topics/Wallpapers/Circles/Circles.pde rename to processing/mode/examples/Topics/Wallpapers/Circles/Circles.pde diff --git a/mode/examples/Topics/Wallpapers/Circles/code/sketch.properties b/processing/mode/examples/Topics/Wallpapers/Circles/code/sketch.properties similarity index 100% rename from mode/examples/Topics/Wallpapers/Circles/code/sketch.properties rename to processing/mode/examples/Topics/Wallpapers/Circles/code/sketch.properties diff --git a/mode/examples/Topics/Watchfaces/WatchFace/WatchFace.pde b/processing/mode/examples/Topics/Watchfaces/WatchFace/WatchFace.pde similarity index 100% rename from mode/examples/Topics/Watchfaces/WatchFace/WatchFace.pde rename to processing/mode/examples/Topics/Watchfaces/WatchFace/WatchFace.pde diff --git a/mode/examples/Topics/Watchfaces/WatchFace/code/sketch.properties b/processing/mode/examples/Topics/Watchfaces/WatchFace/code/sketch.properties similarity index 100% rename from mode/examples/Topics/Watchfaces/WatchFace/code/sketch.properties rename to processing/mode/examples/Topics/Watchfaces/WatchFace/code/sketch.properties diff --git a/processing/mode/icons/launcher_144.png b/processing/mode/icons/launcher_144.png new file mode 100644 index 000000000..78fed6592 Binary files /dev/null and b/processing/mode/icons/launcher_144.png differ diff --git a/processing/mode/icons/launcher_192.png b/processing/mode/icons/launcher_192.png new file mode 100644 index 000000000..48d3a34fe Binary files /dev/null and b/processing/mode/icons/launcher_192.png differ diff --git a/processing/mode/icons/launcher_36.png b/processing/mode/icons/launcher_36.png new file mode 100644 index 000000000..e276bbd6f Binary files /dev/null and b/processing/mode/icons/launcher_36.png differ diff --git a/processing/mode/icons/launcher_48.png b/processing/mode/icons/launcher_48.png new file mode 100644 index 000000000..9dde1a58f Binary files /dev/null and b/processing/mode/icons/launcher_48.png differ diff --git a/processing/mode/icons/launcher_72.png b/processing/mode/icons/launcher_72.png new file mode 100644 index 000000000..ff769c587 Binary files /dev/null and b/processing/mode/icons/launcher_72.png differ diff --git a/processing/mode/icons/launcher_96.png b/processing/mode/icons/launcher_96.png new file mode 100644 index 000000000..d9b25dba2 Binary files /dev/null and b/processing/mode/icons/launcher_96.png differ diff --git a/processing/mode/icons/preview_circular.png b/processing/mode/icons/preview_circular.png new file mode 100644 index 000000000..40a11bf0d Binary files /dev/null and b/processing/mode/icons/preview_circular.png differ diff --git a/processing/mode/icons/preview_rectangular.png b/processing/mode/icons/preview_rectangular.png new file mode 100644 index 000000000..9c9d9ed41 Binary files /dev/null and b/processing/mode/icons/preview_rectangular.png differ diff --git a/mode/keywords.txt b/processing/mode/keywords.txt similarity index 100% rename from mode/keywords.txt rename to processing/mode/keywords.txt diff --git a/mode/languages/mode.properties b/processing/mode/languages/mode.properties similarity index 94% rename from mode/languages/mode.properties rename to processing/mode/languages/mode.properties index 35500f539..a87ae41d9 100644 --- a/mode/languages/mode.properties +++ b/processing/mode/languages/mode.properties @@ -95,15 +95,15 @@ android_keystore.error.cannot_create_keystore = The keystore could not be create # Android Mode android_mode.dialog.watchface_debug_title = Is the watch connected to the computer? -android_mode.dialog.watchface_debug_body = Processing will install watch faces on a smartwatch either over Wi-Fi or via Bluetooth, in which case the watch needs to be paired with a phone.

Read this guide on debugging an Android Wear App for more details. +android_mode.dialog.watchface_debug_body = Processing will install watch faces on a smartwatch either over Wi-Fi or via Bluetooth, in which case the watch needs to be paired with a phone.

Read this guide on debugging an Android Wear App for more details. android_mode.dialog.wallpaper_installed_title = Wallpaper installed! android_mode.dialog.wallpaper_installed_body = Processing just built and installed your sketch as a live wallpaper on the selected device.

You need to open the wallpaper picker in the device in order to select it as the new background. android_mode.dialog.watchface_installed_title = Watch face installed! android_mode.dialog.watchface_installed_body = Processing just built and installed your sketch as a watch face on the selected device.

You need to add it as a favourite watch face on the device and then select it from the watch face picker in order to run it. android_mode.dialog.cannot_export_package_title = Cannot complete export... -android_mode.dialog.cannot_export_package_body = The sketch still has the default package name. Not good, since this name will uniquely identify your app on the Play store... for ever! Come up with a different package name and write in the AndroidManifest.xml file in the sketch folder, after the "package=" attribute inside the manifest tag, which also contains version code and name. Once you have done that, try exporting the sketch again.

For more info on distributing apps from Processing,
check this online tutorial. +android_mode.dialog.cannot_export_package_body = The sketch still has the default package name. Not good, since this name will uniquely identify your app on the Play store... for ever! Come up with a different package name and write in the AndroidManifest.xml file in the sketch folder, after the "package=" attribute inside the manifest tag, which also contains version code and name. Once you have done that, try exporting the sketch again.

For more info on distributing apps from Processing,
check this online tutorial. android_mode.dialog.cannot_use_default_icons_title = Cannot complete export... -android_mode.dialog.cannot_use_default_icons_body = The sketch does not include all required app icons. Processing could use its default set of Android icons, which are okay to test the app on your device, but a bad idea to distribute it on the Play store. Create a full set of unique icons for your app, and copy them into the sketch folder. Once you have done that, try exporting the sketch again.

For more info on distributing apps from Processing,
check this online tutorial. +android_mode.dialog.cannot_use_default_icons_body = The sketch does not include all required app icons. Processing could use its default set of Android icons, which are okay to test the app on your device, but a bad idea to distribute it on the Play store. Create a full set of unique icons for your app, and copy them into the sketch folder. Once you have done that, try exporting the sketch again.

For more info on distributing apps from Processing,
check this online tutorial. android_mode.warn.cannot_load_sdk_title = Bad news... android_mode.warn.cannot_load_sdk_body = The Android SDK could not be loaded.\nThe Android Mode will be disabled. android_mode.info.cannot_open_sdk_path = "Android SDK path couldn't be opened."; @@ -159,9 +159,9 @@ android_sdk.dialog.found_installed_sdk_body = Processing found a valid Android S android_sdk.option.use_existing_sdk = Use existing SDK android_sdk.option.download_new_sdk = Download new SDK android_sdk.dialog.cannot_find_sdk_title = Cannot find an Android SDK... -android_sdk.dialog.cannot_find_sdk_body = Processing did not find an Android SDK on this computer. If there is one, and you know where it is, click "Locate SDK path" to select it, or "Download SDK" to let Processing download the SDK automatically.

If you want to download the SDK manually, you can get the command line tools from here. Make sure to install the SDK platform for API %s. +android_sdk.dialog.cannot_find_sdk_body = Processing did not find an Android SDK on this computer. If there is one, and you know where it is, click "Locate SDK path" to select it, or "Download SDK" to let Processing download the SDK automatically.

If you want to download the SDK manually, you can get the command line tools from here. Make sure to install the SDK platform for API %s. android_sdk.dialog.invalid_sdk_title = Android SDK is not valid... -android_sdk.dialog.invalid_sdk_body = Processing found an Android SDK, but is not valid. It could be missing some files, or might not be including the required platform for API %s.

If a valid SDK is available in a different location, click "Locate SDK path" to select it, or "Download SDK" to let Processing download the SDK automatically.

If you want to download the SDK manually, you can get the command line tools from here. Make sure to install the SDK platform for API %s. +android_sdk.dialog.invalid_sdk_body = Processing found an Android SDK, but is not valid. It could be missing some files, or might not be including the required platform for API %s.

If a valid SDK is available in a different location, click "Locate SDK path" to select it, or "Download SDK" to let Processing download the SDK automatically.

If you want to download the SDK manually, you can get the command line tools from here. Make sure to install the SDK platform for API %s. android_sdk.option.download_sdk = Download SDK automatically android_sdk.option.locate_sdk = Locate SDK path manually android_sdk.dialog.download_phone_image_title = Download phone system image? @@ -173,18 +173,18 @@ android_sdk.error.sdk_selection_canceled = User canceled attempt to find SDK android_sdk.error.sdk_download_canceled = User canceled SDK download android_sdk.error.sdk_download_failed = SDK could not be downloaded android_sdk.dialog.sdk_installed_title = SDK installed! -android_sdk.dialog.sdk_installed_body = Processing just downloaded and installed the Android SDK successfully. The Android mode is now ready to use!

For documentation, examples, and tutorials, visit the Processing for Android website, and if you updated from version 3 of the mode, check the what's new page. -android_sdk.dialog.install_usb_driver =

If you are planning to use Google Nexus devices, then you need the Google USB Driver to connect them to Processing. You will have to install the driver manually following these instructions.

The installation files are available in this folder:
%s +android_sdk.dialog.sdk_installed_body = Processing just downloaded and installed the Android SDK successfully. The Android mode is now ready to use!

For documentation, examples, and tutorials, visit the Processing for Android website, and if you updated from version 3 of the mode, check the what's new page. +android_sdk.dialog.install_usb_driver =

If you are planning to use Google Nexus devices, then you need the Google USB Driver to connect them to Processing. You will have to install the driver manually following these instructions.

The installation files are available in this folder:
%s android_sdk.dialog.sdk_license_rejected_title = SDK license not accepted android_sdk.dialog.sdk_license_rejected_body = The Android SDK was installed, but will not be usable. You can accept the license at a later time by opening a terminal, changing to the SDK folder, and then running the following command:

tools/bin/sdkmanager --licenses android_sdk.dialog.32bit_system_title = System is 32 bit... -android_sdk.dialog.32bit_system_body = The Android SDK no longer includes 32 bit platform tools (adb, etc.), and so they will not work.

This thread provides some possible workarounds. +android_sdk.dialog.32bit_system_body = The Android SDK no longer includes 32 bit platform tools (adb, etc.), and so they will not work.

This thread provides some possible workarounds. android_sdk.error.emulator_download_canceled = User canceled emulator download android_sdk.error.emulator_download_failed = Emulator could not be downloaded android_sdk.dialog.using_existing_sdk_title = SDK configured! -android_sdk.dialog.using_existing_sdk_body = Processing will use the existing Android SDK. The Android mode is now ready to use!

For documentation, examples, and tutorials, visit the Processing for Android website, and if you updated from version 3 of the mode, check the what's new page. +android_sdk.dialog.using_existing_sdk_body = Processing will use the existing Android SDK. The Android mode is now ready to use!

For documentation, examples, and tutorials, visit the Processing for Android website, and if you updated from version 3 of the mode, check the what's new page. android_sdk.dialog.accept_sdk_license_title = Accept SDK license? -android_sdk.dialog.accept_sdk_license_body = You need to accept the terms of the Android SDK license from Google in order to use the SDK. Read the license from here. +android_sdk.dialog.accept_sdk_license_body = You need to accept the terms of the Android SDK license from Google in order to use the SDK. Read the license from here. android_sdk.warn.cannot_run_adb_title = Trouble with adb! android_sdk.warn.cannot_run_adb_body = Could not run the adb tool from the Android SDK.\nOne possibility is that its executable permission\nis not properly set. You can try setting this\npermission manually, or re-installing the SDK.\n\nThe mode will be disabled until this problem is fixed.\n android_sdk.error.missing_sdk_folder = %s does not exist @@ -213,7 +213,7 @@ android_avd.error.cannot_load_avd_body = This could mean that the Android tools android_avd.error.sdk_wrong_install_title = The SDK is not properly installed -android_avd.error.sdk_wrong_install_body = Please re-read the installation instructions for Processing
found in this online tutorial. +android_avd.error.sdk_wrong_install_body = Please re-read the installation instructions for Processing
found in this online tutorial. # --------------------------------------- # Devices @@ -222,7 +222,7 @@ android_devices.error.cannot_get_device_list = Received unfamiliar output from \ android_devices.error.no_permissions_title = Found devices with no permissions! -android_devices.error.no_permissions_body = Make sure that the device has USB debugging enabled, and that the required USB drivers are installed on Windows, and that permissions are properly configured on Linux. Also, on Linux, don't set the USB configuration to "charging" while debugging.

Read this guide on running apps on hardware device for more details. +android_devices.error.no_permissions_body = Make sure that the device has USB debugging enabled, and that the required USB drivers are installed on Windows, and that permissions are properly configured on Linux. Also, on Linux, don't set the USB configuration to "charging" while debugging.

Read this guide on running apps on hardware device for more details. private static final String DEVICE_PERMISSIONS_URL = "https://developer.android.com/studio/run/device.html"; @@ -235,7 +235,7 @@ android_devices.error.no_permissions_body = Make sure that the device has USB de # --------------------------------------- # Keystore manager -keystore_manager.top_label = Please enter the information below so we can generate a private key for you.
Fields marked bold are required, though you may consider to fill some of optional fields below those to avoid potential problems.
More about private keys can be found here. +keystore_manager.top_label = Please enter the information below so we can generate a private key for you.
Fields marked bold are required, though you may consider to fill some of optional fields below those to avoid potential problems.
More about private keys can be found here. keystore_manager.reset_password = Reset password keystore_manager.dialog.reset_keyboard_title = Reset password keystore_manager.dialog.reset_keyboard_body_part1 = Are you sure you want to reset the password? @@ -266,7 +266,7 @@ manifest.warn.cannot_handle_file_body = Errors occurred while reading or writing # Permissions permissions.dialog.label = Android applications must specifically ask for permission\nto do things like connect to the internet, write a file,\nor make phone calls. When installing your application,\nusers will be asked whether they want to allow such access. -permissions.dialog.url = More about permissions can be found here. +permissions.dialog.url = More about permissions can be found here. # --------------------------------------- # SDK Downloader @@ -284,10 +284,10 @@ sdk_downloader.download_sdk_label = Downloading Android SDK... # System image downloader sys_image_downloader.dialog.select_image_title = Choose system image type to download... -sys_image_downloader.dialog.select_image_body = The Android emulator requires a system image to run. There are two types of system images available:

1) ARM image - slow but compatible with all computers, no extra configuration needed.

2) x86 image - fast but compatible only with Intel CPUs, extra configuration may be needed, see this guide for more details. +sys_image_downloader.dialog.select_image_body = The Android emulator requires a system image to run. There are two types of system images available:

1) ARM image - slow but compatible with all computers, no extra configuration needed.

2) x86 image - fast but compatible only with Intel CPUs, extra configuration may be needed, see this guide for more details. sys_image_downloader.dialog.accel_images_title = Some words of caution... sys_image_downloader.dialog.haxm_install_body = Processing will install x86 images in the emulator. These images are fast, but also need the Intel Hardware Accelerated Execution Manager (Intel HAXM).

Processing will try to run the HAXM installer now, which may ask for your administrator password or additional permissions. -sys_image_downloader.dialog.kvm_config_body = You chose to run x86 images in the emulator. This is great but you need to configure VM acceleration on Linux using the KVM package.

Follow these instructions to configure KVM. +sys_image_downloader.dialog.kvm_config_body = You chose to run x86 images in the emulator. This is great but you need to configure VM acceleration on Linux using the KVM package.

Follow these instructions to configure KVM. sys_image_downloader.dialog.ia32libs_title = Additional setup may be required... sys_image_downloader.dialog.ia32libs_body = Looks like you are running a 64-bit version of Linux. In order
to create the SD card in the emulator, Processing needs the
ia32-libs compatibility package. On Ubuntu Linux, you can
install it by runing the following command:

sudo apt-get install lib32stdc++6 sys_image_downloader.option.x86_image = Use x86 image diff --git a/mode/languages/mode_ko.properties b/processing/mode/languages/mode_ko.properties similarity index 100% rename from mode/languages/mode_ko.properties rename to processing/mode/languages/mode_ko.properties diff --git a/processing/mode/languages/mode_zh-Hans.properties b/processing/mode/languages/mode_zh-Hans.properties new file mode 100644 index 000000000..a43428a19 --- /dev/null +++ b/processing/mode/languages/mode_zh-Hans.properties @@ -0,0 +1,328 @@ + + +# --------------------------------------- +# Language: Chinese (zh-Hans) +# --------------------------------------- + + +# --------------------------------------- +# Menu + +# | File | Edit | Sketch | Android | Tools | Help | +# | File | + +menu.sketch.stop = 停止 +menu.file.new = 新建 +menu.file.open = 打开 +menu.file.save = 保存 + +menu.file.export_signed_package = 导出已签名的软件包 +menu.file.export_signed_bundle = 导出已签名的捆绑包 +menu.file.export_android_project = 导出Android项目 + + +# | File | Edit | Sketch | Android | Tools | Help | +# | Sketch | + +menu.sketch.run_on_device = 运行在设备上 +menu.sketch.run_in_emulator = 在模拟器中运行 + +# | File | Edit | Sketch | Android | Tools | Help | +# | Android | + +menu.android = Android +menu.android.sketch_permissions = 画图权限 +menu.android.app = 应用 +menu.android.wallpaper = 壁纸 +menu.android.watch_face = 手表表盘 +menu.android.vr = VR +menu.android.ar = AR +menu.android.devices = 设备 +menu.android.devices.no_connected_devices = 没有连接设备 +menu.android.sdk_updater = SDK 更新器 +menu.android.reset_adb = 重置 ADB + +# | File | Edit | Sketch | Android | Tools | Help | +# | Help | + +menu.help.processing_for_android_site = Processing for Android 网站 +menu.help.android_developer_site = Android 开发者网站 + +# --------------------------------------- +# Android Build + +android_build.error.build_folder = 构建文件夹: %s +android_build.error.export_file_does_not_exist = “%s” 在 export.txt 中被提及,但它是虚假的,不存在。 +android_build.error.cannot_create_build_folder = 无法创建临时目录“%s”以构建 Android Sketch +android_build.error.zip_files_not_allowed = Android 库不允许使用 .zip 文件。\n请将 “%s” 重命名为 .jar 文件。 +android_build.error.cannot_copy_icons = 复制图标时出现问题。 +android_build.error.cannot_create_icon_folder = 无法创建 “%s” 文件夹 +android_build.warn.cannot_find_zipalign.title = 找不到 zipalign... +android_build.warn.cannot_find_zipalign.body = 需要 zipalign 构建工具来准备导出包。\n请确保您的 Android SDK 已正确下载。 + +# --------------------------------------- +# Android Debugger + +android_debugger.info.attaching_debugger = 正在附加调试器... +android_debugger.info.debugger_attached = 调试器已附加 +android_debugger.error.debugger_exception = 调试器错误:%s + +# --------------------------------------- +# Android Editor + +android_editor.status.exporting_project = 正在导出 Sketch 的 Android 项目... +android_editor.status.project_export_completed = 项目导出完成。 +android_editor.status.project_export_failed = 项目导出失败。 +android_editor.status.exporting_package = 正在导出已签名的包... +android_editor.status.package_export_completed = 包导出完成。 +android_editor.status.package_export_failed = 包导出失败。 +android_editor.status.exporting_bundle = 正在导出已签名的 bundle... +android_editor.status.bundle_export_completed = bundle 导出完成。 +android_editor.status.bundle_export_failed = bundle 导出失败。 + +android_editor.error.cannot_create_sketch_properties = 创建 Sketch 属性文件“%s”时出错:%s + +# --------------------------------------- +# Android Keystore + +android_keystore.warn.cannot_create_folders.title = 文件夹,文件夹,文件夹 +android_keystore.warn.cannot_create_folders.body = 无法创建必要的文件夹以进行构建。\n也许您需要解决一些文件权限问题吗? +android_keystore.warn.cannot_find_keystore.title = 哦,这出乎意料... +android_keystore.warn.cannot_find_keystore.body = Keystore 已成功创建,但无法找到。\n难道是意外删除了吗? +android_keystore.error.cannot_create_keystore = 无法创建 Keystore,原因如下: + +# --------------------------------------- +# Android Mode + +android_mode.dialog.watchface_debug_title = 手表是否已连接到计算机? +android_mode.dialog.watchface_debug_body = Processing 将通过 Wi-Fi 或蓝牙在智能手表上安装手表面板,此时手表需要与手机配对。

阅读有关调试 Android Wear 应用程序的指南以获取更多详细信息。 +android_mode.dialog.wallpaper_installed_title = 壁纸已安装! +android_mode.dialog.wallpaper_installed_body = Processing 刚刚将您的 Sketch 构建并作为一款动态壁纸安装在所选设备上。

您需要在设备中打开壁纸选择器,才能将其作为新的背景选择。 +android_mode.dialog.watchface_installed_title = 手表面板已安装! +android_mode.dialog.watchface_installed_body = Processing 刚刚将您的 Sketch 构建并作为手表面板安装在所选设备上。

您需要将其添加为设备上最喜欢的手表面板,然后在手表面板选择器中选择它才能运行它。 +android_mode.dialog.cannot_export_package_title = 无法完成导出... +android_mode.dialog.cannot_export_package_body = Sketch 仍然使用默认软件包名称。这不好,因为此名称将永久地唯一标识您的应用程序在 Play 商店中...。想出不同的软件包名称,并在 AndroidManifest.xml 文件中的 Sketch 文件夹中写入“package=”属性内的清单标记之后。一旦您完成此操作,请再次尝试导出 Sketch。

了解有关从 Processing 发布应用程序的更多信息,请查看此在线教程。 +android_mode.dialog.cannot_use_default_icons_title = 无法完成导出... +android_mode.dialog.cannot_use_default_icons_body = Sketch 不包含所有所需的应用程序图标。Processing 可以使用其默认的 Android 图标集在您的设备上测试应用程序,但在 Play 商店中分发它是一个糟糕的想法。为您的应用程序创建一组完整的独特图标,并将它们复制到 Sketch 文件夹中。一旦您完成此操作,请再次尝试导出 Sketch。

了解有关从 Processing 发布应用程序的更多信息,请查看此在线教程。 +android_mode.warn.cannot_load_sdk_title = 坏消息... +android_mode.warn.cannot_load_sdk_body = 无法加载 Android SDK。\n将禁用 Android Mode。 +android_mode.info.cannot_open_sdk_path = “Android SDK 路径无法打开。”; +android_mode.error.cannot_create_avd = “无法为模拟器创建虚拟设备。”; +android_mode.error.emulator_installation_failed = “安装模拟器时遇到问题。结果代码不为零”; +android_mode.dialog.no_devices_found_title = 找不到设备! +android_mode.dialog.no_devices_found_body = Processing 没有发现任何可运行 Sketch 的设备。\n确保您的手持设备或可穿戴设备已正确连接到计算机,并且 USB 或蓝牙调试已启用。 +android_mode.status.no_devices_found = 找不到设备。 +android_mode.status.starting_project_build = 开始构建... +android_mode.status.building_project = 正在构建 Android 项目... +android_mode.status.project_build_failed = 构建失败。 +android_mode.status.downloading_emulator = 下载模拟器... +android_mode.status.downloading_emulator_successful = 模拟器安装成功。 + +# --------------------------------------- +# Android 预处理器 + +android_preprocessor.error.cannot_parse_size = 关于在 Android 上使用 size() 命令的更多信息,请参阅此处:http://wiki.processing.org/w/Android +android_preprocessor.error.cannot_parse_size_exception = 无法解析 size() 命令。 +android_preprocessor.error.cannot_parse_smooth = 关于在 Android 上使用 smooth() 命令的更多信息,请参阅此处:http://wiki.processing.org/w/Android +android_preprocessor.error.cannot_parse_smooth_exception = 无法解析 smooth() 命令。 +android_preprocessor.warn.cannot_find_smooth_level_title = 找不到平滑级别 +android_preprocessor.warn.cannot_find_smooth_level_body = 该应用程序的平滑级别无法从您的代码中自动确定。\n仅针对 smooth() 命令使用数字值(而非变量)。\n请查看 smooth() 参考文档以获取解释。 + +# --------------------------------------- +# Android Runner + +android_runner.status.waiting_for_device = 正在等待 %s 可用... +android_runner.status.lost_connection_with_device = 在启动时与 %s 的连接断开。请重试。 +android_runner.status.cannot_install_sketch = 无法安装 Sketch。 +android_runner.warn.non_watch_device_title = 所选设备不是手表... +android_runner.warn.non_watch_device_body = 您正在尝试在非手表设备上安装手表面板。请选择正确的设备或使用模拟器。 +android_runner.warn.watch_device_title = 所选设备是手表... +android_runner.warn.watch_device_body = 您正在尝试在手表上安装非手表应用程序。请选择正确的设备或使用模拟器。 +android_runner.status.installing_sketch = 正在在 %s 上安装 Sketch +android_runner.status.lost_connection = 在安装时与 %s 的连接断开。请重试。 +android_runner.status.sketch_installed = Sketch 已安装 +android_runner.status.cannot_install_sketch = 无法安装 Sketch。 +android_runner.status.launching_sketch = 正在启动 %s 上的 Sketch +android_runner.status.sketch_launched= Sketch 已启动 +android_runner.status.cannot_launch_sketch = 无法启动 Sketch。 +android_runner.status.in_emulator = 在模拟器中 +android_runner.status.on_device = 在设备上 +android_runner.status.cancel_waiting_for_device = 不,我改变主意了,我放弃等待那个 +android_runner.error.cannot_parse_stacktrace = 无法解析此异常行: +android_runner.status.unknwon_exception = 未知异常 + +# --------------------------------------- +# Android SDK + +android_sdk.dialog.found_installed_sdk_title = 发现 Android SDK! +android_sdk.dialog.found_installed_sdk_body = Processing 发现了一个有效的、似乎已经在使用的 Android SDK。Processing 也可以使用这个 SDK,或者下载一个新的。

在不同的开发工具(如 Processing 和 Android Studio)之间共享相同的 SDK 将节省空间(SDK 可以使用几个 GB),但当一个工具更新 SDK 时,可能会在另一个工具上出现问题。如果 Processing 下载了一个新的 SDK,它将与刚刚发现的 SDK 分开。

你想怎么办? +android_sdk.option.use_existing_sdk = 使用现有的 SDK +android_sdk.option.download_new_sdk = 下载新的 SDK +android_sdk.dialog.cannot_find_sdk_title = 找不到 Android SDK... +android_sdk.dialog.cannot_find_sdk_body = Processing 在这台计算机上没有找到 Android SDK。如果有一个 SDK,并且你知道它在哪里,请点击“定位 SDK 路径”选择它,或者点击“下载 SDK”让 Processing 自动下载 SDK。

如果你想手动下载 SDK,可以从这里获取命令行工具:这里。确保安装 API %s 的 SDK 平台。 +android_sdk.dialog.invalid_sdk_title = Android SDK 无效... +android_sdk.dialog.invalid_sdk_body = Processing 发现了一个 Android SDK,但是它无效。可能缺少一些文件,或者可能没有包括所需的 API %s 平台。

如果在不同的位置上有一个有效的 SDK,请点击“定位 SDK 路径”选择它,或者点击“下载 SDK”让 Processing 自动下载 SDK。

如果你想手动下载 SDK,可以从这里获取命令行工具:这里。确保安装 API %s 的 SDK 平台。 +android_sdk.option.download_sdk = 自动下载 SDK +android_sdk.option.locate_sdk = 手动选择 SDK 路径 +android_sdk.dialog.download_phone_image_title = 下载手机系统镜像? +android_sdk.dialog.download_phone_image_body = 模拟器需要的系统镜像似乎没有安装。你想让 Processing 现在下载并安装它吗? +android_sdk.dialog.download_watch_image_title = 下载手表系统镜像? +android_sdk.dialog.download_watch_image_body = 模拟器需要的系统镜像似乎没有安装。你想让 Processing 现在下载并安装它吗? +android_sdk.dialog.select_sdk_folder = 选择 Android SDK 的位置 +android_sdk.error.sdk_selection_canceled = 用户取消了查找 SDK 的尝试 +android_sdk.error.sdk_download_canceled = 用户取消了 SDK 下载 +android_sdk.error.sdk_download_failed = 无法下载 SDK +android_sdk.dialog.sdk_installed_title = SDK 已安装! +android_sdk.dialog.sdk_installed_body = Processing 刚刚成功下载并安装了 Android SDK。Android 模式现在可以使用了!

有关文档、示例和教程,请访问Processing for Android 网站,如果您从模式的第 3 版更新,请查看新内容页面。 +android_sdk.dialog.install_usb_driver =

如果您计划使用 Google Nexus 设备,则需要 Google USB 驱动程序将它们连接到 Processing。您将不得不按照这些说明手动安装驱动程序。

安装文件可在此文件夹中找到:
%s +android_sdk.dialog.sdk_license_rejected_title = SDK 许可证未被接受 +android_sdk.dialog.sdk_license_rejected_body = Android SDK 已安装,但不能使用。您可以稍后接受许可证,方法是打开终端,切换到 SDK 文件夹,然后运行以下命令:

tools/bin/sdkmanager --licenses +android_sdk.dialog.32bit_system_title = 系统是 32 位的... +android_sdk.dialog.32bit_system_body = Android SDK 不再包括 32 位平台工具(adb 等),因此它们将无法工作。

这个线程提供了一些可能的解决方法。 +android_sdk.error.emulator_download_canceled = 用户取消了模拟器下载 +android_sdk.error.emulator_download_failed = 无法下载模拟器 +android_sdk.dialog.using_existing_sdk_title = SDK 配置完成! +android_sdk.dialog.using_existing_sdk_body = Processing 将使用现有的 Android SDK。Android 模式现在可以使用了!

有关文档、示例和教程,请访问Processing for Android 网站,如果您从模式的第 3 版更新,请查看新内容页面。 +android_sdk.dialog.accept_sdk_license_title = 接受 SDK 许可证? +android_sdk.dialog.accept_sdk_license_body = 你需要接受 Google 的 Android SDK 许可证条款才能使用 SDK。阅读这里的许可证。 +android_sdk.warn.cannot_run_adb_title = adb 出了问题! +android_sdk.warn.cannot_run_adb_body = 无法运行 Android SDK 中的 adb 工具。\n一种可能是它的可执行权限\n没有正确设置。您可以尝试手动设置此\n权限,或重新安装 SDK。\n\n在解决此问题之前,该模式将被禁用。\n +android_sdk.error.missing_sdk_folder = %s 不存在 +android_sdk.error.missing_cmdtools_folder_found_sdktools = 在%s中没有cmdline-tools/latest文件夹,而SDK工具(sdk/tools)已被弃用。\n请在现有SDK中专门安装cmdline-tools,或创建新的SDK。 +android_sdk.error.missing_cmdtools_folder = 在%s中没有`cmdline-tools/latest`文件夹。\n请在现有SDK中专门安装cmdline-tools,或创建新的SDK。 +android_sdk.error.missing_platform_tools_folder = 在%s中没有platform-tools文件夹。 +android_sdk.error.missing_build_tools_folder = 在%s中没有build-tools文件夹。 +android_sdk.error.missing_platforms_folder = 在%s中没有platforms文件夹。 +android_sdk.error.missing_target_platform = 在%s中没有Android版本%s。 +android_sdk.error.missing_android_jar = 在%s中缺少平台%s的android.jar文件。 +android_sdk.error.missing_emulator = 缺少模拟器文件。 +android_debugger.info.removing_expired_keystore = 正在删除过期的debug.keystore文件。 +android_debugger.error.cannot_remove_expired_keystore = 无法删除过期的debug.keystore文件。 +android_debugger.error.request_removing_keystore = 请删除文件%s。 +android_debugger.error.invalid_keystore_timestamp = 日期“%s”无法解析。 +android_debugger.error.request_bug_report = 请报告此问题,以便我们可以修复它。 + +# --------------------------------------- +# AVD + +android_avd.error.cannot_create_avd_title = 无法创建AVD(Android虚拟设备) +android_avd.error.cannot_create_avd_body = 默认的Android模拟器无法设置。请确保Android SDK已正确安装,且系统映像已安装到级别%s。(私下里,偶尔此错误是一个误导,你的sketch可能很快就会启动。) + +android_avd.error.cannot_load_avd_title = 无法加载AVD(Android虚拟设备) +android_avd.error.cannot_load_avd_body = 这可能意味着需要更新Android工具或者Processing AVD应该被删除(下一次运行Processing时,它将自动重新创建)。您可以使用avdmanager命令行工具手动创建AVDs并列出当前AVDs。 + + +android_avd.error.sdk_wrong_install_title = SDK(软件开发工具包)未正确安装 +android_avd.error.sdk_wrong_install_body = 请重新阅读Processing的安装说明,该说明在此在线教程中找到。 + +# --------------------------------------- +# Devices + +android_devices.error.cannot_get_device_list = “adb devices”收到了陌生的输出。设备列表可能有错误。 + +android_devices.error.no_permissions_title = 发现未授权的设备! + +android_devices.error.no_permissions_body = 确保设备已启用USB调试,并在Windows上安装了所需的USB驱动程序,在Linux上正确配置了权限。此外,在调试期间,在Linux上不要将USB配置设置为“充电”。了解更多详细信息,请阅读有关在硬件设备上运行应用的指南。 + +private static final String DEVICE_PERMISSIONS_URL = + "https://developer.android.com/studio/run/device.html"; + +private static final String DEVICE_PERMISSIONS_TITLE = + ""; + +private static final String DEVICE_PERMISSIONS_MESSAGE = + +# --------------------------------------- +# 密钥库管理器 + +keystore_manager.top_label = 请填写以下信息,以便我们为您生成一个私密密钥。
加粗的字段为必填项,不过您可能要考虑在下面的可选字段中填写一些内容,以避免潜在的问题。
有关私密密钥的更多信息可以在此处找到。 +keystore_manager.reset_password = 重置密码 +keystore_manager.dialog.reset_keyboard_title = 重置密码 +keystore_manager.dialog.reset_keyboard_body_part1 = 您确定要重置密码吗? +keystore_manager.dialog.reset_keyboard_body_part2 = 为了进行此操作,我们将必须重置密钥库,这意味着您将无法上传使用新密钥库签名的应用程序更新到Google Play。

我们会为旧密钥库创建一个备份。 +keystore_manager.warn.cannot_remove_keystore_title = Android密钥库 +keystore_manager.warn.cannot_remove_keystore_body = 无法删除密钥库 +keystore_manager.warn.password_missmatch_title = 密码 +keystore_manager.warn.password_missmatch_body = 密钥库密码不匹配 +keystore_manager.warn.short_password_title = 密码 +keystore_manager.warn.short_password_body = 密钥库密码应至少为6个字符 +keystore_manager.password_label = 密钥库密码: +keystore_manager.repeat_password_label = 重复输入密钥库密码: +keystore_manager.issuer_credentials_header = 密钥库颁发者凭据 +keystore_manager.common_name_label = 名称: +keystore_manager.organizational_unitl_label = 组织单位: +keystore_manager.organization_name_label = 组织名称: +keystore_manager.city_name_label = 城市或地区: +keystore_manager.state_name_label = 州省名: +keystore_manager.country_code_label = 国家代码(XX): + +# --------------------------------------- +# Manifest + +manifest.warn.cannot_handle_file_title = 处理%s时出错 +manifest.warn.cannot_handle_file_body = 在读取或写入%s时发生错误,这意味着很多东西可能无法正常工作。
为了防止数据丢失,建议您使用“另存为”
保存您的sketch的单独副本,然后重新启动Processing。 + +# --------------------------------------- +# Permissions + +permissions.dialog.label = Android应用程序必须明确请求权限
进行诸如连接到互联网、写入文件或拨打电话等操作。
在安装您的应用程序时,用户将被询问是否允许这样的访问。 +permissions.dialog.url = 有关权限的更多信息可以在此处找到。 + +# --------------------------------------- +# SDK Downloader + +sdk_downloader.error_cannot_find_platform_files = 找不到平台文件 +sdk_downloader.error_cannot_find_platform_tools = 找不到平台工具 +sdk_downloader.error_cannot_find_build_tools = 找不到构建工具 +sdk_downloader.error_cannot_find_tools = 找不到工具 +sdk_downloader.error_cannot_find_emulator = 找不到模拟器 +sdk_downloader.error.cannot_unpack_platform = 解压平台至“%s”时出错 +sdk_downloader.download_title = SDK下载 +sdk_downloader.download_sdk_label = 正在下载Android SDK… + +# --------------------------------------- +# System image downloader + +sys_image_downloader.dialog.select_image_title = 选择要下载的系统镜像类型… +sys_image_downloader.dialog.select_image_body = Android模拟器需要系统镜像才能运行。有两种系统镜像可用:

1) ARM镜像——速度慢,但兼容所有计算机,没有额外配置需要。

2) x86镜像——速度快,但仅兼容Intel CPU,可能需要额外的配置,请参阅此指南了解更多详细信息。 +sys_image_downloader.dialog.accel_images_title = 几点忠告… +sys_image_downloader.dialog.haxm_install_body = Processing将在模拟器中安装x86映像。这些映像很快,但也需要Intel的硬件加速执行管理器(Intel HAXM)。

Processing现在将尝试运行HAXM安装程序,该程序可能会要求您输入管理员密码或其他权限。 +sys_image_downloader.dialog.kvm_config_body = 您选择在模拟器中运行x86映像。这很棒,但您需要在Linux上使用KVM包配置VM加速。

请按照这些说明配置KVM。 +sys_image_downloader.dialog.ia32libs_title = 可能需要进行其他设置… +sys_image_downloader.dialog.ia32libs_body = 看起来您正在运行64位版本的Linux。为了
在模拟器中创建SD卡,Processing需要
ia32-libs兼容性包。在Ubuntu Linux上,您可以
通过运行以下命令安装它:

sudo apt-get install lib32stdc++6 +sys_image_downloader.option.x86_image = 使用x86镜像 +sys_image_downloader.option.arm_image = 使用ARM镜像 +sys_image_downloader.download_title = 系统镜像下载 +sys_image_downloader.download_watch_label = 下载手表系统镜像… +sys_image_downloader.download_phone_label = 下载手机系统镜像… + +# --------------------------------------- +# Download strings + +download_property.change_event_total = 总计 +download_property.change_event_downloaded = 已下载 +download_prompt.cancel = 取消下载 + +# --------------------------------------- +# SDK Updater tool + +sdk_updater.name_column = 包名称 +sdk_updater.version_column = 已安装版本 +sdk_updater.available_column = 可用更新 + +sdk_updater.query_message = 正在查询套件… + +sdk_updater.no_updates_message = 没有可用的更新 +sdk_updater.one_updates_message = 发现1个更新! +sdk_updater.many_updates_message = 发现“%d”个更新! + +sdk_updater.warning_failed_finding_package = 无法找到包“%s” +sdk_updater.warning_failed_computing_dependency_list = 无法计算完整的依赖关系列表。 + +sdk_updater.refresh_package_message = 正在刷新套件… +sdk_updater.download_package_message = 正在下载可用更新… +sdk_updater.download_canceled_message = 下载已取消 + +sdk_updater.update_button_label = 更新 +sdk_updater.cancel_button_label = 取消 +sdk_updater.close_button_label = 关闭 diff --git a/mode/libraries/ar/README.md b/processing/mode/libraries/ar/README.md similarity index 100% rename from mode/libraries/ar/README.md rename to processing/mode/libraries/ar/README.md diff --git a/processing/mode/libraries/ar/build.gradle b/processing/mode/libraries/ar/build.gradle new file mode 100644 index 000000000..5b47b90b4 --- /dev/null +++ b/processing/mode/libraries/ar/build.gradle @@ -0,0 +1,123 @@ +import java.nio.file.Files +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; + +plugins { + id 'java-library' + id 'maven-publish' +} + +dependencies { + compileOnly name: "android" + compileOnly "org.p5android:processing-core:${modeVersion}" + implementation "com.google.ar:core:${garVersion}" +} + +sourceSets { + main { + java.srcDir("../../../../libs/processing-ar/src/main/java/") + resources { + srcDir("../../../../libs/processing-ar/src/main/") + exclude "AndroidManifest.xml" + exclude "**/java/**" + } + } +} + +java { + withSourcesJar() +} + +tasks.named('jar') { + duplicatesStrategy = DuplicatesStrategy.INCLUDE +} + +tasks.register("sourceJar", Jar) { + from sourceSets.main.allJava + archiveClassifier.set("sources") +} + +// Does not work because of Processing-specific tags in source code, such as @webref +tasks.register("javadocJar", Jar) { + dependsOn javadoc + archiveClassifier.set("javadoc") + from javadoc.destinationDir +} + +artifacts { +// archives javadocJar + archives sourceJar +} + +tasks.jar { + doLast { + ant.checksum file: archiveFile.get().asFile + } +} + +tasks.clean { + doFirst { + delete "dist" + delete "library/ar.jar" + } +} + +tasks.compileJava { + doFirst { + String[] deps = ["core.jar"] + File libFolder = file("library") + libFolder.mkdirs() + deps.each { String fn -> + Files.copy( + file("${rootDir}/build/libs/" + fn).toPath(), + file("library/" + fn).toPath(), + REPLACE_EXISTING + ) + } + } +} + +tasks.build { + doLast { + // Copying ar jar to library folder + File arJar = file("library/ar.jar") + arJar.mkdirs() + + // Need to check the existance of the files before using as the files + // will get generated only if Task ':mode:libraries:ar:jar' is not being skipped + // Task ':mode:libraries:ar:jar' will be skipped if source files are unchanged or jar task is UP-TO-DATE + def arJarFile = file("$buildDir/libs/ar.jar") + if (arJarFile.exists()) { + Files.copy(arJarFile.toPath(), arJar.toPath(), REPLACE_EXISTING) + } + + // Rename artifacts for Maven publishing + def processingArJar = file("$buildDir/libs/processing-ar-${arLibVersion}.jar") + if (arJarFile.exists()) { + Files.move(arJarFile.toPath(), processingArJar.toPath(), REPLACE_EXISTING) + } + + def processingArSourcesJar = file("$buildDir/libs/processing-ar-${arLibVersion}-sources.jar") + def arSourcesJar = file("$buildDir/libs/ar-sources.jar") + if (arSourcesJar.exists()) { + Files.move(arSourcesJar.toPath(), processingArSourcesJar.toPath(), REPLACE_EXISTING) + } + + def arMd5File = file("$buildDir/libs/ar.jar.MD5") + def processingArMd5File = file("$buildDir/libs/processing-ar-${arLibVersion}.jar.md5") + if (arMd5File.exists()) { + Files.move(arMd5File.toPath(), processingArMd5File.toPath(), REPLACE_EXISTING) + } + } +} + +ext { + libName = 'processing-ar' + libVersion = arLibVersion + libJar = "${buildDir}/libs/${libName}-${libVersion}.jar" + libSrc = "${buildDir}/libs/${libName}-${libVersion}-sources.jar" + libMd5 = "${buildDir}/libs/${libName}-${libVersion}-sources.jar.md5" + libDependencies = [[group: 'org.p5android', name: 'processing-core', version: modeVersion], + [group: 'com.google.ar', name: 'core', version: garVersion]] +} + +apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" diff --git a/mode/libraries/ar/examples/Cubes/Cubes.pde b/processing/mode/libraries/ar/examples/Cubes/Cubes.pde similarity index 100% rename from mode/libraries/ar/examples/Cubes/Cubes.pde rename to processing/mode/libraries/ar/examples/Cubes/Cubes.pde diff --git a/mode/libraries/ar/examples/Cubes/code/sketch.properties b/processing/mode/libraries/ar/examples/Cubes/code/sketch.properties similarity index 100% rename from mode/libraries/ar/examples/Cubes/code/sketch.properties rename to processing/mode/libraries/ar/examples/Cubes/code/sketch.properties diff --git a/processing/mode/libraries/ar/examples/ImageMarkers/ImageMarkers.pde b/processing/mode/libraries/ar/examples/ImageMarkers/ImageMarkers.pde new file mode 100644 index 000000000..6b346c7f2 --- /dev/null +++ b/processing/mode/libraries/ar/examples/ImageMarkers/ImageMarkers.pde @@ -0,0 +1,43 @@ +import processing.ar.*; + +ARTracker tracker; +ARAnchor anchor; +PShape earth; + +void setup() { + fullScreen(AR); + + tracker = new ARTracker(this); + + PImage earthImg = loadImage("earth.jpg"); + tracker.start(); + + // Add the image to use as a marker to the AR tracker + tracker.addImage("earth", earthImg); + + // If you know the size (in meters) of the image in the physical space, + // you can specify it in the addImage(), this is optional but it would + // speed up the detection since the AR library will know the size of the + // marker beforehand + // tracker.addImage("earth", earthImg, 0.25); + + earth = createShape(SPHERE, 0.15); +} + +void draw() { + lights(); + + if (mousePressed) { + // Create new anchor at the current touch point + if (anchor != null) anchor.dispose(); + ARTrackable hit = tracker.get(mouseX, mouseY); + if (hit != null && hit.isImage() && hit.getName().equals("earth")) anchor = new ARAnchor(hit); + else anchor = null; + } + + if (anchor != null) { + anchor.attach(); + shape(earth); + anchor.detach(); + } +} \ No newline at end of file diff --git a/mode/libraries/ar/examples/ImportObj/code/sketch.properties b/processing/mode/libraries/ar/examples/ImageMarkers/code/sketch.properties similarity index 100% rename from mode/libraries/ar/examples/ImportObj/code/sketch.properties rename to processing/mode/libraries/ar/examples/ImageMarkers/code/sketch.properties diff --git a/processing/mode/libraries/ar/examples/ImageMarkers/data/earth.jpg b/processing/mode/libraries/ar/examples/ImageMarkers/data/earth.jpg new file mode 100644 index 000000000..73ebe8431 Binary files /dev/null and b/processing/mode/libraries/ar/examples/ImageMarkers/data/earth.jpg differ diff --git a/mode/libraries/ar/examples/ImportObj/ImportObj.pde b/processing/mode/libraries/ar/examples/ImportObj/ImportObj.pde similarity index 100% rename from mode/libraries/ar/examples/ImportObj/ImportObj.pde rename to processing/mode/libraries/ar/examples/ImportObj/ImportObj.pde diff --git a/processing/mode/libraries/ar/examples/ImportObj/code/sketch.properties b/processing/mode/libraries/ar/examples/ImportObj/code/sketch.properties new file mode 100644 index 000000000..db8eaa0b5 --- /dev/null +++ b/processing/mode/libraries/ar/examples/ImportObj/code/sketch.properties @@ -0,0 +1 @@ +component=ar diff --git a/mode/libraries/ar/examples/ImportObj/data/grey.png b/processing/mode/libraries/ar/examples/ImportObj/data/grey.png similarity index 100% rename from mode/libraries/ar/examples/ImportObj/data/grey.png rename to processing/mode/libraries/ar/examples/ImportObj/data/grey.png diff --git a/mode/libraries/ar/examples/ImportObj/data/materials.mtl b/processing/mode/libraries/ar/examples/ImportObj/data/materials.mtl similarity index 100% rename from mode/libraries/ar/examples/ImportObj/data/materials.mtl rename to processing/mode/libraries/ar/examples/ImportObj/data/materials.mtl diff --git a/mode/libraries/ar/examples/ImportObj/data/model.obj b/processing/mode/libraries/ar/examples/ImportObj/data/model.obj similarity index 100% rename from mode/libraries/ar/examples/ImportObj/data/model.obj rename to processing/mode/libraries/ar/examples/ImportObj/data/model.obj diff --git a/mode/libraries/ar/examples/Spheres/Spheres.pde b/processing/mode/libraries/ar/examples/Spheres/Spheres.pde similarity index 100% rename from mode/libraries/ar/examples/Spheres/Spheres.pde rename to processing/mode/libraries/ar/examples/Spheres/Spheres.pde diff --git a/mode/libraries/ar/examples/Spheres/code/sketch.properties b/processing/mode/libraries/ar/examples/Spheres/code/sketch.properties similarity index 100% rename from mode/libraries/ar/examples/Spheres/code/sketch.properties rename to processing/mode/libraries/ar/examples/Spheres/code/sketch.properties diff --git a/mode/libraries/ar/library.properties b/processing/mode/libraries/ar/library.properties similarity index 84% rename from mode/libraries/ar/library.properties rename to processing/mode/libraries/ar/library.properties index c9e600b01..e5f844ae3 100644 --- a/mode/libraries/ar/library.properties +++ b/processing/mode/libraries/ar/library.properties @@ -1,6 +1,6 @@ name = AR authorList = The Processing Foundation, Syam Sundar K -url = http://android.processing.org +url = https://android.processing.org category = 3D sentence = Renderer to develop AR apps paragraph = diff --git a/mode/libraries/vr/README.md b/processing/mode/libraries/vr/README.md similarity index 100% rename from mode/libraries/vr/README.md rename to processing/mode/libraries/vr/README.md diff --git a/processing/mode/libraries/vr/build.gradle b/processing/mode/libraries/vr/build.gradle new file mode 100644 index 000000000..b223c4910 --- /dev/null +++ b/processing/mode/libraries/vr/build.gradle @@ -0,0 +1,132 @@ +import java.nio.file.Files +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING + +plugins { + id 'java-library' + id 'maven-publish' +} + +dependencies { + compileOnly name: "android" + compileOnly "org.p5android:processing-core:${modeVersion}" + +// commenting due to issue #718 +// implementationAar "com.google.vr:sdk-audio:${gvrVersion}" +// implementationAar "com.google.vr:sdk-base:${gvrVersion}" + +// fix for Issue #718 + implementation fileTree(dir: "../../../../libs/google-vr/", include: ["*.aar"]) +} + +sourceSets { + main { + java.srcDir("../../../../libs/processing-vr/src/main/java/") + resources { + srcDir("../../../../libs/processing-vr/src/main/") + exclude "AndroidManifest.xml" + exclude "**/java/**" + } + } +} + +java { + withSourcesJar() +} + +tasks.named('jar') { + duplicatesStrategy = DuplicatesStrategy.INCLUDE +} + +tasks.register("sourceJar", Jar) { + from sourceSets.main.allJava + archiveClassifier.set("sources") +} + +// Does not work because of Processing-specific tags in source code, such as @webref +tasks.register("javadocJar", Jar) { + dependsOn javadoc + archiveClassifier.set("javadoc") + from javadoc.destinationDir +} + +artifacts { +// archives javadocJar + archives sourceJar +} + +tasks.jar { + doLast { + ant.checksum file: archiveFile.get().asFile + } +} + +tasks.clean { + doFirst { + delete "dist" + delete "library/vr.jar" + } +} + +tasks.compileJava { + doFirst { + String[] deps = ["sdk-audio.jar", + "sdk-base.jar", + "sdk-common.jar"] + File libFolder = file("library") + libFolder.mkdirs() + deps.each { String fn -> + Files.copy( + file("${rootDir}/build/libs/" + fn).toPath(), + file("library/" + fn).toPath(), + REPLACE_EXISTING + ) + } + } +} + +tasks.build { + doLast { + // Copying vr jar to library folder + File vrJar = file("library/vr.jar") + vrJar.mkdirs() + + // Need to check the existance of the files before using as the files + // will get generated only if Task ':mode:libraries:vr:jar' is not being skipped + // Task ':mode:libraries:vr:jar' will be skipped if source files are unchanged or jar task is UP-TO-DATE + def vrJarFile = file("$buildDir/libs/vr.jar") + if (vrJarFile.exists()) { + Files.copy(vrJarFile.toPath(), vrJar.toPath(), REPLACE_EXISTING) + } + + // Renaming artifacts for maven publishing + def processingVrJar = file("$buildDir/libs/processing-vr-${vrLibVersion}.jar") + if (vrJarFile.exists()) { + Files.move(vrJarFile.toPath(), processingVrJar.toPath(), REPLACE_EXISTING) + } + + def processingVrSourcesJar = file("$buildDir/libs/processing-vr-${vrLibVersion}-sources.jar") + def vrSourcesJar = file("$buildDir/libs/vr-sources.jar") + if (vrSourcesJar.exists()) { + Files.move(vrSourcesJar.toPath(), processingVrSourcesJar.toPath(), REPLACE_EXISTING) + } + + def vrMd5File = file("$buildDir/libs/vr.jar.MD5") + def processingVrMd5File = file("$buildDir/libs/processing-vr-${vrLibVersion}.jar.md5") + if (vrMd5File.exists()) { + Files.move(vrMd5File.toPath(), processingVrMd5File.toPath(), REPLACE_EXISTING) + } + } +} + +ext { + libName = 'processing-vr' + libVersion = vrLibVersion + libJar = "${buildDir}/libs/${libName}-${libVersion}.jar" + libSrc = "${buildDir}/libs/${libName}-${libVersion}-sources.jar" + libMd5 = "${buildDir}/libs/${libName}-${libVersion}-sources.jar.md5" + libDependencies = [[group: 'org.p5android', name: 'processing-core', version: modeVersion], + [group: 'com.google.vr', name: 'sdk-base', version: gvrVersion], + [group: 'com.google.vr', name: 'sdk-audio', version: gvrVersion]] +} + +apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" diff --git a/mode/libraries/vr/examples/Cube/Cube.pde b/processing/mode/libraries/vr/examples/Cube/Cube.pde similarity index 100% rename from mode/libraries/vr/examples/Cube/Cube.pde rename to processing/mode/libraries/vr/examples/Cube/Cube.pde diff --git a/mode/libraries/vr/examples/Cube/code/sketch.properties b/processing/mode/libraries/vr/examples/Cube/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/Cube/code/sketch.properties rename to processing/mode/libraries/vr/examples/Cube/code/sketch.properties diff --git a/mode/libraries/vr/examples/GenerateRay/GenerateRay.pde b/processing/mode/libraries/vr/examples/GenerateRay/GenerateRay.pde similarity index 100% rename from mode/libraries/vr/examples/GenerateRay/GenerateRay.pde rename to processing/mode/libraries/vr/examples/GenerateRay/GenerateRay.pde diff --git a/mode/libraries/vr/examples/GenerateRay/code/sketch.properties b/processing/mode/libraries/vr/examples/GenerateRay/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/GenerateRay/code/sketch.properties rename to processing/mode/libraries/vr/examples/GenerateRay/code/sketch.properties diff --git a/mode/libraries/vr/examples/IntersectsBox/IntersectsBox.pde b/processing/mode/libraries/vr/examples/IntersectsBox/IntersectsBox.pde similarity index 100% rename from mode/libraries/vr/examples/IntersectsBox/IntersectsBox.pde rename to processing/mode/libraries/vr/examples/IntersectsBox/IntersectsBox.pde diff --git a/mode/libraries/vr/examples/IntersectsBox/code/sketch.properties b/processing/mode/libraries/vr/examples/IntersectsBox/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/IntersectsBox/code/sketch.properties rename to processing/mode/libraries/vr/examples/IntersectsBox/code/sketch.properties diff --git a/mode/libraries/vr/examples/IntersectsPlane/IntersectsPlane.pde b/processing/mode/libraries/vr/examples/IntersectsPlane/IntersectsPlane.pde similarity index 100% rename from mode/libraries/vr/examples/IntersectsPlane/IntersectsPlane.pde rename to processing/mode/libraries/vr/examples/IntersectsPlane/IntersectsPlane.pde diff --git a/mode/libraries/vr/examples/IntersectsPlane/code/sketch.properties b/processing/mode/libraries/vr/examples/IntersectsPlane/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/IntersectsPlane/code/sketch.properties rename to processing/mode/libraries/vr/examples/IntersectsPlane/code/sketch.properties diff --git a/mode/libraries/vr/examples/IntersectsSphere/IntersectsSphere.pde b/processing/mode/libraries/vr/examples/IntersectsSphere/IntersectsSphere.pde similarity index 100% rename from mode/libraries/vr/examples/IntersectsSphere/IntersectsSphere.pde rename to processing/mode/libraries/vr/examples/IntersectsSphere/IntersectsSphere.pde diff --git a/mode/libraries/vr/examples/IntersectsSphere/code/sketch.properties b/processing/mode/libraries/vr/examples/IntersectsSphere/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/IntersectsSphere/code/sketch.properties rename to processing/mode/libraries/vr/examples/IntersectsSphere/code/sketch.properties diff --git a/mode/libraries/vr/examples/Mono/Mono.pde b/processing/mode/libraries/vr/examples/Mono/Mono.pde similarity index 100% rename from mode/libraries/vr/examples/Mono/Mono.pde rename to processing/mode/libraries/vr/examples/Mono/Mono.pde diff --git a/mode/libraries/vr/examples/Mono/code/sketch.properties b/processing/mode/libraries/vr/examples/Mono/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/Mono/code/sketch.properties rename to processing/mode/libraries/vr/examples/Mono/code/sketch.properties diff --git a/mode/libraries/vr/examples/Stereoscopy/Stereoscopy.pde b/processing/mode/libraries/vr/examples/Stereoscopy/Stereoscopy.pde similarity index 100% rename from mode/libraries/vr/examples/Stereoscopy/Stereoscopy.pde rename to processing/mode/libraries/vr/examples/Stereoscopy/Stereoscopy.pde diff --git a/mode/libraries/vr/examples/Stereoscopy/code/sketch.properties b/processing/mode/libraries/vr/examples/Stereoscopy/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/Stereoscopy/code/sketch.properties rename to processing/mode/libraries/vr/examples/Stereoscopy/code/sketch.properties diff --git a/mode/libraries/vr/examples/drawAim/code/sketch.properties b/processing/mode/libraries/vr/examples/drawAim/code/sketch.properties similarity index 100% rename from mode/libraries/vr/examples/drawAim/code/sketch.properties rename to processing/mode/libraries/vr/examples/drawAim/code/sketch.properties diff --git a/mode/libraries/vr/examples/drawAim/drawAim.pde b/processing/mode/libraries/vr/examples/drawAim/drawAim.pde similarity index 100% rename from mode/libraries/vr/examples/drawAim/drawAim.pde rename to processing/mode/libraries/vr/examples/drawAim/drawAim.pde diff --git a/mode/libraries/vr/library.properties b/processing/mode/libraries/vr/library.properties similarity index 83% rename from mode/libraries/vr/library.properties rename to processing/mode/libraries/vr/library.properties index 2b6aecb22..7c92c2cff 100644 --- a/mode/libraries/vr/library.properties +++ b/processing/mode/libraries/vr/library.properties @@ -1,6 +1,6 @@ name = VR authorList = Processing Foundation -url = http://android.processing.org +url = https://android.processing.org category = 3D sentence = Renderer to develop VR apps paragraph = diff --git a/mode/mode.properties b/processing/mode/mode.properties similarity index 73% rename from mode/mode.properties rename to processing/mode/mode.properties index c91327d3b..a03cb0ece 100644 --- a/mode/mode.properties +++ b/processing/mode/mode.properties @@ -1,11 +1,10 @@ name = Android Mode for Processing 4 authorList = [The Processing Foundation](https://processingfoundation.org/) -url = http://android.processing.org +url = https://android.processing.org sentence = This mode lets you use Processing to create Android apps paragraph = imports=processing.mode.java.JavaMode -version = 409 -prettyVersion = 4.5.0b5 +version = 412 +prettyVersion = 4.6.0 minRevision = 1283 -maxRevision = 0 - +maxRevision = 0 \ No newline at end of file diff --git a/mode/mode/JavaMode.jar b/processing/mode/mode/JavaMode.jar similarity index 100% rename from mode/mode/JavaMode.jar rename to processing/mode/mode/JavaMode.jar diff --git a/mode/mode/core.jar b/processing/mode/mode/core.jar similarity index 100% rename from mode/mode/core.jar rename to processing/mode/mode/core.jar diff --git a/processing/mode/mode/gradlew.zip b/processing/mode/mode/gradlew.zip new file mode 100644 index 000000000..5f7697c8a Binary files /dev/null and b/processing/mode/mode/gradlew.zip differ diff --git a/mode/mode/istack-commons-runtime.jar b/processing/mode/mode/istack-commons-runtime.jar similarity index 100% rename from mode/mode/istack-commons-runtime.jar rename to processing/mode/mode/istack-commons-runtime.jar diff --git a/mode/mode/javax.activation-api.jar b/processing/mode/mode/javax.activation-api.jar similarity index 100% rename from mode/mode/javax.activation-api.jar rename to processing/mode/mode/javax.activation-api.jar diff --git a/mode/mode/jaxb-api.jar b/processing/mode/mode/jaxb-api.jar similarity index 100% rename from mode/mode/jaxb-api.jar rename to processing/mode/mode/jaxb-api.jar diff --git a/mode/mode/jaxb-jxc.jar b/processing/mode/mode/jaxb-jxc.jar similarity index 100% rename from mode/mode/jaxb-jxc.jar rename to processing/mode/mode/jaxb-jxc.jar diff --git a/mode/mode/jaxb-runtime.jar b/processing/mode/mode/jaxb-runtime.jar similarity index 100% rename from mode/mode/jaxb-runtime.jar rename to processing/mode/mode/jaxb-runtime.jar diff --git a/mode/mode/jaxb-xjc.jar b/processing/mode/mode/jaxb-xjc.jar similarity index 100% rename from mode/mode/jaxb-xjc.jar rename to processing/mode/mode/jaxb-xjc.jar diff --git a/mode/mode/jdi.jar b/processing/mode/mode/jdi.jar similarity index 100% rename from mode/mode/jdi.jar rename to processing/mode/mode/jdi.jar diff --git a/mode/mode/jdimodel.jar b/processing/mode/mode/jdimodel.jar similarity index 100% rename from mode/mode/jdimodel.jar rename to processing/mode/mode/jdimodel.jar diff --git a/mode/mode/org.eclipse.core.contenttype.jar b/processing/mode/mode/org.eclipse.core.contenttype.jar similarity index 100% rename from mode/mode/org.eclipse.core.contenttype.jar rename to processing/mode/mode/org.eclipse.core.contenttype.jar diff --git a/mode/mode/org.eclipse.core.jobs.jar b/processing/mode/mode/org.eclipse.core.jobs.jar similarity index 100% rename from mode/mode/org.eclipse.core.jobs.jar rename to processing/mode/mode/org.eclipse.core.jobs.jar diff --git a/mode/mode/org.eclipse.core.resources.jar b/processing/mode/mode/org.eclipse.core.resources.jar similarity index 100% rename from mode/mode/org.eclipse.core.resources.jar rename to processing/mode/mode/org.eclipse.core.resources.jar diff --git a/mode/mode/org.eclipse.core.runtime.jar b/processing/mode/mode/org.eclipse.core.runtime.jar similarity index 100% rename from mode/mode/org.eclipse.core.runtime.jar rename to processing/mode/mode/org.eclipse.core.runtime.jar diff --git a/mode/mode/org.eclipse.equinox.common.jar b/processing/mode/mode/org.eclipse.equinox.common.jar similarity index 100% rename from mode/mode/org.eclipse.equinox.common.jar rename to processing/mode/mode/org.eclipse.equinox.common.jar diff --git a/mode/mode/org.eclipse.equinox.preferences.jar b/processing/mode/mode/org.eclipse.equinox.preferences.jar similarity index 100% rename from mode/mode/org.eclipse.equinox.preferences.jar rename to processing/mode/mode/org.eclipse.equinox.preferences.jar diff --git a/mode/mode/org.eclipse.jdt.core.jar b/processing/mode/mode/org.eclipse.jdt.core.jar similarity index 100% rename from mode/mode/org.eclipse.jdt.core.jar rename to processing/mode/mode/org.eclipse.jdt.core.jar diff --git a/mode/mode/org.eclipse.osgi.jar b/processing/mode/mode/org.eclipse.osgi.jar similarity index 100% rename from mode/mode/org.eclipse.osgi.jar rename to processing/mode/mode/org.eclipse.osgi.jar diff --git a/mode/mode/org.eclipse.text.jar b/processing/mode/mode/org.eclipse.text.jar similarity index 100% rename from mode/mode/org.eclipse.text.jar rename to processing/mode/mode/org.eclipse.text.jar diff --git a/mode/mode/pde.jar b/processing/mode/mode/pde.jar similarity index 100% rename from mode/mode/pde.jar rename to processing/mode/mode/pde.jar diff --git a/mode/resources/device-art-resources/device-art.xml b/processing/mode/resources/device-art-resources/device-art.xml similarity index 100% rename from mode/resources/device-art-resources/device-art.xml rename to processing/mode/resources/device-art-resources/device-art.xml diff --git a/mode/resources/device-art-resources/pixel_3/layout b/processing/mode/resources/device-art-resources/pixel_3/layout similarity index 100% rename from mode/resources/device-art-resources/pixel_3/layout rename to processing/mode/resources/device-art-resources/pixel_3/layout diff --git a/mode/resources/device-art-resources/pixel_3/port_back.webp b/processing/mode/resources/device-art-resources/pixel_3/port_back.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_3/port_back.webp rename to processing/mode/resources/device-art-resources/pixel_3/port_back.webp diff --git a/mode/resources/device-art-resources/pixel_3/round_corners.webp b/processing/mode/resources/device-art-resources/pixel_3/round_corners.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_3/round_corners.webp rename to processing/mode/resources/device-art-resources/pixel_3/round_corners.webp diff --git a/mode/resources/device-art-resources/pixel_6/back.webp b/processing/mode/resources/device-art-resources/pixel_6/back.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_6/back.webp rename to processing/mode/resources/device-art-resources/pixel_6/back.webp diff --git a/mode/resources/device-art-resources/pixel_6/layout b/processing/mode/resources/device-art-resources/pixel_6/layout similarity index 100% rename from mode/resources/device-art-resources/pixel_6/layout rename to processing/mode/resources/device-art-resources/pixel_6/layout diff --git a/mode/resources/device-art-resources/pixel_6/mask.webp b/processing/mode/resources/device-art-resources/pixel_6/mask.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_6/mask.webp rename to processing/mode/resources/device-art-resources/pixel_6/mask.webp diff --git a/mode/resources/device-art-resources/pixel_c/land_back.webp b/processing/mode/resources/device-art-resources/pixel_c/land_back.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_c/land_back.webp rename to processing/mode/resources/device-art-resources/pixel_c/land_back.webp diff --git a/mode/resources/device-art-resources/pixel_c/land_fore.webp b/processing/mode/resources/device-art-resources/pixel_c/land_fore.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_c/land_fore.webp rename to processing/mode/resources/device-art-resources/pixel_c/land_fore.webp diff --git a/mode/resources/device-art-resources/pixel_c/land_shadow.webp b/processing/mode/resources/device-art-resources/pixel_c/land_shadow.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_c/land_shadow.webp rename to processing/mode/resources/device-art-resources/pixel_c/land_shadow.webp diff --git a/mode/resources/device-art-resources/pixel_c/layout b/processing/mode/resources/device-art-resources/pixel_c/layout similarity index 100% rename from mode/resources/device-art-resources/pixel_c/layout rename to processing/mode/resources/device-art-resources/pixel_c/layout diff --git a/mode/resources/device-art-resources/pixel_c/port_back.webp b/processing/mode/resources/device-art-resources/pixel_c/port_back.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_c/port_back.webp rename to processing/mode/resources/device-art-resources/pixel_c/port_back.webp diff --git a/mode/resources/device-art-resources/pixel_c/port_fore.webp b/processing/mode/resources/device-art-resources/pixel_c/port_fore.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_c/port_fore.webp rename to processing/mode/resources/device-art-resources/pixel_c/port_fore.webp diff --git a/mode/resources/device-art-resources/pixel_c/port_shadow.webp b/processing/mode/resources/device-art-resources/pixel_c/port_shadow.webp similarity index 100% rename from mode/resources/device-art-resources/pixel_c/port_shadow.webp rename to processing/mode/resources/device-art-resources/pixel_c/port_shadow.webp diff --git a/mode/resources/device-art-resources/wearos_small_round/device_bezel.png b/processing/mode/resources/device-art-resources/wearos_small_round/device_bezel.png similarity index 100% rename from mode/resources/device-art-resources/wearos_small_round/device_bezel.png rename to processing/mode/resources/device-art-resources/wearos_small_round/device_bezel.png diff --git a/mode/resources/device-art-resources/wearos_small_round/hardware.ini b/processing/mode/resources/device-art-resources/wearos_small_round/hardware.ini similarity index 100% rename from mode/resources/device-art-resources/wearos_small_round/hardware.ini rename to processing/mode/resources/device-art-resources/wearos_small_round/hardware.ini diff --git a/mode/resources/device-art-resources/wearos_small_round/layout b/processing/mode/resources/device-art-resources/wearos_small_round/layout similarity index 100% rename from mode/resources/device-art-resources/wearos_small_round/layout rename to processing/mode/resources/device-art-resources/wearos_small_round/layout diff --git a/mode/resources/device-art-resources/wearos_square/device_bezel.png b/processing/mode/resources/device-art-resources/wearos_square/device_bezel.png similarity index 100% rename from mode/resources/device-art-resources/wearos_square/device_bezel.png rename to processing/mode/resources/device-art-resources/wearos_square/device_bezel.png diff --git a/mode/resources/device-art-resources/wearos_square/hardware.ini b/processing/mode/resources/device-art-resources/wearos_square/hardware.ini similarity index 100% rename from mode/resources/device-art-resources/wearos_square/hardware.ini rename to processing/mode/resources/device-art-resources/wearos_square/hardware.ini diff --git a/mode/resources/device-art-resources/wearos_square/layout b/processing/mode/resources/device-art-resources/wearos_square/layout similarity index 100% rename from mode/resources/device-art-resources/wearos_square/layout rename to processing/mode/resources/device-art-resources/wearos_square/layout diff --git a/mode/scripts/permissions.py b/processing/mode/scripts/permissions.py similarity index 100% rename from mode/scripts/permissions.py rename to processing/mode/scripts/permissions.py diff --git a/mode/scripts/requirements.txt b/processing/mode/scripts/requirements.txt similarity index 75% rename from mode/scripts/requirements.txt rename to processing/mode/scripts/requirements.txt index c1f5f713c..6f83e94d2 100644 --- a/mode/scripts/requirements.txt +++ b/processing/mode/scripts/requirements.txt @@ -1 +1,2 @@ beautifulsoup4 +lxml diff --git a/mode/src/processing/mode/android/AVD.java b/processing/mode/src/processing/mode/android/AVD.java similarity index 94% rename from mode/src/processing/mode/android/AVD.java rename to processing/mode/src/processing/mode/android/AVD.java index 47bf632f4..7674bc6b6 100644 --- a/mode/src/processing/mode/android/AVD.java +++ b/processing/mode/src/processing/mode/android/AVD.java @@ -38,14 +38,12 @@ public class AVD { final static private int WEAR = 1; final static public String DEFAULT_ABI = "x86"; - - public static final String TARGET_SDK_ARM = "24"; public final static String DEFAULT_PHONE_PORT = "5566"; public final static String DEFAULT_WEAR_PORT = "5576"; private static final String GETTING_START_TUT_URL = - "http://android.processing.org/tutorials/getting_started/index.html"; + "https://android.processing.org/tutorials/getting_started/index.html"; static final String DEVICE_DEFINITION = "pixel_6"; static final String DEVICE_SKIN = "pixel_6"; @@ -95,23 +93,24 @@ static public String getName(boolean wear) { return AVD.phoneAVD.name; } } - - - static public String getPreferredPlatform(boolean wear, String abi) { - if (wear) { - return AndroidBuild.TARGET_PLATFORM; - } else if (abi.equals("arm")) { + + static public String getTargetSDK(boolean wear, String abi) { + if (abi.equals("arm")) { // The ARM images using Google APIs are too slow, so use the // older Android (AOSP) images. // TODO check if we can move to the regular ARM images... - return "android-" + TARGET_SDK_ARM; + return AndroidBuild.TARGET_WEAR_SDK_ARM; } else if (abi.equals("arm64-v8a")) { - return AndroidBuild.TARGET_PLATFORM; - } else { - return AndroidBuild.TARGET_PLATFORM; + return wear ? AndroidBuild.TARGET_WEAR_SDK : AndroidBuild.TARGET_SDK; + } else { // x86 + return wear ? AndroidBuild.TARGET_WEAR_SDK : AndroidBuild.TARGET_SDK; } } + static public String getPreferredPlatform(boolean wear, String abi) { + return "android-" + getTargetSDK(wear, abi); + } + static public String getPreferredPort(boolean wear) { String port = ""; if (wear) { @@ -322,7 +321,6 @@ protected void getImages(final ArrayList images, final AndroidSDK sdk, line.contains(";" + imagePlatform) && line.contains(";" + imageTag) && line.contains(";" + imageAbi)) { -// System.out.println(" added image!"); images.add(line); } } diff --git a/mode/src/processing/mode/android/AndroidBuild.java b/processing/mode/src/processing/mode/android/AndroidBuild.java similarity index 93% rename from mode/src/processing/mode/android/AndroidBuild.java rename to processing/mode/src/processing/mode/android/AndroidBuild.java index f1ae72ecf..78a16f8a3 100644 --- a/mode/src/processing/mode/android/AndroidBuild.java +++ b/processing/mode/src/processing/mode/android/AndroidBuild.java @@ -26,7 +26,6 @@ import processing.app.Base; import processing.app.Library; -import processing.app.Messages; import processing.app.Platform; import processing.app.Preferences; import processing.app.Sketch; @@ -67,8 +66,9 @@ class AndroidBuild extends JavaBuild { static public String MIN_SDK_WATCHFACE; // Versions of all required dependencies - static public String TARGET_SDK; - static public String TARGET_PLATFORM; + static public String TARGET_SDK; + static public String TARGET_WEAR_SDK_ARM; + static public String TARGET_WEAR_SDK; static public String GRADLE_PLUGIN_VER; static public String APPCOMPAT_VER; static public String V4LEGACY_VER; @@ -393,7 +393,13 @@ private void createTopModule(String projectModules, String keyPassword) File settingsTemplate = mode.getContentFile("templates/" + GRADLE_SETTINGS_TEMPLATE); File settingsFile = new File(tmpFolder, "settings.gradle"); replaceMap.clear(); - replaceMap.put("@@project_modules@@", projectModules); + if (getAppComponent() == VR) { + // The local google-vr has to be added to the settings to fix Issue #718 + replaceMap.put("@@project_modules@@", projectModules + ", ':app:libs:google-vr'"); + } else { + replaceMap.put("@@project_modules@@", projectModules); + } + AndroidUtil.createFileFromTemplate(settingsTemplate, settingsFile, replaceMap); File localPropsTemplate = mode.getContentFile("templates/" + LOCAL_PROPERTIES_TEMPLATE); @@ -475,15 +481,10 @@ private void createAppModule(String moduleName) copyImportedLibs(libsFolder, mainFolder, assetsFolder); copyCodeFolder(libsFolder); - // Copy any system libraries needed by the project -// copyWearLib(libsFolder); -// copySupportLibs(libsFolder); -// if (getAppComponent() == APP) { -// copyAppCompatLib(libsFolder); -// } -// if (getAppComponent() == VR) { -// copyGVRLibs(libsFolder); -// } + if (getAppComponent() == VR) { + // Need to call this to fix Issue #718 + copyGVRLibs(libsFolder); + } // Copy the data folder (if one exists) to the project's 'assets' folder final File sketchDataFolder = sketch.getDataFolder(); @@ -852,7 +853,6 @@ private void copyImportedLibs(final File libsFolder, } } } - private void copyImportedLib(final File libsFolder, final File mainFolder, @@ -899,6 +899,15 @@ else if (exportName.equals("jniLibs")) { } } + /** + * Copy the dummy Gradle project containing aar files from Google VR, + * so they can be imported locally from the project + */ + private void copyGVRLibs(final File libsFolder) throws IOException { + File srcFolder = new File(mode.getFolder(), "libraries/vr/libs/google-vr"); + File dstFolder = new File(libsFolder, "google-vr"); + Util.copyDir(srcFolder, dstFolder); + } private void copyCodeFolder(final File libsFolder) throws IOException { // Copy files from the 'code' directory into the 'libs' folder @@ -982,7 +991,7 @@ private File createTempBuildFolder(final Sketch sketch) throws IOException { private void installGradlew(File exportFolder) throws IOException { File gradlewFile = mode.getContentFile("mode/gradlew.zip"); - AndroidUtil.extractFolder(gradlewFile, exportFolder, false, true); + AndroidUtil.extractFolder(gradlewFile, exportFolder); if (Platform.isMacOS() || Platform.isLinux()) { File execFile = new File(exportFolder, "gradlew"); execFile.setExecutable(true); @@ -1024,8 +1033,21 @@ static public void initVersions(File file) { TARGET_SDK = defTargetSDK; Preferences.set("android.sdk.target", TARGET_SDK); } - TARGET_PLATFORM = "android-" + TARGET_SDK; - + + TARGET_WEAR_SDK_ARM = Preferences.get("android.sdk.target.wear_arm"); + String defTargetWearSDKArm = props.getProperty("android-platform-wear-arm"); + if (TARGET_WEAR_SDK_ARM == null || PApplet.parseInt(TARGET_WEAR_SDK_ARM) != PApplet.parseInt(defTargetWearSDKArm)) { + TARGET_WEAR_SDK_ARM = defTargetWearSDKArm; + Preferences.set("android.sdk.target.wear_arm", TARGET_WEAR_SDK_ARM); + } + + TARGET_WEAR_SDK = Preferences.get("android.sdk.target.wear"); + String defTargetWearSDK = props.getProperty("android-platform-wear"); + if (TARGET_WEAR_SDK == null || PApplet.parseInt(TARGET_WEAR_SDK) != PApplet.parseInt(defTargetWearSDK)) { + TARGET_WEAR_SDK = defTargetWearSDK; + Preferences.set("android.sdk.target.wear", TARGET_WEAR_SDK); + } + APPCOMPAT_VER = Preferences.get("android.sdk.appcompat"); String defAppCompatVer = props.getProperty("androidx.appcompat%appcompat"); if (APPCOMPAT_VER == null || !versionCheck(APPCOMPAT_VER, defAppCompatVer)) { diff --git a/mode/src/processing/mode/android/AndroidDebugger.java b/processing/mode/src/processing/mode/android/AndroidDebugger.java similarity index 100% rename from mode/src/processing/mode/android/AndroidDebugger.java rename to processing/mode/src/processing/mode/android/AndroidDebugger.java diff --git a/mode/src/processing/mode/android/AndroidEditor.java b/processing/mode/src/processing/mode/android/AndroidEditor.java similarity index 98% rename from mode/src/processing/mode/android/AndroidEditor.java rename to processing/mode/src/processing/mode/android/AndroidEditor.java index c7c7e5dd4..d45cb4ad9 100644 --- a/mode/src/processing/mode/android/AndroidEditor.java +++ b/processing/mode/src/processing/mode/android/AndroidEditor.java @@ -123,7 +123,7 @@ public boolean handleSaveAs() { public JMenu buildFileMenu() { String exportPackageTitle = AndroidToolbar.getTitle(AndroidToolbar.EXPORT_PACKAGE); - JMenuItem exportPackage = Toolkit.newJMenuItemShift(exportPackageTitle,'T'); + JMenuItem exportPackage = Toolkit.newJMenuItemShift(exportPackageTitle, 'X'); exportPackage.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExportPackage(); @@ -132,7 +132,7 @@ public void actionPerformed(ActionEvent e) { String exportBundleTitle = AndroidToolbar.getTitle(AndroidToolbar.EXPORT_BUNDLE); - JMenuItem exportBundle = Toolkit.newJMenuItem(exportBundleTitle, 'B'); + JMenuItem exportBundle = Toolkit.newJMenuItemShift(exportBundleTitle, 'B'); exportBundle.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExportBundle(); @@ -141,7 +141,7 @@ public void actionPerformed(ActionEvent e) { String exportProjectTitle = AndroidToolbar.getTitle(AndroidToolbar.EXPORT_PROJECT); - JMenuItem exportProject = Toolkit.newJMenuItemShift(exportProjectTitle, 'X'); + JMenuItem exportProject = Toolkit.newJMenuItemShift(exportProjectTitle, 'E'); exportProject.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleExportProject(); @@ -153,14 +153,14 @@ public void actionPerformed(ActionEvent e) { public JMenu buildSketchMenu() { - JMenuItem runItem = Toolkit.newJMenuItem(AndroidToolbar.getTitle(AndroidToolbar.RUN_ON_DEVICE), 'D'); + JMenuItem runItem = Toolkit.newJMenuItem(AndroidToolbar.getTitle(AndroidToolbar.RUN_ON_DEVICE), 'R'); runItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleRunDevice(); } }); - JMenuItem presentItem = Toolkit.newJMenuItemShift(AndroidToolbar.getTitle(AndroidToolbar.RUN_IN_EMULATOR), 'E'); + JMenuItem presentItem = Toolkit.newJMenuItemShift(AndroidToolbar.getTitle(AndroidToolbar.RUN_IN_EMULATOR), 'R'); presentItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleRunEmulator(); @@ -348,7 +348,7 @@ public JMenu buildHelpMenu() { item = new JMenuItem(AndroidMode.getTextString("menu.help.processing_for_android_site")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - Platform.openURL("http://android.processing.org/"); + Platform.openURL("https://android.processing.org/"); } }); menu.add(item); @@ -357,7 +357,7 @@ public void actionPerformed(ActionEvent e) { item = new JMenuItem(AndroidMode.getTextString("menu.help.android_developer_site")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - Platform.openURL("http://developer.android.com/"); + Platform.openURL("https://developer.android.com/"); } }); menu.add(item); diff --git a/mode/src/processing/mode/android/AndroidKeyStore.java b/processing/mode/src/processing/mode/android/AndroidKeyStore.java similarity index 100% rename from mode/src/processing/mode/android/AndroidKeyStore.java rename to processing/mode/src/processing/mode/android/AndroidKeyStore.java diff --git a/mode/src/processing/mode/android/AndroidLineBreakpoint.java b/processing/mode/src/processing/mode/android/AndroidLineBreakpoint.java similarity index 100% rename from mode/src/processing/mode/android/AndroidLineBreakpoint.java rename to processing/mode/src/processing/mode/android/AndroidLineBreakpoint.java diff --git a/mode/src/processing/mode/android/AndroidMode.java b/processing/mode/src/processing/mode/android/AndroidMode.java similarity index 98% rename from mode/src/processing/mode/android/AndroidMode.java rename to processing/mode/src/processing/mode/android/AndroidMode.java index 6d35f855b..1d341c164 100644 --- a/mode/src/processing/mode/android/AndroidMode.java +++ b/processing/mode/src/processing/mode/android/AndroidMode.java @@ -65,10 +65,10 @@ public class AndroidMode extends JavaMode { private static final String VERSIONS_FILE = "version.properties"; private static final String BLUETOOTH_DEBUG_URL = - "https://developer.android.com/training/wearables/apps/debugging.html"; + "https://developer.android.com/training/wearables/get-started/debugging"; private static final String DISTRIBUTING_APPS_TUT_URL = - "http://android.processing.org/tutorials/distributing/index.html"; + "https://android.processing.org/tutorials/distributing/index.html"; public AndroidMode(Base base, File folder) { super(base, folder); diff --git a/mode/src/processing/mode/android/AndroidRunner.java b/processing/mode/src/processing/mode/android/AndroidRunner.java similarity index 100% rename from mode/src/processing/mode/android/AndroidRunner.java rename to processing/mode/src/processing/mode/android/AndroidRunner.java diff --git a/mode/src/processing/mode/android/AndroidSDK.java b/processing/mode/src/processing/mode/android/AndroidSDK.java similarity index 88% rename from mode/src/processing/mode/android/AndroidSDK.java rename to processing/mode/src/processing/mode/android/AndroidSDK.java index 18b988edf..36e7423a1 100644 --- a/mode/src/processing/mode/android/AndroidSDK.java +++ b/processing/mode/src/processing/mode/android/AndroidSDK.java @@ -41,13 +41,18 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; +import java.nio.file.attribute.PosixFilePermission; import java.io.PrintWriter; +import java.util.Set; /** * Class holding all needed references (path, tools, etc) to the SDK used by @@ -69,18 +74,19 @@ class AndroidSDK { private final File cmdlineTools; private final File avdManager; private final File sdkManager; + private final File adb; private File emulator; - - private static final String SDK_DOWNLOAD_URL = - "https://developer.android.com/studio/index.html#downloads"; private static final String PROCESSING_FOR_ANDROID_URL = - "http://android.processing.org/"; + "https://android.processing.org/"; private static final String WHATS_NEW_URL = - "http://android.processing.org/whatsnew.html"; - + "https://android.processing.org/whatsnew"; + + private static final String SDK_DOWNLOAD_URL = + "https://developer.android.com/studio/index.html#android-studio-downloads"; + private static final String DRIVER_INSTALL_URL = "https://developer.android.com/studio/run/oem-usb.html#InstallingDriver"; @@ -132,30 +138,35 @@ public AndroidSDK(File folder) throws BadSDKException, IOException { } // Retrieve the highest platform from the available targets - ArrayList targets = getAvailableSdkTargets(); - int highest = 1; - for (SDKTarget targ: targets) { - if (highest < targ.version) { - highest = targ.version; + ArrayList targets = getAvailableSdkTargets(); + int highestBuild = 1; + int highestTarget = 1; + String highestName = ""; + for (Target targ: targets) { + if (highestBuild < targ.build) { + highestBuild = targ.build; + highestTarget = targ.sdk; + highestName = targ.name; } } - if (highest < PApplet.parseInt(AndroidBuild.TARGET_SDK)) { + if (highestTarget < PApplet.parseInt(AndroidBuild.TARGET_SDK)) { throw new BadSDKException(AndroidMode.getTextString("android_sdk.error.missing_target_platform", AndroidBuild.TARGET_SDK, platforms.getAbsolutePath())); } - - highestPlatform = new File(platforms, "android-" + highest); + highestPlatform = new File(platforms, highestName); androidJar = new File(highestPlatform, "android.jar"); if (!androidJar.exists()) { throw new BadSDKException(AndroidMode.getTextString("android_sdk.error.missing_android_jar", AndroidBuild.TARGET_SDK, highestPlatform.getAbsolutePath())); } + // Collecting the tools needed by the mode + adb = findCliTool(platformTools, "adb"); avdManager = findCliTool(new File(cmdlineTools, "bin"), "avdmanager"); sdkManager = findCliTool(new File(cmdlineTools, "bin"), "sdkmanager"); - + initEmu(); String path = Platform.getenv("PATH"); @@ -328,18 +339,7 @@ public File getHighestPlatform() { public File getTargetPlatform(String target) { return new File(platforms, "android-" + target); } - - - public File getZipAlignTool() { - File[] files = buildTools.listFiles(); - String name = Platform.isWindows() ? "zipalign.exe" : "zipalign"; - for (File f: files) { - File z = new File(f, name); - if (z.exists()) return z; - } - return null; - } - + // Write to the process input, so the licenses will be accepted. In // principle, we only need 7 'y', one for the 'yes' to the first @@ -403,18 +403,48 @@ static public File getGoogleDriverFolder() { * for the SDK installation. Also figures out the name of android/android.bat/android.exe * so that it can be called explicitly. */ - private static File findCliTool(final File tools, String name) + private static File findCliTool(final File toolDir, String toolName) throws BadSDKException { - if (new File(tools, name + ".bat").exists()) { - return new File(tools, name + ".bat"); - } - if (new File(tools, name + ".exe").exists()) { - return new File(tools, name + ".exe"); - } - if (new File(tools, name).exists()) { - return new File(tools, name); + File toolFile; + if (Platform.isWindows()) { + toolFile = new File(toolDir, toolName + ".exe"); + if (!toolFile.exists()) { + toolFile = new File(toolDir, toolName + ".bat"); + } + } else { + toolFile = new File(toolDir, toolName); + } + + if (!toolFile.exists()) { + throw new BadSDKException("Cannot find " + toolName + " in " + toolDir); + } + + if (!Platform.isWindows()) { + try { + // Get the POSIX file permissions + Path toolPath = Paths.get(toolFile.getAbsolutePath()); + Set permissions = Files.getPosixFilePermissions(toolPath); + + boolean addedPerm = false; + if (!permissions.contains(PosixFilePermission.OWNER_EXECUTE)) { + permissions.add(PosixFilePermission.OWNER_EXECUTE); + addedPerm = true; + } + if (!permissions.contains(PosixFilePermission.GROUP_EXECUTE)) { + permissions.add(PosixFilePermission.GROUP_EXECUTE); + addedPerm = true; + } + + if (addedPerm) { + // Set the missing POSIX execute (group and owner) permissions + Files.setPosixFilePermissions(toolPath, permissions); + } + } catch (Exception e) { + e.printStackTrace(); + } } - throw new BadSDKException("Cannot find " + name + " in " + tools); + + return toolFile; } @@ -784,25 +814,20 @@ static public File selectFolder(String prompt, File folder, Frame frame) { private static final String ADB_DAEMON_MSG_1 = "daemon not running"; private static final String ADB_DAEMON_MSG_2 = "daemon started successfully"; - public ProcessResult runADB(final String... cmd) + public ProcessResult runAdb(final String... cmd) throws InterruptedException, IOException { if (adbDisabled) { throw new IOException("adb is currently disabled"); } - - final String[] adbCmd; - if (!cmd[0].contains("adb")) { - File abdPath = Platform.isWindows() ? new File(platformTools, "adb.exe") : - new File(platformTools, "adb"); - adbCmd = PApplet.splice(cmd, abdPath.getCanonicalPath(), 0); - } else { - adbCmd = cmd; - } - // printing this here to see if anyone else is killing the adb server + + final String[] adbCmd = PApplet.splice(cmd, adb.getCanonicalPath(), 0); + if (processing.app.Base.DEBUG) { + // printing this here to see if anyone else is killing the adb server PApplet.printArray(adbCmd); } + try { ProcessResult adbResult = new ProcessHelper(adbCmd).execute(); // Ignore messages about starting up an adb daemon @@ -832,36 +857,71 @@ public ProcessResult runADB(final String... cmd) } } - static class SDKTarget { - public int version = 0; - public String name; + public Process getAdbProcess(final String... cmd) + throws IOException { + + if (adbDisabled) { + throw new IOException("adb is currently disabled"); + } + + final String[] adbCmd = PApplet.splice(cmd, adb.getCanonicalPath(), 0); + + if (processing.app.Base.DEBUG) { + // printing this here to see if anyone else is killing the adb server + PApplet.printArray(adbCmd); + } + + try { + Process process = Runtime.getRuntime().exec(adbCmd); + return process; + } catch (IOException ioe) { + if (-1 < ioe.getMessage().indexOf("Permission denied")) { + Messages.showWarning(AndroidMode.getTextString("android_sdk.warn.cannot_run_adb_title"), + AndroidMode.getTextString("android_sdk.warn.cannot_run_adb_body")); + adbDisabled = true; + } + throw ioe; + } } - public ArrayList getAvailableSdkTargets() throws IOException { - ArrayList targets = new ArrayList(); + static private class Target { + public int sdk = 0; + public String release = ""; + public int build = 0; + public String name = ""; + } + + private ArrayList getAvailableSdkTargets() throws IOException { + ArrayList targets = new ArrayList(); for (File platform : platforms.listFiles()) { File propFile = new File(platform, "build.prop"); if (!propFile.exists()) continue; - SDKTarget target = new SDKTarget(); + Target target = new Target(); BufferedReader br = new BufferedReader(new FileReader(propFile)); String line; while ((line = br.readLine()) != null) { String[] lineData = line.split("="); - if (lineData[0].equals("ro.build.version.sdk")) { - target.version = Integer.valueOf(lineData[1]); + + if (lineData[0].equals("ro.system.build.version.incremental")) { + target.build = Integer.valueOf(lineData[1]); } if (lineData[0].equals("ro.build.version.release")) { - target.name = lineData[1]; - break; + target.release = lineData[1]; } + + if (lineData[0].equals("ro.build.version.sdk")) { + target.sdk = Integer.valueOf(lineData[1]); + } + + target.name = platform.getName(); } br.close(); - if (target.version != 0 && target.name != null) targets.add(target); + if (target.sdk != 0 && target.build != 0 && target.name != "") targets.add(target); } return targets; diff --git a/mode/src/processing/mode/android/AndroidTool.java b/processing/mode/src/processing/mode/android/AndroidTool.java similarity index 86% rename from mode/src/processing/mode/android/AndroidTool.java rename to processing/mode/src/processing/mode/android/AndroidTool.java index 3dbdb932b..7bab241d7 100644 --- a/mode/src/processing/mode/android/AndroidTool.java +++ b/processing/mode/src/processing/mode/android/AndroidTool.java @@ -93,27 +93,34 @@ public String initLoader(String className) throws Exception { File[] toolArchives = Util.listJarFiles(toolDir); File[] libArchives = Util.listJarFiles(libDir); - if (toolArchives != null && toolArchives.length > 0 && - libArchives != null && libArchives.length > 0) { - URL[] urlList = new URL[toolArchives.length + libArchives.length + 1]; + if (toolArchives != null && toolArchives.length > 0) { + + int nArchives = toolArchives.length + 1; + if (libArchives != null && libArchives.length > 0) { + nArchives += libArchives.length; + } + URL[] urlList = new URL[nArchives]; int j; for (j = 0; j < toolArchives.length; j++) { Messages.log("Found archive " + toolArchives[j] + " for " + getName()); urlList[j] = toolArchives[j].toURI().toURL(); } - for (int k = 0; k < libArchives.length; k++, j++) { - Messages.log("Found archive " + libArchives[k] + " for " + getName()); - urlList[j] = libArchives[k].toURI().toURL(); + if (libArchives != null) { + for (int k = 0; k < libArchives.length; k++, j++) { + Messages.log("Found archive " + libArchives[k] + " for " + getName()); + urlList[j] = libArchives[k].toURI().toURL(); + } } urlList[urlList.length - 1] = new File(mode.getModeJar()).toURI().toURL(); - // String modePath = new File(dmode.getFolder(), "mode").getAbsolutePath(); // urlList[urlList.length - 1] = new File(modePath + File.separator + "JavaMode.jar").toURI().toURL(); loader = new URLClassLoader(urlList); Messages.log("loading above JARs with loader " + loader); + } else { + throw new IgnorableException("Could not find any files inside " + toolDir.getAbsolutePath()); } } diff --git a/mode/src/processing/mode/android/AndroidToolbar.java b/processing/mode/src/processing/mode/android/AndroidToolbar.java similarity index 100% rename from mode/src/processing/mode/android/AndroidToolbar.java rename to processing/mode/src/processing/mode/android/AndroidToolbar.java diff --git a/mode/src/processing/mode/android/AndroidUtil.java b/processing/mode/src/processing/mode/android/AndroidUtil.java similarity index 89% rename from mode/src/processing/mode/android/AndroidUtil.java rename to processing/mode/src/processing/mode/android/AndroidUtil.java index f73e86dbf..9e0a215f4 100644 --- a/mode/src/processing/mode/android/AndroidUtil.java +++ b/processing/mode/src/processing/mode/android/AndroidUtil.java @@ -66,6 +66,7 @@ public class AndroidUtil { // Creates a message dialog, where the text can contain clickable links. static public void showMessage(String title, String text) { + System.out.println(text); if (title == null) title = "Message"; if (Base.isCommandLine()) { System.out.println(title + ": " + text); @@ -76,17 +77,26 @@ static public void showMessage(String title, String text) { "margin: " + TEXT_MARGIN + "px; " + "width: " + TEXT_WIDTH + "px }" + " " + - "

" + text + "

"; - JEditorPane pane = new JEditorPane("text/html", htmlString); + "

" + text + "

"; + JEditorPane pane = new JEditorPane(); + pane.setContentType("text/html"); + pane.setText(htmlString); + pane.setEditable(false); + pane.addHyperlinkListener(new HyperlinkListener() { @Override public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { - Platform.openURL(e.getURL().toString()); + if (e.getURL() != null) { + Platform.openURL(e.getURL().toString()); + } else { + String description = e.getDescription(); + System.err.println("Cannot open this URL: " + description); + } } } }); - pane.setEditable(false); + JLabel label = new JLabel(); pane.setBackground(label.getBackground()); JOptionPane.showMessageDialog(null, pane, title, @@ -100,8 +110,7 @@ static public void writeFile(final File file, String[] lines) { writer.flush(); writer.close(); } - - + static public File createPath(final File parent, final String name) throws SketchException { final File result = new File(parent, name); @@ -110,12 +119,10 @@ static public File createPath(final File parent, final String name) } return result; } - - + static public void createFileFromTemplate(final File tmplFile, final File destFile) { createFileFromTemplate(tmplFile, destFile, null); - } - + } static public void createFileFromTemplate(final File tmplFile, final File destFile, final HashMap replaceMap) { @@ -139,8 +146,7 @@ static public void createFileFromTemplate(final File tmplFile, final File destFi pw.flush(); pw.close(); } - - + static public File createSubFolder(File parent, String name) throws IOException { File newFolder = new File(parent, name); if (newFolder.exists()) { @@ -180,15 +186,9 @@ static public File createSubFolder(File parent, String name) throws IOException } return newFolder; } - - - static public void extractFolder(File file, File newPath, boolean setExec) + + static public void extractFolder(File file, File newPath) throws IOException { - extractFolder(file, newPath, setExec, false); - } - - static public void extractFolder(File file, File newPath, boolean setExec, - boolean remRoot) throws IOException { int BUFFER = 2048; ZipFile zip = new ZipFile(file); @@ -199,18 +199,7 @@ static public void extractFolder(File file, File newPath, boolean setExec, // grab a zip file entry ZipEntry entry = zipFileEntries.nextElement(); String currentEntry = entry.getName(); - - if (remRoot) { - // Remove root folder from path - int idx = currentEntry.indexOf("/"); - if (idx == -1) { - // Let's try the system file separator - // https://stackoverflow.com/a/16485210 - idx = currentEntry.indexOf(File.separator); - } - currentEntry = currentEntry.substring(idx + 1); - } - + File destFile = new File(newPath, currentEntry); //destFile = new File(newPath, destFile.getName()); File destinationParent = destFile.getParentFile(); @@ -218,13 +207,6 @@ static public void extractFolder(File file, File newPath, boolean setExec, // create the parent directory structure if needed destinationParent.mkdirs(); - String ext = PApplet.getExtension(currentEntry); - if (setExec && ext.equals("unknown")) { - // On some OS X machines the android binaries lose their executable - // attribute, rendering the mode unusable - destFile.setExecutable(true); - } - if (!entry.isDirectory()) { // should preserve permissions // https://bitbucket.org/atlassian/amps/pull-requests/21/amps-904-preserve-executable-file-status/diff @@ -253,17 +235,15 @@ static public void extractClassesJarFromAar(File wearFile, File explodeDir, File jarFile) throws IOException { extractClassesJarFromAar(wearFile, explodeDir, jarFile, true); } - - + static public void extractClassesJarFromAar(File wearFile, File explodeDir, File jarFile, boolean removeDir) throws IOException { - extractFolder(wearFile, explodeDir, false); + extractFolder(wearFile, explodeDir); File classFile = new File(explodeDir, "classes.jar"); Util.copyFile(classFile, jarFile); Util.removeDir(explodeDir); } - static public File[] getFileList(File folder, String[] names) { return getFileList(folder, names, null); } @@ -279,8 +259,7 @@ static public File[] getFileList(File folder, String[] names, String[] altNames) } return icons; } - - + static public File[] getFileList(Mode mode, String prefix, String[] names) { File[] icons = new File[names.length]; for (int i = 0; i < names.length; i++) { @@ -295,8 +274,7 @@ static public boolean allFilesExists(File[] files) { } return true; } - - + static public boolean noFileExists(File[] files) { for (File f: files) { if (f.exists()) return false; diff --git a/mode/src/processing/mode/android/Commander.java b/processing/mode/src/processing/mode/android/Commander.java similarity index 100% rename from mode/src/processing/mode/android/Commander.java rename to processing/mode/src/processing/mode/android/Commander.java diff --git a/mode/src/processing/mode/android/Device.java b/processing/mode/src/processing/mode/android/Device.java similarity index 93% rename from mode/src/processing/mode/android/Device.java rename to processing/mode/src/processing/mode/android/Device.java index 590c9167e..017250da0 100644 --- a/mode/src/processing/mode/android/Device.java +++ b/processing/mode/src/processing/mode/android/Device.java @@ -22,7 +22,6 @@ package processing.mode.android; import processing.app.Base; -import processing.app.Platform; import processing.app.RunnerListener; import processing.app.exec.LineProcessor; import processing.app.exec.ProcessRegistry; @@ -31,7 +30,6 @@ import processing.core.PApplet; import processing.mode.android.LogEntry.Severity; -import java.io.File; import java.io.IOException; import java.util.*; import java.util.regex.Matcher; @@ -73,8 +71,8 @@ public Device(final Devices env, final String id) { public void bringLauncherToFront() { try { adb("shell", "am", "start", - "-a", "android.intent.action.MAIN", - "-c", "android.intent.category.HOME"); + "-a", "android.intent.action.MAIN", + "-c", "android.intent.category.HOME"); } catch (final Exception e) { e.printStackTrace(System.err); } @@ -88,12 +86,12 @@ public String getName() { String name = ""; try { - ProcessResult result = env.getSDK().runADB("-s", id, "shell", "getprop", "ro.product.brand"); + ProcessResult result = adb("shell", "getprop", "ro.product.brand"); if (result.succeeded()) { name += result.getStdout() + " "; } - result = env.getSDK().runADB("-s", id, "shell", "getprop", "ro.product.model"); + result = adb("shell", "getprop", "ro.product.model"); if (result.succeeded()) { name += result.getStdout(); } @@ -208,7 +206,6 @@ public boolean launchApp(final String packageName, boolean isDebuggerEnabled) }; pr = adb(cmd); } -// PApplet.println(cmd); if (Base.DEBUG) { System.out.println(pr.toString()); @@ -226,8 +223,9 @@ public boolean launchApp(final String packageName, boolean isDebuggerEnabled) public void forwardPort(int tcpPort) throws IOException, InterruptedException { // Start ADB Server adb("start-server"); - final String[] jdwpcmd = generateAdbCommand("jdwp"); - Process deviceId = Runtime.getRuntime().exec(jdwpcmd); + + Process deviceId = adbProc("jdwp"); + // Get Process ID from ADB command `adb jdwp` JDWPProcessor pIDProcessor = new JDWPProcessor(); new StreamPump(deviceId.getInputStream(), "jdwp: ").addTarget( @@ -236,7 +234,8 @@ public void forwardPort(int tcpPort) throws IOException, InterruptedException { System.err).start(); Thread.sleep(1000); - // forward to tcp port + + // Forward to tcp port adb("forward", "tcp:" + tcpPort, "jdwp:" + pIDProcessor.getId()); } @@ -389,9 +388,11 @@ private void reportStackTrace(final LogEntry entry) { void initialize() throws IOException, InterruptedException { adb("logcat", "-c"); - final String[] cmd = generateAdbCommand("logcat", "-v", "brief"); + + final String[] cmd = genAdbCommand("logcat", "-v", "brief"); final String title = PApplet.join(cmd, ' '); - logcat = Runtime.getRuntime().exec(cmd); + logcat = env.getSDK().getAdbProcess(cmd); + ProcessRegistry.watch(logcat); new StreamPump(logcat.getInputStream(), "log: " + title).addTarget( new LogLineProcessor()).start(); @@ -465,15 +466,17 @@ public void removeListener(final DeviceListener listener) { } private ProcessResult adb(final String... cmd) throws InterruptedException, IOException { - final String[] adbCmd = generateAdbCommand(cmd); - return env.getSDK().runADB(adbCmd); + final String[] adbCmd = genAdbCommand(cmd); + return env.getSDK().runAdb(adbCmd); + } + + private Process adbProc(final String... cmd) throws IOException { + final String[] adbCmd = genAdbCommand(cmd); + return env.getSDK().getAdbProcess(adbCmd); } - private String[] generateAdbCommand(final String... cmd) throws IOException { - File toolsPath = env.getSDK().getPlatformToolsFolder(); - File abdPath = Platform.isWindows() ? new File(toolsPath, "adb.exe") : - new File(toolsPath, "adb"); - return PApplet.concat(new String[] { abdPath.getCanonicalPath(), "-s", getId() }, cmd); + private String[] genAdbCommand(final String... cmd) { + return PApplet.concat(new String[] { "-s", getId() }, cmd); } @Override diff --git a/mode/src/processing/mode/android/DeviceListener.java b/processing/mode/src/processing/mode/android/DeviceListener.java similarity index 100% rename from mode/src/processing/mode/android/DeviceListener.java rename to processing/mode/src/processing/mode/android/DeviceListener.java diff --git a/mode/src/processing/mode/android/Devices.java b/processing/mode/src/processing/mode/android/Devices.java similarity index 95% rename from mode/src/processing/mode/android/Devices.java rename to processing/mode/src/processing/mode/android/Devices.java index c893f1de0..92f1e2208 100644 --- a/mode/src/processing/mode/android/Devices.java +++ b/processing/mode/src/processing/mode/android/Devices.java @@ -83,7 +83,7 @@ public void killAdbServer() { System.out.print("Shutting down any existing adb server..."); System.out.flush(); try { - sdk.runADB("kill-server"); + sdk.runAdb("kill-server"); System.out.println(" Done."); } catch (final Exception e) { System.err.println("/nDevices.killAdbServer() failed."); @@ -95,7 +95,7 @@ public void startAdbServer() { System.out.print("Starting a new adb server..."); System.out.flush(); try { - sdk.runADB("start-server"); + sdk.runAdb("start-server"); System.out.println(" Done."); } catch (final Exception e) { System.err.println("/nDevices.startAdbServer() failed."); @@ -118,9 +118,9 @@ public void enableBluetoothDebugging() { try { // Try Enable debugging over bluetooth // http://developer.android.com/training/wearables/apps/bt-debugging.html - sdk.runADB("-s", device.getId(), "forward", "tcp:" + BT_DEBUG_PORT, + sdk.runAdb("-s", device.getId(), "forward", "tcp:" + BT_DEBUG_PORT, "localabstract:/adb-hub"); - sdk.runADB("connect", "127.0.0.1:" + BT_DEBUG_PORT); + sdk.runAdb("connect", "127.0.0.1:" + BT_DEBUG_PORT); } catch (final Exception e) { e.printStackTrace(); } @@ -349,7 +349,7 @@ public List list() { ProcessResult result; try { // System.out.println("listing devices 00"); - result = sdk.runADB("devices"); + result = sdk.runAdb("devices"); // System.out.println("listing devices 05"); } catch (InterruptedException e) { return Collections.emptyList(); diff --git a/mode/src/processing/mode/android/EmulatorController.java b/processing/mode/src/processing/mode/android/EmulatorController.java similarity index 99% rename from mode/src/processing/mode/android/EmulatorController.java rename to processing/mode/src/processing/mode/android/EmulatorController.java index 0e2288591..e3d9b7a13 100644 --- a/mode/src/processing/mode/android/EmulatorController.java +++ b/processing/mode/src/processing/mode/android/EmulatorController.java @@ -146,7 +146,7 @@ public void run() { } Thread.sleep(2000); //System.out.println("done sleeping"); - ProcessResult result = sdk.runADB("-s", "emulator-" + portString, + ProcessResult result = sdk.runAdb("-s", "emulator-" + portString, "shell", "getprop", "dev.bootcomplete"); if (result.getStdout().trim().equals("1")) { setState(State.RUNNING); diff --git a/mode/src/processing/mode/android/KeyStoreManager.java b/processing/mode/src/processing/mode/android/KeyStoreManager.java similarity index 100% rename from mode/src/processing/mode/android/KeyStoreManager.java rename to processing/mode/src/processing/mode/android/KeyStoreManager.java diff --git a/mode/src/processing/mode/android/Keys.java b/processing/mode/src/processing/mode/android/Keys.java similarity index 100% rename from mode/src/processing/mode/android/Keys.java rename to processing/mode/src/processing/mode/android/Keys.java diff --git a/mode/src/processing/mode/android/LogEntry.java b/processing/mode/src/processing/mode/android/LogEntry.java similarity index 100% rename from mode/src/processing/mode/android/LogEntry.java rename to processing/mode/src/processing/mode/android/LogEntry.java diff --git a/mode/src/processing/mode/android/Manifest.java b/processing/mode/src/processing/mode/android/Manifest.java similarity index 99% rename from mode/src/processing/mode/android/Manifest.java rename to processing/mode/src/processing/mode/android/Manifest.java index 856a43c4a..1cc755f86 100644 --- a/mode/src/processing/mode/android/Manifest.java +++ b/processing/mode/src/processing/mode/android/Manifest.java @@ -128,7 +128,7 @@ public String[] getPermissions() { for (int i = 0; i < count; i++) { String tmp = elements[i].getString("android:name"); if (tmp.indexOf("android.permission") == 0) { - // Standard permission, remove perfix + // Standard permission, remove prefix int idx = tmp.lastIndexOf("."); names[i] = tmp.substring(idx + 1); } else { diff --git a/mode/src/processing/mode/android/Pair.java b/processing/mode/src/processing/mode/android/Pair.java similarity index 100% rename from mode/src/processing/mode/android/Pair.java rename to processing/mode/src/processing/mode/android/Pair.java diff --git a/mode/src/processing/mode/android/Permissions.java b/processing/mode/src/processing/mode/android/Permissions.java similarity index 69% rename from mode/src/processing/mode/android/Permissions.java rename to processing/mode/src/processing/mode/android/Permissions.java index cc1ea0a2f..10b80f98f 100644 --- a/mode/src/processing/mode/android/Permissions.java +++ b/processing/mode/src/processing/mode/android/Permissions.java @@ -256,6 +256,7 @@ public String getMenuTitle() { "ACCESS_CHECKIN_PROPERTIES", "Allows read/write access to the \"properties\" table in the checkin database, to change values that get uploaded.", "ACCESS_COARSE_LOCATION", "Allows an app to access approximate location.", "ACCESS_FINE_LOCATION", "Allows an app to access precise location.", + "ACCESS_HIDDEN_PROFILES", "Allows applications to access profiles with ACCESS_HIDDEN_PROFILES user property", "ACCESS_LOCATION_EXTRA_COMMANDS", "Allows an application to access extra location provider commands.", "ACCESS_MEDIA_LOCATION", "Allows an application to access any geographic locations persisted in the user's shared collection.", "ACCESS_NETWORK_STATE", "Allows applications to access information about networks.", @@ -275,6 +276,7 @@ public String getMenuTitle() { "BIND_COMPANION_DEVICE_SERVICE", "Must be required by any CompanionDeviceService s to ensure that only the system can bind to it.", "BIND_CONDITION_PROVIDER_SERVICE", "Must be required by a ConditionProviderService , to ensure that only the system can bind to it.", "BIND_CONTROLS", "Allows SystemUI to request third party controls.", + "BIND_CREDENTIAL_PROVIDER_SERVICE", "Must be required by a CredentialProviderService to ensure that only the system can bind to it.", "BIND_DEVICE_ADMIN", "Must be required by device administration receiver, to ensure that only the system can interact with it.", "BIND_DREAM_SERVICE", "Must be required by an DreamService , to ensure that only the system can bind to it.", "BIND_INCALL_SERVICE", "Must be required by a InCallService , to ensure that only the system can bind to it.", @@ -319,16 +321,37 @@ public String getMenuTitle() { "CHANGE_WIFI_MULTICAST_STATE", "Allows applications to enter Wi-Fi Multicast mode.", "CHANGE_WIFI_STATE", "Allows applications to change Wi-Fi connectivity state.", "CLEAR_APP_CACHE", "Allows an application to clear the caches of all installed applications on the device.", + "CONFIGURE_WIFI_DISPLAY", "Allows an application to configure and connect to Wifi displays", "CONTROL_LOCATION_UPDATES", "Allows enabling/disabling location update notifications from the radio.", + "CREDENTIAL_MANAGER_QUERY_CANDIDATE_CREDENTIALS", "Allows a browser to invoke the set of query apis to get metadata about credential candidates prepared during the CredentialManager.prepareGetCredential API.", + "CREDENTIAL_MANAGER_SET_ALLOWED_PROVIDERS", "Allows specifying candidate credential providers to be queried in Credential Manager get flows, or to be preferred as a default in the Credential Manager create flows.", + "CREDENTIAL_MANAGER_SET_ORIGIN", "Allows a browser to invoke credential manager APIs on behalf of another RP.", "DELETE_CACHE_FILES", "Old permission for deleting an app's cache files, no longer used, but signals for us to quietly ignore calls instead of throwing an exception.", "DELETE_PACKAGES", "Allows an application to delete packages.", "DELIVER_COMPANION_MESSAGES", "Allows an application to deliver companion messages to system", + "DETECT_SCREEN_CAPTURE", "Allows an application to get notified when a screen capture of its windows is attempted.", + "DETECT_SCREEN_RECORDING", "Allows an application to get notified when it is being recorded.", "DIAGNOSTIC", "Allows applications to RW to diagnostic resources.", "DISABLE_KEYGUARD", "Allows applications to disable the keyguard if it is not secure.", "DUMP", "Allows an application to retrieve state dump information from system services.", + "ENFORCE_UPDATE_OWNERSHIP", "Allows an application to indicate via PackageInstaller.SessionParams.setRequestUpdateOwnership(boolean) that it has the intention of becoming the update owner.", + "EXECUTE_APP_ACTION", "Allows an assistive application to perform actions on behalf of users inside of applications.", "EXPAND_STATUS_BAR", "Allows an application to expand or collapse the status bar.", "FACTORY_TEST", "Run as a manufacturer test application, running as the root user.", "FOREGROUND_SERVICE", "Allows a regular application to use Service.startForeground .", + "FOREGROUND_SERVICE_CAMERA", "Allows a regular application to use Service.startForeground with the type \"camera\".", + "FOREGROUND_SERVICE_CONNECTED_DEVICE", "Allows a regular application to use Service.startForeground with the type \"connectedDevice\".", + "FOREGROUND_SERVICE_DATA_SYNC", "Allows a regular application to use Service.startForeground with the type \"dataSync\".", + "FOREGROUND_SERVICE_HEALTH", "Allows a regular application to use Service.startForeground with the type \"health\".", + "FOREGROUND_SERVICE_LOCATION", "Allows a regular application to use Service.startForeground with the type \"location\".", + "FOREGROUND_SERVICE_MEDIA_PLAYBACK", "Allows a regular application to use Service.startForeground with the type \"mediaPlayback\".", + "FOREGROUND_SERVICE_MEDIA_PROCESSING", "Allows a regular application to use Service.startForeground with the type \"mediaProcessing\".", + "FOREGROUND_SERVICE_MEDIA_PROJECTION", "Allows a regular application to use Service.startForeground with the type \"mediaProjection\".", + "FOREGROUND_SERVICE_MICROPHONE", "Allows a regular application to use Service.startForeground with the type \"microphone\".", + "FOREGROUND_SERVICE_PHONE_CALL", "Allows a regular application to use Service.startForeground with the type \"phoneCall\".", + "FOREGROUND_SERVICE_REMOTE_MESSAGING", "Allows a regular application to use Service.startForeground with the type \"remoteMessaging\".", + "FOREGROUND_SERVICE_SPECIAL_USE", "Allows a regular application to use Service.startForeground with the type \"specialUse\".", + "FOREGROUND_SERVICE_SYSTEM_EXEMPTED", "Allows a regular application to use Service.startForeground with the type \"systemExempted\".", "GET_ACCOUNTS", "Allows access to the list of accounts in the Accounts Service.", "GET_ACCOUNTS_PRIVILEGED", "Allows access to the list of accounts in the Accounts Service.", "GET_PACKAGE_SIZE", "Allows an application to find out the space used by any package.", @@ -342,9 +365,92 @@ public String getMenuTitle() { "INTERACT_ACROSS_PROFILES", "Allows interaction across profiles in the same profile group.", "INTERNET", "Allows applications to open network sockets.", "KILL_BACKGROUND_PROCESSES", "Allows an application to call ActivityManager.killBackgroundProcesses(String) .", + "LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE", "Allows an application to capture screen content to perform a screenshot using the intent action Intent.ACTION_LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE .", "LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK", "An application needs this permission for Settings.ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY to show its Activity embedded in Settings app.", "LOADER_USAGE_STATS", "Allows a data loader to read a package's access logs.", "LOCATION_HARDWARE", "Allows an application to use location features in hardware, such as the geofencing api.", + "MANAGE_DEVICE_LOCK_STATE", "Allows financed device kiosk apps to perform actions on the Device Lock service", + "MANAGE_DEVICE_POLICY_ACCESSIBILITY", "Allows an application to manage policy related to accessibility.", + "MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT", "Allows an application to set policy related to account management.", + "MANAGE_DEVICE_POLICY_ACROSS_USERS", "Allows an application to set device policies outside the current user that are required for securing device ownership without accessing user data.", + "MANAGE_DEVICE_POLICY_ACROSS_USERS_FULL", "Allows an application to set device policies outside the current user.", + "MANAGE_DEVICE_POLICY_ACROSS_USERS_SECURITY_CRITICAL", "Allows an application to set device policies outside the current user that are critical for securing data within the current user.", + "MANAGE_DEVICE_POLICY_AIRPLANE_MODE", "Allows an application to set policy related to airplane mode.", + "MANAGE_DEVICE_POLICY_APPS_CONTROL", "Allows an application to manage policy regarding modifying applications.", + "MANAGE_DEVICE_POLICY_APP_RESTRICTIONS", "Allows an application to manage application restrictions.", + "MANAGE_DEVICE_POLICY_APP_USER_DATA", "Allows an application to manage policy related to application user data.", + "MANAGE_DEVICE_POLICY_ASSIST_CONTENT", "Allows an application to set policy related to sending assist content to a privileged app such as the Assistant app.", + "MANAGE_DEVICE_POLICY_AUDIO_OUTPUT", "Allows an application to set policy related to audio output.", + "MANAGE_DEVICE_POLICY_AUTOFILL", "Allows an application to set policy related to autofill.", + "MANAGE_DEVICE_POLICY_BACKUP_SERVICE", "Allows an application to manage backup service policy.", + "MANAGE_DEVICE_POLICY_BLOCK_UNINSTALL", "Allows an application to manage policy related to block package uninstallation.", + "MANAGE_DEVICE_POLICY_BLUETOOTH", "Allows an application to set policy related to bluetooth.", + "MANAGE_DEVICE_POLICY_BUGREPORT", "Allows an application to request bugreports with user consent.", + "MANAGE_DEVICE_POLICY_CALLS", "Allows an application to manage calling policy.", + "MANAGE_DEVICE_POLICY_CAMERA", "Allows an application to set policy related to restricting a user's ability to use or enable and disable the camera.", + "MANAGE_DEVICE_POLICY_CAMERA_TOGGLE", "Allows an application to manage policy related to camera toggle.", + "MANAGE_DEVICE_POLICY_CERTIFICATES", "Allows an application to set policy related to certificates.", + "MANAGE_DEVICE_POLICY_COMMON_CRITERIA_MODE", "Allows an application to manage policy related to common criteria mode.", + "MANAGE_DEVICE_POLICY_CONTENT_PROTECTION", "Allows an application to manage policy related to content protection.", + "MANAGE_DEVICE_POLICY_DEBUGGING_FEATURES", "Allows an application to manage debugging features policy.", + "MANAGE_DEVICE_POLICY_DEFAULT_SMS", "Allows an application to set policy related to the default sms application.", + "MANAGE_DEVICE_POLICY_DEVICE_IDENTIFIERS", "Allows an application to manage policy related to device identifiers.", + "MANAGE_DEVICE_POLICY_DISPLAY", "Allows an application to set policy related to the display.", + "MANAGE_DEVICE_POLICY_FACTORY_RESET", "Allows an application to set policy related to factory reset.", + "MANAGE_DEVICE_POLICY_FUN", "Allows an application to set policy related to fun.", + "MANAGE_DEVICE_POLICY_INPUT_METHODS", "Allows an application to set policy related to input methods.", + "MANAGE_DEVICE_POLICY_INSTALL_UNKNOWN_SOURCES", "Allows an application to manage installing from unknown sources policy.", + "MANAGE_DEVICE_POLICY_KEEP_UNINSTALLED_PACKAGES", "Allows an application to set policy related to keeping uninstalled packages.", + "MANAGE_DEVICE_POLICY_KEYGUARD", "Allows an application to manage policy related to keyguard.", + "MANAGE_DEVICE_POLICY_LOCALE", "Allows an application to set policy related to locale.", + "MANAGE_DEVICE_POLICY_LOCATION", "Allows an application to set policy related to location.", + "MANAGE_DEVICE_POLICY_LOCK", "Allows an application to lock a profile or the device with the appropriate cross-user permission.", + "MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS", "Allows an application to set policy related to lock credentials.", + "MANAGE_DEVICE_POLICY_LOCK_TASK", "Allows an application to manage lock task policy.", + "MANAGE_DEVICE_POLICY_MANAGED_SUBSCRIPTIONS", "Allows an application to set policy related to subscriptions downloaded by an admin.", + "MANAGE_DEVICE_POLICY_METERED_DATA", "Allows an application to manage policy related to metered data.", + "MANAGE_DEVICE_POLICY_MICROPHONE", "Allows an application to set policy related to restricting a user's ability to use or enable and disable the microphone.", + "MANAGE_DEVICE_POLICY_MICROPHONE_TOGGLE", "Allows an application to manage policy related to microphone toggle.", + "MANAGE_DEVICE_POLICY_MOBILE_NETWORK", "Allows an application to set policy related to mobile networks.", + "MANAGE_DEVICE_POLICY_MODIFY_USERS", "Allows an application to manage policy preventing users from modifying users.", + "MANAGE_DEVICE_POLICY_MTE", "Allows an application to manage policy related to the Memory Tagging Extension (MTE).", + "MANAGE_DEVICE_POLICY_NEARBY_COMMUNICATION", "Allows an application to set policy related to nearby communications (e.g. Beam and nearby streaming).", + "MANAGE_DEVICE_POLICY_NETWORK_LOGGING", "Allows an application to set policy related to network logging.", + "MANAGE_DEVICE_POLICY_ORGANIZATION_IDENTITY", "Allows an application to manage the identity of the managing organization.", + "MANAGE_DEVICE_POLICY_OVERRIDE_APN", "Allows an application to set policy related to override APNs.", + "MANAGE_DEVICE_POLICY_PACKAGE_STATE", "Allows an application to set policy related to hiding and suspending packages.", + "MANAGE_DEVICE_POLICY_PHYSICAL_MEDIA", "Allows an application to set policy related to physical media.", + "MANAGE_DEVICE_POLICY_PRINTING", "Allows an application to set policy related to printing.", + "MANAGE_DEVICE_POLICY_PRIVATE_DNS", "Allows an application to set policy related to private DNS.", + "MANAGE_DEVICE_POLICY_PROFILES", "Allows an application to set policy related to profiles.", + "MANAGE_DEVICE_POLICY_PROFILE_INTERACTION", "Allows an application to set policy related to interacting with profiles (e.g. Disallowing cross-profile copy and paste).", + "MANAGE_DEVICE_POLICY_PROXY", "Allows an application to set a network-independent global HTTP proxy.", + "MANAGE_DEVICE_POLICY_QUERY_SYSTEM_UPDATES", "Allows an application query system updates.", + "MANAGE_DEVICE_POLICY_RESET_PASSWORD", "Allows an application to force set a new device unlock password or a managed profile challenge on current user.", + "MANAGE_DEVICE_POLICY_RESTRICT_PRIVATE_DNS", "Allows an application to set policy related to restricting the user from configuring private DNS.", + "MANAGE_DEVICE_POLICY_RUNTIME_PERMISSIONS", "Allows an application to set the grant state of runtime permissions on packages.", + "MANAGE_DEVICE_POLICY_RUN_IN_BACKGROUND", "Allows an application to set policy related to users running in the background.", + "MANAGE_DEVICE_POLICY_SAFE_BOOT", "Allows an application to manage safe boot policy.", + "MANAGE_DEVICE_POLICY_SCREEN_CAPTURE", "Allows an application to set policy related to screen capture.", + "MANAGE_DEVICE_POLICY_SCREEN_CONTENT", "Allows an application to set policy related to the usage of the contents of the screen.", + "MANAGE_DEVICE_POLICY_SECURITY_LOGGING", "Allows an application to set policy related to security logging.", + "MANAGE_DEVICE_POLICY_SETTINGS", "Allows an application to set policy related to settings.", + "MANAGE_DEVICE_POLICY_SMS", "Allows an application to set policy related to sms.", + "MANAGE_DEVICE_POLICY_STATUS_BAR", "Allows an application to set policy related to the status bar.", + "MANAGE_DEVICE_POLICY_SUPPORT_MESSAGE", "Allows an application to set support messages for when a user action is affected by an active policy.", + "MANAGE_DEVICE_POLICY_SUSPEND_PERSONAL_APPS", "Allows an application to set policy related to suspending personal apps.", + "MANAGE_DEVICE_POLICY_SYSTEM_APPS", "Allows an application to manage policy related to system apps.", + "MANAGE_DEVICE_POLICY_SYSTEM_DIALOGS", "Allows an application to set policy related to system dialogs.", + "MANAGE_DEVICE_POLICY_SYSTEM_UPDATES", "Allows an application to set policy related to system updates.", + "MANAGE_DEVICE_POLICY_TIME", "Allows an application to manage device policy relating to time.", + "MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING", "Allows an application to set policy related to usb data signalling.", + "MANAGE_DEVICE_POLICY_USB_FILE_TRANSFER", "Allows an application to set policy related to usb file transfers.", + "MANAGE_DEVICE_POLICY_USERS", "Allows an application to set policy related to users.", + "MANAGE_DEVICE_POLICY_VPN", "Allows an application to set policy related to VPNs.", + "MANAGE_DEVICE_POLICY_WALLPAPER", "Allows an application to set policy related to the wallpaper.", + "MANAGE_DEVICE_POLICY_WIFI", "Allows an application to set policy related to Wifi.", + "MANAGE_DEVICE_POLICY_WINDOWS", "Allows an application to set policy related to windows.", + "MANAGE_DEVICE_POLICY_WIPE_DATA", "Allows an application to manage policy related to wiping data.", "MANAGE_DOCUMENTS", "Allows an application to manage access to documents, usually as part of a document picker.", "MANAGE_EXTERNAL_STORAGE", "Allows an application a broad access to external storage in scoped storage.", "MANAGE_MEDIA", "Allows an application to modify and delete media files on this device or any connected storage device without user confirmation.", @@ -354,6 +460,7 @@ public String getMenuTitle() { "MANAGE_WIFI_NETWORK_SELECTION", "This permission is used to let OEMs grant their trusted app access to a subset of privileged wifi APIs to improve wifi performance.", "MASTER_CLEAR", "Not for use by third-party applications.", "MEDIA_CONTENT_CONTROL", "Allows an application to know what content is playing and control its playback.", + "MEDIA_ROUTING_CONTROL", "Allows an application to control the routing of media apps.", "MODIFY_AUDIO_SETTINGS", "Allows an application to modify global audio settings.", "MODIFY_PHONE_STATE", "Allows modification of the telephony state - power on, mmi, etc.", "MOUNT_FORMAT_FILESYSTEMS", "Allows formatting file systems for removable storage.", @@ -365,18 +472,22 @@ public String getMenuTitle() { "OVERRIDE_WIFI_CONFIG", "Allows an application to modify any wifi configuration, even if created by another application.", "PACKAGE_USAGE_STATS", "Allows an application to collect component usage statistics", "POST_NOTIFICATIONS", "Allows an app to post notifications", + "PROVIDE_OWN_AUTOFILL_SUGGESTIONS", "Allows an application to display its suggestions using the autofill framework.", + "PROVIDE_REMOTE_CREDENTIALS", "Allows an application to be able to store and retrieve credentials from a remote device.", "QUERY_ALL_PACKAGES", "Allows query of any normal app on the device, regardless of manifest declarations.", "READ_ASSISTANT_APP_SEARCH_DATA", "Allows an application to query over global data in AppSearch that's visible to the ASSISTANT role.", "READ_BASIC_PHONE_STATE", "Allows read only access to phone state with a non dangerous permission, including the information like cellular network type, software version.", "READ_CALENDAR", "Allows an application to read the user's calendar data.", "READ_CALL_LOG", "Allows an application to read the user's call log.", "READ_CONTACTS", "Allows an application to read the user's contacts data.", + "READ_DROPBOX_DATA", "Allows an application to access the data in Dropbox.", "READ_EXTERNAL_STORAGE", "Allows an application to read from external storage.", "READ_HOME_APP_SEARCH_DATA", "Allows an application to query over global data in AppSearch that's visible to the HOME role.", "READ_LOGS", "Allows an application to read the low-level system log files.", "READ_MEDIA_AUDIO", "Allows an application to read audio files from external storage.", "READ_MEDIA_IMAGES", "Allows an application to read image files from external storage.", "READ_MEDIA_VIDEO", "Allows an application to read video files from external storage.", + "READ_MEDIA_VISUAL_USER_SELECTED", "Allows an application to read image or video files from external storage that a user has selected via the permission prompt photo picker.", "READ_NEARBY_STREAMING_POLICY", "Allows an application to read nearby streaming policy.", "READ_PHONE_NUMBERS", "Allows read access to the device's phone number(s).", "READ_PHONE_STATE", "Allows read only access to phone state, including the current cellular network information, the status of any ongoing calls, and a list of any PhoneAccount s registered on the device.", @@ -395,6 +506,8 @@ public String getMenuTitle() { "REQUEST_COMPANION_PROFILE_APP_STREAMING", "Allows application to request to be associated with a virtual display capable of streaming Android applications ( AssociationRequest.DEVICE_PROFILE_APP_STREAMING ) by CompanionDeviceManager .", "REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION", "Allows application to request to be associated with a vehicle head unit capable of automotive projection ( AssociationRequest.DEVICE_PROFILE_AUTOMOTIVE_PROJECTION ) by CompanionDeviceManager .", "REQUEST_COMPANION_PROFILE_COMPUTER", "Allows application to request to be associated with a computer to share functionality and/or data with other devices, such as notifications, photos and media ( AssociationRequest.DEVICE_PROFILE_COMPUTER ) by CompanionDeviceManager .", + "REQUEST_COMPANION_PROFILE_GLASSES", "Allows app to request to be associated with a device via CompanionDeviceManager as \"glasses\"", + "REQUEST_COMPANION_PROFILE_NEARBY_DEVICE_STREAMING", "Allows application to request to stream content from an Android host to a nearby device ( AssociationRequest.DEVICE_PROFILE_NEARBY_DEVICE_STREAMING ) by CompanionDeviceManager .", "REQUEST_COMPANION_PROFILE_WATCH", "Allows app to request to be associated with a device via CompanionDeviceManager as a \"watch\"", "REQUEST_COMPANION_RUN_IN_BACKGROUND", "Allows a companion app to run in the background.", "REQUEST_COMPANION_SELF_MANAGED", "Allows an application to create a \"self-managed\" association.", @@ -405,12 +518,14 @@ public String getMenuTitle() { "REQUEST_INSTALL_PACKAGES", "Allows an application to request installing packages.", "REQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE", "Allows an application to subscribe to notifications about the presence status change of their associated companion device", "REQUEST_PASSWORD_COMPLEXITY", "Allows an application to request the screen lock complexity and prompt users to update the screen lock to a certain complexity level.", + "RUN_USER_INITIATED_JOBS", "Allows applications to use the user-initiated jobs API.", "SCHEDULE_EXACT_ALARM", "Allows applications to use exact alarm APIs.", "SEND_RESPOND_VIA_MESSAGE", "Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls.", "SEND_SMS", "Allows an application to send SMS messages.", "SET_ALARM", "Allows an application to broadcast an Intent to set an alarm for the user.", "SET_ALWAYS_FINISH", "Allows an application to control whether activities are immediately finished when put in the background.", "SET_ANIMATION_SCALE", "Modify the global animation scaling factor.", + "SET_BIOMETRIC_DIALOG_ADVANCED", "Allows an application to set the advanced features on BiometricDialog (SystemUI), including logo, logo description, and content view with more options button.", "SET_DEBUG_APP", "Configure an application for debugging.", "SET_PROCESS_LIMIT", "Allows an application to set the maximum number of (not needed) application processes that can be running.", "SET_TIME", "Allows applications to set the system time directly.", @@ -425,6 +540,7 @@ public String getMenuTitle() { "SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE", "Allows an application to subscribe to keyguard locked (i.e., showing) state.", "SYSTEM_ALERT_WINDOW", "Allows an app to create windows using the type WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY , shown on top of all other apps.", "TRANSMIT_IR", "Allows using the device's IR transmitter, if available.", + "TURN_SCREEN_ON", "Allows an app to turn on the screen on, e.g. with PowerManager.ACQUIRE_CAUSES_WAKEUP .", "UPDATE_DEVICE_STATS", "Allows an application to update device statistics.", "UPDATE_PACKAGES_WITHOUT_USER_ACTION", "Allows an application to indicate via PackageInstaller.SessionParams.setRequireUserAction(int) that user action should not be required for an app update.", "USE_BIOMETRIC", "Allows an app to use device supported biometric modalities.", @@ -437,7 +553,7 @@ public String getMenuTitle() { "WAKE_LOCK", "Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming.", "WRITE_APN_SETTINGS", "Allows applications to write the apn settings and read sensitive fields of an existing apn settings like user and password.", "WRITE_CALENDAR", "Allows an application to write the user's calendar data.", - "WRITE_CALL_LOG", "Allows an application to write (but not read) the user's call log data.", + "WRITE_CALL_LOG", "Allows an application to write and read the user's call log data.", "WRITE_CONTACTS", "Allows an application to write the user's contacts data.", "WRITE_EXTERNAL_STORAGE", "Allows an application to write to external storage.", "WRITE_GSERVICES", "Allows an application to modify the Google service map.", @@ -475,6 +591,7 @@ public String getMenuTitle() { "READ_MEDIA_AUDIO", "READ_MEDIA_IMAGES", "READ_MEDIA_VIDEO", + "READ_MEDIA_VISUAL_USER_SELECTED", "READ_PHONE_NUMBERS", "READ_PHONE_STATE", "READ_SMS", diff --git a/mode/src/processing/mode/android/RedirectStreamHandler.java b/processing/mode/src/processing/mode/android/RedirectStreamHandler.java similarity index 100% rename from mode/src/processing/mode/android/RedirectStreamHandler.java rename to processing/mode/src/processing/mode/android/RedirectStreamHandler.java diff --git a/mode/src/processing/mode/android/SDKDownloader.java b/processing/mode/src/processing/mode/android/SDKDownloader.java similarity index 97% rename from mode/src/processing/mode/android/SDKDownloader.java rename to processing/mode/src/processing/mode/android/SDKDownloader.java index 58397611d..2f9312b81 100644 --- a/mode/src/processing/mode/android/SDKDownloader.java +++ b/processing/mode/src/processing/mode/android/SDKDownloader.java @@ -141,7 +141,7 @@ protected Object doInBackground() throws Exception { // Command-line tools File downloadedCmdLineTools = new File(tempFolder, downloadUrls.cmdlineToolsFilename); - downloadAndUnpack(downloadUrls.cmdlineToolsUrl, downloadedCmdLineTools, sdkFolder, true); + downloadAndUnpack(downloadUrls.cmdlineToolsUrl, downloadedCmdLineTools, sdkFolder); File tmpFrom = new File(sdkFolder, "cmdline-tools"); File tmpTo = new File(sdkFolder, "cmdline-tmp"); AndroidUtil.moveDir(tmpFrom, tmpTo); @@ -151,33 +151,33 @@ protected Object doInBackground() throws Exception { // Platform tools File downloadedPlatformTools = new File(tempFolder, downloadUrls.platformToolsFilename); - downloadAndUnpack(downloadUrls.platformToolsUrl, downloadedPlatformTools, sdkFolder, true); + downloadAndUnpack(downloadUrls.platformToolsUrl, downloadedPlatformTools, sdkFolder); // Build tools File downloadedBuildTools = new File(tempFolder, downloadUrls.buildToolsFilename); - downloadAndUnpack(downloadUrls.buildToolsUrl, downloadedBuildTools, buildToolsFolder, true); + downloadAndUnpack(downloadUrls.buildToolsUrl, downloadedBuildTools, buildToolsFolder); // Platform File downloadedPlatform = new File(tempFolder, downloadUrls.platformFilename); - downloadAndUnpack(downloadUrls.platformUrl, downloadedPlatform, platformsFolder, false); + downloadAndUnpack(downloadUrls.platformUrl, downloadedPlatform, platformsFolder); // USB driver - if (Platform.isWindows()) { + if (Platform.isWindows() && downloadUrls.usbDriverFilename != null) { File downloadedFolder = new File(tempFolder, downloadUrls.usbDriverFilename); - downloadAndUnpack(downloadUrls.usbDriverUrl, downloadedFolder, googleRepoFolder, false); + downloadAndUnpack(downloadUrls.usbDriverUrl, downloadedFolder, googleRepoFolder); } // HAXM - if (!Platform.isLinux()) { + if (!Platform.isLinux() && downloadUrls.haxmFilename != null) { File downloadedFolder = new File(tempFolder, downloadUrls.haxmFilename); - downloadAndUnpack(downloadUrls.haxmUrl, downloadedFolder, haxmFolder, true); + downloadAndUnpack(downloadUrls.haxmUrl, downloadedFolder, haxmFolder); } - if (DOWNLOAD_EMU_WITH_SDK) { + if (DOWNLOAD_EMU_WITH_SDK && downloadUrls.emulatorFilename != null) { // Emulator, unpacks directly to sdk folder File downloadedEmulator = new File(tempFolder, downloadUrls.emulatorFilename); - downloadAndUnpack(downloadUrls.emulatorUrl, downloadedEmulator, sdkFolder, true); - } + downloadAndUnpack(downloadUrls.emulatorUrl, downloadedEmulator, sdkFolder); + } if (Platform.isLinux() || Platform.isMacOS()) { Runtime.getRuntime().exec("chmod -R 755 " + sdkFolder.getAbsolutePath()); @@ -186,10 +186,11 @@ protected Object doInBackground() throws Exception { for (File f: tempFolder.listFiles()) f.delete(); tempFolder.delete(); - // Normalize built-tools and platform folders to android- - String actualName = platformsFolder.listFiles()[0].getName(); - renameFolder(platformsFolder, "android-" + AndroidBuild.TARGET_SDK, actualName); - actualName = buildToolsFolder.listFiles()[0].getName(); + +// String actualName = platformsFolder.listFiles()[0].getName(); +// renameFolder(platformsFolder, "android-" + AndroidBuild.TARGET_SDK, actualName); + // Rename build-tools folder to the expected name if it's not that already + String actualName = buildToolsFolder.listFiles()[0].getName(); renameFolder(buildToolsFolder, downloadUrls.buildToolsVersion, actualName); // Done, let's set the environment and load the new SDK! @@ -216,7 +217,7 @@ protected void done() { } private void downloadAndUnpack(String urlString, File saveTo, - File unpackTo, boolean setExec) throws IOException { + File unpackTo) throws IOException { URL url = null; try { url = new URL(urlString); @@ -248,7 +249,7 @@ private void downloadAndUnpack(String urlString, File saveTo, inputStream.close(); outputStream.close(); - AndroidUtil.extractFolder(saveTo, unpackTo, setExec); + AndroidUtil.extractFolder(saveTo, unpackTo); } private void getMainDownloadUrls(SDKUrlHolder urlHolder, diff --git a/mode/src/processing/mode/android/SysImageDownloader.java b/processing/mode/src/processing/mode/android/SysImageDownloader.java similarity index 95% rename from mode/src/processing/mode/android/SysImageDownloader.java rename to processing/mode/src/processing/mode/android/SysImageDownloader.java index 0b626fcae..d665991f4 100644 --- a/mode/src/processing/mode/android/SysImageDownloader.java +++ b/processing/mode/src/processing/mode/android/SysImageDownloader.java @@ -139,26 +139,25 @@ protected Object doInBackground() throws Exception { firePropertyChange(AndroidMode.getTextString("download_property.change_event_total"), 0, downloadUrls.totalSize); totalSize = downloadUrls.totalSize; + String level = AVD.getTargetSDK(wear, abi); + if (wear) { // wear system images File downloadedSysImgWear = new File(tempFolder, downloadUrls.sysImgWearFilename); - File tmp = new File(sysImgFolder, "android-" + AndroidBuild.TARGET_SDK); + File tmp = new File(sysImgFolder, "android-" + level); if (!tmp.exists()) tmp.mkdir(); File sysImgWearFinalFolder = new File(tmp, downloadUrls.sysImgWearTag); if (!sysImgWearFinalFolder.exists()) sysImgWearFinalFolder.mkdir(); - downloadAndUnpack(downloadUrls.sysImgWearUrl, downloadedSysImgWear, sysImgWearFinalFolder, false); + downloadAndUnpack(downloadUrls.sysImgWearUrl, downloadedSysImgWear, sysImgWearFinalFolder); fixSourceProperties(sysImgWearFinalFolder); } else { // mobile system images - File downloadedSysImg = new File(tempFolder, downloadUrls.sysImgFilename); - - String level = abi.equals("arm") ? AVD.TARGET_SDK_ARM : AndroidBuild.TARGET_SDK; - File tmp = new File(sysImgFolder, "android-" + level); - + File downloadedSysImg = new File(tempFolder, downloadUrls.sysImgFilename); + File tmp = new File(sysImgFolder, "android-" + level); if (!tmp.exists()) tmp.mkdir(); File sysImgFinalFolder = new File(tmp, downloadUrls.sysImgTag); if (!sysImgFinalFolder.exists()) sysImgFinalFolder.mkdir(); - downloadAndUnpack(downloadUrls.sysImgUrl, downloadedSysImg, sysImgFinalFolder, false); + downloadAndUnpack(downloadUrls.sysImgUrl, downloadedSysImg, sysImgFinalFolder); fixSourceProperties(sysImgFinalFolder); } @@ -194,7 +193,7 @@ protected void done() { } private void downloadAndUnpack(String urlString, File saveTo, - File unpackTo, boolean setExec) throws IOException { + File unpackTo) throws IOException { URL url = null; try { url = new URL(urlString); @@ -219,7 +218,7 @@ private void downloadAndUnpack(String urlString, File saveTo, inputStream.close(); outputStream.close(); - AndroidUtil.extractFolder(saveTo, unpackTo, setExec); + AndroidUtil.extractFolder(saveTo, unpackTo); } // For some reason the source.properties file includes Addon entries, @@ -253,22 +252,23 @@ private void getDownloadUrls(UrlHolder urlHolder, XPathExpression expr; NodeList remotePackages; + String targetSDK = AVD.getTargetSDK(wear, abi); if (abi.equals("arm")) { - expr = xpath.compile("//remotePackage[contains(@path, '" + AVD.TARGET_SDK_ARM + "')" + - "and contains(@path, \"armeabi-v7a\")]"); - } else if (abi.equals("arm64-v8a")) { - expr = xpath.compile("//remotePackage[contains(@path, '" + AndroidBuild.TARGET_SDK + "')" + - "and contains(@path, \"arm64-v8a\")]"); + expr = xpath.compile("//remotePackage[contains(@path, '" + targetSDK + "')" + + "and contains(@path, \"armeabi-v7a\")]"); + } if (abi.equals("arm64-v8a")) { + expr = xpath.compile("//remotePackage[contains(@path, '" + targetSDK + "')" + + "and contains(@path, \"arm64-v8a\")]"); } else { - expr = xpath.compile("//remotePackage[contains(@path, '" + AndroidBuild.TARGET_SDK + "')" + - "and contains(@path, \"x86\")]"); + expr = xpath.compile("//remotePackage[contains(@path, '" + targetSDK + "')" + + "and contains(@path, \"x86\")]"); } if (wear) { Document docSysImgWear = db.parse(new URL(repositoryUrl).openStream()); + remotePackages = (NodeList) expr.evaluate(docSysImgWear, XPathConstants.NODESET); NodeList childNodes = remotePackages.item(0).getChildNodes(); - NodeList typeDetails = ((Element) childNodes).getElementsByTagName("type-details"); NodeList tag = ((Element) typeDetails.item(0)).getElementsByTagName("tag"); NodeList id = ((Element) tag.item(0)).getElementsByTagName("id"); @@ -481,6 +481,9 @@ public void processLine(String line) { process.waitFor(); } catch (final InterruptedException ie) { ie.printStackTrace(); + System.out.println("Processing was not able to install HAXM automatically, " + + "but the installation package was downloaded into android/sdk/extras/intel/HAXM. " + + "You can try install to install it manually from there."); } finally { process.destroy(); } diff --git a/mode/templates/ARActivity.java.tmpl b/processing/mode/templates/ARActivity.java.tmpl similarity index 90% rename from mode/templates/ARActivity.java.tmpl rename to processing/mode/templates/ARActivity.java.tmpl index ade8e71a3..ca441712f 100644 --- a/mode/templates/ARActivity.java.tmpl +++ b/processing/mode/templates/ARActivity.java.tmpl @@ -20,6 +20,7 @@ import processing.core.PApplet; public class MainActivity extends AppCompatActivity { private static final int CAMERA_PERMISSION_CODE = 0; + private static boolean CAMERA_PERMISSION_REQUESTED = false; private static final String CAMERA_PERMISSION = Manifest.permission.CAMERA; private static final String CAMERA_PERMISSION_MESSAGE = "Camera permission is needed to use AR"; @@ -57,6 +58,7 @@ public class MainActivity extends AppCompatActivity { if (sketch != null) { sketch.onRequestPermissionsResult(requestCode, permissions, grantResults); } + CAMERA_PERMISSION_REQUESTED = false; } @Override @@ -86,7 +88,10 @@ public class MainActivity extends AppCompatActivity { } private void requestCameraPermission() { - ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_CODE); + if (!CAMERA_PERMISSION_REQUESTED) { + CAMERA_PERMISSION_REQUESTED = true; + ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_CODE); + } } private boolean shouldShowRequestPermissionRationale() { diff --git a/mode/templates/ARBuild.gradle.tmpl b/processing/mode/templates/ARBuild.gradle.tmpl similarity index 97% rename from mode/templates/ARBuild.gradle.tmpl rename to processing/mode/templates/ARBuild.gradle.tmpl index 2c222a9d0..9bd31923a 100644 --- a/mode/templates/ARBuild.gradle.tmpl +++ b/processing/mode/templates/ARBuild.gradle.tmpl @@ -7,7 +7,7 @@ android { } compileSdkVersion @@target_sdk@@ defaultConfig { - applicationId "@@target_sdk@@" + applicationId "@@package_name@@" minSdkVersion @@min_sdk@@ targetSdkVersion @@target_sdk@@ versionCode @@version_code@@ diff --git a/mode/templates/ARBuildECJ.gradle.tmpl b/processing/mode/templates/ARBuildECJ.gradle.tmpl similarity index 100% rename from mode/templates/ARBuildECJ.gradle.tmpl rename to processing/mode/templates/ARBuildECJ.gradle.tmpl diff --git a/mode/templates/ARManifest.xml.tmpl b/processing/mode/templates/ARManifest.xml.tmpl similarity index 100% rename from mode/templates/ARManifest.xml.tmpl rename to processing/mode/templates/ARManifest.xml.tmpl diff --git a/mode/templates/AppActivity.java.tmpl b/processing/mode/templates/AppActivity.java.tmpl similarity index 100% rename from mode/templates/AppActivity.java.tmpl rename to processing/mode/templates/AppActivity.java.tmpl diff --git a/mode/templates/AppBuild.gradle.tmpl b/processing/mode/templates/AppBuild.gradle.tmpl similarity index 100% rename from mode/templates/AppBuild.gradle.tmpl rename to processing/mode/templates/AppBuild.gradle.tmpl diff --git a/mode/templates/AppBuildECJ.gradle.tmpl b/processing/mode/templates/AppBuildECJ.gradle.tmpl similarity index 100% rename from mode/templates/AppBuildECJ.gradle.tmpl rename to processing/mode/templates/AppBuildECJ.gradle.tmpl diff --git a/mode/templates/AppManifest.xml.tmpl b/processing/mode/templates/AppManifest.xml.tmpl similarity index 100% rename from mode/templates/AppManifest.xml.tmpl rename to processing/mode/templates/AppManifest.xml.tmpl diff --git a/mode/templates/ExpProperties.gradle.tmpl b/processing/mode/templates/ExpProperties.gradle.tmpl similarity index 100% rename from mode/templates/ExpProperties.gradle.tmpl rename to processing/mode/templates/ExpProperties.gradle.tmpl diff --git a/mode/templates/LayoutActivity.xml.tmpl b/processing/mode/templates/LayoutActivity.xml.tmpl similarity index 100% rename from mode/templates/LayoutActivity.xml.tmpl rename to processing/mode/templates/LayoutActivity.xml.tmpl diff --git a/mode/templates/Properties.gradle.tmpl b/processing/mode/templates/Properties.gradle.tmpl similarity index 100% rename from mode/templates/Properties.gradle.tmpl rename to processing/mode/templates/Properties.gradle.tmpl diff --git a/mode/templates/Properties.local.tmpl b/processing/mode/templates/Properties.local.tmpl similarity index 100% rename from mode/templates/Properties.local.tmpl rename to processing/mode/templates/Properties.local.tmpl diff --git a/mode/templates/Settings.gradle.tmpl b/processing/mode/templates/Settings.gradle.tmpl similarity index 100% rename from mode/templates/Settings.gradle.tmpl rename to processing/mode/templates/Settings.gradle.tmpl diff --git a/mode/templates/StringsWallpaper.xml.tmpl b/processing/mode/templates/StringsWallpaper.xml.tmpl similarity index 100% rename from mode/templates/StringsWallpaper.xml.tmpl rename to processing/mode/templates/StringsWallpaper.xml.tmpl diff --git a/mode/templates/StylesAR.xml.tmpl b/processing/mode/templates/StylesAR.xml.tmpl similarity index 100% rename from mode/templates/StylesAR.xml.tmpl rename to processing/mode/templates/StylesAR.xml.tmpl diff --git a/mode/templates/StylesFragment.xml.tmpl b/processing/mode/templates/StylesFragment.xml.tmpl similarity index 100% rename from mode/templates/StylesFragment.xml.tmpl rename to processing/mode/templates/StylesFragment.xml.tmpl diff --git a/mode/templates/StylesVR.xml.tmpl b/processing/mode/templates/StylesVR.xml.tmpl similarity index 100% rename from mode/templates/StylesVR.xml.tmpl rename to processing/mode/templates/StylesVR.xml.tmpl diff --git a/mode/templates/TopBuild.gradle.tmpl b/processing/mode/templates/TopBuild.gradle.tmpl similarity index 100% rename from mode/templates/TopBuild.gradle.tmpl rename to processing/mode/templates/TopBuild.gradle.tmpl diff --git a/processing/mode/templates/VRActivity.java.tmpl b/processing/mode/templates/VRActivity.java.tmpl new file mode 100644 index 000000000..bd2b73cce --- /dev/null +++ b/processing/mode/templates/VRActivity.java.tmpl @@ -0,0 +1,24 @@ +package @@package_name@@; + +import android.os.Build; +import android.os.Bundle; +import android.view.WindowManager; + +import processing.vr.VRActivity; +import processing.core.PApplet; + +public class MainActivity extends VRActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + // This is to ensure that the app shows in fullscreen mode with display cutout: + // https://stackoverflow.com/questions/49190381/fullscreen-app-with-displaycutout + getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + } + PApplet sketch = new @@sketch_class_name@@(); + @@external@@ + setSketch(sketch); + } +} \ No newline at end of file diff --git a/mode/templates/VRBuild.gradle.tmpl b/processing/mode/templates/VRBuild.gradle.tmpl similarity index 93% rename from mode/templates/VRBuild.gradle.tmpl rename to processing/mode/templates/VRBuild.gradle.tmpl index 86883c131..3837b763a 100644 --- a/mode/templates/VRBuild.gradle.tmpl +++ b/processing/mode/templates/VRBuild.gradle.tmpl @@ -49,10 +49,10 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:@@appcompat_version@@' - implementation 'com.google.vr:sdk-audio:@@gvr_version@@' - implementation 'com.google.vr:sdk-base:@@gvr_version@@' + implementation project('libs:google-vr') implementation files('libs/processing-core.jar') implementation files('libs/vr.jar') + implementation 'com.google.protobuf.nano:protobuf-javanano:3.1.0' androidTestImplementation 'com.android.support.test:runner:1.3.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' testImplementation 'junit:junit:4.13' diff --git a/mode/templates/VRBuildECJ.gradle.tmpl b/processing/mode/templates/VRBuildECJ.gradle.tmpl similarity index 97% rename from mode/templates/VRBuildECJ.gradle.tmpl rename to processing/mode/templates/VRBuildECJ.gradle.tmpl index f5a0c12cc..d8368f00f 100644 --- a/mode/templates/VRBuildECJ.gradle.tmpl +++ b/processing/mode/templates/VRBuildECJ.gradle.tmpl @@ -98,8 +98,8 @@ dependencies { compileOnly files('@@mode_folder@@/org.eclipse.jdt.core.jar') implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:@@appcompat_version@@' - implementation 'com.google.vr:sdk-audio:@@gvr_version@@' - implementation 'com.google.vr:sdk-base:@@gvr_version@@' + implementation project('libs:google-vr') implementation files('libs/processing-core.jar') implementation files('libs/vr.jar') + implementation 'com.google.protobuf.nano:protobuf-javanano:3.1.0' } diff --git a/mode/templates/VRManifest.xml.tmpl b/processing/mode/templates/VRManifest.xml.tmpl similarity index 100% rename from mode/templates/VRManifest.xml.tmpl rename to processing/mode/templates/VRManifest.xml.tmpl diff --git a/mode/templates/WallpaperManifest.xml.tmpl b/processing/mode/templates/WallpaperManifest.xml.tmpl similarity index 100% rename from mode/templates/WallpaperManifest.xml.tmpl rename to processing/mode/templates/WallpaperManifest.xml.tmpl diff --git a/mode/templates/WallpaperService.java.tmpl b/processing/mode/templates/WallpaperService.java.tmpl similarity index 100% rename from mode/templates/WallpaperService.java.tmpl rename to processing/mode/templates/WallpaperService.java.tmpl diff --git a/mode/templates/WatchFaceManifest.xml.tmpl b/processing/mode/templates/WatchFaceManifest.xml.tmpl similarity index 100% rename from mode/templates/WatchFaceManifest.xml.tmpl rename to processing/mode/templates/WatchFaceManifest.xml.tmpl diff --git a/mode/templates/WatchFaceService.java.tmpl b/processing/mode/templates/WatchFaceService.java.tmpl similarity index 100% rename from mode/templates/WatchFaceService.java.tmpl rename to processing/mode/templates/WatchFaceService.java.tmpl diff --git a/mode/templates/WearBuild.gradle.tmpl b/processing/mode/templates/WearBuild.gradle.tmpl similarity index 100% rename from mode/templates/WearBuild.gradle.tmpl rename to processing/mode/templates/WearBuild.gradle.tmpl diff --git a/mode/templates/WearBuildECJ.gradle.tmpl b/processing/mode/templates/WearBuildECJ.gradle.tmpl similarity index 100% rename from mode/templates/WearBuildECJ.gradle.tmpl rename to processing/mode/templates/WearBuildECJ.gradle.tmpl diff --git a/mode/templates/XMLWallpaper.xml.tmpl b/processing/mode/templates/XMLWallpaper.xml.tmpl similarity index 100% rename from mode/templates/XMLWallpaper.xml.tmpl rename to processing/mode/templates/XMLWallpaper.xml.tmpl diff --git a/mode/templates/XMLWatchFace.xml.tmpl b/processing/mode/templates/XMLWatchFace.xml.tmpl similarity index 100% rename from mode/templates/XMLWatchFace.xml.tmpl rename to processing/mode/templates/XMLWatchFace.xml.tmpl diff --git a/mode/theme/completion/class_obj-1x.png b/processing/mode/theme/completion/class_obj-1x.png similarity index 100% rename from mode/theme/completion/class_obj-1x.png rename to processing/mode/theme/completion/class_obj-1x.png diff --git a/mode/theme/completion/class_obj-2x.png b/processing/mode/theme/completion/class_obj-2x.png similarity index 100% rename from mode/theme/completion/class_obj-2x.png rename to processing/mode/theme/completion/class_obj-2x.png diff --git a/mode/theme/completion/field_default_obj-1x.png b/processing/mode/theme/completion/field_default_obj-1x.png similarity index 100% rename from mode/theme/completion/field_default_obj-1x.png rename to processing/mode/theme/completion/field_default_obj-1x.png diff --git a/mode/theme/completion/field_default_obj-2x.png b/processing/mode/theme/completion/field_default_obj-2x.png similarity index 100% rename from mode/theme/completion/field_default_obj-2x.png rename to processing/mode/theme/completion/field_default_obj-2x.png diff --git a/mode/theme/completion/field_protected_obj-1x.png b/processing/mode/theme/completion/field_protected_obj-1x.png similarity index 100% rename from mode/theme/completion/field_protected_obj-1x.png rename to processing/mode/theme/completion/field_protected_obj-1x.png diff --git a/mode/theme/completion/field_protected_obj-2x.png b/processing/mode/theme/completion/field_protected_obj-2x.png similarity index 100% rename from mode/theme/completion/field_protected_obj-2x.png rename to processing/mode/theme/completion/field_protected_obj-2x.png diff --git a/mode/theme/completion/methpub_obj-1x.png b/processing/mode/theme/completion/methpub_obj-1x.png similarity index 100% rename from mode/theme/completion/methpub_obj-1x.png rename to processing/mode/theme/completion/methpub_obj-1x.png diff --git a/mode/theme/completion/methpub_obj-2x.png b/processing/mode/theme/completion/methpub_obj-2x.png similarity index 100% rename from mode/theme/completion/methpub_obj-2x.png rename to processing/mode/theme/completion/methpub_obj-2x.png diff --git a/mode/theme/debug/breakpoint-enabled-1x.png b/processing/mode/theme/debug/breakpoint-enabled-1x.png similarity index 100% rename from mode/theme/debug/breakpoint-enabled-1x.png rename to processing/mode/theme/debug/breakpoint-enabled-1x.png diff --git a/mode/theme/debug/breakpoint-enabled-2x.png b/processing/mode/theme/debug/breakpoint-enabled-2x.png similarity index 100% rename from mode/theme/debug/breakpoint-enabled-2x.png rename to processing/mode/theme/debug/breakpoint-enabled-2x.png diff --git a/mode/theme/debug/continue-enabled-1x.png b/processing/mode/theme/debug/continue-enabled-1x.png similarity index 100% rename from mode/theme/debug/continue-enabled-1x.png rename to processing/mode/theme/debug/continue-enabled-1x.png diff --git a/mode/theme/debug/continue-enabled-2x.png b/processing/mode/theme/debug/continue-enabled-2x.png similarity index 100% rename from mode/theme/debug/continue-enabled-2x.png rename to processing/mode/theme/debug/continue-enabled-2x.png diff --git a/mode/theme/debug/step-enabled-1x.png b/processing/mode/theme/debug/step-enabled-1x.png similarity index 100% rename from mode/theme/debug/step-enabled-1x.png rename to processing/mode/theme/debug/step-enabled-1x.png diff --git a/mode/theme/debug/step-enabled-2x.png b/processing/mode/theme/debug/step-enabled-2x.png similarity index 100% rename from mode/theme/debug/step-enabled-2x.png rename to processing/mode/theme/debug/step-enabled-2x.png diff --git a/mode/theme/variables-1x.png b/processing/mode/theme/variables-1x.png similarity index 100% rename from mode/theme/variables-1x.png rename to processing/mode/theme/variables-1x.png diff --git a/mode/theme/variables-2x.png b/processing/mode/theme/variables-2x.png similarity index 100% rename from mode/theme/variables-2x.png rename to processing/mode/theme/variables-2x.png diff --git a/mode/tools/SDKUpdater/.classpath b/processing/mode/tools/SDKUpdater/.classpath similarity index 100% rename from mode/tools/SDKUpdater/.classpath rename to processing/mode/tools/SDKUpdater/.classpath diff --git a/mode/tools/SDKUpdater/.gitignore b/processing/mode/tools/SDKUpdater/.gitignore similarity index 100% rename from mode/tools/SDKUpdater/.gitignore rename to processing/mode/tools/SDKUpdater/.gitignore diff --git a/mode/tools/SDKUpdater/.project b/processing/mode/tools/SDKUpdater/.project similarity index 87% rename from mode/tools/SDKUpdater/.project rename to processing/mode/tools/SDKUpdater/.project index 4dc71227b..730c03fa8 100644 --- a/mode/tools/SDKUpdater/.project +++ b/processing/mode/tools/SDKUpdater/.project @@ -22,12 +22,12 @@ - 1650246874238 + 1675640664206 30 org.eclipse.core.resources.regexFilterMatcher - node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ diff --git a/mode/tools/SDKUpdater/.settings/org.eclipse.buildship.core.prefs b/processing/mode/tools/SDKUpdater/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from mode/tools/SDKUpdater/.settings/org.eclipse.buildship.core.prefs rename to processing/mode/tools/SDKUpdater/.settings/org.eclipse.buildship.core.prefs diff --git a/mode/tools/SDKUpdater/.settings/org.eclipse.jdt.core.prefs b/processing/mode/tools/SDKUpdater/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from mode/tools/SDKUpdater/.settings/org.eclipse.jdt.core.prefs rename to processing/mode/tools/SDKUpdater/.settings/org.eclipse.jdt.core.prefs diff --git a/mode/tools/SDKUpdater/build.gradle b/processing/mode/tools/SDKUpdater/build.gradle similarity index 100% rename from mode/tools/SDKUpdater/build.gradle rename to processing/mode/tools/SDKUpdater/build.gradle diff --git a/mode/tools/SDKUpdater/src/processing/mode/android/tools/SDKUpdater.java b/processing/mode/tools/SDKUpdater/src/processing/mode/android/tools/SDKUpdater.java similarity index 100% rename from mode/tools/SDKUpdater/src/processing/mode/android/tools/SDKUpdater.java rename to processing/mode/tools/SDKUpdater/src/processing/mode/android/tools/SDKUpdater.java diff --git a/mode/version.properties b/processing/mode/version.properties similarity index 70% rename from mode/version.properties rename to processing/mode/version.properties index 39239114f..fbf85d18d 100644 --- a/mode/version.properties +++ b/processing/mode/version.properties @@ -1,5 +1,7 @@ # Basics -android-platform = 31 +android-platform = 33 +android-platform-wear = 30 +android-platform-wear-arm = 24 android-toolslib = 30.3.0 android-gradle-plugin = 7.1.0 gradle-wrapper = 7.4.2 @@ -15,12 +17,12 @@ android-min-wear = 25 # https://mvnrepository.com # https://repo.gradle.org # The format below is group%artifact -androidx.appcompat%appcompat = 1.2.0 +androidx.appcompat%appcompat = 1.6.0 androidx.legacy%legacy-support-v4 = 1.0.0 -com.google.android.support%wearable = 2.8.1 -com.google.android.gms%play-services-wearable = 17.0.0 +com.google.android.support%wearable = 2.9.0 +com.google.android.gms%play-services-wearable = 18.0.0 com.google.vr = 1.180.0 -com.google.ar = 1.35.0 +com.google.ar = 1.37.0 org.processing = 4.0.0b7 org.gradle%gradle-tooling-api = 7.2 org.slf4j = 1.7.30 diff --git a/scripts/publish-module.gradle b/processing/scripts/publish-module.gradle similarity index 100% rename from scripts/publish-module.gradle rename to processing/scripts/publish-module.gradle diff --git a/scripts/publish-root.gradle b/processing/scripts/publish-root.gradle similarity index 100% rename from scripts/publish-root.gradle rename to processing/scripts/publish-root.gradle diff --git a/processing/settings.gradle b/processing/settings.gradle new file mode 100644 index 000000000..9e3fad4ab --- /dev/null +++ b/processing/settings.gradle @@ -0,0 +1,2 @@ +include ':mode', ':core', ':mode:libraries:vr', ':mode:libraries:ar', 'mode:tools:SDKUpdater' + diff --git a/settings.gradle b/settings.gradle index 9e3fad4ab..193a03378 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1 @@ -include ':mode', ':core', ':mode:libraries:vr', ':mode:libraries:ar', 'mode:tools:SDKUpdater' - +include ':libs:processing-core', 'libs:google-vr',':libs:processing-vr', ':libs:processing-ar', ':apps:simple', ':apps:wallpaper', ':apps:arscene', ':apps:watchface', ':apps:fast2d', ':apps:armarkers' \ No newline at end of file