Compare commits

...

121 Commits

Author SHA1 Message Date
Abe Pazos
7d9065b818 Update openrndr and orx to 0.4.3 2023-06-20 10:31:53 +02:00
Abe Pazos
36fc9c7908 Add 7 new orx extensions, use OPENRNDR and ORX 0.4.3-alpha9 2023-06-02 14:59:36 +02:00
Abe Pazos
8ed15ab6eb Update README.md, mention how to run the jar
Also mention gradlew.bat for Windows.
2023-06-02 08:45:41 +02:00
Abe Pazos
88c716804b Silence os constants access warnings 2023-05-10 15:33:06 +02:00
Abe Pazos
f5763cca77 Update kotlin and jsoup dependencies 2023-05-03 10:17:26 +02:00
Abe Pazos
b84956b9aa Fix build task jar -> shadowJar 2023-05-03 10:17:26 +02:00
Abe Pazos
2534cd25ff Add Gradle task to add scopes to IntelliJ 2023-04-27 15:55:01 +02:00
Abe Pazos
38c37d2df0 Update Gradle 2023-04-24 21:39:27 +02:00
Abe Pazos
f3320b722b README: Add missing run commands following ./gradlew 2023-04-22 08:30:32 +00:00
Edwin Jakobs
5aef63bad7 Upgrade to Gradle 8.1 2023-04-15 15:56:48 +02:00
Abe Pazos
0ff4e26091 build.gradle.kts: add openrndr("dialogs") dependency
See usage demos in this commit a368aac916
2023-04-04 07:50:44 +02:00
Edwin Jakobs
9716ffed5f Upgrade to Kotlin 1.8.20, slf4j 2.0.7, kotlin-logging 3.0.5, kotlin-csv 1.9.0 2023-04-03 15:46:29 +02:00
Abe Pazos
a9b2f1859b README.md: fix openrndr badge version number 2023-04-03 15:13:44 +02:00
Abe Pazos
a7fbe6f470 README.md Fix paths to yaml files 2023-03-31 16:51:50 +02:00
Abe Pazos
6944998cb6 Update used third-party github actions 2023-03-30 18:34:06 +02:00
Abe Pazos
b4dae00646 Fix workflow name 2023-03-30 18:34:06 +02:00
Abe Pazos
6210723148 Combine 3 publish github actions into one 2023-03-30 18:34:06 +02:00
Abe Pazos
2e9da10d4d Increase template version to v1.0.0. Fixes building on Mac. 2023-03-30 18:34:06 +02:00
Abe Pazos
35b8474c2d Gradle cache has issues, disable it 2023-03-30 18:34:06 +02:00
Abe Pazos
ea279f63a2 Fix warning and publishing permissions 2023-03-30 18:34:06 +02:00
Abe Pazos
da2d9d3aa9 Update README: fix --P
Fix the incorrect formatting in the cross-build example.

Add link to read about Gradle.

Mention TemplateLiveProgram.kt.
2023-03-28 09:02:55 +02:00
Abe Pazos
589a408709 Update README.md: fix ORX badge, rewording 2023-03-16 09:29:48 +01:00
Abe Pazos
d72cee08a9 Update README.md
Add version badges, fix typo
2023-03-16 09:29:48 +01:00
Abe Pazos
2113b159fe Update README.md (updating dependencies) 2023-03-16 09:29:48 +01:00
Edwin Jakobs
16eb227741 Fix jpackage macos app bundles 2023-03-15 14:34:43 +01:00
Edwin Jakobs
4f1517a62f Upgrade to log4j 2.20.0, jackson 2.14.2, kotlin 1.18.10, kotlin-logging 3.0.5,kotlin-csv 1.8.0 2023-03-04 16:47:54 +01:00
Edwin Jakobs
3ead34887e Upgrade to Gradle 8.0.2 2023-03-04 16:35:00 +01:00
vechro
129626edbe Prefer mavenCentral before mavenLocal 2023-03-04 15:01:57 +01:00
vechro
89767de35a Remove hardcoded mavenLocal() logic 2023-03-04 15:01:57 +01:00
vechro
a26fd652d5 Move to libs.version.toml for version management 2023-03-04 15:01:57 +01:00
Abe Pazos
1620af58a3 Delete reference to orx which no longer exists 2023-03-04 12:02:57 +01:00
Edwin Jakobs
1d51a766e1 Fix location of data inside macos app bundle, update workflows 2023-03-01 16:31:01 +01:00
Abe Pazos
0e76bcd431 Fix launching custom Kt files from command line
The `application` property was already used.
Reusing it breaks things.
Use `openrndr.application` instead.
2023-02-28 09:40:19 +01:00
Abe Pazos
01d45029e6 Add application gradle option to allow running custom Kt files 2023-02-20 12:37:55 +01:00
Edwin Jakobs
ff1942d2a8 Fix minimize excludes for log4j-slf4j2 2023-01-27 09:13:28 +01:00
Edwin Jakobs
cb6aa04f91 Upgrade to openrndr 0.4.2, kotlin 1.8, slf4j 2.0.6, kotlin-logging 3.0.4 2023-01-27 09:09:58 +01:00
Edwin Jakobs
091115f49a Add OPENRNDR task aliases 2023-01-25 20:36:24 +01:00
Edwin Jakobs
3b957d53e3 Upgrade OPENRNDR to 0.4.2-rc.3, runtime to 1.13.0, gson to 2.10.1. Enable gradle configuration cache. Change default orx features. 2023-01-23 08:37:19 +01:00
Edwin Jakobs
4631eced38 Configure jpackage to launch JVM with cwd set to Contents/Resources 2022-12-19 21:33:10 +01:00
Edwin Jakobs
63f10ce2bb Upgrade to Kotlin 1.7.21, Jackson 2.14.1, log4j 2.19.0, jsoup 1.15.3, kotlin-csv 1.7.0 2022-12-19 21:27:47 +01:00
Kazik Pogoda
29a0cbdd75 dependencies: sl4j-api is an explicit dependency solving resolution of slf4j parts in different versions, "Implementation-Version" added to shadowJar manifest, shadowJar minimization will not remove logging support 2022-12-07 14:57:36 +01:00
Kazik Pogoda
c340edab96 fix: typo in "org.slf4j" group name, "f" was missing 2022-12-07 14:57:36 +01:00
vechro
a42a2bd9a3 Fix macOS M1 architecture not being correctly detected for lwjgl 2022-10-12 16:18:30 +02:00
Edwin Jakobs
905c5f8b9d Upgrade Kotlin to 1.7.20 2022-10-12 15:45:02 +02:00
Edwin Jakobs
f0c25cb7f0 Upgrade to OPENRNDR 0.4.1 2022-08-24 14:35:27 +02:00
Edwin Jakobs
7cc1edb568 Upgrade to OPENRNDR 0.4.1, kotlin-logging 2.1.23, kotlin-csv-jvm 1.6.0, kotlinx-coroutines 1.6.4 2022-08-22 17:34:26 +02:00
vechro
fd6333e264 Use Kotlin 1.7.10 and target JVM 11 2022-08-12 11:58:29 +02:00
vechro
787d0ab673 Upgrade to Gradle 7.5.1 2022-08-12 11:58:29 +02:00
Abe Pazos
5756c29660 Update json, xml and csv libraries (#28) 2022-08-12 07:08:43 +02:00
Abe Pazos
f80caf7acf Fix broken link in README (#26) 2022-08-12 07:08:31 +02:00
Edwin Jakobs
f5d9accd71 Upgrade to OPENRNDR 0.4.0, ORX 0.4.0, Kotlin 1.6.21, Jackson 2.13.3, log4j 2.18.0 2022-07-08 22:19:51 +02:00
Edwin Jakobs
71bb6c61c7 Upgrade to Gradle 7.4.1, OPENRNDR 0.4.0-rc.7, ORX 0.4.0-rc.8, Jackson 2.13.2. Add orx-minim 2022-03-19 07:49:58 +01:00
Edwin Jakobs
6ca525341e Upgrade to shadow plugin 7.1.2, slf4j 1.7.36, jackson 2.13.1 2022-03-06 08:25:01 +01:00
Edwin Jakobs
e16ae4334e Switch to Gradle 7.4 version catalog syntax 2022-03-03 08:17:02 +01:00
Edwin Jakobs
975d4ee1a1 Upgrade to Gradle 7.4, log4j 2.17.2, kotlinx-coroutines 1.6.0, kotlin-logging 2.1.21, gson 2.9.0 2022-03-02 10:43:25 +01:00
Edwin Jakobs
24a5f7f091 Fix M1 support, disable video support for M1 2022-02-11 11:24:59 +01:00
Edwin Jakobs
11dc0f71d9 Attempt to add macOS m1 libraries 2022-02-10 17:37:55 +01:00
Edwin Jakobs
0c82af93b2 Upgrade to ORX 0.4.0-rc.7, OPENRNDR 0.4.0-rc.6 2022-02-09 17:34:03 +01:00
Steven van den Broek
6797934670 Fix typo in jpackage configuration (#25) 2022-01-31 08:32:20 +01:00
Edwin Jakobs
ad3b2f8c7c Switch to OPENRNDR 0.4.0-rc.5, ORX 0.4.0-rc.5 2022-01-29 20:46:31 +01:00
Vechro
64aaa00524 Update log4j to 2.17.0 2021-12-22 19:29:41 +01:00
Edwin Jakobs
34fac68d50 Upgrade to log4j 2.15.0 2021-12-11 15:46:40 +01:00
Edwin Jakobs
8553c8a4c8 Update .gitignore 2021-11-23 10:50:12 +01:00
Edwin Jakobs
e507fb7b35 Change list of default orxFeatures 2021-11-23 10:26:25 +01:00
Edwin Jakobs
180d85bd69 Add gitArchiveToMarkdown plugin and task 2021-11-23 10:26:25 +01:00
Edwin Jakobs
d1fbf470b2 Shorten jpackage configuration 2021-11-23 10:26:25 +01:00
Edwin Jakobs
e988a14f03 Add version catalog 2021-11-23 10:26:25 +01:00
Edwin Jakobs
a02d3fc44f Upgrade to Kotlin 1.6.0, Gradle 7.3 2021-11-20 21:18:56 +01:00
Edwin Jakobs
df1782f317 Prepare template for OPENRNDR 0.4 2021-07-22 16:26:58 +02:00
Edwin Jakobs
d103e206d2 Upgrade to Gradle 7.0.2, OPENRNDR/ORX 0.3.58, Kotlin 1.5.0 2021-05-16 09:34:06 +02:00
Edwin Jakobs
ef25b9a101 Change maven url to https://maven.openrndr.org 2021-04-12 13:55:47 +02:00
Edwin Jakobs
acaa7ceeba Upgrade to Gradle 7.0, Kotlin 1.4.32 2021-04-10 18:08:42 +02:00
Edwin Jakobs
248c1eb617 Upgrade to OPENRNDR 0.3.46 2021-03-12 08:58:28 +01:00
Abe Pazos
495078a419 Add missing orx to build.gradle.kts, null as trailing comma (#16) 2021-02-24 20:08:51 +01:00
Abe Pazos
03d5b07009 Update gradle to 6.8 (#15) 2021-01-22 21:21:01 +01:00
Edwin Jakobs
3e932ac945 Merge pull request #14 from ricardomatias/patch-4
Add orml setup
2021-01-21 21:06:59 +01:00
Ricardo Matias
b6e2377384 Add orml setup 2021-01-21 12:53:18 +01:00
Edwin Jakobs
39cacd7f70 Upgrade to OPENRNDR 0.3.44 2020-10-16 12:01:30 +02:00
Edwin Jakobs
175dac1bf4 Merge pull request #13 from ricardomatias/master
Add cheeta image for easy guide example usage
2020-07-20 10:42:54 +02:00
Ricardo Matias
f4335c152e Add cheeta image for easy guide example usage 2020-07-20 10:18:55 +02:00
Edwin Jakobs
7070dd95b8 Merge pull request #12 from gauthams-kumar/patch-1
Added missing commas
2020-07-14 23:31:03 +02:00
gauthams-kumar
3bef89761c Added missing commas
At end of lines 18, 41
2020-07-14 21:46:53 +01:00
Edwin Jakobs
12c65fc9d6 Merge pull request #11 from hamoid/defaultFont
Add default font and license
2020-07-13 11:31:19 +02:00
Edwin Jakobs
28a1f4862e Merge pull request #10 from ricardomatias/patch-2
Fix typo
2020-07-13 11:31:00 +02:00
Abe Pazos
797d2a75ca Add default font and license 2020-07-13 11:15:56 +02:00
Ricardo Matias
41fe1d31da Fix typo 2020-07-13 10:51:52 +02:00
Edwin Jakobs
b7dbf58574 Bump to latest OPENRNDR release 2020-07-06 19:18:53 +02:00
Edwin Jakobs
55eff802c5 Prepare for OPENRNDR 0.3.43 2020-07-06 15:07:34 +02:00
Edwin Jakobs
88782c614f Fix runtime configuration to produce working macOS binaries 2020-06-15 12:18:35 +02:00
Edwin Jakobs
a90e036620 Merge pull request #9 from hamoid/removeRedundantBoofcv
Remove redundant boofcv dependency
2020-06-10 20:53:07 +02:00
Abe Pazos
6964febf08 Remove redundant boofcv dependency 2020-06-09 15:04:34 +02:00
Edwin Jakobs
4f2bea7d94 Merge pull request #7 from hamoid/upstreamMaster
Add boofcv to build.gradle.kts
2020-05-20 08:54:33 +02:00
Abe Pazos
a483ecfd64 Add boofcv to build.gradle.kts 2020-05-19 09:58:10 +02:00
Edwin Jakobs
c9bbe84471 Merge pull request #6 from ricardomatias/patch-1
Add orx-time-operators
2020-05-18 16:57:09 +02:00
Ricardo Matias
ae0ef47a44 Add orx-time-operators 2020-05-17 20:49:28 +02:00
Edwin Jakobs
f391fed255 Add jpackageZip and Github actions for publishing binaries 2020-05-17 11:00:48 +02:00
Edwin Jakobs
896a8629fa Upgrade OPENRNDR/ORX 2020-05-15 18:15:31 +02:00
Edwin Jakobs
53dec983b1 Upgrade OPENRNDR/ORX, kotlin-coroutines core 1.3.6 2020-05-11 09:08:17 +02:00
Edwin Jakobs
0296f5036f Upgrade to Gradle 6.4 2020-05-06 23:26:31 +02:00
Edwin Jakobs
5151b7af89 Upgrade OPENRNDR, change TemplateLiveProgram.kt 2020-05-06 19:13:30 +02:00
Edwin Jakobs
38254b084d Fix issue with IntelliJ and not having the script runtime on the classpath 2020-04-29 14:48:21 +02:00
Edwin Jakobs
5c0b2b2c3f Upgrade to OPENRNDR 0.3.42-rc.2, ORX 0.3.51-rc.3, Kotlin 1.3.72 2020-04-29 12:13:33 +02:00
Edwin Jakobs
e86cf3f7e6 Upgrade to OPENRNDR 0.3.40, ORX 0.3.50 2020-03-27 22:21:57 +01:00
Edwin Jakobs
3374024592 Merge pull request #4 from reinvdwoerd/patch-3
Added orx-shapes
2020-03-09 14:55:29 +01:00
Rein van der Woerd
14bb87c02e Update build.gradle.kts 2020-03-09 13:18:31 +01:00
Edwin Jakobs
6c0d0ed16b Merge pull request #3 from reinvdwoerd/patch-2
Added missing orx features...
2020-03-04 13:54:40 +01:00
Rein van der Woerd
eab750d7f7 Added missing orx features... 2020-03-04 13:22:19 +01:00
Edwin Jakobs
63bbdb1218 Merge pull request #2 from reinvdwoerd/patch-1
orx-noclear has been renamed to orx-no-clear
2020-03-02 18:14:58 +01:00
Rein van der Woerd
59349d83f2 orx-noclear has been renamed to orx-no-clear 2020-03-02 08:29:03 +01:00
Edwin Jakobs
998a5051c1 Update build.gradle.kts 2020-03-01 15:21:13 +01:00
Edwin Jakobs
97c55825e2 Upgrade to OPENRNDR 0.3.39 2020-02-14 15:48:06 +01:00
Edwin Jakobs
15c188aee0 Fix for aarch64 architecture 2020-01-29 14:07:47 +01:00
Edwin Jakobs
6c3d1319cb Update README.md 2020-01-29 12:44:43 +01:00
Edwin Jakobs
ede734d74c Add support for cross building and support for future linux-arm64 version 2020-01-29 12:43:32 +01:00
Edwin Jakobs
89fce80aff Upgrade to OPENRNDR 0.3.38, add TemplateLiveProgram.kt 2020-01-28 00:12:33 +01:00
Edwin Jakobs
0a478a98a6 Fix orx-kinect-v1 native dependencies 2020-01-13 21:00:56 +01:00
Edwin Jakobs
b994ccfd28 Update README.md 2020-01-13 20:17:02 +01:00
edwin
79d9a7971a Bump OPENRNDR, ORX, Panel, Gradle 2019-12-16 18:48:34 +01:00
Edwin Jakobs
d99af16ab8 Bump to ORX 0.3.42 2019-11-29 13:52:05 +01:00
Edwin Jakobs
b781680fb6 Bump to ORX 0.3.41 2019-11-28 16:36:13 +01:00
edwin
e2108f86e5 Bump to OPENRNDR 0.3.36, ORX 0.3.40, Panel 0.3.18 2019-11-25 19:41:26 +01:00
21 changed files with 837 additions and 277 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
*.bat eol=crlf

20
.github/workflows/build-on-commit.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Build on commit
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
#cache: 'gradle'
- name: Build sources
run: ./gradlew build

59
.github/workflows/publish-binaries.yaml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: Publish binaries
on:
push:
tags:
- v1.*
- v1.*.*
permissions:
contents: write
# Required to make env var work on Windows
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
#cache: 'gradle'
- name: Build with Gradle
run: ./gradlew jpackageZip
- run: echo "OR_TARGET_NAME=linux-x64" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
- run: echo "OR_TARGET_NAME=macos" >> $GITHUB_ENV
if: matrix.os == 'macos-latest'
- run: echo "OR_TARGET_NAME=windows" >> $GITHUB_ENV
if: matrix.os == 'windows-latest'
- name: Rename jpackage zip
run: mv ./build/distributions/openrndr-application.zip ./build/distributions/openrndr-application-${{env.OR_TARGET_NAME}}.zip
- name: Create Release
uses: ncipollo/release-action@v1.12.0
id: create_release
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
replacesArtifacts: false
body: Fully automated release
artifacts: "./build/distributions/openrndr-application-${{env.OR_TARGET_NAME}}.zip"

3
.gitignore vendored
View File

@@ -3,3 +3,6 @@ build
out out
.idea .idea
.gradle .gradle
video/
screenshots/
gui-parameters/

View File

@@ -1,12 +1,68 @@
# openrndr-template # OPENRNDR template project
A feature rich template for creating OPENRNDR programs based on Gradle/Kts
You will find some [basic instructions](https://guide.openrndr.org/#/02_Getting_Started_with_OPENRNDR/C00_SetupYourFirstProgram) in the [OPENRNDR guide](https://guide.openrndr.org) A feature rich template for creating OPENRNDR programs based on [Gradle/Kts](https://en.wikipedia.org/wiki/Gradle).
The template consists of a configuration for Gradle and an example OPENRNDR program. The Gradle configuration should serve as the The template consists of a configuration for Gradle and two example OPENRNDR programs. The Gradle configuration should serve as the
go-to starting point for writing OPENRNDR-based software. go-to starting point for writing OPENRNDR-based software.
If you are looking at this from IntelliJ IDEA you can start by expanding the _project_ tab on the left. You will find a template program in `src/main/kotlin/TemplateProgram.kt` and a live-coding example in `src/main/kotlin/TemplateLiveProgram.kt`.
You will find some [basic instructions](https://guide.openrndr.org/setUpYourFirstProgram.html) in the [OPENRNDR guide](https://guide.openrndr.org)
## Gradle tasks ## Gradle tasks
- `run` runs the TemplateProgram
- `jar` creates an executable platform specific jar file with all dependencies - `./gradlew run` runs the TemplateProgram (Use `gradlew.bat run` under Windows)
- `zipDistribution` creates a zip file containing the application jar and the data folder - `./gradlew shadowJar` creates an executable platform specific jar file with all dependencies. Run the resulting program by typing `java -jar build/libs/openrndr-template-1.0.0-all.jar` in a terminal from the project root.
- `./gradlew jpackageZip` creates a zip with a stand-alone executable for the current platform (works with Java 14 only)
## Cross builds
To create a runnable jar for a platform different from your current platform, use `./gradlew jar -PtargetPlatform=<platform>`, where `<platform>` is either `windows`, `macos`, `linux-x64`, or `linux-arm64`.
## Updating OPENRNDR, ORX and other dependencies
The openrndr-template depends on various packages including the core [openrndr](https://github.com/openrndr/openrndr/) and the [orx](https://github.com/openrndr/orx/) extensions. The version numbers of these dependencies are specified in your [libs.versions.toml](gradle/libs.versions.toml) file. If you want to learn about file format visit the [Gradle documentation](https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml) website.
Newer versions of OPENRNDR and ORX bring useful features and bug fixes. The most recent versions are
<br>![openrndr version](https://maven-badges.herokuapp.com/maven-central/org.openrndr/openrndr-application/badge.svg) for OPENRNDR.
<br>![orx version](https://maven-badges.herokuapp.com/maven-central/org.openrndr.extra/orx-parameters-jvm/badge.svg) for ORX.
You can use those version numbers in your toml file. They can look like "0.4.3" or "0.4.3-alpha4". Use the complete string, as in:
openrndr = "0.4.3-alpha4"
orx = "0.4.3-alpha4"
You can add other dependencies needed by your project to your [build.gradle.kts](build.gradle.kts) file, inside the `dependencies { }` block.
Remember to reload the Gradle configuration after changing any dependencies.
## Run other Kotlin programs from the command line
By default `./gradlew run` runs a program called `TemplateProgram.kt` but a different one can be provided as an argument:
To run `src/main/kotlin/myProgram.kt`
./gradlew run -Popenrndr.application=MyProgramKt
To run `src/main/kotlin/foo/bar/myProgram.kt` (assuming `package foo.bar` in myProgram.kt)
./gradlew run -Popenrndr.application=foo.bar.MyProgramKt
## Github Actions
This repository contains a number of Github Actions under `./github/workflows`.
[build-on-commit.yaml](.github/workflows/build-on-commit.yaml) runs a basic build on every commit,
which can help detect issues in the source code.
[publish-binaries.yaml](.github/workflows/publish-binaries.yaml) publishes binaries for Linux, Mac and Windows
any time a commit is tagged with a version number like `v1.*`.
For example, we can create and push a tag with these git commands:
git tag -a v1.0.0 -m "v1.0.0"
git push origin v1.0.0
The progress of the running actions can be followed under the Actions tab in GitHub.
Once complete, the executables will be found under the Releases section.

View File

@@ -1,146 +1,329 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.internal.os.OperatingSystem import org.gradle.internal.os.OperatingSystem
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion = "1.3.50"
plugins {
java
kotlin("jvm") version("1.3.50")
}
group = "org.openrndr.template" group = "org.openrndr.template"
version = "0.3.6" version = "1.0.0"
val applicationMainClass = "TemplateProgramKt" val applicationMainClass = "TemplateProgramKt"
enum class Logging { /** ## additional ORX features to be added to this project */
NONE, val orxFeatures = setOf<String>(
SIMPLE, // "orx-boofcv",
FULL "orx-camera",
// "orx-chataigne",
"orx-color",
"orx-compositor",
// "orx-compute-graph",
// "orx-compute-graph-nodes",
// "orx-dnk3",
// "orx-easing",
// "orx-expression-evaluator",
// "orx-file-watcher",
"orx-fx",
// "orx-git-archiver",
// "orx-glslify",
// "orx-gradient-descent",
"orx-gui",
// "orx-hash-grid",
"orx-image-fit",
// "orx-integral-image",
// "orx-interval-tree",
// "orx-jumpflood",
// "orx-kdtree",
// "orx-keyframer",
// "orx-kinect-v1",
// "orx-kotlin-parser",
// "orx-marching-squares",
// "orx-mesh-generators",
// "orx-midi",
// "orx-minim",
"orx-no-clear",
"orx-noise",
// "orx-obj-loader",
"orx-olive",
// "orx-osc",
// "orx-palette",
"orx-panel",
// "orx-parameters",
// "orx-poisson-fill",
// "orx-quadtree",
// "orx-rabbit-control",
// "orx-realsense2",
// "orx-runway",
"orx-shade-styles",
// "orx-shader-phrases",
"orx-shapes",
// "orx-syphon",
// "orx-temporal-blur",
// "orx-tensorflow",
// "orx-time-operators",
// "orx-timer",
// "orx-triangulation",
// "orx-turtle",
"orx-video-profiles",
"orx-view-box",
)
/** ## additional ORML features to be added to this project */
val ormlFeatures = setOf<String>(
// "orml-blazepose",
// "orml-dbface",
// "orml-facemesh",
// "orml-image-classifier",
// "orml-psenet",
// "orml-ssd",
// "orml-style-transfer",
// "orml-super-resolution",
// "orml-u2net",
)
/** ## additional OPENRNDR features to be added to this project */
val openrndrFeatures = setOfNotNull(
if (DefaultNativePlatform("current").architecture.name != "arm-v8") "video" else null
)
/** ## configure the type of logging this project uses */
enum class Logging { NONE, SIMPLE, FULL }
val applicationLogging = Logging.FULL
// ------------------------------------------------------------------------------------------------------------------ //
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
java
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.shadow)
alias(libs.plugins.runtime)
alias(libs.plugins.gitarchive.tomarkdown).apply(false)
} }
val applicationLogging = Logging.SIMPLE
val openrndrUseSnapshot = false
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.35"
val openrndrOs = when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> "windows"
OperatingSystem.MAC_OS -> "macos"
OperatingSystem.LINUX -> "linux-x64"
else -> throw IllegalArgumentException("os not supported")
}
// supported features are: video, panel
val openrndrFeatures = setOf("video", "panel")
val panelUseSnapshot = false
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.17-m3"
val orxUseSnapshot = false
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.38"
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher,
// orx-integral-image, orx-interval-tree, orx-jumpflood, orx-kdtree, orx-mesh-generators,orx-midi, orx-no-clear,
// orx-noise, orx-obj, orx-olive, orx-osc
val orxFeatures = setOf("orx-noise")
repositories { repositories {
mavenCentral() mavenCentral()
if (openrndrUseSnapshot || orxUseSnapshot || panelUseSnapshot) {
mavenLocal() mavenLocal()
} }
maven(url = "https://dl.bintray.com/openrndr/openrndr")
}
fun DependencyHandler.orx(module: String): Any {
return "org.openrndr.extra:$module:$orxVersion"
}
fun DependencyHandler.openrndr(module: String): Any {
return "org.openrndr:openrndr-$module:$openrndrVersion"
}
fun DependencyHandler.openrndrNatives(module: String): Any {
return "org.openrndr:openrndr-$module-natives-$openrndrOs:$openrndrVersion"
}
dependencies { dependencies {
runtime(openrndr("gl3"))
runtime(openrndrNatives("gl3"))
compile(openrndr("core"))
compile(openrndr("svg"))
compile(openrndr("animatable"))
compile(openrndr("extensions"))
compile(openrndr("filter"))
compile("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.0") // implementation(libs.jsoup)
// implementation(libs.gson)
// implementation(libs.csv)
compile("io.github.microutils", "kotlin-logging","1.7.6") implementation(libs.kotlinx.coroutines.core)
implementation(libs.slf4j.api)
implementation(libs.kotlin.logging)
when (applicationLogging) { when (applicationLogging) {
Logging.NONE -> { Logging.NONE -> {
runtime("org.slf4j","slf4j-nop","1.7.29") runtimeOnly(libs.slf4j.nop)
} }
Logging.SIMPLE -> { Logging.SIMPLE -> {
runtime("org.slf4j","slf4j-simple","1.7.29") runtimeOnly(libs.slf4j.simple)
} }
Logging.FULL -> { Logging.FULL -> {
runtime("org.apache.logging.log4j", "log4j-slf4j-impl", "2.12.1") runtimeOnly(libs.log4j.slf4j2)
runtime("com.fasterxml.jackson.core", "jackson-databind", "2.8.7") runtimeOnly(libs.log4j.core)
runtime("com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml", "2.8.7") runtimeOnly(libs.jackson.databind)
runtimeOnly(libs.jackson.json)
} }
} }
if ("video" in openrndrFeatures) {
compile(openrndr("ffmpeg"))
runtime(openrndrNatives("ffmpeg"))
}
if ("panel" in openrndrFeatures) {
compile("org.openrndr.panel:openrndr-panel:$panelVersion")
}
for (feature in orxFeatures) {
compile(orx(feature))
}
if ("orx-olive" in orxFeatures) {
compile("org.jetbrains.kotlin", "kotlin-scripting-compiler-embeddable")
}
implementation(kotlin("stdlib-jdk8")) implementation(kotlin("stdlib-jdk8"))
testCompile("junit", "junit", "4.12") testImplementation(libs.junit)
} }
configure<JavaPluginConvention> { // ------------------------------------------------------------------------------------------------------------------ //
sourceCompatibility = JavaVersion.VERSION_1_8
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
} }
tasks.withType<KotlinCompile> { tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8" kotlinOptions.jvmTarget = "11"
} }
tasks.withType<Jar> { // ------------------------------------------------------------------------------------------------------------------ //
project.setProperty("mainClassName", applicationMainClass)
application {
if (hasProperty("openrndr.application")) {
mainClass.set("${property("openrndr.application")}")
}
}
tasks {
named<ShadowJar>("shadowJar") {
manifest { manifest {
attributes["Main-Class"] = applicationMainClass attributes["Main-Class"] = applicationMainClass
attributes["Implementation-Version"] = project.version
}
minimize {
exclude(dependency("org.openrndr:openrndr-gl3:.*"))
exclude(dependency("org.jetbrains.kotlin:kotlin-reflect:.*"))
exclude(dependency("org.slf4j:slf4j-simple:.*"))
exclude(dependency("org.apache.logging.log4j:log4j-slf4j2-impl:.*"))
exclude(dependency("com.fasterxml.jackson.core:jackson-databind:.*"))
exclude(dependency("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:.*"))
}
}
named<org.beryx.runtime.JPackageTask>("jpackage") {
doLast {
val destPath = if(OperatingSystem.current().isMacOsX)
"build/jpackage/openrndr-application.app/Contents/Resources/data"
else
"build/jpackage/openrndr-application/data"
copy {
from("data") {
include("**/*")
}
into(destPath)
}
}
} }
doFirst {
from(configurations.compileClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
} }
exclude(listOf("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA", "**/module-info*")) // ------------------------------------------------------------------------------------------------------------------ //
archiveFileName.set("application-$openrndrOs.jar")
tasks.register<Zip>("jpackageZip") {
archiveFileName.set("openrndr-application.zip")
from("$buildDir/jpackage") {
include("**/*")
}
}
tasks.findByName("jpackageZip")?.dependsOn("jpackage")
// ------------------------------------------------------------------------------------------------------------------ //
runtime {
jpackage {
imageName = "openrndr-application"
skipInstaller = true
if (OperatingSystem.current().isMacOsX) {
jvmArgs.add("-XstartOnFirstThread")
jvmArgs.add("-Duser.dir=${"$"}APPDIR/../Resources")
}
}
options.set(listOf("--strip-debug", "--compress", "1", "--no-header-files", "--no-man-pages"))
modules.set(listOf("jdk.unsupported", "java.management", "java.desktop"))
} }
tasks.create("zipDistribution", Zip::class.java) { // ------------------------------------------------------------------------------------------------------------------ //
archiveFileName.set("application-$openrndrOs.zip")
from("./") {
include("data/**")
}
from("$buildDir/libs/application-$openrndrOs.jar")
}.dependsOn(tasks.jar)
tasks.create("run", JavaExec::class.java) { tasks.register<org.openrndr.extra.gitarchiver.GitArchiveToMarkdown>("gitArchiveToMarkDown") {
main = applicationMainClass historySize.set(20)
classpath = sourceSets.main.get().runtimeClasspath }
}.dependsOn(tasks.build)
// ------------------------------------------------------------------------------------------------------------------ //
class Openrndr {
val openrndrVersion = libs.versions.openrndr.get()
val orxVersion = libs.versions.orx.get()
val ormlVersion = libs.versions.orml.get()
// choices are "orx-tensorflow-gpu", "orx-tensorflow"
val orxTensorflowBackend = "orx-tensorflow"
val currArch = DefaultNativePlatform("current").architecture.name
val currOs = OperatingSystem.current()
val os = if (project.hasProperty("targetPlatform")) {
val supportedPlatforms = setOf("windows", "macos", "linux-x64", "linux-arm64")
val platform: String = project.property("targetPlatform") as String
if (platform !in supportedPlatforms) {
throw IllegalArgumentException("target platform not supported: $platform")
} else {
platform
}
} else when {
currOs.isWindows -> "windows"
currOs.isMacOsX -> when (currArch) {
"aarch64", "arm-v8" -> "macos-arm64"
else -> "macos"
}
currOs.isLinux -> when (currArch) {
"x86-64" -> "linux-x64"
"aarch64" -> "linux-arm64"
else -> throw IllegalArgumentException("architecture not supported: $currArch")
}
else -> throw IllegalArgumentException("os not supported: ${currOs.name}")
}
fun orx(module: String) = "org.openrndr.extra:$module:$orxVersion"
fun orml(module: String) = "org.openrndr.orml:$module:$ormlVersion"
fun openrndr(module: String) = "org.openrndr:openrndr-$module:$openrndrVersion"
fun openrndrNatives(module: String) = "org.openrndr:openrndr-$module-natives-$os:$openrndrVersion"
fun orxNatives(module: String) = "org.openrndr.extra:$module-natives-$os:$orxVersion"
init {
dependencies {
runtimeOnly(openrndr("gl3"))
runtimeOnly(openrndrNatives("gl3"))
implementation(openrndr("openal"))
runtimeOnly(openrndrNatives("openal"))
implementation(openrndr("application"))
implementation(openrndr("svg"))
implementation(openrndr("animatable"))
implementation(openrndr("extensions"))
implementation(openrndr("filter"))
implementation(openrndr("dialogs"))
if ("video" in openrndrFeatures) {
implementation(openrndr("ffmpeg"))
runtimeOnly(openrndrNatives("ffmpeg"))
}
for (feature in orxFeatures) {
implementation(orx(feature))
}
for (feature in ormlFeatures) {
implementation(orml(feature))
}
if ("orx-tensorflow" in orxFeatures) runtimeOnly("org.openrndr.extra:$orxTensorflowBackend-natives-$os:$orxVersion")
if ("orx-kinect-v1" in orxFeatures) runtimeOnly(orxNatives("orx-kinect-v1"))
if ("orx-olive" in orxFeatures) implementation(libs.kotlin.script.runtime)
}
}
}
val openrndr = Openrndr()
if (properties["openrndr.tasks"] == "true") {
task("create executable jar for $applicationMainClass") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("shadowJar")
}
task("run $applicationMainClass") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("run")
}
task("create standalone executable for $applicationMainClass") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("jpackageZip")
}
task("add IDE file scopes") {
group = " \uD83E\uDD8C OPENRNDR"
val scopesFolder = File("${project.projectDir}/.idea/scopes")
scopesFolder.mkdirs()
val files = listOf(
"Code" to "file:*.kt||file:*.frag||file:*.vert||file:*.glsl",
"Text" to "file:*.txt||file:*.md||file:*.xml||file:*.json",
"Gradle" to "file[*buildSrc*]:*/||file:*gradle.*||file:*.gradle||file:*/gradle-wrapper.properties||file:*.toml",
"Images" to "file:*.png||file:*.jpg||file:*.dds||file:*.exr"
)
files.forEach { (name, pattern) ->
val file = File(scopesFolder, "__$name.xml")
if (!file.exists()) {
file.writeText(
"""
<component name="DependencyValidationManager">
<scope name=" ★ $name" pattern="$pattern" />
</component>
""".trimIndent()
)
}
}
}
}

Binary file not shown.

BIN
data/fonts/default.otf Normal file

Binary file not shown.

92
data/fonts/license.txt Normal file
View File

@@ -0,0 +1,92 @@
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
data/images/cheeta.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@@ -1 +1,4 @@
openrndr.tasks=true
kotlin.code.style=official kotlin.code.style=official
org.gradle.unsafe.configuration-cache=false

33
gradle/libs.versions.toml Normal file
View File

@@ -0,0 +1,33 @@
[versions]
kotlin = "1.8.21"
openrndr = "0.4.3"
orx = "0.4.3"
orml = "0.4.1"
slf4j = "2.0.7"
log4j = "2.20.0"
jackson = "2.14.2"
[libraries]
kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" }
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
slf4j-nop = { group = "org.slf4j", name = "slf4j-nop", version.ref = "slf4j" }
slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" }
log4j-slf4j2 = { group = "org.apache.logging.log4j", name = "log4j-slf4j2-impl", version.ref = "log4j" }
log4j-core = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" }
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson" }
jackson-json = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-yaml", version.ref = "jackson" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.6.4" }
kotlin-logging = { group = "io.github.microutils", name = "kotlin-logging", version = "3.0.5" }
junit = { group = "junit", name = "junit", version = "4.13.2" }
jsoup = { group = "org.jsoup", name = "jsoup", version = "1.16.1" }
gson = { group = "com.google.code.gson", name = "gson", version = "2.10.1" }
csv = { group = "com.github.doyaaaaaken", name = "kotlin-csv-jvm", version = "1.9.0" }
[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
runtime = { id = "org.beryx.runtime", version = "1.13.0" }
gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" }

Binary file not shown.

View File

@@ -1,6 +1,6 @@
#Thu Aug 01 12:32:31 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

303
gradlew vendored
View File

@@ -1,78 +1,126 @@
#!/usr/bin/env sh #!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
############################################################################## ##############################################################################
## #
## Gradle start up script for UN*X # Gradle start up script for POSIX generated by Gradle.
## #
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
############################################################################## ##############################################################################
# Attempt to set APP_HOME # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" app_path=$0
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do # Need this for daisy-chained symlinks.
ls=`ls -ld "$PRG"` while
link=`expr "$ls" : '.*-> \(.*\)$'` APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
if expr "$link" : '/.*' > /dev/null; then [ -h "$app_path" ]
PRG="$link" do
else ls=$( ls -ld "$app_path" )
PRG=`dirname "$PRG"`"/$link" link=${ls#*' -> '}
fi case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle" # This is normally unused
APP_BASE_NAME=`basename "$0"` # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
DEFAULT_JVM_OPTS='"-Xmx64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD=maximum
warn () { warn () {
echo "$*" echo "$*"
} } >&2
die () { die () {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} } >&2
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
nonstop=false nonstop=false
case "`uname`" in case "$( uname )" in #(
CYGWIN* ) CYGWIN* ) cygwin=true ;; #(
cygwin=true Darwin* ) darwin=true ;; #(
;; MSYS* | MINGW* ) msys=true ;; #(
Darwin* ) NONSTOP* ) nonstop=true ;;
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD=$JAVA_HOME/jre/sh/java
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD=$JAVA_HOME/bin/java
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,7 +129,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
else else
JAVACMD="java" JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
@@ -89,84 +137,109 @@ location of your Java installation."
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
MAX_FD_LIMIT=`ulimit -H -n` case $MAX_FD in #(
if [ $? -eq 0 ] ; then max*)
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
MAX_FD="$MAX_FD_LIMIT" # shellcheck disable=SC3045
fi MAX_FD=$( ulimit -H -n ) ||
ulimit -n $MAX_FD warn "Could not query maximum file descriptor limit"
if [ $? -ne 0 ] ; then esac
warn "Could not set maximum file descriptor limit: $MAX_FD" case $MAX_FD in #(
fi '' | soft) :;; #(
else *)
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
fi # shellcheck disable=SC3045
fi ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
# Escape application args # Collect all arguments for the java command, stacking in reverse order:
save () { # * args from the command line
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done # * the main class name
echo " " # * -classpath
} # * -D...appname settings
APP_ARGS=$(save "$@") # * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules # For Cygwin or MSYS, switch paths to Windows format before running java
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong JAVACMD=$( cygpath --unix "$JAVACMD" )
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")" # Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@" exec "$JAVACMD" "$@"

52
gradlew.bat vendored
View File

@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@@ -10,18 +26,22 @@ if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if %ERRORLEVEL% equ 0 goto execute
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -35,7 +55,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto execute
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -45,38 +65,26 @@ echo location of your Java installation.
goto fail goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View File

@@ -1,2 +0,0 @@
rootProject.name = 'openrndr-template'

8
settings.gradle.kts Normal file
View File

@@ -0,0 +1,8 @@
rootProject.name = "openrndr-template"
pluginManagement {
repositories {
gradlePluginPortal()
mavenLocal()
}
}

View File

@@ -0,0 +1,22 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.olive.oliveProgram
/**
* This is a template for a live program.
*
* It uses oliveProgram {} instead of program {}. All code inside the
* oliveProgram {} can be changed while the program is running.
*/
fun main() = application {
configure {
width = 800
height = 800
}
oliveProgram {
extend {
drawer.clear(ColorRGBa.PINK)
}
}
}

View File

@@ -13,9 +13,8 @@ fun main() = application {
} }
program { program {
val image = loadImage("data/images/pm5544.png") val image = loadImage("data/images/pm5544.png")
val font = loadFont("data/fonts/IBMPlexMono-Regular.ttf", 64.0) val font = loadFont("data/fonts/default.otf", 64.0)
extend { extend {
drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2)) drawer.drawStyle.colorMatrix = tint(ColorRGBa.WHITE.shade(0.2))

View File

@@ -2,10 +2,11 @@ Configuration:
status: warn status: warn
Appenders: Appenders:
Console: Console:
name: Console - name: Console_Info
target: SYSTEM_OUT target: SYSTEM_ERR
PatternLayout: PatternLayout:
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" Pattern: "%highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=green} %style{[%t]}{white} %style{%-30.30c{1.}}{white} %style{ ↘ %m%n%ex}{white}"
#Pattern: "%style{%d{yyyy-MM-dd HH:mm:ss.SSS}}{white} %highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=green} %style{[%t]}{white} %style{%-30.30c{1.}}{cyan} %style{:%m%n%ex}{white}"
File: File:
append: false append: false
name: File_Appender name: File_Appender
@@ -14,7 +15,7 @@ Configuration:
Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" Pattern: "%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"
Loggers: Loggers:
Root: Root:
level: debug level: info
AppenderRef: AppenderRef:
- ref: Console - ref: Console_Info
- ref: File_Appender - ref: File_Appender