diff --git a/.github/workflows/build-gradle.yml b/.github/workflows/build-gradle.yml
index e53355d29..254433edd 100644
--- a/.github/workflows/build-gradle.yml
+++ b/.github/workflows/build-gradle.yml
@@ -1,4 +1,4 @@
-name: Pre-releases with Gradle
+name: Branch Builds
on:
push:
paths-ignore:
@@ -6,31 +6,58 @@ on:
- '.all-contributorsrc'
jobs:
+ test:
+ runs-on: ubuntu-latest
+ name: Test Processing
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+ - name: Install Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+
+ - name: Build with Gradle
+ run: ./gradlew test
build:
- name: Create Pre-release for ${{ matrix.os_prefix }} (${{ matrix.arch }})
+ name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Build
runs-on: ${{ matrix.os }}
- permissions:
- contents: write
+ needs: test
strategy:
fail-fast: false
matrix:
include:
- - os: [self-hosted, linux, ARM64]
+ - os: ubuntu-24.04-arm
os_prefix: linux
arch: aarch64
+ binary: processing*.snap
- os: ubuntu-latest
os_prefix: linux
arch: x64
+ binary: processing*.snap
- os: windows-latest
os_prefix: windows
arch: x64
+ binary: msi/Processing-*.msi
- os: macos-latest
os_prefix: macos
arch: x64
+ binary: dmg/Processing-*.dmg
- os: macos-latest
os_prefix: macos
arch: aarch64
+ binary: dmg/Processing-*.dmg
steps:
+ - name: Install Snapcraft
+ if: runner.os == 'Linux'
+ uses: samuelmeuli/action-snapcraft@v3
+ - name: Install LXD
+ if: runner.os == 'Linux'
+ uses: canonical/setup-lxd@main
+
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
@@ -41,19 +68,13 @@ jobs:
architecture: ${{ matrix.arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS
- - name: Add instructions
- if: ${{ matrix.os_prefix == 'macos' }}
- run: |
- echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
+
- name: Add artifact
uses: actions/upload-artifact@v4
with:
- name: processing-${{ github.ref_name }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-gradle
- path: |
- ./app/build/compose/binaries/main/dmg/Processing-*.dmg
- ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
- ./app/build/compose/binaries/main/msi/Processing-*.msi
- ./app/build/compose/binaries/main/deb/processing*.deb
+ name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-br_${{ github.ref_name }}
retention-days: 1
+ path: app/build/compose/binaries/main/${{ matrix.binary }}
\ No newline at end of file
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
deleted file mode 100644
index b66dcdeed..000000000
--- a/.github/workflows/maven.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Maven Release
-on:
- workflow_dispatch:
- inputs:
- version:
- description: 'Version to release'
- required: true
- default: '1.0.0'
-
-
-jobs:
- publish:
- name: Create Processing Core Release on Maven Central
- runs-on: ubuntu-latest
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v4
- - name: Setup Java
- uses: actions/setup-java@v4
- with:
- distribution: 'temurin'
- java-version: 17
- - name: Setup Gradle
- uses: gradle/actions/setup-gradle@v4
- - name: Build with Gradle
- run: ./gradlew publish
- env:
- MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
- MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
-
- ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
- ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
-
- ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
- ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
-
- ORG_GRADLE_PROJECT_version: ${{ github.event.inputs.version }}
\ No newline at end of file
diff --git a/.github/workflows/pull_request-gradle.yml b/.github/workflows/pull_request-gradle.yml
index 11ae6f05a..4ea0bcc9d 100644
--- a/.github/workflows/pull_request-gradle.yml
+++ b/.github/workflows/pull_request-gradle.yml
@@ -7,12 +7,26 @@ on:
- main
jobs:
- build:
- name: Create Pull Request Build for ${{ matrix.os_prefix }} (${{ matrix.arch }})
+ test:
+ runs-on: ubuntu-latest
+ name: Test Processing
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v4
+ - name: Install Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+ - name: Setup Gradle
+ uses: gradle/actions/setup-gradle@v4
+
+ - name: Build with Gradle
+ run: ./gradlew test
+ build:
+ name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Build
runs-on: ${{ matrix.os }}
- permissions:
- pull-requests: write
- contents: read
+ needs: test
strategy:
fail-fast: false
matrix:
@@ -20,19 +34,31 @@ jobs:
- os: ubuntu-24.04-arm
os_prefix: linux
arch: aarch64
+ binary: processing*.snap
- os: ubuntu-latest
os_prefix: linux
arch: x64
+ binary: processing*.snap
- os: windows-latest
os_prefix: windows
arch: x64
+ binary: msi/Processing-*.msi
- os: macos-latest
os_prefix: macos
arch: x64
+ binary: dmg/Processing-*.dmg
- os: macos-latest
os_prefix: macos
arch: aarch64
+ binary: dmg/Processing-*.dmg
steps:
+ - name: Install Snapcraft
+ if: runner.os == 'Linux'
+ uses: samuelmeuli/action-snapcraft@v3
+ - name: Install LXD
+ if: runner.os == 'Linux'
+ uses: canonical/setup-lxd@main
+
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
@@ -43,19 +69,13 @@ jobs:
architecture: ${{ matrix.arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS
- - name: Add instructions
- if: ${{ matrix.os_prefix == 'macos' }}
- run: |
- echo "run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag" > ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
+
- name: Add artifact
uses: actions/upload-artifact@v4
with:
- name: processing-pr${{ github.event.pull_request.number }}-${{github.sha}}-${{ matrix.os_prefix }}-${{ matrix.arch }}-gradle
- path: |
- ./app/build/compose/binaries/main/dmg/Processing-*.dmg
- ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
- ./app/build/compose/binaries/main/msi/Processing-*.msi
- ./app/build/compose/binaries/main/deb/processing*.deb
+ name: processing-${{ matrix.os_prefix }}-${{ matrix.arch }}-pr_${{ github.event.pull_request.number }}
retention-days: 5
+ path: app/build/compose/binaries/main/${{ matrix.binary }}
\ No newline at end of file
diff --git a/.github/workflows/release-gradle.yml b/.github/workflows/release-gradle.yml
index fb7700cea..cafc22ce3 100644
--- a/.github/workflows/release-gradle.yml
+++ b/.github/workflows/release-gradle.yml
@@ -7,22 +7,50 @@ jobs:
version:
runs-on: ubuntu-latest
outputs:
- build_number: ${{ steps.tag_info.outputs.build_number }}
+ revision: ${{ steps.tag_info.outputs.revision }}
version: ${{ steps.tag_info.outputs.version }}
steps:
- - name: Extract version and build number
+ - name: Extract version and revision
id: tag_info
shell: bash
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
- BUILD_NUMBER=$(echo "$TAG_NAME" | cut -d'-' -f2)
+ REVISION=$(echo "$TAG_NAME" | cut -d'-' -f2)
VERSION=$(echo "$TAG_NAME" | cut -d'-' -f3)
# Set outputs for use in later jobs or steps
- echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
+ echo "revision=$REVISION" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
+ reference:
+ name: Publish Processing Reference to release
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ needs: version
+ steps:
+ - name: Checkout Website Repository
+ uses: actions/checkout@v4
+ with:
+ repository: processing/processing-website
+ - name: Use Node.js 16
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - name: Install dependencies
+ run: npm ci
+ - name: Build
+ run: npm run build
+ - name: Make reference.zip
+ run: npm run zip
+ - name: Upload reference to release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ asset_name: processing-${{ needs.version.outputs.version }}-reference.zip
+ file: reference.zip
+
publish:
- name: Publish Processing Core to Maven Central
+ name: Publish Processing Libraries to Maven Central
runs-on: ubuntu-latest
needs: version
steps:
@@ -35,6 +63,7 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
+
- name: Build with Gradle
run: ./gradlew publish
env:
@@ -48,9 +77,9 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_IN_MEMORY_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
- ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
+ ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
build:
- name: Publish Release for ${{ matrix.os_prefix }} (${{ matrix.arch }})
+ name: (${{ matrix.os_prefix }}/${{ matrix.arch }}) Create Processing Release
runs-on: ${{ matrix.os }}
needs: version
permissions:
@@ -59,26 +88,47 @@ jobs:
fail-fast: false
matrix:
include:
- # compiling for arm32 needs a self-hosted runner on Raspi OS (32-bit)
- - os: [self-hosted, linux, ARM]
+ - os: ubuntu-24.04-arm
os_prefix: linux
- arch: arm
+ arch: aarch64
+ binary: ${{ vars.SNAP_NAME }}_${{ needs.version.outputs.version }}_arm64
+ extension: snap
- os: ubuntu-latest
os_prefix: linux
arch: x64
+ binary: ${{ vars.SNAP_NAME }}_${{ needs.version.outputs.version }}_amd64
+ extension: snap
- os: windows-latest
os_prefix: windows
arch: x64
+ binary: msi/Processing-${{ needs.version.outputs.version }}
+ extension: msi
- os: macos-latest
os_prefix: macos
arch: x64
+ binary: dmg/Processing-${{ needs.version.outputs.version }}
+ extension: dmg
- os: macos-latest
os_prefix: macos
arch: aarch64
- - os: macos-latest
- os_prefix: linux
- arch: aarch64
+ binary: dmg/Processing-${{ needs.version.outputs.version }}
+ extension: dmg
steps:
+ - name: Install Certificates for Code Signing
+ if: runner.os == 'macOS'
+ continue-on-error: true
+ uses: apple-actions/import-codesign-certs@v3
+ with:
+ p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
+ p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
+
+ - name: Install Snapcraft
+ if: runner.os == 'Linux'
+ uses: samuelmeuli/action-snapcraft@v3
+ - name: Install LXD
+ if: runner.os == 'Linux'
+ uses: canonical/setup-lxd@main
+
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Java
@@ -89,25 +139,53 @@ jobs:
architecture: ${{ matrix.arch }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- # - name: Install Certificates for Code Signing
- # if: ${{ matrix.os_prefix == 'macos' }}
- # uses: apple-actions/import-codesign-certs@v3
- # with:
- # p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
- # p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
+
- name: Build with Gradle
run: ./gradlew packageDistributionForCurrentOS
- env:
+ env:
ORG_GRADLE_PROJECT_version: ${{ needs.version.outputs.version }}
- ORG_GRADLE_PROJECT_group: ${{ vars.PROCESSING_GROUP }}
+ ORG_GRADLE_PROJECT_group: ${{ vars.GRADLE_GROUP }}
+ ORG_GRADLE_PROJECT_revision: ${{ needs.version.outputs.revision }}
+ ORG_GRADLE_PROJECT_compose.desktop.verbose: true
+ ORG_GRADLE_PROJECT_compose.desktop.mac.sign: ${{ secrets.PROCESSING_SIGNING }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.signing.identity: ${{ secrets.PROCESSING_SIGNING_IDENTITY }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.notarization.appleID: ${{ secrets.PROCESSING_APPLE_ID }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.notarization.password: ${{ secrets.PROCESSING_APP_PASSWORD }}
+ ORG_GRADLE_PROJECT_compose.desktop.mac.notarization.teamID: ${{ secrets.PROCESSING_TEAM_ID }}
+ ORG_GRADLE_PROJECT_snapname: ${{ vars.SNAP_NAME }}
- - name: Upload binaries to release
+ - name: Upload portables to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
- file: |
- ./app/build/compose/binaries/main/dmg/Processing-*.dmg
- ./app/build/compose/binaries/main/dmg/INSTRUCTIONS_FOR_TESTING.txt
- ./app/build/compose/binaries/main/msi/Processing-*.msi
- ./app/build/compose/binaries/main/deb/processing*.deb
- file_glob: true
+ asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}-portable.zip
+ file: app/build/compose/binaries/main/Processing-${{ needs.version.outputs.version }}.zip
+
+ - name: Upload installers to release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ asset_name: processing-${{ needs.version.outputs.version }}-${{ matrix.os_prefix }}-${{ matrix.arch }}.${{ matrix.extension }}
+ file: app/build/compose/binaries/main/${{ matrix.binary }}.${{ matrix.extension }}
+
+ - name: Upload snap to Snap Store
+ if: runner.os == 'Linux'
+ run: snapcraft upload --release=beta app/build/compose/binaries/main/${{ matrix.binary }}.${{ matrix.extension }}
+ env:
+ SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.PROCESSING_SNAPCRAFT_TOKEN }}
+
+ - name: Sign files with Trusted Signing
+ if: runner.os == 'Windows'
+ uses: azure/trusted-signing-action@v0
+ with:
+ azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
+ azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
+ azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
+ endpoint: https://eus.codesigning.azure.net/
+ trusted-signing-account-name: vscx-codesigning
+ certificate-profile-name: vscx-certificate-profile
+ files-folder: app/build/compose/binaries/main/msi
+ files-folder-filter: msi
+ file-digest: SHA256
+ timestamp-rfc3161: http://timestamp.acs.microsoft.com
+ timestamp-digest: SHA256
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 68cdd251d..b33d88a19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -113,3 +113,6 @@ java/build/
/core/examples/build
/java/gradle/build
/java/gradle/example/.processing
+
+.build/
+/app/windows/obj
diff --git a/.idea/icon.svg b/.idea/icon.svg
new file mode 100644
index 000000000..149e0a180
--- /dev/null
+++ b/.idea/icon.svg
@@ -0,0 +1,5 @@
+
diff --git a/.idea/runConfigurations/Processing.xml b/.idea/runConfigurations/Processing.xml
index 0c7c99651..648638250 100644
--- a/.idea/runConfigurations/Processing.xml
+++ b/.idea/runConfigurations/Processing.xml
@@ -4,7 +4,6 @@
diff --git a/app/src/processing/app/Messages.java b/app/ant/processing/app/Messages.java
similarity index 100%
rename from app/src/processing/app/Messages.java
rename to app/ant/processing/app/Messages.java
diff --git a/app/ant/processing/app/ui/WelcomeToBeta.java b/app/ant/processing/app/ui/WelcomeToBeta.java
new file mode 100644
index 000000000..3127e4adc
--- /dev/null
+++ b/app/ant/processing/app/ui/WelcomeToBeta.java
@@ -0,0 +1,11 @@
+package processing.app.ui;
+
+
+// Stub class for backwards compatibility with the ant-build system
+// This class is not used in the Gradle build system
+// The actual implementation is in src/.../Schema.kt
+public class WelcomeToBeta {
+ public static void showWelcomeToBeta(){
+
+ }
+}
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index e7ef2e5b3..3384d688c 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -1,6 +1,14 @@
+import org.gradle.kotlin.dsl.support.zipTo
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
+import org.jetbrains.compose.desktop.application.tasks.AbstractJPackageTask
import org.jetbrains.compose.internal.de.undercouch.gradle.tasks.download.Download
+import org.jetbrains.kotlin.fir.scopes.impl.overrides
+import java.io.FileOutputStream
+import java.util.zip.ZipEntry
+import java.util.zip.ZipOutputStream
+
+// TODO: Update to 2.10.20 and add hot-reloading: https://github.com/JetBrains/compose-hot-reload
plugins{
id("java")
@@ -12,9 +20,6 @@ plugins{
alias(libs.plugins.download)
}
-group = rootProject.group
-version = rootProject.version
-
repositories{
mavenCentral()
google()
@@ -29,6 +34,14 @@ sourceSets{
kotlin{
srcDirs("src")
}
+ resources{
+ srcDirs("resources", listOf("languages", "fonts", "theme").map { "../build/shared/lib/$it" })
+ }
+ }
+ test{
+ kotlin{
+ srcDirs("test")
+ }
}
}
@@ -37,37 +50,38 @@ compose.desktop {
mainClass = "processing.app.ui.Start"
jvmArgs(*listOf(
- Pair("processing.version", version),
- Pair("processing.revision", "1300"),
- Pair("processing.contributions.source", "https://contributions-preview.processing.org/contribs.txt"),
+ Pair("processing.version", rootProject.version),
+ Pair("processing.revision", findProperty("revision") ?: Int.MAX_VALUE),
+ Pair("processing.contributions.source", "https://download.processing.org/contribs.txt"),
Pair("processing.download.page", "https://processing.org/download/"),
Pair("processing.download.latest", "https://processing.org/download/latest.txt"),
Pair("processing.tutorials", "https://processing.org/tutorials/"),
).map { "-D${it.first}=${it.second}" }.toTypedArray())
nativeDistributions{
- modules("jdk.jdi", "java.compiler", "jdk.accessibility")
+ modules("jdk.jdi", "java.compiler", "jdk.accessibility", "java.management.rmi")
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Processing"
macOS{
- bundleID = "org.processing.app"
- iconFile = project.file("../build/macos/processing.icns")
+ bundleID = "${rootProject.group}.app"
+ iconFile = rootProject.file("build/macos/processing.icns")
infoPlist{
- extraKeysRawXml = layout.projectDirectory.file("info.plist").asFile.readText()
+ extraKeysRawXml = file("macos/info.plist").readText()
}
- entitlementsFile.set(project.file("entitlements.plist"))
- runtimeEntitlementsFile.set(project.file("entitlements.plist"))
+ entitlementsFile.set(file("macos/entitlements.plist"))
+ runtimeEntitlementsFile.set(file("macos/entitlements.plist"))
+ appStore = true
}
windows{
- iconFile = project.file("../build/windows/processing.ico")
+ iconFile = rootProject.file("build/windows/processing.ico")
menuGroup = "Processing"
upgradeUuid = "89d8d7fe-5602-4b12-ba10-0fe78efbd602"
}
linux {
appCategory = "Programming"
- menuGroup = "Processing"
- iconFile = project.file("../build/linux/processing.png")
+ menuGroup = "Development;Programming;"
+ iconFile = rootProject.file("build/linux/processing.png")
// Fix fonts on some Linux distributions
jvmArgs("-Dawt.useSystemAAFontSettings=on")
@@ -99,12 +113,191 @@ dependencies {
implementation(libs.compottie)
implementation(libs.kaml)
+ implementation(libs.markdown)
+ implementation(libs.markdownJVM)
+
+ testImplementation(kotlin("test"))
+ testImplementation(libs.mockitoKotlin)
+ testImplementation(libs.junitJupiter)
+ testImplementation(libs.junitJupiterParams)
+}
+
+tasks.test {
+ useJUnitPlatform()
+ workingDir = file("build/test")
+ workingDir.mkdirs()
}
tasks.compileJava{
options.encoding = "UTF-8"
}
+val version = if(project.version == "unspecified") "1.0.0" else project.version
+
+tasks.register("installCreateDmg") {
+ onlyIf { org.gradle.internal.os.OperatingSystem.current().isMacOsX }
+ commandLine("arch", "-arm64", "brew", "install", "--quiet", "create-dmg")
+}
+tasks.register("packageCustomDmg"){
+ onlyIf { org.gradle.internal.os.OperatingSystem.current().isMacOsX }
+ group = "compose desktop"
+
+ val distributable = tasks.named("createDistributable").get()
+ dependsOn(distributable, "installCreateDmg")
+
+ val packageName = distributable.packageName.get()
+ val dir = distributable.destinationDir.get()
+ val dmg = dir.file("../dmg/$packageName-$version.dmg").asFile
+ val app = dir.file("$packageName.app").asFile
+
+ dmg.parentFile.deleteRecursively()
+ dmg.parentFile.mkdirs()
+
+ val extra = mutableListOf()
+ val isSigned = compose.desktop.application.nativeDistributions.macOS.signing.sign.get()
+
+ if(!isSigned) {
+ val content = """
+ run 'xattr -d com.apple.quarantine Processing-${version}.dmg' to remove the quarantine flag
+ """.trimIndent()
+ val instructions = dmg.parentFile.resolve("INSTRUCTIONS.txt")
+ instructions.writeText(content)
+ extra.add("--add-file")
+ extra.add("INSTRUCTIONS.txt")
+ extra.add(instructions.path)
+ extra.add("200")
+ extra.add("25")
+ }
+
+ commandLine("brew", "install", "--quiet", "create-dmg")
+
+ commandLine("create-dmg",
+ "--volname", packageName,
+ "--volicon", file("macos/volume.icns"),
+ "--background", file("macos/background.png"),
+ "--icon", "$packageName.app", "190", "185",
+ "--window-pos", "200", "200",
+ "--window-size", "658", "422",
+ "--app-drop-link", "466", "185",
+ "--hide-extension", "$packageName.app",
+ *extra.toTypedArray(),
+ dmg,
+ app
+ )
+}
+
+tasks.register("packageCustomMsi"){
+ onlyIf { org.gradle.internal.os.OperatingSystem.current().isWindows }
+ dependsOn("createDistributable")
+ workingDir = file("windows")
+ group = "compose desktop"
+
+ val version = if(version == "unspecified") "1.0.0" else version
+
+ commandLine(
+ "dotnet",
+ "build",
+ "/p:Platform=x64",
+ "/p:Version=$version",
+ "/p:DefineConstants=\"Version=$version;\""
+ )
+}
+
+val snapname = findProperty("snapname") ?: rootProject.name
+val snaparch = when (System.getProperty("os.arch")) {
+ "amd64", "x86_64" -> "amd64"
+ "aarch64" -> "arm64"
+ else -> System.getProperty("os.arch")
+}
+tasks.register("generateSnapConfiguration"){
+ onlyIf { org.gradle.internal.os.OperatingSystem.current().isLinux }
+ val distributable = tasks.named("createDistributable").get()
+ dependsOn(distributable)
+
+ val dir = distributable.destinationDir.get()
+ val content = """
+ name: $snapname
+ version: $version
+ base: core22
+ summary: A creative coding editor
+ description: |
+ Processing is a flexible software sketchbook and a programming language designed for learning how to code.
+ confinement: strict
+
+ apps:
+ processing:
+ command: opt/processing/bin/Processing
+ desktop: opt/processing/lib/processing-Processing.desktop
+ environment:
+ LD_LIBRARY_PATH: ${'$'}SNAP/opt/processing/lib/runtime/lib:${'$'}LD_LIBRARY_PATH
+ LIBGL_DRIVERS_PATH: ${'$'}SNAP/usr/lib/${'$'}SNAPCRAFT_ARCH_TRIPLET/dri
+ plugs:
+ - desktop
+ - desktop-legacy
+ - wayland
+ - x11
+ - network
+ - opengl
+
+ parts:
+ processing:
+ plugin: dump
+ source: deb/processing_$version-1_$snaparch.deb
+ source-type: deb
+ stage-packages:
+ - openjdk-17-jre
+ override-prime: |
+ snapcraftctl prime
+ chmod -R +x opt/processing/lib/app/resources/jdk-*
+ rm -vf usr/lib/jvm/java-17-openjdk-*/lib/security/cacerts
+ """.trimIndent()
+ dir.file("../snapcraft.yaml").asFile.writeText(content)
+}
+
+tasks.register("packageSnap"){
+ onlyIf { org.gradle.internal.os.OperatingSystem.current().isLinux }
+ dependsOn("packageDeb", "generateSnapConfiguration")
+ group = "compose desktop"
+
+ val distributable = tasks.named("createDistributable").get()
+ workingDir = distributable.destinationDir.dir("../").get().asFile
+ commandLine("snapcraft")
+}
+tasks.register("zipDistributable"){
+ dependsOn("createDistributable", "setExecutablePermissions")
+ group = "compose desktop"
+
+ val distributable = tasks.named("createDistributable").get()
+ val dir = distributable.destinationDir.get()
+ val packageName = distributable.packageName.get()
+
+ from(dir){ eachFile{ permissions{ unix("755") } } }
+ archiveBaseName.set(packageName)
+ destinationDirectory.set(dir.file("../").asFile)
+}
+
+afterEvaluate{
+ tasks.named("packageDmg").configure{
+ dependsOn("packageCustomDmg")
+ group = "compose desktop"
+ actions = emptyList()
+ }
+
+ tasks.named("packageMsi").configure{
+ dependsOn("packageCustomMsi")
+ group = "compose desktop"
+ actions = emptyList()
+ }
+ tasks.named("packageDistributionForCurrentOS").configure {
+ if(org.gradle.internal.os.OperatingSystem.current().isMacOsX
+ && compose.desktop.application.nativeDistributions.macOS.notarization.appleID.isPresent
+ ){
+ dependsOn("notarizeDmg")
+ }
+ dependsOn("packageSnap", "zipDistributable")
+ }
+}
+
// LEGACY TASKS
// Most of these are shims to be compatible with the old build system
@@ -220,6 +413,97 @@ tasks.register("renameWindres") {
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
into(dir)
+}
+tasks.register("signResources"){
+ onlyIf {
+ org.gradle.internal.os.OperatingSystem.current().isMacOsX
+ &&
+ compose.desktop.application.nativeDistributions.macOS.signing.sign.get()
+ }
+ group = "compose desktop"
+ dependsOn(
+ "includeCore",
+ "includeJavaMode",
+ "includeJdk",
+ "includeSharedAssets",
+ "includeProcessingExamples",
+ "includeProcessingWebsiteExamples",
+ "includeJavaModeResources",
+ "renameWindres"
+ )
+ finalizedBy("prepareAppResources")
+
+ val resourcesPath = composeResources("")
+
+
+
+ // find jars in the resources directory
+ val jars = mutableListOf()
+ doFirst{
+ fileTree(resourcesPath)
+ .matching { include("**/Info.plist") }
+ .singleOrNull()
+ ?.let { file ->
+ copy {
+ from(file)
+ into(resourcesPath)
+ }
+ }
+ fileTree(resourcesPath) {
+ include("**/*.jar")
+ exclude("**/*.jar.tmp/**")
+ }.forEach { file ->
+ val tempDir = file.parentFile.resolve("${file.name}.tmp")
+ copy {
+ from(zipTree(file))
+ into(tempDir)
+ }
+ file.delete()
+ jars.add(tempDir)
+ }
+ fileTree(resourcesPath){
+ include("**/bin/**")
+ include("**/*.jnilib")
+ include("**/*.dylib")
+ include("**/*aarch64*")
+ include("**/*x86_64*")
+ include("**/*ffmpeg*")
+ include("**/ffmpeg*/**")
+ exclude("jdk-*/**")
+ exclude("*.jar")
+ exclude("*.so")
+ exclude("*.dll")
+ }.forEach{ file ->
+ exec {
+ commandLine("codesign", "--timestamp", "--force", "--deep","--options=runtime", "--sign", "Developer ID Application", file)
+ }
+ }
+ jars.forEach { file ->
+ FileOutputStream(File(file.parentFile, file.nameWithoutExtension)).use { fos ->
+ ZipOutputStream(fos).use { zos ->
+ file.walkTopDown().forEach { fileEntry ->
+ if (fileEntry.isFile) {
+ // Calculate the relative path for the zip entry
+ val zipEntryPath = fileEntry.relativeTo(file).path
+ val entry = ZipEntry(zipEntryPath)
+ zos.putNextEntry(entry)
+
+ // Copy file contents to the zip
+ fileEntry.inputStream().use { input ->
+ input.copyTo(zos)
+ }
+ zos.closeEntry()
+ }
+ }
+ }
+ }
+
+ file.deleteRecursively()
+ }
+ file(composeResources("Info.plist")).delete()
+ }
+
+
}
afterEvaluate {
tasks.named("prepareAppResources").configure {
@@ -253,5 +537,8 @@ afterEvaluate {
}
}
}
- tasks.findByName("createDistributable")?.finalizedBy("setExecutablePermissions")
+ tasks.named("createDistributable").configure {
+ dependsOn("signResources")
+ finalizedBy("setExecutablePermissions")
+ }
}
\ No newline at end of file
diff --git a/app/macos/background.png b/app/macos/background.png
new file mode 100644
index 000000000..4c0cd97fa
Binary files /dev/null and b/app/macos/background.png differ
diff --git a/app/entitlements.plist b/app/macos/entitlements.plist
similarity index 100%
rename from app/entitlements.plist
rename to app/macos/entitlements.plist
diff --git a/app/info.plist b/app/macos/info.plist
similarity index 100%
rename from app/info.plist
rename to app/macos/info.plist
diff --git a/app/macos/volume.icns b/app/macos/volume.icns
new file mode 100644
index 000000000..460610c03
Binary files /dev/null and b/app/macos/volume.icns differ
diff --git a/app/src/main/resources/bird.svg b/app/src/main/resources/bird.svg
new file mode 100644
index 000000000..90d69c899
--- /dev/null
+++ b/app/src/main/resources/bird.svg
@@ -0,0 +1,5 @@
+
diff --git a/app/src/main/resources/defaults.txt b/app/src/main/resources/defaults.txt
new file mode 100644
index 000000000..6e3e00f0d
--- /dev/null
+++ b/app/src/main/resources/defaults.txt
@@ -0,0 +1,309 @@
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# DO NOT MAKE CHANGES TO THIS FILE!!!
+
+# These are the default preferences. If you want to modify
+# them directly, use the per-user local version of the file:
+
+# Users -> [username] -> AppData -> Roaming ->
+# Processing -> preferences.txt (on Windows 10)
+
+# ~/Library -> Processing -> preferences.txt (on macOS)
+
+# ~/.config/processing -> preferences.txt (on Linux)
+
+# The exact location of your preferences file can be found at
+# the bottom of the Preferences window inside Processing.
+
+# Because AppData and Application Data may be considered
+# hidden or system folders on Windows, you'll have to ensure
+# that they're visible in order to get at preferences.txt
+
+# You'll have problems running Processing if you incorrectly
+# modify lines in this file. It will probably not start at all.
+
+# AGAIN, DO NOT ALTER THIS FILE! I'M ONLY YELLING BECAUSE I LOVE YOU!
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# If you don't want users to have their sketchbook default to
+# "My Documents/Processing" on Windows and "Documents/Processing" on OS X,
+# set this to another path that will be used by default.
+# Note that this path must exist already otherwise it won't see
+# the sketchbook folder, and will instead assume the sketchbook
+# has gone missing, and that it should instead use the default.
+# In 4.0, the location has changed.
+#sketchbook.path.four=
+
+# Whether or not to show the Welcome screen for 4.0
+# (It's always available under Help → Welcome)
+welcome.four.show = true
+welcome.four.seen = false
+
+# Set 'true' for the default behavior before 4.0, where the
+# main tab must have the same name as the sketch folder
+editor.sync_folder_and_filename = true
+
+# By default, contributions are moved to backup folders when
+# they are removed or replaced. The backups can be found at
+# sketchbook/libraries/old, sketchbook/tools/old, and sketchbook/modes/old
+
+# true to backup contributions when "Remove" button is pressed
+contribution.backup.on_remove = true
+# true to backup contributions when installing a newer version
+contribution.backup.on_install = true
+
+recent.count = 10
+
+# Default to the native (AWT) file selector where possible
+chooser.files.native = true
+# We were shutting this off on macOS because it broke Copy/Paste:
+# https://github.com/processing/processing/issues/1035
+# But removing again for 4.0 alpha 5, because the JFileChooser is awful,
+# and worse on Big Sur, so a bigger problem than the Copy/Paste issue.
+# https://github.com/processing/processing4/issues/77
+#chooser.files.native.macos = false
+
+# set to 'lab' to interpolate theme gradients using L*a*b* color space
+theme.gradient.method = rgb
+
+
+# by default, check the processing server for any updates
+# (please avoid disabling, this also helps us know basic numbers
+# on how many people are using Processing)
+update.check = true
+
+# on windows, automatically associate .pde files with processing.exe
+platform.auto_file_type_associations = true
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# default size for the main window
+editor.window.width.default = 700
+editor.window.height.default = 600
+
+editor.window.width.min = 400
+editor.window.height.min = 500
+# tested as approx 440 on OS X
+editor.window.height.min.macos = 450
+# tested to be 515 on Windows XP, this leaves some room
+editor.window.height.min.windows = 530
+# tested with Raspberry Pi display
+editor.window.height.min.linux = 480
+
+# scaling for the interface (to handle Windows and Linux HiDPI displays)
+editor.zoom = 100%
+# automatically set based on system dpi (only helps on Windows)
+editor.zoom.auto = true
+
+# Use the default monospace font included in lib/fonts.
+# (As of Processing 4 alpha 5, that's Source Code Pro)
+editor.font.family = processing.mono
+editor.font.size = 12
+
+# To reset everyone's default, replaced editor.antialias with editor.smooth
+# for 2.1. Fonts are unusably gross on OS X (and Linux) w/o smoothing and
+# the Oracle JVM, and many longtime users have anti-aliasing turned off.
+editor.smooth = true
+
+# blink the caret by default
+editor.caret.blink = true
+# change to true to use a block (instead of a bar)
+editor.caret.block = false
+
+# enable ctrl-ins, shift-ins, shift-delete for cut/copy/paste
+# on windows and linux, but disable on the mac
+editor.keys.alternative_cut_copy_paste = true
+editor.keys.alternative_cut_copy_paste.macos = false
+
+# true if shift-backspace sends the delete character,
+# false if shift-backspace just means backspace
+editor.keys.shift_backspace_is_delete = false
+
+# home and end keys should only travel to the start/end of the current line
+editor.keys.home_and_end_travel_far = false
+# home and end keys move to the first/last non-whitespace character,
+# and move to the actual start/end when pressed a second time.
+# Only works if editor.keys.home_and_end_travel_far is false.
+editor.keys.home_and_end_travel_smart = true
+# The OS X HI Guidelines say that home/end are relative to the document,
+# but that drives some people nuts. This pref enables/disables it.
+editor.keys.home_and_end_travel_far.macos = true
+
+# Enable/disable support for complex scripts. Used for Japanese and others,
+# but disable when not needed, otherwise basic Western European chars break.
+editor.input_method_support = false
+
+# convert tabs to spaces? how many spaces?
+editor.tabs.expand = true
+editor.tabs.size = 2
+
+# Set to true to automatically close [ { ( " and '
+editor.completion.auto_close = false
+
+# automatically indent each line
+editor.indent = true
+
+# Whether to check files to see if they've been modified externally
+editor.watcher = true
+# Set true to enable debugging, since this is quirky on others' machines
+editor.watcher.debug = false
+# The window of time (in milliseconds) in which a change won't be counted
+editor.watcher.window = 1500
+
+# Format and search engine to use for online queries
+search.format = https://google.com/search?q=%s
+
+# font choice and size for the console
+console.font.size = 12
+
+# number of lines to show by default
+console.lines = 4
+
+# Number of blank lines to advance/clear console.
+# Note that those lines are also printed in the terminal when
+# Processing is executed there.
+# Setting to 0 stops this behavior.
+console.head_padding = 10
+
+# Set to false to disable automatically clearing the console
+# each time 'run' is hit
+# If one sets it to false, one may also want to set 'console.head_padding'
+# to a positive number to separate outputs from different runs.
+console.auto_clear = true
+
+# number of days of history to keep around before cleaning
+# setting to 0 will never clean files
+console.temp.days = 7
+
+# set the maximum number of lines remembered by the console
+# the default is 500, lengthen at your own peril
+console.scrollback.lines = 500
+console.scrollback.chars = 40000
+
+# Any additional Java options when running.
+# If you change this and can't run things, it's your own durn fault.
+run.options =
+
+# settings for the -XmsNNNm and -XmxNNNm command line option
+run.options.memory = false
+run.options.memory.initial = 64
+run.options.memory.maximum = 512
+
+# Index of the display to use for running sketches (starts at 1).
+# Kept this 1-indexed because older vesions of Processing were setting
+# the preference even before it was being used.
+# -1 means the default display, 0 means all displays
+run.display = -1
+
+# set internally because it comes from the system
+#run.window.bgcolor=
+
+# set to false to open a new untitled window when closing the last window
+# (otherwise, the environment will quit)
+# default to the relative norm for the different platforms,
+# but the setting can be changed in the prefs dialog anyway
+#sketchbook.closing_last_window_quits = true
+#sketchbook.closing_last_window_quits.macos = false
+
+editor.untitled.prefix=sketch_
+# The old (pre-1.0, back for 2.0) style for default sketch name.
+# If you change this, be careful that this will work with your language
+# settings. For instance, MMMdd won't work on Korean-language systems
+# because it'll insert non-ASCII characters and break the environment.
+# https://github.com/processing/processing/issues/322
+editor.untitled.suffix=yyMMdd
+
+# replace underscores in .pde file names with spaces
+sketch.name.replace_underscore = true
+
+# what to use for generating sketch names (change in the prefs window)
+#sketch.name.approach =
+
+# number of days of build history and other temp files to keep around
+# these are kept around for debugging purposes, and in case code is lost
+temp.days = 7
+
+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+# whether or not to export as full screen (present) mode
+export.application.fullscreen = false
+
+# whether to show the stop button when exporting to application
+export.application.stop = true
+
+# embed Java by default for lower likelihood of problems
+export.application.embed_java = true
+
+# set to false to no longer delete application folders before export
+# (removed from the Preferences windows in 4.0 beta 9)
+export.delete_target_folder = true
+
+# may be useful when attempting to debug the preprocessor
+preproc.save_build_files=false
+
+# allows various preprocessor features to be toggled
+# in case they are causing problems
+
+# preprocessor: pde.g
+preproc.color_datatype = true
+preproc.web_colors = true
+preproc.enhanced_casting = true
+
+# preprocessor: PdeEmitter.java
+preproc.substitute_floats = true
+
+# PdePreproc.java
+# writes out the parse tree as parseTree.xml, which can be usefully
+# viewed in (at least) Mozilla or IE. useful when debugging the preprocessor.
+preproc.output_parse_tree = false
+
+# set to the program to be used for opening HTML files, folders, etc.
+#launcher.linux = xdg-open
+
+# FULL SCREEN (PRESENT MODE)
+run.present.bgcolor = #666666
+run.present.stop.color = #cccccc
+
+# PROXIES
+# Set a proxy server for folks that require it. This will allow the update
+# checker and the contrib manager to run properly in those environments.
+# This changed from proxy.host and proxy.port to proxy.http.host and
+# proxy.http.port in 3.0a8. In addition, https and socks were added.
+proxy.http.host=
+proxy.http.port=
+proxy.https.host=
+proxy.https.port=
+proxy.socks.host=
+proxy.socks.port=
+# Example of usage (replace 'http' with 'https' or 'socks' as needed)
+#proxy.http.host=proxy.example.com
+#proxy.http.port=8080
+# Whether to use the system proxy by default
+proxy.system=true
+
+# PDE X
+pdex.errorCheckEnabled = true
+pdex.warningsEnabled = true
+pdex.writeErrorLogs = false
+
+pdex.autoSave.autoSaveEnabled = false
+pdex.autoSaveInterval = 5
+pdex.autoSave.promptDisplay = true
+pdex.autoSave.autoSaveByDefault = true
+
+# Enable auto-completion when hitting ctrl-space
+pdex.completion = false
+# Setting this true will show completions whenever available, not just after ctrl-space
+pdex.completion.trigger = false
+# Suggest libraries to import when a class is undefined/unavailable
+pdex.suggest.imports = true
+# Set to false to disable ctrl/cmd-click jump to definition
+pdex.inspectMode.hotkey = true
diff --git a/app/src/main/resources/logo.svg b/app/src/main/resources/logo.svg
new file mode 100644
index 000000000..aa04fcb29
--- /dev/null
+++ b/app/src/main/resources/logo.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java
index 27b194a0a..07e23d36b 100644
--- a/app/src/processing/app/Base.java
+++ b/app/src/processing/app/Base.java
@@ -124,6 +124,7 @@ public class Base {
static public void main(final String[] args) {
+ Messages.log("Starting Processing version" + VERSION_NAME + " revision "+ REVISION);
EventQueue.invokeLater(() -> {
try {
createAndShowGUI(args);
@@ -563,14 +564,12 @@ public class Base {
cl.downloadAvailableList(this, new ContribProgress(null));
long t9 = System.currentTimeMillis();
- if (DEBUG) {
- System.out.println("core modes: " + (t2b-t2) +
- ", contrib modes: " + (t2c-t2b) +
- ", contrib ex: " + (t2c-t2b));
- System.out.println("base took " + (t2-t1) + " " + (t3-t2) + " " + (t4-t3) +
+ Messages.log("core modes: " + (t2b-t2) +
+ ", contrib modes: " + (t2c-t2b) +
+ ", contrib ex: " + (t2c-t2b));
+ Messages.log("base took " + (t2-t1) + " " + (t3-t2) + " " + (t4-t3) +
" " + (t5-t4) + " t6-t5=" + (t6-t5) + " " + (t7-t6) +
" handleNew=" + (t8-t7) + " " + (t9-t8) + " ms");
- }
}
@@ -1366,10 +1365,10 @@ public class Base {
* @param schemeUri the full URI, including pde://
*/
public Editor handleScheme(String schemeUri) {
-// var result = Schema.handleSchema(schemeUri, this);
-// if (result != null) {
-// return result;
-// }
+ var result = Schema.handleSchema(schemeUri, this);
+ if (result != null) {
+ return result;
+ }
String location = schemeUri.substring(6);
if (location.length() > 0) {
diff --git a/app/src/processing/app/Library.java b/app/src/processing/app/Library.java
index dc8269eeb..f23354284 100644
--- a/app/src/processing/app/Library.java
+++ b/app/src/processing/app/Library.java
@@ -1,6 +1,5 @@
package processing.app;
-import java.awt.EventQueue;
import java.io.*;
import java.util.*;
import java.util.zip.ZipFile;
@@ -330,6 +329,7 @@ public class Library extends LocalContribution {
* imports to specific libraries.
* @param importToLibraryTable mapping from package names to Library objects
*/
+ static boolean instructed = false;
// public void addPackageList(HashMap importToLibraryTable) {
public void addPackageList(Map> importToLibraryTable) {
// PApplet.println(packages);
@@ -342,18 +342,20 @@ public class Library extends LocalContribution {
libraries = new ArrayList<>();
importToLibraryTable.put(pkg, libraries);
} else {
- if (Base.DEBUG) {
- System.err.println("The library found in");
- System.err.println(getPath());
- System.err.println("conflicts with");
+ if(!instructed) {
+ instructed = true;
+ Messages.err("The library found in");
+ Messages.err(getPath());
+ Messages.err("conflicts with");
for (Library library : libraries) {
- System.err.println(library.getPath());
+ Messages.err(library.getPath());
}
- System.err.println("which already define(s) the package " + pkg);
- System.err.println("If you have a line in your sketch that reads");
- System.err.println("import " + pkg + ".*;");
- System.err.println("Then you'll need to first remove one of those libraries.");
- System.err.println();
+ Messages.err("which already define(s) the package " + pkg);
+ Messages.err("If you have a line in your sketch that reads");
+ Messages.err("import " + pkg + ".*;");
+ Messages.err("Then you'll need to first remove one of those libraries.");
+ }else{
+ Messages.err("\tPackage ("+pkg+")\t conflict found in [" + name + "] with libraries: " + libraries.stream().map(Library::getName).reduce((a, b) -> a + ", " + b).orElse(""));
}
}
libraries.add(this);
diff --git a/app/src/processing/app/Messages.kt b/app/src/processing/app/Messages.kt
new file mode 100644
index 000000000..cae54e6e9
--- /dev/null
+++ b/app/src/processing/app/Messages.kt
@@ -0,0 +1,282 @@
+/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /*
+ Part of the Processing project - http://processing.org
+
+ Copyright (c) 2015 The Processing Foundation
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2, as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+package processing.app
+
+import processing.app.ui.Toolkit
+import java.awt.EventQueue
+import java.awt.Frame
+import java.io.PrintWriter
+import java.io.StringWriter
+import javax.swing.JFrame
+import javax.swing.JOptionPane
+
+class Messages {
+ companion object {
+ /**
+ * "No cookie for you" type messages. Nothing fatal or all that
+ * much of a bummer, but something to notify the user about.
+ */
+ @JvmStatic
+ fun showMessage(title: String = "Message", message: String) {
+ if (Base.isCommandLine()) {
+ println("$title: $message")
+ } else {
+ JOptionPane.showMessageDialog(
+ Frame(), message, title,
+ JOptionPane.INFORMATION_MESSAGE
+ )
+ }
+ }
+
+
+ /**
+ * Non-fatal error message with optional stack trace side dish.
+ */
+ /**
+ * Non-fatal error message.
+ */
+ @JvmStatic
+ @JvmOverloads
+ fun showWarning(title: String = "Warning", message: String, e: Throwable? = null) {
+ if (Base.isCommandLine()) {
+ println("$title: $message")
+ } else {
+ JOptionPane.showMessageDialog(
+ Frame(), message, title,
+ JOptionPane.WARNING_MESSAGE
+ )
+ }
+ e?.printStackTrace()
+ }
+
+ /**
+ * Non-fatal error message with two levels of formatting.
+ * Unlike the others, this is non-blocking and will run later on the EDT.
+ */
+ @JvmStatic
+ fun showWarningTiered(
+ title: String,
+ primary: String, secondary: String,
+ e: Throwable?
+ ) {
+ if (Base.isCommandLine()) {
+ // TODO All these messages need to be handled differently for
+ // proper parsing on the command line. Many have \n in them.
+ println("$title: $primary\n$secondary")
+ } else {
+ EventQueue.invokeLater {
+ JOptionPane.showMessageDialog(
+ JFrame(),
+ Toolkit.formatMessage(primary, secondary),
+ title, JOptionPane.WARNING_MESSAGE
+ )
+ }
+ }
+ e?.printStackTrace()
+ }
+
+
+ /**
+ * Show an error message that's actually fatal to the program.
+ * This is an error that can't be recovered. Use showWarning()
+ * for errors that allow P5 to continue running.
+ */
+ @JvmStatic
+ fun showError(title: String = "Error", message: String, e: Throwable?) {
+ if (Base.isCommandLine()) {
+ System.err.println("$title: $message")
+ } else {
+ JOptionPane.showMessageDialog(
+ Frame(), message, title,
+ JOptionPane.ERROR_MESSAGE
+ )
+ }
+ e?.printStackTrace()
+ System.exit(1)
+ }
+
+
+ /**
+ * Warning window that includes the stack trace.
+ */
+ @JvmStatic
+ fun showTrace(
+ title: String?,
+ message: String,
+ t: Throwable?,
+ fatal: Boolean
+ ) {
+ val title = title ?: if (fatal) "Error" else "Warning"
+
+ if (Base.isCommandLine()) {
+ System.err.println("$title: $message")
+ t?.printStackTrace()
+ } else {
+ val sw = StringWriter()
+ t!!.printStackTrace(PrintWriter(sw))
+
+ JOptionPane.showMessageDialog(
+ Frame(), // first clears to the next line
+ // second is a shorter height blank space before the trace
+ Toolkit.formatMessage("$message $sw"),
+ title,
+ if (fatal) JOptionPane.ERROR_MESSAGE else JOptionPane.WARNING_MESSAGE
+ )
+
+ if (fatal) {
+ System.exit(1)
+ }
+ }
+ }
+
+ @JvmStatic
+ fun showYesNoQuestion(
+ editor: Frame?, title: String?,
+ primary: String?, secondary: String?
+ ): Int {
+ if (!Platform.isMacOS()) {
+ return JOptionPane.showConfirmDialog(
+ editor,
+ Toolkit.formatMessage(primary, secondary), //"" +
+ //"" + primary + "" +
+ //" " + secondary,
+ title,
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE
+ )
+ } else {
+ val result = showCustomQuestion(
+ editor, title, primary, secondary,
+ 0, "Yes", "No"
+ )
+ return if (result == 0) {
+ JOptionPane.YES_OPTION
+ } else if (result == 1) {
+ JOptionPane.NO_OPTION
+ } else {
+ JOptionPane.CLOSED_OPTION
+ }
+ }
+ }
+
+
+ /**
+ * @param highlight A valid array index for options[] that specifies the
+ * default (i.e. safe) choice.
+ * @return The (zero-based) index of the selected value, -1 otherwise.
+ */
+ @JvmStatic
+ fun showCustomQuestion(
+ editor: Frame?, title: String?,
+ primary: String?, secondary: String?,
+ highlight: Int, vararg options: String
+ ): Int {
+ val result: Any
+ if (!Platform.isMacOS()) {
+ return JOptionPane.showOptionDialog(
+ editor,
+ Toolkit.formatMessage(primary, secondary), title,
+ JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null,
+ options, options[highlight]
+ )
+ } else {
+ val pane =
+ JOptionPane(
+ Toolkit.formatMessage(primary, secondary),
+ JOptionPane.QUESTION_MESSAGE
+ )
+
+ pane.options = options
+
+ // highlight the safest option ala apple hig
+ pane.initialValue = options[highlight]
+
+ val dialog = pane.createDialog(editor, null)
+ dialog.isVisible = true
+
+ result = pane.value
+ }
+ for (i in options.indices) {
+ if (result != null && result == options[i]) return i
+ }
+ return -1
+ }
+
+
+ // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ @JvmStatic
+ @Deprecated("Use log() instead")
+ fun log(from: Any, message: String) {
+ if (Base.DEBUG) {
+ val callingClass = Throwable()
+ .stackTrace[2]
+ .className
+ .formatClassName()
+ println("$callingClass: $message")
+ }
+ }
+
+ @JvmStatic
+ fun log(message: String?) {
+ if (Base.DEBUG) {
+ val callingClass = Throwable()
+ .stackTrace[2]
+ .className
+ .formatClassName()
+ println("$callingClass$message")
+ }
+ }
+
+ @JvmStatic
+ fun logf(message: String?, vararg args: Any?) {
+ if (Base.DEBUG) {
+ val callingClass = Throwable()
+ .stackTrace[2]
+ .className
+ .formatClassName()
+ System.out.printf("$callingClass$message", *args)
+ }
+ }
+
+ @JvmStatic
+ @JvmOverloads
+ fun err(message: String?, e: Throwable? = null) {
+ if (Base.DEBUG) {
+ if (message != null) {
+ val callingClass = Throwable()
+ .stackTrace[4]
+ .className
+ .formatClassName()
+ System.err.println("$callingClass$message")
+ }
+ e?.printStackTrace()
+ }
+ }
+ }
+}
+
+// Helper functions to give the base classes a color
+fun String.formatClassName() = this
+ .replace("processing.", "")
+ .replace(".", "/")
+ .padEnd(40)
+ .colorizePathParts()
+fun String.colorizePathParts() = split("/").joinToString("/") { part ->
+ "\u001B[${31 + (part.hashCode() and 0x7).rem(6)}m$part\u001B[0m"
+}
\ No newline at end of file
diff --git a/app/src/processing/app/Platform.java b/app/src/processing/app/Platform.java
index 8d4d28ddc..2af96bfd1 100644
--- a/app/src/processing/app/Platform.java
+++ b/app/src/processing/app/Platform.java
@@ -577,18 +577,25 @@ public class Platform {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ /**
+ * These methods were refactored to use the Preferences system instead of
+ * actual environment variables, since modifying environment variables at runtime
+ * proved problematic. This approach provides similar functionality
+ * while being compatible with various platforms and execution environments.
+ *
+ * This abstraction maintains a consistent API for environment-like variable storage
+ * while implementing it differently under the hood to work around runtime limitations.
+ */
static public void setenv(String variable, String value) {
- inst.setenv(variable, value);
+ Preferences.set(variable, value);
}
-
static public String getenv(String variable) {
- return inst.getenv(variable);
+ return Preferences.get(variable);
}
-
static public int unsetenv(String variable) {
- return inst.unsetenv(variable);
+ throw new RuntimeException("unsetenv() not yet implemented");
}
}
diff --git a/app/src/processing/app/contrib/ui/Preferences.kt b/app/src/processing/app/Preferences.kt
similarity index 69%
rename from app/src/processing/app/contrib/ui/Preferences.kt
rename to app/src/processing/app/Preferences.kt
index b344e1cb7..c5645c9bb 100644
--- a/app/src/processing/app/contrib/ui/Preferences.kt
+++ b/app/src/processing/app/Preferences.kt
@@ -1,11 +1,10 @@
-package processing.app.contrib.ui
+package processing.app
import androidx.compose.runtime.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
-import processing.app.Base
-import processing.app.Platform
import java.io.File
+import java.io.InputStream
import java.nio.file.*
import java.util.Properties
@@ -13,10 +12,13 @@ import java.util.Properties
const val PREFERENCES_FILE_NAME = "preferences.txt"
const val DEFAULTS_FILE_NAME = "defaults.txt"
+fun PlatformStart(){
+ Platform.inst ?: Platform.init()
+}
@Composable
fun loadPreferences(): Properties{
- Platform.init()
+ PlatformStart()
val settingsFolder = Platform.getSettingsFolder()
val preferencesFile = settingsFolder.resolve(PREFERENCES_FILE_NAME)
@@ -24,20 +26,12 @@ fun loadPreferences(): Properties{
if(!preferencesFile.exists()){
preferencesFile.createNewFile()
}
- val watched = watchFile(preferencesFile)
+ watchFile(preferencesFile)
- val preferences by remember {
- mutableStateOf(Properties())
+ return Properties().apply {
+ load(ClassLoader.getSystemResourceAsStream(DEFAULTS_FILE_NAME) ?: InputStream.nullInputStream())
+ load(preferencesFile.inputStream())
}
-
- LaunchedEffect(watched){
- val defaults = Base::class.java.getResourceAsStream("/lib/${DEFAULTS_FILE_NAME}") ?: return@LaunchedEffect
-
- preferences.load(defaults)
- preferences.load(preferencesFile.inputStream())
- }
-
- return preferences
}
@Composable
@@ -68,4 +62,12 @@ fun watchFile(file: File): Any? {
}
}
return event
+}
+val LocalPreferences = compositionLocalOf { error("No preferences provided") }
+@Composable
+fun PreferencesProvider(content: @Composable () -> Unit){
+ val preferences = loadPreferences()
+ CompositionLocalProvider(LocalPreferences provides preferences){
+ content()
+ }
}
\ No newline at end of file
diff --git a/app/src/processing/app/Schema.kt b/app/src/processing/app/Schema.kt
index 8ea12e7f6..3a269f7d3 100644
--- a/app/src/processing/app/Schema.kt
+++ b/app/src/processing/app/Schema.kt
@@ -53,7 +53,11 @@ class Schema {
private fun handleSketchUrl(uri: URI): Editor?{
val url = File(uri.path.replace("/url/", ""))
- val tempSketchFolder = File(Base.untitledFolder, url.nameWithoutExtension)
+ val rand = (1..6)
+ .map { (('a'..'z') + ('A'..'Z')).random() }
+ .joinToString("")
+
+ val tempSketchFolder = File(File(Base.untitledFolder, rand), url.nameWithoutExtension)
tempSketchFolder.mkdirs()
val tempSketchFile = File(tempSketchFolder, "${tempSketchFolder.name}.pde")
@@ -71,7 +75,7 @@ class Schema {
?.map { it.split("=") }
?.associate {
URLDecoder.decode(it[0], StandardCharsets.UTF_8) to
- URLDecoder.decode(it[1], StandardCharsets.UTF_8)
+ URLDecoder.decode(it[1], StandardCharsets.UTF_8)
}
?: emptyMap()
options["data"]?.let{ data ->
@@ -81,7 +85,7 @@ class Schema {
downloadFiles(uri, code, File(sketchFolder, "code"))
}
options["pde"]?.let{ pde ->
- downloadFiles(uri, pde, sketchFolder)
+ downloadFiles(uri, pde, sketchFolder, "pde")
}
options["mode"]?.let{ mode ->
val modeFile = File(sketchFolder, "sketch.properties")
@@ -89,7 +93,7 @@ class Schema {
}
}
- private fun downloadFiles(uri: URI, urlList: String, targetFolder: File){
+ private fun downloadFiles(uri: URI, urlList: String, targetFolder: File, extension: String = ""){
Thread{
targetFolder.mkdirs()
@@ -101,37 +105,31 @@ class Schema {
val files = urlList.split(",")
files.filter { it.isNotBlank() }
- .map{ it.split(":", limit = 2) }
- .map{ segments ->
- if(segments.size == 2){
- if(segments[0].isBlank()){
- return@map listOf(null, segments[1])
- }
- return@map segments
- }
- return@map listOf(null, segments[0])
+ .map {
+ if (it.contains(":")) it
+ else "$it:$it"
}
+ .map{ it.split(":", limit = 2) }
.forEach { (name, content) ->
+ var target = File(targetFolder, name)
+ if(extension.isNotBlank() && target.extension != extension){
+ target = File(targetFolder, "$name.$extension")
+ }
try{
- // Try to decode the content as base64
val file = Base64.getDecoder().decode(content)
- if(name == null){
+ if(name.isBlank()){
Messages.err("Base64 files needs to start with a file name followed by a colon")
return@forEach
}
- File(targetFolder, name).writeBytes(file)
+ target.writeBytes(file)
}catch(_: IllegalArgumentException){
- // Assume it's a URL and download it
- var url = URI.create(content)
- if(url.host == null){
- url = URI.create("https://$base/$content")
- }
- if(url.scheme == null){
- url = URI.create("https://$content")
- }
-
- val target = File(targetFolder, name ?: url.path.split("/").last())
- url.toURL().openStream().use { input ->
+ val url = URL(when{
+ content.startsWith("https://") -> content
+ content.startsWith("http://") -> content.replace("http://", "https://")
+ URL("https://$content").path.isNotBlank() -> "https://$content"
+ else -> "https://$base/$content"
+ })
+ url.openStream().use { input ->
target.outputStream().use { output ->
input.copyTo(output)
}
@@ -148,7 +146,7 @@ class Schema {
?.map { it.split("=") }
?.associate {
URLDecoder.decode(it[0], StandardCharsets.UTF_8) to
- URLDecoder.decode(it[1], StandardCharsets.UTF_8)
+ URLDecoder.decode(it[1], StandardCharsets.UTF_8)
}
?: emptyMap()
for ((key, value) in options){
diff --git a/app/src/processing/app/UpdateCheck.java b/app/src/processing/app/UpdateCheck.java
index 40ffe24c0..1bfa29688 100644
--- a/app/src/processing/app/UpdateCheck.java
+++ b/app/src/processing/app/UpdateCheck.java
@@ -31,6 +31,7 @@ import java.util.Random;
import javax.swing.JOptionPane;
+import processing.app.ui.WelcomeToBeta;
import processing.core.PApplet;
@@ -116,7 +117,7 @@ public class UpdateCheck {
long now = System.currentTimeMillis();
if (lastString != null) {
long when = Long.parseLong(lastString);
- if (now - when < ONE_DAY) {
+ if (now - when < ONE_DAY && !Base.DEBUG) {
// don't annoy the shit outta people
return;
}
@@ -134,6 +135,9 @@ public class UpdateCheck {
// offerToUpdateContributions = !promptToVisitDownloadPage();
promptToVisitDownloadPage();
}
+ if(latest < Base.getRevision()){
+ WelcomeToBeta.showWelcomeToBeta();
+ }
/*
if (offerToUpdateContributions) {
diff --git a/app/src/processing/app/contrib/ContributionListing.java b/app/src/processing/app/contrib/ContributionListing.java
index 0c9945526..08b8d307c 100644
--- a/app/src/processing/app/contrib/ContributionListing.java
+++ b/app/src/processing/app/contrib/ContributionListing.java
@@ -30,6 +30,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
import processing.app.Base;
+import processing.app.Messages;
import processing.app.UpdateCheck;
import processing.app.Util;
import processing.core.PApplet;
@@ -228,6 +229,7 @@ public class ContributionListing {
public void downloadAvailableList(final Base base,
final ContribProgress progress) {
// TODO: replace with SwingWorker [jv]
+ Messages.log("Downloading contributions list from " + LISTING_URL);
new Thread(() -> {
downloadingLock.lock();
diff --git a/app/src/processing/app/contrib/ui/ContributionManager.kt b/app/src/processing/app/contrib/ui/ContributionManager.kt
index a057e76df..2ad472159 100644
--- a/app/src/processing/app/contrib/ui/ContributionManager.kt
+++ b/app/src/processing/app/contrib/ui/ContributionManager.kt
@@ -12,8 +12,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.awt.ComposePanel
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.input.key.Key
-import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.pointer.PointerIcon
import androidx.compose.ui.input.pointer.pointerHoverIcon
import androidx.compose.ui.text.font.FontWeight
@@ -25,6 +23,7 @@ import com.charleskorn.kaml.Yaml
import com.charleskorn.kaml.YamlConfiguration
import kotlinx.serialization.Serializable
import processing.app.Platform
+import processing.app.loadPreferences
import java.net.URL
import java.util.*
import javax.swing.JFrame
@@ -33,16 +32,7 @@ import kotlin.io.path.*
fun main() = application {
- val active = remember { mutableStateOf(true) }
- if(!active.value){
- Window(onCloseRequest = ::exitApplication) {
-
- }
- return@application
- }
- Window(
- onCloseRequest = { active.value = false },
- ) {
+ Window(onCloseRequest = ::exitApplication) {
contributionsManager()
}
}
diff --git a/app/src/processing/app/exec/StreamPump.java b/app/src/processing/app/exec/StreamPump.java
index 130a74afd..29786102c 100644
--- a/app/src/processing/app/exec/StreamPump.java
+++ b/app/src/processing/app/exec/StreamPump.java
@@ -13,6 +13,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import processing.app.Base;
+import processing.app.Messages;
/**
@@ -79,8 +80,7 @@ public class StreamPump implements Runnable {
}
} catch (final IOException e) {
if (Base.DEBUG) {
- System.err.println("StreamPump: " + name);
- e.printStackTrace(System.err);
+ Messages.err("StreamPump: " + name, e);
// removing for 0190, but need a better way to handle these
throw new RuntimeException("Inside " + this + " for " + name, e);
}
diff --git a/app/src/processing/app/platform/DefaultPlatform.java b/app/src/processing/app/platform/DefaultPlatform.java
index c2b858093..18997755b 100644
--- a/app/src/processing/app/platform/DefaultPlatform.java
+++ b/app/src/processing/app/platform/DefaultPlatform.java
@@ -257,31 +257,31 @@ public class DefaultPlatform {
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- public interface CLibrary extends Library {
- CLibrary INSTANCE = Native.load("c", CLibrary.class);
- int setenv(String name, String value, int overwrite);
- String getenv(String name);
- int unsetenv(String name);
- int putenv(String string);
- }
-
-
- public void setenv(String variable, String value) {
- CLibrary clib = CLibrary.INSTANCE;
- clib.setenv(variable, value, 1);
- }
-
-
- public String getenv(String variable) {
- CLibrary clib = CLibrary.INSTANCE;
- return clib.getenv(variable);
- }
-
-
- public int unsetenv(String variable) {
- CLibrary clib = CLibrary.INSTANCE;
- return clib.unsetenv(variable);
- }
+// public interface CLibrary extends Library {
+// CLibrary INSTANCE = Native.load("c", CLibrary.class);
+// int setenv(String name, String value, int overwrite);
+// String getenv(String name);
+// int unsetenv(String name);
+// int putenv(String string);
+// }
+//
+//
+// public void setenv(String variable, String value) {
+// CLibrary clib = CLibrary.INSTANCE;
+// clib.setenv(variable, value, 1);
+// }
+//
+//
+// public String getenv(String variable) {
+// CLibrary clib = CLibrary.INSTANCE;
+// return clib.getenv(variable);
+// }
+//
+//
+// public int unsetenv(String variable) {
+// CLibrary clib = CLibrary.INSTANCE;
+// return clib.unsetenv(variable);
+// }
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
diff --git a/app/src/processing/app/platform/LinuxPlatform.java b/app/src/processing/app/platform/LinuxPlatform.java
index 15a8e3d5a..cda629192 100644
--- a/app/src/processing/app/platform/LinuxPlatform.java
+++ b/app/src/processing/app/platform/LinuxPlatform.java
@@ -33,7 +33,8 @@ import processing.core.PApplet;
public class LinuxPlatform extends DefaultPlatform {
- String homeDir;
+ // Switched to use ~ as the home directory for compatibility with snap
+ String homeDir = "~";
public void initBase(Base base) {
@@ -98,7 +99,7 @@ public class LinuxPlatform extends DefaultPlatform {
File configHome = null;
// Check to see if the user has set a different location for their config
- String configHomeEnv = getenv("XDG_CONFIG_HOME");
+ String configHomeEnv = System.getenv("XDG_CONFIG_HOME");
if (configHomeEnv != null && !configHomeEnv.isBlank()) {
configHome = new File(configHomeEnv);
if (!configHome.exists()) {
diff --git a/app/src/processing/app/syntax/im/InputMethodSupport.java b/app/src/processing/app/syntax/im/InputMethodSupport.java
index 391b96b97..e3323fa11 100644
--- a/app/src/processing/app/syntax/im/InputMethodSupport.java
+++ b/app/src/processing/app/syntax/im/InputMethodSupport.java
@@ -79,9 +79,7 @@ public class InputMethodSupport implements InputMethodRequests, InputMethodListe
@Override
public Rectangle getTextLocation(TextHitInfo offset) {
- if (Base.DEBUG) {
- Messages.log("#Called getTextLocation:" + offset);
- }
+ Messages.log("#Called getTextLocation:" + offset);
int line = textArea.getCaretLine();
int offsetX = textArea.getCaretPosition() - textArea.getLineStartOffset(line);
// '+1' mean textArea.lineToY(line) + textArea.getPainter().getFontMetrics().getHeight().
@@ -238,9 +236,7 @@ public class InputMethodSupport implements InputMethodRequests, InputMethodListe
RenderingHints.VALUE_TEXT_ANTIALIAS_ON :
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
FontRenderContext frc = g2d.getFontRenderContext();
- if (Base.DEBUG) {
- Messages.log("debug: FontRenderContext is Antialiased = " + frc.getAntiAliasingHint());
- }
+ Messages.log("debug: FontRenderContext is Antialiased = " + frc.getAntiAliasingHint());
return new TextLayout(composedTextString.getIterator(), frc);
}
diff --git a/app/src/processing/app/ui/EditorConsole.java b/app/src/processing/app/ui/EditorConsole.java
index 14be32d68..c8c40ee48 100644
--- a/app/src/processing/app/ui/EditorConsole.java
+++ b/app/src/processing/app/ui/EditorConsole.java
@@ -276,7 +276,9 @@ public class EditorConsole extends JScrollPane {
// components, causing deadlock. Updates are buffered to the console and
// displayed at regular intervals on Swing's event-dispatching thread.
// (patch by David Mellis)
- consoleDoc.appendString(what, err ? errStyle : stdStyle);
+ // Remove ANSI escape codes from the text before adding it to the console
+ String clean = what.replaceAll("\u001B\\[[0-9;]*m", "");
+ consoleDoc.appendString(clean, err ? errStyle : stdStyle);
}
}
diff --git a/app/src/processing/app/ui/WelcomeToBeta.kt b/app/src/processing/app/ui/WelcomeToBeta.kt
new file mode 100644
index 000000000..d7492fa6a
--- /dev/null
+++ b/app/src/processing/app/ui/WelcomeToBeta.kt
@@ -0,0 +1,211 @@
+package processing.app.ui
+
+import androidx.compose.animation.animateColorAsState
+import androidx.compose.animation.core.animateFloatAsState
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.*
+import androidx.compose.material.MaterialTheme
+import androidx.compose.material.MaterialTheme.colors
+import androidx.compose.material.MaterialTheme.typography
+import androidx.compose.material.Surface
+import androidx.compose.material.Text
+import androidx.compose.runtime.*
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.ExperimentalComposeUiApi
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.awt.ComposePanel
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.input.pointer.PointerEventType
+import androidx.compose.ui.input.pointer.PointerIcon
+import androidx.compose.ui.input.pointer.onPointerEvent
+import androidx.compose.ui.input.pointer.pointerHoverIcon
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.DpSize
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.compose.ui.window.Window
+import androidx.compose.ui.window.WindowPosition
+import androidx.compose.ui.window.application
+import androidx.compose.ui.window.rememberWindowState
+import com.formdev.flatlaf.util.SystemInfo
+import com.mikepenz.markdown.compose.Markdown
+import com.mikepenz.markdown.m2.markdownColor
+import com.mikepenz.markdown.m2.markdownTypography
+import com.mikepenz.markdown.model.MarkdownColors
+import com.mikepenz.markdown.model.MarkdownTypography
+import processing.app.Base.getRevision
+import processing.app.Base.getVersionName
+import processing.app.ui.theme.LocalLocale
+import processing.app.ui.theme.LocalTheme
+import processing.app.ui.theme.Locale
+import processing.app.ui.theme.ProcessingTheme
+import java.awt.Cursor
+import java.awt.Dimension
+import java.awt.event.KeyAdapter
+import java.awt.event.KeyEvent
+import java.io.InputStream
+import java.util.Properties
+import javax.swing.JFrame
+import javax.swing.SwingUtilities
+
+
+class WelcomeToBeta {
+ companion object{
+ val windowSize = Dimension(400, 200)
+ val windowTitle = Locale()["beta.window.title"]
+
+ @JvmStatic
+ fun showWelcomeToBeta() {
+ val mac = SystemInfo.isMacFullWindowContentSupported
+ SwingUtilities.invokeLater {
+ JFrame(windowTitle).apply {
+ val close = { dispose() }
+ rootPane.putClientProperty("apple.awt.transparentTitleBar", mac)
+ rootPane.putClientProperty("apple.awt.fullWindowContent", mac)
+ defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE
+ contentPane.add(ComposePanel().apply {
+ size = windowSize
+ setContent {
+ ProcessingTheme {
+ Box(modifier = Modifier.padding(top = if (mac) 22.dp else 0.dp)) {
+ welcomeToBeta(close)
+ }
+ }
+ }
+ })
+ pack()
+ background = java.awt.Color.white
+ setLocationRelativeTo(null)
+ addKeyListener(object : KeyAdapter() {
+ override fun keyPressed(e: KeyEvent) {
+ if (e.keyCode == KeyEvent.VK_ESCAPE) close()
+ }
+ })
+ isResizable = false
+ isVisible = true
+ requestFocus()
+ }
+ }
+ }
+
+ @Composable
+ fun welcomeToBeta(close: () -> Unit = {}) {
+ Row(
+ modifier = Modifier
+ .padding(20.dp, 10.dp)
+ .size(windowSize.width.dp, windowSize.height.dp),
+ horizontalArrangement = Arrangement
+ .spacedBy(20.dp)
+ ){
+ val locale = LocalLocale.current
+ Image(
+ painter = painterResource("bird.svg"),
+ contentDescription = locale["beta.logo"],
+ modifier = Modifier
+ .align(Alignment.CenterVertically)
+ .size(100.dp, 100.dp)
+ .offset(0.dp, (-25).dp)
+ )
+ Column(
+ modifier = Modifier
+ .fillMaxHeight(),
+ verticalArrangement = Arrangement
+ .spacedBy(
+ 10.dp,
+ alignment = Alignment.CenterVertically
+ )
+ ) {
+ Text(
+ text = locale["beta.title"],
+ style = typography.subtitle1,
+ )
+ val text = locale["beta.message"]
+ .replace('$' + "version", getVersionName())
+ .replace('$' + "revision", getRevision().toString())
+ Markdown(
+ text,
+ colors = markdownColor(),
+ typography = markdownTypography(text = typography.body1, link = typography.body1.copy(color = colors.primary)),
+ modifier = Modifier.background(Color.Transparent).padding(bottom = 10.dp)
+ )
+ Row {
+ Spacer(modifier = Modifier.weight(1f))
+ PDEButton(onClick = {
+ close()
+ }) {
+ Text(
+ text = locale["beta.button"],
+ color = colors.onPrimary
+ )
+ }
+ }
+ }
+ }
+ }
+ @OptIn(ExperimentalComposeUiApi::class)
+ @Composable
+ fun PDEButton(onClick: () -> Unit, content: @Composable BoxScope.() -> Unit) {
+ val theme = LocalTheme.current
+
+ var hover by remember { mutableStateOf(false) }
+ var clicked by remember { mutableStateOf(false) }
+ val offset by animateFloatAsState(if (hover) -5f else 5f)
+ val color by animateColorAsState(if(clicked) colors.primaryVariant else colors.primary)
+
+ Box(modifier = Modifier.padding(end = 5.dp, top = 5.dp)) {
+ Box(
+ modifier = Modifier
+ .offset((-offset).dp, (offset).dp)
+ .background(theme.getColor("toolbar.button.pressed.field"))
+ .matchParentSize()
+ )
+ Box(
+ modifier = Modifier
+ .onPointerEvent(PointerEventType.Press) {
+ clicked = true
+ }
+ .onPointerEvent(PointerEventType.Release) {
+ clicked = false
+ onClick()
+ }
+ .onPointerEvent(PointerEventType.Enter) {
+ hover = true
+ }
+ .onPointerEvent(PointerEventType.Exit) {
+ hover = false
+ }
+ .pointerHoverIcon(PointerIcon(Cursor(Cursor.HAND_CURSOR)))
+ .background(color)
+ .padding(10.dp)
+ .sizeIn(minWidth = 100.dp),
+ contentAlignment = Alignment.Center,
+ content = content
+ )
+ }
+ }
+
+
+ @JvmStatic
+ fun main(args: Array) {
+ application {
+ val windowState = rememberWindowState(
+ size = DpSize.Unspecified,
+ position = WindowPosition(Alignment.Center)
+ )
+
+ Window(onCloseRequest = ::exitApplication, state = windowState, title = windowTitle) {
+ ProcessingTheme {
+ Surface(color = colors.background) {
+ welcomeToBeta {
+ exitApplication()
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/app/src/processing/app/ui/theme/Locale.kt b/app/src/processing/app/ui/theme/Locale.kt
new file mode 100644
index 000000000..254c0946c
--- /dev/null
+++ b/app/src/processing/app/ui/theme/Locale.kt
@@ -0,0 +1,45 @@
+package processing.app.ui.theme
+
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.compositionLocalOf
+import processing.app.LocalPreferences
+import processing.app.Messages
+import processing.app.Platform
+import processing.app.PlatformStart
+import processing.app.watchFile
+import java.io.File
+import java.io.InputStream
+import java.util.*
+
+class Locale(language: String = "") : Properties() {
+ init {
+ val locale = java.util.Locale.getDefault()
+ load(ClassLoader.getSystemResourceAsStream("PDE.properties"))
+ load(ClassLoader.getSystemResourceAsStream("PDE_${locale.language}.properties") ?: InputStream.nullInputStream())
+ load(ClassLoader.getSystemResourceAsStream("PDE_${locale.toLanguageTag()}.properties") ?: InputStream.nullInputStream())
+ load(ClassLoader.getSystemResourceAsStream("PDE_${language}.properties") ?: InputStream.nullInputStream())
+ }
+
+ @Deprecated("Use get instead", ReplaceWith("get(key)"))
+ override fun getProperty(key: String?, default: String): String {
+ val value = super.getProperty(key, default)
+ if(value == default) Messages.log("Missing translation for $key")
+ return value
+ }
+ operator fun get(key: String): String = getProperty(key, key)
+}
+val LocalLocale = compositionLocalOf { Locale() }
+@Composable
+fun LocaleProvider(content: @Composable () -> Unit) {
+ PlatformStart()
+
+ val settingsFolder = Platform.getSettingsFolder()
+ val languageFile = File(settingsFolder, "language.txt")
+ watchFile(languageFile)
+
+ val locale = Locale(languageFile.readText().substring(0, 2))
+ CompositionLocalProvider(LocalLocale provides locale) {
+ content()
+ }
+}
\ No newline at end of file
diff --git a/app/src/processing/app/ui/theme/Theme.kt b/app/src/processing/app/ui/theme/Theme.kt
new file mode 100644
index 000000000..735d8e5b2
--- /dev/null
+++ b/app/src/processing/app/ui/theme/Theme.kt
@@ -0,0 +1,75 @@
+package processing.app.ui.theme
+
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.material.Colors
+import androidx.compose.material.MaterialTheme
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.compositionLocalOf
+import androidx.compose.ui.graphics.Color
+import processing.app.LocalPreferences
+import processing.app.PreferencesProvider
+import java.io.InputStream
+import java.util.Properties
+
+
+class Theme(themeFile: String? = "") : Properties() {
+ init {
+ load(ClassLoader.getSystemResourceAsStream("theme.txt"))
+ load(ClassLoader.getSystemResourceAsStream(themeFile) ?: InputStream.nullInputStream())
+ }
+ fun getColor(key: String): Color {
+ return Color(getProperty(key).toColorInt())
+ }
+}
+
+val LocalTheme = compositionLocalOf { error("No theme provided") }
+
+@Composable
+fun ProcessingTheme(
+ darkTheme: Boolean = isSystemInDarkTheme(),
+ content: @Composable() () -> Unit
+) {
+ PreferencesProvider {
+ val preferences = LocalPreferences.current
+ val theme = Theme(preferences.getProperty("theme"))
+ val colors = Colors(
+ primary = theme.getColor("editor.gradient.top"),
+ primaryVariant = theme.getColor("toolbar.button.pressed.field"),
+ secondary = theme.getColor("editor.gradient.bottom"),
+ secondaryVariant = theme.getColor("editor.scrollbar.thumb.pressed.color"),
+ background = theme.getColor("editor.bgcolor"),
+ surface = theme.getColor("editor.bgcolor"),
+ error = theme.getColor("status.error.bgcolor"),
+ onPrimary = theme.getColor("toolbar.button.enabled.field"),
+ onSecondary = theme.getColor("toolbar.button.enabled.field"),
+ onBackground = theme.getColor("editor.fgcolor"),
+ onSurface = theme.getColor("editor.fgcolor"),
+ onError = theme.getColor("status.error.fgcolor"),
+ isLight = theme.getProperty("laf.mode").equals("light")
+ )
+
+ CompositionLocalProvider(LocalTheme provides theme) {
+ LocaleProvider {
+ MaterialTheme(
+ colors = colors,
+ typography = Typography,
+ content = content
+ )
+ }
+ }
+ }
+}
+
+fun String.toColorInt(): Int {
+ if (this[0] == '#') {
+ var color = substring(1).toLong(16)
+ if (length == 7) {
+ color = color or 0x00000000ff000000L
+ } else if (length != 9) {
+ throw IllegalArgumentException("Unknown color")
+ }
+ return color.toInt()
+ }
+ throw IllegalArgumentException("Unknown color")
+}
\ No newline at end of file
diff --git a/app/src/processing/app/ui/theme/Typography.kt b/app/src/processing/app/ui/theme/Typography.kt
new file mode 100644
index 000000000..5d87c490e
--- /dev/null
+++ b/app/src/processing/app/ui/theme/Typography.kt
@@ -0,0 +1,38 @@
+package processing.app.ui.theme
+
+import androidx.compose.material.MaterialTheme.typography
+import androidx.compose.material.Typography
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontStyle
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.platform.Font
+import androidx.compose.ui.unit.sp
+
+val processingFont = FontFamily(
+ Font(
+ resource = "ProcessingSans-Regular.ttf",
+ weight = FontWeight.Normal,
+ style = FontStyle.Normal
+ ),
+ Font(
+ resource = "ProcessingSans-Bold.ttf",
+ weight = FontWeight.Bold,
+ style = FontStyle.Normal
+ )
+)
+
+val Typography = Typography(
+ body1 = TextStyle(
+ fontFamily = processingFont,
+ fontWeight = FontWeight.Normal,
+ fontSize = 13.sp,
+ lineHeight = 16.sp
+ ),
+ subtitle1 = TextStyle(
+ fontFamily = processingFont,
+ fontWeight = FontWeight.Bold,
+ fontSize = 16.sp,
+ lineHeight = 20.sp
+ )
+)
\ No newline at end of file
diff --git a/app/test/processing/app/SchemaTest.kt b/app/test/processing/app/SchemaTest.kt
new file mode 100644
index 000000000..009f77adf
--- /dev/null
+++ b/app/test/processing/app/SchemaTest.kt
@@ -0,0 +1,113 @@
+package processing.app
+
+import org.junit.jupiter.params.ParameterizedTest
+import org.junit.jupiter.params.provider.ValueSource
+import org.mockito.ArgumentCaptor
+import org.mockito.MockedStatic
+import org.mockito.Mockito.mockStatic
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+import java.io.File
+import kotlin.io.encoding.Base64
+import kotlin.io.encoding.ExperimentalEncodingApi
+import kotlin.test.Test
+
+
+class SchemaTest {
+ private val base: Base = mock{
+
+ }
+ companion object {
+ val preferences: MockedStatic = mockStatic(Preferences::class.java)
+ }
+
+
+ @Test
+ fun testLocalFiles() {
+ val file = "/this/is/a/local/file"
+ Schema.handleSchema("pde://$file", base)
+ verify(base).handleOpen(file)
+ }
+
+ @Test
+ fun testNewSketch() {
+ Schema.handleSchema("pde://sketch/new", base)
+ verify(base).handleNew()
+ }
+
+ @OptIn(ExperimentalEncodingApi::class)
+ @Test
+ fun testBase64SketchAndExtraFiles() {
+ val sketch = """
+ void setup(){
+
+ }
+ void draw(){
+
+ }
+ """.trimIndent()
+
+ val base64 = Base64.encode(sketch.toByteArray())
+ Schema.handleSchema("pde://sketch/base64/$base64?pde=AnotherFile:$base64", base)
+ val captor = ArgumentCaptor.forClass(String::class.java)
+
+ verify(base).handleOpenUntitled(captor.capture())
+
+ val file = File(captor.value)
+ assert(file.exists())
+ assert(file.readText() == sketch)
+
+ val extra = file.parentFile.resolve("AnotherFile.pde")
+ assert(extra.exists())
+ assert(extra.readText() == sketch)
+ file.parentFile.deleteRecursively()
+ }
+
+ @Test
+ fun testURLSketch() {
+ Schema.handleSchema("pde://sketch/url/github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/Array/Array.pde", base)
+
+ val captor = ArgumentCaptor.forClass(String::class.java)
+ verify(base).handleOpenUntitled(captor.capture())
+ val output = File(captor.value)
+ assert(output.exists())
+ assert(output.name == "Array.pde")
+ assert(output.extension == "pde")
+ assert(output.parentFile.name == "Array")
+
+ output.parentFile.parentFile.deleteRecursively()
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = [
+ "Module.pde:https://github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/Module.pde",
+ "Module.pde",
+ "Module:Module.pde",
+ "Module:https://github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/Module.pde",
+ "Module.pde:github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/Module.pde"
+ ])
+ fun testURLSketchWithFile(file: String){
+ Schema.handleSchema("pde://sketch/url/github.com/processing/processing-examples/raw/refs/heads/main/Basics/Arrays/ArrayObjects/ArrayObjects.pde?pde=$file", base)
+
+ val captor = ArgumentCaptor.forClass(String::class.java)
+ verify(base).handleOpenUntitled(captor.capture())
+
+ // wait for threads to resolve
+ Thread.sleep(1000)
+
+ val output = File(captor.value)
+ assert(output.parentFile.name == "ArrayObjects")
+ assert(output.exists())
+ assert(output.parentFile.resolve("Module.pde").exists())
+ output.parentFile.parentFile.deleteRecursively()
+ }
+
+ @Test
+ fun testPreferences() {
+ Schema.handleSchema("pde://preferences?test=value", base)
+ preferences.verify {
+ Preferences.set("test", "value")
+ Preferences.save()
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/windows/LICENSE.rtf b/app/windows/LICENSE.rtf
new file mode 100644
index 000000000..5f882b67e
--- /dev/null
+++ b/app/windows/LICENSE.rtf
@@ -0,0 +1,1055 @@
+{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
+{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
+\widowctrl\hyphauto
+
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Introduction\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 We use GPL v2 for the parts of the project that we\u8217've developed ourselves. For the \u8216'core\u8217' library, it\u8217's LGPL, for everything else, it\u8217's GPL.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 Over the course of many years of development, files being moved around, and other code being added and removed, the license information has become quite a mess. Please help us clean this up so that others are properly credited and licenses are consistently/correctly noted: https://github.com/processing/processing/issues/224\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 GNU GPL License\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 License for processing outside of core:\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \f1 \line
+ GNU GENERAL PUBLIC LICENSE\line
+ Version 2, June 1991\line
+\line
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.\line
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\line
+Everyone is permitted to copy and distribute verbatim copies\line
+of this license document, but changing it is not allowed.\line
+\line
+ Preamble\line
+\line
+ The licenses for most software are designed to take away your\line
+freedom to share and change it. By contrast, the GNU General Public\line
+License is intended to guarantee your freedom to share and change free\line
+software--to make sure the software is free for all its users. This\line
+General Public License applies to most of the Free Software\line
+Foundation's software and to any other program whose authors commit to\line
+using it. (Some other Free Software Foundation software is covered by\line
+the GNU Library General Public License instead.) You can apply it to\line
+your programs, too.\line
+\line
+ When we speak of free software, we are referring to freedom, not\line
+price. Our General Public Licenses are designed to make sure that you\line
+have the freedom to distribute copies of free software (and charge for\line
+this service if you wish), that you receive source code or can get it\line
+if you want it, that you can change the software or use pieces of it\line
+in new free programs; and that you know you can do these things.\line
+\line
+ To protect your rights, we need to make restrictions that forbid\line
+anyone to deny you these rights or to ask you to surrender the rights.\line
+These restrictions translate to certain responsibilities for you if you\line
+distribute copies of the software, or if you modify it.\line
+\line
+ For example, if you distribute copies of such a program, whether\line
+gratis or for a fee, you must give the recipients all the rights that\line
+you have. You must make sure that they, too, receive or can get the\line
+source code. And you must show them these terms so they know their\line
+rights.\line
+\line
+ We protect your rights with two steps: (1) copyright the software, and\line
+(2) offer you this license which gives you legal permission to copy,\line
+distribute and/or modify the software.\line
+\line
+ Also, for each author's protection and ours, we want to make certain\line
+that everyone understands that there is no warranty for this free\line
+software. If the software is modified by someone else and passed on, we\line
+want its recipients to know that what they have is not the original, so\line
+that any problems introduced by others will not reflect on the original\line
+authors' reputations.\line
+\line
+ Finally, any free program is threatened constantly by software\line
+patents. We wish to avoid the danger that redistributors of a free\line
+program will individually obtain patent licenses, in effect making the\line
+program proprietary. To prevent this, we have made it clear that any\line
+patent must be licensed for everyone's free use or not licensed at all.\line
+\line
+ The precise terms and conditions for copying, distribution and\line
+modification follow.\line
+\line
+ GNU GENERAL PUBLIC LICENSE\line
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\line
+\line
+ 0. This License applies to any program or other work which contains\line
+a notice placed by the copyright holder saying it may be distributed\line
+under the terms of this General Public License. The "Program", below,\line
+refers to any such program or work, and a "work based on the Program"\line
+means either the Program or any derivative work under copyright law:\line
+that is to say, a work containing the Program or a portion of it,\line
+either verbatim or with modifications and/or translated into another\line
+language. (Hereinafter, translation is included without limitation in\line
+the term "modification".) Each licensee is addressed as "you".\line
+\line
+Activities other than copying, distribution and modification are not\line
+covered by this License; they are outside its scope. The act of\line
+running the Program is not restricted, and the output from the Program\line
+is covered only if its contents constitute a work based on the\line
+Program (independent of having been made by running the Program).\line
+Whether that is true depends on what the Program does.\line
+\line
+ 1. You may copy and distribute verbatim copies of the Program's\line
+source code as you receive it, in any medium, provided that you\line
+conspicuously and appropriately publish on each copy an appropriate\line
+copyright notice and disclaimer of warranty; keep intact all the\line
+notices that refer to this License and to the absence of any warranty;\line
+and give any other recipients of the Program a copy of this License\line
+along with the Program.\line
+\line
+You may charge a fee for the physical act of transferring a copy, and\line
+you may at your option offer warranty protection in exchange for a fee.\line
+\line
+ 2. You may modify your copy or copies of the Program or any portion\line
+of it, thus forming a work based on the Program, and copy and\line
+distribute such modifications or work under the terms of Section 1\line
+above, provided that you also meet all of these conditions:\line
+\line
+ a) You must cause the modified files to carry prominent notices\line
+ stating that you changed the files and the date of any change.\line
+\line
+ b) You must cause any work that you distribute or publish, that in\line
+ whole or in part contains or is derived from the Program or any\line
+ part thereof, to be licensed as a whole at no charge to all third\line
+ parties under the terms of this License.\line
+\line
+ c) If the modified program normally reads commands interactively\line
+ when run, you must cause it, when started running for such\line
+ interactive use in the most ordinary way, to print or display an\line
+ announcement including an appropriate copyright notice and a\line
+ notice that there is no warranty (or else, saying that you provide\line
+ a warranty) and that users may redistribute the program under\line
+ these conditions, and telling the user how to view a copy of this\line
+ License. (Exception: if the Program itself is interactive but\line
+ does not normally print such an announcement, your work based on\line
+ the Program is not required to print an announcement.)\line
+\line
+These requirements apply to the modified work as a whole. If\line
+identifiable sections of that work are not derived from the Program,\line
+and can be reasonably considered independent and separate works in\line
+themselves, then this License, and its terms, do not apply to those\line
+sections when you distribute them as separate works. But when you\line
+distribute the same sections as part of a whole which is a work based\line
+on the Program, the distribution of the whole must be on the terms of\line
+this License, whose permissions for other licensees extend to the\line
+entire whole, and thus to each and every part regardless of who wrote it.\line
+\line
+Thus, it is not the intent of this section to claim rights or contest\line
+your rights to work written entirely by you; rather, the intent is to\line
+exercise the right to control the distribution of derivative or\line
+collective works based on the Program.\line
+\line
+In addition, mere aggregation of another work not based on the Program\line
+with the Program (or with a work based on the Program) on a volume of\line
+a storage or distribution medium does not bring the other work under\line
+the scope of this License.\line
+\line
+ 3. You may copy and distribute the Program (or a work based on it,\line
+under Section 2) in object code or executable form under the terms of\line
+Sections 1 and 2 above provided that you also do one of the following:\line
+\line
+ a) Accompany it with the complete corresponding machine-readable\line
+ source code, which must be distributed under the terms of Sections\line
+ 1 and 2 above on a medium customarily used for software interchange; or,\line
+\line
+ b) Accompany it with a written offer, valid for at least three\line
+ years, to give any third party, for a charge no more than your\line
+ cost of physically performing source distribution, a complete\line
+ machine-readable copy of the corresponding source code, to be\line
+ distributed under the terms of Sections 1 and 2 above on a medium\line
+ customarily used for software interchange; or,\line
+\line
+ c) Accompany it with the information you received as to the offer\line
+ to distribute corresponding source code. (This alternative is\line
+ allowed only for noncommercial distribution and only if you\line
+ received the program in object code or executable form with such\line
+ an offer, in accord with Subsection b above.)\line
+\line
+The source code for a work means the preferred form of the work for\line
+making modifications to it. For an executable work, complete source\line
+code means all the source code for all modules it contains, plus any\line
+associated interface definition files, plus the scripts used to\line
+control compilation and installation of the executable. However, as a\line
+special exception, the source code distributed need not include\line
+anything that is normally distributed (in either source or binary\line
+form) with the major components (compiler, kernel, and so on) of the\line
+operating system on which the executable runs, unless that component\line
+itself accompanies the executable.\line
+\line
+If distribution of executable or object code is made by offering\line
+access to copy from a designated place, then offering equivalent\line
+access to copy the source code from the same place counts as\line
+distribution of the source code, even though third parties are not\line
+compelled to copy the source along with the object code.\line
+\line
+ 4. You may not copy, modify, sublicense, or distribute the Program\line
+except as expressly provided under this License. Any attempt\line
+otherwise to copy, modify, sublicense or distribute the Program is\line
+void, and will automatically terminate your rights under this License.\line
+However, parties who have received copies, or rights, from you under\line
+this License will not have their licenses terminated so long as such\line
+parties remain in full compliance.\line
+\line
+ 5. You are not required to accept this License, since you have not\line
+signed it. However, nothing else grants you permission to modify or\line
+distribute the Program or its derivative works. These actions are\line
+prohibited by law if you do not accept this License. Therefore, by\line
+modifying or distributing the Program (or any work based on the\line
+Program), you indicate your acceptance of this License to do so, and\line
+all its terms and conditions for copying, distributing or modifying\line
+the Program or works based on it.\line
+\line
+ 6. Each time you redistribute the Program (or any work based on the\line
+Program), the recipient automatically receives a license from the\line
+original licensor to copy, distribute or modify the Program subject to\line
+these terms and conditions. You may not impose any further\line
+restrictions on the recipients' exercise of the rights granted herein.\line
+You are not responsible for enforcing compliance by third parties to\line
+this License.\line
+\line
+ 7. If, as a consequence of a court judgment or allegation of patent\line
+infringement or for any other reason (not limited to patent issues),\line
+conditions are imposed on you (whether by court order, agreement or\line
+otherwise) that contradict the conditions of this License, they do not\line
+excuse you from the conditions of this License. If you cannot\line
+distribute so as to satisfy simultaneously your obligations under this\line
+License and any other pertinent obligations, then as a consequence you\line
+may not distribute the Program at all. For example, if a patent\line
+license would not permit royalty-free redistribution of the Program by\line
+all those who receive copies directly or indirectly through you, then\line
+the only way you could satisfy both it and this License would be to\line
+refrain entirely from distribution of the Program.\line
+\line
+If any portion of this section is held invalid or unenforceable under\line
+any particular circumstance, the balance of the section is intended to\line
+apply and the section as a whole is intended to apply in other\line
+circumstances.\line
+\line
+It is not the purpose of this section to induce you to infringe any\line
+patents or other property right claims or to contest validity of any\line
+such claims; this section has the sole purpose of protecting the\line
+integrity of the free software distribution system, which is\line
+implemented by public license practices. Many people have made\line
+generous contributions to the wide range of software distributed\line
+through that system in reliance on consistent application of that\line
+system; it is up to the author/donor to decide if he or she is willing\line
+to distribute software through any other system and a licensee cannot\line
+impose that choice.\line
+\line
+This section is intended to make thoroughly clear what is believed to\line
+be a consequence of the rest of this License.\line
+\line
+ 8. If the distribution and/or use of the Program is restricted in\line
+certain countries either by patents or by copyrighted interfaces, the\line
+original copyright holder who places the Program under this License\line
+may add an explicit geographical distribution limitation excluding\line
+those countries, so that distribution is permitted only in or among\line
+countries not thus excluded. In such case, this License incorporates\line
+the limitation as if written in the body of this License.\line
+\line
+ 9. The Free Software Foundation may publish revised and/or new versions\line
+of the General Public License from time to time. Such new versions will\line
+be similar in spirit to the present version, but may differ in detail to\line
+address new problems or concerns.\line
+\line
+Each version is given a distinguishing version number. If the Program\line
+specifies a version number of this License which applies to it and "any\line
+later version", you have the option of following the terms and conditions\line
+either of that version or of any later version published by the Free\line
+Software Foundation. If the Program does not specify a version number of\line
+this License, you may choose any version ever published by the Free Software\line
+Foundation.\line
+\line
+ 10. If you wish to incorporate parts of the Program into other free\line
+programs whose distribution conditions are different, write to the author\line
+to ask for permission. For software which is copyrighted by the Free\line
+Software Foundation, write to the Free Software Foundation; we sometimes\line
+make exceptions for this. Our decision will be guided by the two goals\line
+of preserving the free status of all derivatives of our free software and\line
+of promoting the sharing and reuse of software generally.\line
+\line
+ NO WARRANTY\line
+\line
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\line
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\line
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\line
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\line
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\line
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\line
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\line
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\line
+REPAIR OR CORRECTION.\line
+\line
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\line
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\line
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\line
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\line
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\line
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\line
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\line
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\line
+POSSIBILITY OF SUCH DAMAGES.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 GNU LGPL License\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 License for core:\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \f1 GNU LESSER GENERAL PUBLIC LICENSE\line
+ Version 2.1, February 1999\line
+\line
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.\line
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\line
+Everyone is permitted to copy and distribute verbatim copies\line
+of this license document, but changing it is not allowed.\line
+\line
+[ This is the first released version of the Lesser GPL. \line
+It also counts as the successor of the GNU Library Public\line
+License, version 2, hence the version number 2.1. ]\line
+\line
+ Preamble\line
+\line
+The licenses for most software are designed to take away your\line
+freedom to share and change it. By contrast, the GNU General Public\line
+Licenses are intended to guarantee your freedom to share and change\line
+free software--to make sure the software is free for all its users.\line
+\line
+This license, the Lesser General Public License, applies to some\line
+specially designated software packages--typically libraries--of the\line
+Free Software Foundation and other authors who decide to use it. You\line
+can use it too, but we suggest you first think carefully about whether\line
+this license or the ordinary General Public License is the better\line
+strategy to use in any particular case, based on the explanations below.\line
+\line
+When we speak of free software, we are referring to freedom of use,\line
+not price. Our General Public Licenses are designed to make sure that\line
+you have the freedom to distribute copies of free software (and charge\line
+for this service if you wish); that you receive source code or can get\line
+it if you want it; that you can change the software and use pieces of\line
+it in new free programs; and that you are informed that you can do\line
+these things.\line
+\line
+To protect your rights, we need to make restrictions that forbid\line
+distributors to deny you these rights or to ask you to surrender these\line
+rights. These restrictions translate to certain responsibilities for\line
+you if you distribute copies of the library or if you modify it.\line
+\line
+For example, if you distribute copies of the library, whether gratis\line
+or for a fee, you must give the recipients all the rights that we gave\line
+you. You must make sure that they, too, receive or can get the source\line
+code. If you link other code with the library, you must provide\line
+complete object files to the recipients, so that they can relink them\line
+with the library after making changes to the library and recompiling\line
+it. And you must show them these terms so they know their rights.\line
+\line
+We protect your rights with a two-step method: (1) we copyright the\line
+library, and (2) we offer you this license, which gives you legal\line
+permission to copy, distribute and/or modify the library.\line
+\line
+To protect each distributor, we want to make it very clear that\line
+there is no warranty for the free library. Also, if the library is\line
+modified by someone else and passed on, the recipients should know\line
+that what they have is not the original version, so that the original\line
+author's reputation will not be affected by problems that might be\line
+introduced by others.\line
+\line
+Finally, software patents pose a constant threat to the existence of\line
+any free program. We wish to make sure that a company cannot\line
+effectively restrict the users of a free program by obtaining a\line
+restrictive license from a patent holder. Therefore, we insist that\line
+any patent license obtained for a version of the library must be\line
+consistent with the full freedom of use specified in this license.\line
+\line
+Most GNU software, including some libraries, is covered by the\line
+ordinary GNU General Public License. This license, the GNU Lesser\line
+General Public License, applies to certain designated libraries, and\line
+is quite different from the ordinary General Public License. We use\line
+this license for certain libraries in order to permit linking those\line
+libraries into non-free programs.\line
+\line
+When a program is linked with a library, whether statically or using\line
+a shared library, the combination of the two is legally speaking a\line
+combined work, a derivative of the original library. The ordinary\line
+General Public License therefore permits such linking only if the\line
+entire combination fits its criteria of freedom. The Lesser General\line
+Public License permits more lax criteria for linking other code with\line
+the library.\line
+\line
+We call this license the "Lesser" General Public License because it\line
+does Less to protect the user's freedom than the ordinary General\line
+Public License. It also provides other free software developers Less\line
+of an advantage over competing non-free programs. These disadvantages\line
+are the reason we use the ordinary General Public License for many\line
+libraries. However, the Lesser license provides advantages in certain\line
+special circumstances.\line
+\line
+For example, on rare occasions, there may be a special need to\line
+encourage the widest possible use of a certain library, so that it becomes\line
+a de-facto standard. To achieve this, non-free programs must be\line
+allowed to use the library. A more frequent case is that a free\line
+library does the same job as widely used non-free libraries. In this\line
+case, there is little to gain by limiting the free library to free\line
+software only, so we use the Lesser General Public License.\line
+\line
+In other cases, permission to use a particular library in non-free\line
+programs enables a greater number of people to use a large body of\line
+free software. For example, permission to use the GNU C Library in\line
+non-free programs enables many more people to use the whole GNU\line
+operating system, as well as its variant, the GNU/Linux operating\line
+system.\line
+\line
+Although the Lesser General Public License is Less protective of the\line
+users' freedom, it does ensure that the user of a program that is\line
+linked with the Library has the freedom and the wherewithal to run\line
+that program using a modified version of the Library.\line
+\line
+The precise terms and conditions for copying, distribution and\line
+modification follow. Pay close attention to the difference between a\line
+"work based on the library" and a "work that uses the library". The\line
+former contains code derived from the library, whereas the latter must\line
+be combined with the library in order to run.\line
+\line
+ GNU LESSER GENERAL PUBLIC LICENSE\line
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\line
+\line
+0. This License Agreement applies to any software library or other\line
+program which contains a notice placed by the copyright holder or\line
+other authorized party saying it may be distributed under the terms of\line
+this Lesser General Public License (also called "this License").\line
+Each licensee is addressed as "you".\line
+\line
+A "library" means a collection of software functions and/or data\line
+prepared so as to be conveniently linked with application programs\line
+(which use some of those functions and data) to form executables.\line
+\line
+The "Library", below, refers to any such software library or work\line
+which has been distributed under these terms. A "work based on the\line
+Library" means either the Library or any derivative work under\line
+copyright law: that is to say, a work containing the Library or a\line
+portion of it, either verbatim or with modifications and/or translated\line
+straightforwardly into another language. (Hereinafter, translation is\line
+included without limitation in the term "modification".)\line
+\line
+"Source code" for a work means the preferred form of the work for\line
+making modifications to it. For a library, complete source code means\line
+all the source code for all modules it contains, plus any associated\line
+interface definition files, plus the scripts used to control compilation\line
+and installation of the library.\line
+\line
+Activities other than copying, distribution and modification are not\line
+covered by this License; they are outside its scope. The act of\line
+running a program using the Library is not restricted, and output from\line
+such a program is covered only if its contents constitute a work based\line
+on the Library (independent of the use of the Library in a tool for\line
+writing it). Whether that is true depends on what the Library does\line
+and what the program that uses the Library does.\line
+\line
+1. You may copy and distribute verbatim copies of the Library's\line
+complete source code as you receive it, in any medium, provided that\line
+you conspicuously and appropriately publish on each copy an\line
+appropriate copyright notice and disclaimer of warranty; keep intact\line
+all the notices that refer to this License and to the absence of any\line
+warranty; and distribute a copy of this License along with the\line
+Library.\line
+\line
+You may charge a fee for the physical act of transferring a copy,\line
+and you may at your option offer warranty protection in exchange for a\line
+fee.\line
+\line
+2. You may modify your copy or copies of the Library or any portion\line
+of it, thus forming a work based on the Library, and copy and\line
+distribute such modifications or work under the terms of Section 1\line
+above, provided that you also meet all of these conditions:\line
+\line
+a) The modified work must itself be a software library.\line
+\line
+b) You must cause the files modified to carry prominent notices\line
+stating that you changed the files and the date of any change.\line
+\line
+c) You must cause the whole of the work to be licensed at no\line
+charge to all third parties under the terms of this License.\line
+\line
+d) If a facility in the modified Library refers to a function or a\line
+table of data to be supplied by an application program that uses\line
+the facility, other than as an argument passed when the facility\line
+is invoked, then you must make a good faith effort to ensure that,\line
+in the event an application does not supply such function or\line
+table, the facility still operates, and performs whatever part of\line
+its purpose remains meaningful.\line
+\line
+(For example, a function in a library to compute square roots has\line
+a purpose that is entirely well-defined independent of the\line
+application. Therefore, Subsection 2d requires that any\line
+application-supplied function or table used by this function must\line
+be optional: if the application does not supply it, the square\line
+root function must still compute square roots.)\line
+\line
+These requirements apply to the modified work as a whole. If\line
+identifiable sections of that work are not derived from the Library,\line
+and can be reasonably considered independent and separate works in\line
+themselves, then this License, and its terms, do not apply to those\line
+sections when you distribute them as separate works. But when you\line
+distribute the same sections as part of a whole which is a work based\line
+on the Library, the distribution of the whole must be on the terms of\line
+this License, whose permissions for other licensees extend to the\line
+entire whole, and thus to each and every part regardless of who wrote\line
+it.\line
+\line
+Thus, it is not the intent of this section to claim rights or contest\line
+your rights to work written entirely by you; rather, the intent is to\line
+exercise the right to control the distribution of derivative or\line
+collective works based on the Library.\line
+\line
+In addition, mere aggregation of another work not based on the Library\line
+with the Library (or with a work based on the Library) on a volume of\line
+a storage or distribution medium does not bring the other work under\line
+the scope of this License.\line
+\line
+3. You may opt to apply the terms of the ordinary GNU General Public\line
+License instead of this License to a given copy of the Library. To do\line
+this, you must alter all the notices that refer to this License, so\line
+that they refer to the ordinary GNU General Public License, version 2,\line
+instead of to this License. (If a newer version than version 2 of the\line
+ordinary GNU General Public License has appeared, then you can specify\line
+that version instead if you wish.) Do not make any other change in\line
+these notices.\line
+\line
+Once this change is made in a given copy, it is irreversible for\line
+that copy, so the ordinary GNU General Public License applies to all\line
+subsequent copies and derivative works made from that copy.\line
+\line
+This option is useful when you wish to copy part of the code of\line
+the Library into a program that is not a library.\line
+\line
+4. You may copy and distribute the Library (or a portion or\line
+derivative of it, under Section 2) in object code or executable form\line
+under the terms of Sections 1 and 2 above provided that you accompany\line
+it with the complete corresponding machine-readable source code, which\line
+must be distributed under the terms of Sections 1 and 2 above on a\line
+medium customarily used for software interchange.\line
+\line
+If distribution of object code is made by offering access to copy\line
+from a designated place, then offering equivalent access to copy the\line
+source code from the same place satisfies the requirement to\line
+distribute the source code, even though third parties are not\line
+compelled to copy the source along with the object code.\line
+\line
+5. A program that contains no derivative of any portion of the\line
+Library, but is designed to work with the Library by being compiled or\line
+linked with it, is called a "work that uses the Library". Such a\line
+work, in isolation, is not a derivative work of the Library, and\line
+therefore falls outside the scope of this License.\line
+\line
+However, linking a "work that uses the Library" with the Library\line
+creates an executable that is a derivative of the Library (because it\line
+contains portions of the Library), rather than a "work that uses the\line
+library". The executable is therefore covered by this License.\line
+Section 6 states terms for distribution of such executables.\line
+\line
+When a "work that uses the Library" uses material from a header file\line
+that is part of the Library, the object code for the work may be a\line
+derivative work of the Library even though the source code is not.\line
+Whether this is true is especially significant if the work can be\line
+linked without the Library, or if the work is itself a library. The\line
+threshold for this to be true is not precisely defined by law.\line
+\line
+If such an object file uses only numerical parameters, data\line
+structure layouts and accessors, and small macros and small inline\line
+functions (ten lines or less in length), then the use of the object\line
+file is unrestricted, regardless of whether it is legally a derivative\line
+work. (Executables containing this object code plus portions of the\line
+Library will still fall under Section 6.)\line
+\line
+Otherwise, if the work is a derivative of the Library, you may\line
+distribute the object code for the work under the terms of Section 6.\line
+Any executables containing that work also fall under Section 6,\line
+whether or not they are linked directly with the Library itself.\line
+\line
+6. As an exception to the Sections above, you may also combine or\line
+link a "work that uses the Library" with the Library to produce a\line
+work containing portions of the Library, and distribute that work\line
+under terms of your choice, provided that the terms permit\line
+modification of the work for the customer's own use and reverse\line
+engineering for debugging such modifications.\line
+\line
+You must give prominent notice with each copy of the work that the\line
+Library is used in it and that the Library and its use are covered by\line
+this License. You must supply a copy of this License. If the work\line
+during execution displays copyright notices, you must include the\line
+copyright notice for the Library among them, as well as a reference\line
+directing the user to the copy of this License. Also, you must do one\line
+of these things:\line
+\line
+a) Accompany the work with the complete corresponding\line
+machine-readable source code for the Library including whatever\line
+changes were used in the work (which must be distributed under\line
+Sections 1 and 2 above); and, if the work is an executable linked\line
+with the Library, with the complete machine-readable "work that\line
+uses the Library", as object code and/or source code, so that the\line
+user can modify the Library and then relink to produce a modified\line
+executable containing the modified Library. (It is understood\line
+that the user who changes the contents of definitions files in the\line
+Library will not necessarily be able to recompile the application\line
+to use the modified definitions.)\line
+\line
+b) Use a suitable shared library mechanism for linking with the\line
+Library. A suitable mechanism is one that (1) uses at run time a\line
+copy of the library already present on the user's computer system,\line
+rather than copying library functions into the executable, and (2)\line
+will operate properly with a modified version of the library, if\line
+the user installs one, as long as the modified version is\line
+interface-compatible with the version that the work was made with.\line
+\line
+c) Accompany the work with a written offer, valid for at\line
+least three years, to give the same user the materials\line
+specified in Subsection 6a, above, for a charge no more\line
+than the cost of performing this distribution.\line
+\line
+d) If distribution of the work is made by offering access to copy\line
+from a designated place, offer equivalent access to copy the above\line
+specified materials from the same place.\line
+\line
+e) Verify that the user has already received a copy of these\line
+materials or that you have already sent this user a copy.\line
+\line
+For an executable, the required form of the "work that uses the\line
+Library" must include any data and utility programs needed for\line
+reproducing the executable from it. However, as a special exception,\line
+the materials to be distributed need not include anything that is\line
+normally distributed (in either source or binary form) with the major\line
+components (compiler, kernel, and so on) of the operating system on\line
+which the executable runs, unless that component itself accompanies\line
+the executable.\line
+\line
+It may happen that this requirement contradicts the license\line
+restrictions of other proprietary libraries that do not normally\line
+accompany the operating system. Such a contradiction means you cannot\line
+use both them and the Library together in an executable that you\line
+distribute.\line
+\line
+7. You may place library facilities that are a work based on the\line
+Library side-by-side in a single library together with other library\line
+facilities not covered by this License, and distribute such a combined\line
+library, provided that the separate distribution of the work based on\line
+the Library and of the other library facilities is otherwise\line
+permitted, and provided that you do these two things:\line
+\line
+a) Accompany the combined library with a copy of the same work\line
+based on the Library, uncombined with any other library\line
+facilities. This must be distributed under the terms of the\line
+Sections above.\line
+\line
+b) Give prominent notice with the combined library of the fact\line
+that part of it is a work based on the Library, and explaining\line
+where to find the accompanying uncombined form of the same work.\line
+\line
+8. You may not copy, modify, sublicense, link with, or distribute\line
+the Library except as expressly provided under this License. Any\line
+attempt otherwise to copy, modify, sublicense, link with, or\line
+distribute the Library is void, and will automatically terminate your\line
+rights under this License. However, parties who have received copies,\line
+or rights, from you under this License will not have their licenses\line
+terminated so long as such parties remain in full compliance.\line
+\line
+9. You are not required to accept this License, since you have not\line
+signed it. However, nothing else grants you permission to modify or\line
+distribute the Library or its derivative works. These actions are\line
+prohibited by law if you do not accept this License. Therefore, by\line
+modifying or distributing the Library (or any work based on the\line
+Library), you indicate your acceptance of this License to do so, and\line
+all its terms and conditions for copying, distributing or modifying\line
+the Library or works based on it.\line
+\line
+10. Each time you redistribute the Library (or any work based on the\line
+Library), the recipient automatically receives a license from the\line
+original licensor to copy, distribute, link with or modify the Library\line
+subject to these terms and conditions. You may not impose any further\line
+restrictions on the recipients' exercise of the rights granted herein.\line
+You are not responsible for enforcing compliance by third parties with\line
+this License.\line
+\line
+11. If, as a consequence of a court judgment or allegation of patent\line
+infringement or for any other reason (not limited to patent issues),\line
+conditions are imposed on you (whether by court order, agreement or\line
+otherwise) that contradict the conditions of this License, they do not\line
+excuse you from the conditions of this License. If you cannot\line
+distribute so as to satisfy simultaneously your obligations under this\line
+License and any other pertinent obligations, then as a consequence you\line
+may not distribute the Library at all. For example, if a patent\line
+license would not permit royalty-free redistribution of the Library by\line
+all those who receive copies directly or indirectly through you, then\line
+the only way you could satisfy both it and this License would be to\line
+refrain entirely from distribution of the Library.\line
+\line
+If any portion of this section is held invalid or unenforceable under any\line
+particular circumstance, the balance of the section is intended to apply,\line
+and the section as a whole is intended to apply in other circumstances.\line
+\line
+It is not the purpose of this section to induce you to infringe any\line
+patents or other property right claims or to contest validity of any\line
+such claims; this section has the sole purpose of protecting the\line
+integrity of the free software distribution system which is\line
+implemented by public license practices. Many people have made\line
+generous contributions to the wide range of software distributed\line
+through that system in reliance on consistent application of that\line
+system; it is up to the author/donor to decide if he or she is willing\line
+to distribute software through any other system and a licensee cannot\line
+impose that choice.\line
+\line
+This section is intended to make thoroughly clear what is believed to\line
+be a consequence of the rest of this License.\line
+\line
+12. If the distribution and/or use of the Library is restricted in\line
+certain countries either by patents or by copyrighted interfaces, the\line
+original copyright holder who places the Library under this License may add\line
+an explicit geographical distribution limitation excluding those countries,\line
+so that distribution is permitted only in or among countries not thus\line
+excluded. In such case, this License incorporates the limitation as if\line
+written in the body of this License.\line
+\line
+13. The Free Software Foundation may publish revised and/or new\line
+versions of the Lesser General Public License from time to time.\line
+Such new versions will be similar in spirit to the present version,\line
+but may differ in detail to address new problems or concerns.\line
+\line
+Each version is given a distinguishing version number. If the Library\line
+specifies a version number of this License which applies to it and\line
+"any later version", you have the option of following the terms and\line
+conditions either of that version or of any later version published by\line
+the Free Software Foundation. If the Library does not specify a\line
+license version number, you may choose any version ever published by\line
+the Free Software Foundation.\line
+\line
+14. If you wish to incorporate parts of the Library into other free\line
+programs whose distribution conditions are incompatible with these,\line
+write to the author to ask for permission. For software which is\line
+copyrighted by the Free Software Foundation, write to the Free\line
+Software Foundation; we sometimes make exceptions for this. Our\line
+decision will be guided by the two goals of preserving the free status\line
+of all derivatives of our free software and of promoting the sharing\line
+and reuse of software generally.\line
+\line
+ NO WARRANTY\line
+\line
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\line
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\line
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\line
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY\line
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\line
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\line
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\line
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\line
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\line
+\line
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\line
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\line
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\line
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\line
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\line
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\line
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\line
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\line
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\line
+DAMAGES.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Third Party Open Source Software Used\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://ant.apache.org"}}{\fldrslt{\ul
+Ant
+}}}
+ by {\field{\*\fldinst{HYPERLINK "https://www.apache.org"}}{\fldrslt{\ul
+The Apache Software Foundation
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://www.apache.org/licenses/LICENSE-2.0"}}{\fldrslt{\ul
+Apache v2 License
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://ant-contrib.sourceforge.net"}}{\fldrslt{\ul
+Ant-contrib
+}}}
+ by the Ant-Contrib Project under the {\field{\*\fldinst{HYPERLINK "https://sourceforge.net/p/ant-contrib/code/HEAD/tree/ant-contrib/trunk/docs/LICENSE.txt"}}{\fldrslt{\ul
+Apache 1.1 License
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://www.antlr2.org"}}{\fldrslt{\ul
+Antlr 2
+}}}
+ under {\field{\*\fldinst{HYPERLINK "https://www.antlr2.org/license.html"}}{\fldrslt{\ul
+Public Domain
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Processing has a modified copy of appbundler under. It is is a fork of {\field{\*\fldinst{HYPERLINK "https://web.archive.org/web/20161220062720/https://java.net/projects/appbundler"}}{\fldrslt{\ul
+Oracle\u8217's now-defunct appbundler project
+}}}
+ with contributions from {\field{\*\fldinst{HYPERLINK "https://bitbucket.org/infinitekind/appbundler"}}{\fldrslt{\ul
+InfiniteKind
+}}}
+, both under the {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/legal/gplv2+ce.html"}}{\fldrslt{\ul
+GPL v2 license with classpath exception
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://site.icu-project.org"}}{\fldrslt{\ul
+ICU4J
+}}}
+ from IBM under the {\field{\*\fldinst{HYPERLINK "http://source.icu-project.org/repos/icu/icu/tags/release-57-1/LICENSE"}}{\fldrslt{\ul
+ICU License
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://www.eclipse.org/jdt/"}}{\fldrslt{\ul
+Java Development Tools
+}}}
+ by the {\field{\*\fldinst{HYPERLINK "https://www.eclipse.org"}}{\fldrslt{\ul
+Eclipse Foundation
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://www.eclipse.org/legal/epl-2.0/"}}{\fldrslt{\ul
+Eclipse Public License v2
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://github.com/java-native-access/jna"}}{\fldrslt{\ul
+Java Native Access
+}}}
+ dual licensed under the {\field{\*\fldinst{HYPERLINK "https://github.com/java-native-access/jna/blob/master/LICENSE"}}{\fldrslt{\ul
+Apache v2 License and LGPL
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://jogamp.org/jogl/www/"}}{\fldrslt{\ul
+JOGL
+}}}
+ by {\field{\*\fldinst{HYPERLINK "http://jogamp.org"}}{\fldrslt{\ul
+Jogamp
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://creativecommons.org/licenses/by/3.0/us/"}}{\fldrslt{\ul
+CC BY 3.0 US license
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://openjfx.io"}}{\fldrslt{\ul
+OpenJFX 11
+}}}
+ by Oracle under the {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/legal/gplv2+ce.html"}}{\fldrslt{\ul
+GPL v2 with classpath exception
+}}}
+.\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/projects/jdk/11/"}}{\fldrslt{\ul
+OpenJDK 11
+}}}
+ by Oracle under the {\field{\*\fldinst{HYPERLINK "https://openjdk.java.net/legal/gplv2+ce.html"}}{\fldrslt{\ul
+GPL v2 with classpath exception
+}}}
+\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\f1 org.netbeans.swing.outline} from {\field{\*\fldinst{HYPERLINK "http://netbeans.apache.org"}}{\fldrslt{\ul
+Netbeans
+}}}
+ dual licensed under the {\field{\*\fldinst{HYPERLINK "http://wiki.netbeans.org/FaqWhyCDDLAndGPL"}}{\fldrslt{\ul
+GNU GPL v2 and CDDL licenses
+}}}
+\par}
+{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Some text used from {\field{\*\fldinst{HYPERLINK "https://en.wikipedia.org/wiki/Wikipedia:Copyrights"}}{\fldrslt{\ul
+Wikipedia
+}}}
+ under the {\field{\*\fldinst{HYPERLINK "https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"}}{\fldrslt{\ul
+CC BY-SA
+}}}
+ license.\sa180\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Other License Bodies\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 Text of other relevant licenses\u8230 ?\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 {\b IBM Public License Version 1.0}\line the original document can be found at: http://oss.software.ibm.com/developerworks/opensource/license10.html\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \f1 IBM Public License Version 1.0\line
+\line
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM\line
+PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF\line
+THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\line
+\line
+\line
+1. DEFINITIONS\line
+\line
+"Contribution" means:\line
+\line
+a) in the case of International Business Machines Corporation ("IBM"),\line
+the Original Program, and\line
+\line
+b) in the case of each Contributor,\line
+\line
+i) changes to the Program, and\line
+\line
+ii) additions to the Program;\line
+where such changes and/or additions to the Program originate from and\line
+are distributed by that particular Contributor. A Contribution\line
+'originates' from a Contributor if it was added to the Program by such\line
+Contributor itself or anyone acting on such Contributor's\line
+behalf. Contributions do not include additions to the Program which:\line
+(i) are separate modules of software distributed in conjunction with\line
+the Program under their own license agreement, and (ii) are not\line
+derivative works of the Program.\line
+\line
+"Contributor" means IBM and any other entity that distributes the\line
+Program.\line
+\line
+"Licensed Patents " mean patent claims licensable by a Contributor\line
+which are necessarily infringed by the use or sale of its Contribution\line
+alone or when combined with the Program.\line
+\line
+\line
+"Original Program" means the original version of the software\line
+accompanying this Agreement as released by IBM, including source code,\line
+object code and documentation, if any.\line
+\line
+"Program" means the Original Program and Contributions.\line
+\line
+"Recipient" means anyone who receives the Program under this\line
+Agreement, including all Contributors.\line
+\line
+\line
+2. GRANT OF RIGHTS\line
+\line
+a) Subject to the terms of this Agreement, each Contributor hereby\line
+grants Recipient a non-exclusive, worldwide, royalty-free copyright\line
+license to reproduce, prepare derivative works of, publicly display,\line
+publicly perform, distribute and sublicense the Contribution of such\line
+Contributor, if any, and such derivative works, in source code and\line
+object code form.\line
+\line
+b) Subject to the terms of this Agreement, each Contributor hereby\line
+grants Recipient a non-exclusive, worldwide, royalty-free patent\line
+license under Licensed Patents to make, use, sell, offer to sell,\line
+import and otherwise transfer the Contribution of such Contributor, if\line
+any, in source code and object code form. This patent license shall\line
+apply to the combination of the Contribution and the Program if, at\line
+the time the Contribution is added by the Contributor, such addition\line
+of the Contribution causes such combination to be covered by the\line
+Licensed Patents. The patent license shall not apply to any other\line
+combinations which include the Contribution. No hardware per se is\line
+licensed hereunder.\line
+\line
+c) Recipient understands that although each Contributor grants the\line
+licenses to its Contributions set forth herein, no assurances are\line
+provided by any Contributor that the Program does not infringe the\line
+patent or other intellectual property rights of any other entity. Each\line
+Contributor disclaims any liability to Recipient for claims brought by\line
+any other entity based on infringement of intellectual property rights\line
+or otherwise. As a condition to exercising the rights and licenses\line
+granted hereunder, each Recipient hereby assumes sole responsibility\line
+to secure any other intellectual property rights needed, if any. For\line
+example, if a third party patent license is required to allow\line
+Recipient to distribute the Program, it is Recipient's responsibility\line
+to acquire that license before distributing the Program.\line
+\line
+d) Each Contributor represents that to its knowledge it has sufficient\line
+copyright rights in its Contribution, if any, to grant the copyright\line
+license set forth in this Agreement.\line
+\line
+\line
+3. REQUIREMENTS\line
+\line
+A Contributor may choose to distribute the Program in object code form\line
+under its own license agreement, provided that:\line
+\line
+a) it complies with the terms and conditions of this Agreement; and\line
+\line
+b) its license agreement:\line
+\line
+i) effectively disclaims on behalf of all Contributors all warranties\line
+and conditions, express and implied, including warranties or\line
+conditions of title and non-infringement, and implied warranties or\line
+conditions of merchantability and fitness for a particular purpose;\line
+\line
+ii) effectively excludes on behalf of all Contributors all liability\line
+for damages, including direct, indirect, special, incidental and\line
+consequential damages, such as lost profits;\line
+\line
+iii) states that any provisions which differ from this Agreement are\line
+offered by that Contributor alone and not by any other party; and\line
+\line
+iv) states that source code for the Program is available from such\line
+Contributor, and informs licensees how to obtain it in a reasonable\line
+manner on or through a medium customarily used for software exchange.\line
+\line
+When the Program is made available in source code form:\line
+a) it must be made available under this Agreement; and\line
+b) a copy of this Agreement must be included with each copy of the\line
+Program.\line
+\line
+Each Contributor must include the following in a conspicuous location\line
+in the Program:\line
+\line
+Copyright 2003, International Business Machines Corporation and\line
+others. All Rights Reserved.\line
+\line
+In addition, each Contributor must identify itself as the originator\line
+of its Contribution, if any, in a manner that reasonably allows\line
+subsequent Recipients to identify the originator of the Contribution.\line
+\line
+\line
+4. COMMERCIAL DISTRIBUTION\line
+\line
+Commercial distributors of software may accept certain\line
+responsibilities with respect to end users, business partners and the\line
+like. While this license is intended to facilitate the commercial use\line
+of the Program, the Contributor who includes the Program in a\line
+commercial product offering should do so in a manner which does not\line
+create potential liability for other Contributors. Therefore, if a\line
+Contributor includes the Program in a commercial product offering,\line
+such Contributor ("Commercial Contributor") hereby agrees to defend\line
+and indemnify every other Contributor ("Indemnified Contributor")\line
+against any losses, damages and costs (collectively "Losses") arising\line
+from claims, lawsuits and other legal actions brought by a third party\line
+against the Indemnified Contributor to the extent caused by the acts\line
+or omissions of such Commercial Contributor in connection with its\line
+distribution of the Program in a commercial product offering. The\line
+obligations in this section do not apply to any claims or Losses\line
+relating to any actual or alleged intellectual property\line
+infringement. In order to qualify, an Indemnified Contributor must: a)\line
+promptly notify the Commercial Contributor in writing of such claim,\line
+and b) allow the Commercial Contributor to control, and cooperate with\line
+the Commercial Contributor in, the defense and any related settlement\line
+negotiations. The Indemnified Contributor may participate in any such\line
+claim at its own expense.\line
+\line
+For example, a Contributor might include the Program in a commercial\line
+product offering, Product X. That Contributor is then a Commercial\line
+Contributor. If that Commercial Contributor then makes performance\line
+claims, or offers warranties related to Product X, those performance\line
+claims and warranties are such Commercial Contributor's responsibility\line
+alone. Under this section, the Commercial Contributor would have to\line
+defend claims against the other Contributors related to those\line
+performance claims and warranties, and if a court requires any other\line
+Contributor to pay any damages as a result, the Commercial Contributor\line
+must pay those damages.\line
+\line
+\line
+5. NO WARRANTY\line
+\line
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS\line
+PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\line
+KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY\line
+WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY\line
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely\line
+responsible for determining the appropriateness of using and\line
+distributing the Program and assumes all risks associated with its\line
+exercise of rights under this Agreement, including but not limited to\line
+the risks and costs of program errors, compliance with applicable\line
+laws, damage to or loss of data, programs or equipment, and\line
+unavailability or interruption of operations.\line
+\line
+\line
+6. DISCLAIMER OF LIABILITY\line
+\line
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR\line
+ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,\line
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING\line
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF\line
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\line
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR\line
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED\line
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\line
+\line
+\line
+7. GENERAL\line
+\line
+If any provision of this Agreement is invalid or unenforceable under\line
+applicable law, it shall not affect the validity or enforceability of\line
+the remainder of the terms of this Agreement, and without further\line
+action by the parties hereto, such provision shall be reformed to the\line
+minimum extent necessary to make such provision valid and\line
+enforceable.\line
+\line
+If Recipient institutes patent litigation against a Contributor with\line
+respect to a patent applicable to software (including a cross-claim or\line
+counterclaim in a lawsuit), then any patent licenses granted by that\line
+Contributor to such Recipient under this Agreement shall terminate as\line
+of the date such litigation is filed. In addition, If Recipient\line
+institutes patent litigation against any entity (including a\line
+cross-claim or counterclaim in a lawsuit) alleging that the Program\line
+itself (excluding combinations of the Program with other software or\line
+hardware\par}
+}
diff --git a/app/windows/Processing.wixproj b/app/windows/Processing.wixproj
new file mode 100644
index 000000000..3dcd4695f
--- /dev/null
+++ b/app/windows/Processing.wixproj
@@ -0,0 +1,9 @@
+
+
+ ..\build\compose\binaries\main\msi
+ Processing-$(Version)
+
+
+
+
+
\ No newline at end of file
diff --git a/app/windows/Processing.wxs b/app/windows/Processing.wxs
new file mode 100644
index 000000000..2170bdb6c
--- /dev/null
+++ b/app/windows/Processing.wxs
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/windows/background.png b/app/windows/background.png
new file mode 100644
index 000000000..0d2e2e2f0
Binary files /dev/null and b/app/windows/background.png differ
diff --git a/app/windows/banner.png b/app/windows/banner.png
new file mode 100644
index 000000000..69bb2be24
Binary files /dev/null and b/app/windows/banner.png differ
diff --git a/build.gradle.kts b/build.gradle.kts
index 44805d0b1..0675c2db3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,3 @@
-group = "org.processing"
-version = "4.4.0"
-
plugins {
kotlin("jvm") version libs.versions.kotlin apply false
alias(libs.plugins.kotlinMultiplatform) apply false
diff --git a/build/shared/lib/languages/PDE.properties b/build/shared/lib/languages/PDE.properties
index 02f98473e..30446ecd1 100644
--- a/build/shared/lib/languages/PDE.properties
+++ b/build/shared/lib/languages/PDE.properties
@@ -613,7 +613,6 @@ update_check = Update
update_check.updates_available.core = A new version of Processing is available,\nwould you like to visit the Processing download page?
update_check.updates_available.contributions = There are updates available for some of the installed contributions,\nwould you like to open the the Contribution Manager now?
-
# ---------------------------------------
# Color Chooser
diff --git a/build/shared/lib/languages/PDE_nl.properties b/build/shared/lib/languages/PDE_nl.properties
index 9b9527517..f1ac08b5e 100644
--- a/build/shared/lib/languages/PDE_nl.properties
+++ b/build/shared/lib/languages/PDE_nl.properties
@@ -315,6 +315,13 @@ update_check = Update
update_check.updates_available.core = Een nieuwe versie van Processing is beschikbaar,\nwilt u de Processing download pagina bezoeken?
update_check.updates_available.contributions = Er zijn updates beschikbaar voor sommige van de door u geïnstalleerde bijdragen,\nwilt u nu de Bijdragen Manager openen?
+# ---------------------------------------
+# Beta
+beta.window.title = Welkom bij Beta
+beta.title = Welkom bij de Processing Beta
+beta.message = Bedankt dat je de nieuwe versie van Processing uitprobeert. We zijn je zeer dankbaar!\n\nMeld eventuele bugs alsjeblieft op de forums.
+beta.button = Okee!
+
# ---------------------------------------
# Color Chooser
diff --git a/core/README.md b/core/README.md
index bf300f897..2f4617cea 100644
--- a/core/README.md
+++ b/core/README.md
@@ -63,7 +63,7 @@ dependencies {
```
## Developing for Core
-The easiest way to develop for core, without the need to build the whole project, is to use the `examples/src` sketches. In
+The easiest way to develop for core, without the need to build the whole project, is to use the `examples/src` sketches.
## PGraphics Modes
Documentation on how to develop graphics modes as a library should go here.
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index 7f7438d77..8f7211b13 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -6,8 +6,6 @@ plugins {
alias(libs.plugins.mavenPublish)
}
-version = rootProject.version
-
repositories {
mavenCentral()
maven { url = uri("https://jogamp.org/deployment/maven") }
@@ -23,6 +21,11 @@ sourceSets{
exclude("**/*.java")
}
}
+ test{
+ java{
+ srcDirs("test")
+ }
+ }
}
dependencies {
@@ -70,4 +73,7 @@ tasks.test {
}
tasks.withType {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
-}
\ No newline at end of file
+}
+tasks.compileJava{
+ options.encoding = "UTF-8"
+}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d4ec11baf..f2dc0305e 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,17 +3,21 @@ kotlin = "2.0.20"
compose-plugin = "1.7.1"
jogl = "2.5.0"
antlr = "4.13.2"
+jupiter = "5.12.0"
[libraries]
jogl = { module = "org.jogamp.jogl:jogl-all-main", version.ref = "jogl" }
gluegen = { module = "org.jogamp.gluegen:gluegen-rt-main", version.ref = "jogl" }
-flatlaf = { module = "com.formdev:flatlaf", version = "3.4.1" }
+flatlaf = { module = "com.formdev:flatlaf", version = "2.4" }
jna = { module = "net.java.dev.jna:jna", version = "5.12.1" }
jnaplatform = { module = "net.java.dev.jna:jna-platform", version = "5.12.1" }
compottie = { module = "io.github.alexzhirkevich:compottie", version = "2.0.0-rc02" }
kaml = { module = "com.charleskorn.kaml:kaml", version = "0.65.0" }
junit = { module = "junit:junit", version = "4.13.2" }
+junitJupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "jupiter" }
+junitJupiterParams = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "jupiter" }
mockito = { module = "org.mockito:mockito-core", version = "4.11.0" }
+mockitoKotlin = { module = "org.mockito.kotlin:mockito-kotlin", version = "5.4.0" }
antlr = { module = "org.antlr:antlr4", version = "4.7.2" }
eclipseJDT = { module = "org.eclipse.jdt:org.eclipse.jdt.core", version = "3.16.0" }
eclipseJDTCompiler = { module = "org.eclipse.jdt:org.eclipse.jdt.compiler.apt", version = "1.3.400" }
@@ -27,6 +31,8 @@ antlr4Runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlr" }
composeGradlePlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "compose-plugin" }
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlinComposePlugin = { module = "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin", version.ref = "kotlin" }
+markdown = { module = "com.mikepenz:multiplatform-markdown-renderer-m2", version = "0.31.0" }
+markdownJVM = { module = "com.mikepenz:multiplatform-markdown-renderer-jvm", version = "0.31.0" }
[plugins]
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
diff --git a/java/lsp/build.gradle.kts b/java/lsp/build.gradle.kts
index 6818093a2..63ac7ab72 100644
--- a/java/lsp/build.gradle.kts
+++ b/java/lsp/build.gradle.kts
@@ -5,8 +5,6 @@ plugins{
id("com.vanniktech.maven.publish") version "0.30.0"
}
-group = "org.processing"
-
repositories{
mavenCentral()
google()
diff --git a/java/preprocessor/build.gradle.kts b/java/preprocessor/build.gradle.kts
index a7bad0cce..4e7a2a1a1 100644
--- a/java/preprocessor/build.gradle.kts
+++ b/java/preprocessor/build.gradle.kts
@@ -6,8 +6,6 @@ plugins{
alias(libs.plugins.mavenPublish)
}
-version = rootProject.version
-
repositories{
mavenCentral()
google()
diff --git a/java/src/processing/mode/java/CompletionPanel.java b/java/src/processing/mode/java/CompletionPanel.java
index bda85d75e..2ba1eb29e 100644
--- a/java/src/processing/mode/java/CompletionPanel.java
+++ b/java/src/processing/mode/java/CompletionPanel.java
@@ -287,7 +287,7 @@ public class CompletionPanel {
int x = ta.getCaretPosition() - ta.getLineStartOffset(line) - 1, x1 = x - 1;
if (x >= s.length() || x < 0)
return null; //TODO: Does this check cause problems? Verify.
- if (Base.DEBUG) System.out.print(" x char: " + s.charAt(x));
+ Messages.log(" x char: " + s.charAt(x));
String word = String.valueOf(s.charAt(x));
if (s.trim().length() == 1) {
diff --git a/java/src/processing/mode/java/PreprocService.java b/java/src/processing/mode/java/PreprocService.java
index f70536294..4f9150561 100644
--- a/java/src/processing/mode/java/PreprocService.java
+++ b/java/src/processing/mode/java/PreprocService.java
@@ -117,7 +117,7 @@ public class PreprocService {
running = true;
PreprocSketch prevResult = null;
CompletableFuture> runningCallbacks = null;
- Messages.log("PPS: Hi!");
+ Messages.log("Hi!");
while (running) {
try {
try {
@@ -127,7 +127,7 @@ public class PreprocService {
break;
}
- Messages.log("PPS: Starting");
+ Messages.log("Starting");
prevResult = preprocessSketch(prevResult);
@@ -143,7 +143,7 @@ public class PreprocService {
synchronized (requestLock) {
if (requestQueue.isEmpty()) {
runningCallbacks = lastCallback;
- Messages.log("PPS: Done");
+ Messages.log("Done");
preprocessingTask.complete(prevResult);
}
}
@@ -151,7 +151,7 @@ public class PreprocService {
Messages.err("problem in preprocessor service loop", e);
}
}
- Messages.log("PPS: Bye!");
+ Messages.log("Bye!");
}
/**
@@ -188,7 +188,7 @@ public class PreprocService {
* Indicate to this service that the sketch libraries have changed.
*/
public void notifyLibrariesChanged() {
- Messages.log("PPS: notified libraries changed");
+ Messages.log("notified libraries changed");
librariesChanged.set(true);
notifySketchChanged();
}
@@ -197,7 +197,7 @@ public class PreprocService {
* Indicate to this service that the folder housing sketch code has changed.
*/
public void notifyCodeFolderChanged() {
- Messages.log("PPS: notified code folder changed");
+ Messages.log("notified code folder changed");
codeFolderChanged.set(true);
notifySketchChanged();
}
@@ -216,7 +216,7 @@ public class PreprocService {
.thenAcceptBothAsync(lastCallback, (ps, a) -> callback.accept(ps))
// Make sure exception in callback won't cancel whole callback chain
.handleAsync((res, e) -> {
- if (e != null) Messages.err("PPS: exception in callback", e);
+ if (e != null) Messages.err("exception in callback", e);
return res;
});
return lastCallback;
diff --git a/java/src/processing/mode/java/runner/Runner.java b/java/src/processing/mode/java/runner/Runner.java
index 0e29e18a1..b4dc51770 100644
--- a/java/src/processing/mode/java/runner/Runner.java
+++ b/java/src/processing/mode/java/runner/Runner.java
@@ -253,19 +253,19 @@ public class Runner implements MessageConsumer {
// while (!available) {
while (true) {
try {
- Messages.log(getClass().getName() + " attempting to attach to VM");
+ Messages.log("attempting to attach to VM");
synchronized (cancelLock) {
vm = connector.attach(arguments);
if (cancelled && vm != null) {
// cancelled and connected to the VM, handle closing now
- Messages.log(getClass().getName() + " aborting, launch cancelled");
+ Messages.log("aborting, launch cancelled");
close();
return false;
}
}
// vm = connector.attach(arguments);
if (vm != null) {
- Messages.log(getClass().getName() + " attached to the VM");
+ Messages.log("attached to the VM");
// generateTrace();
// available = true;
return true;
@@ -273,17 +273,17 @@ public class Runner implements MessageConsumer {
} catch (ConnectException ce) {
// This will fire ConnectException (socket not available) until
// the VM finishes starting up and opens its socket for us.
- Messages.log(getClass().getName() + " socket for VM not ready");
+ Messages.log("socket for VM not ready");
// System.out.println("waiting");
// e.printStackTrace();
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
- Messages.err(getClass().getName() + " interrupted", ie);
+ Messages.err("interrupted", ie);
// ie.printStackTrace(sketchErr);
}
} catch (IOException e) {
- Messages.err(getClass().getName() + " while attaching to VM", e);
+ Messages.err("while attaching to VM", e);
}
}
// } catch (IOException exc) {