Compare commits

...

4 Commits

Author SHA1 Message Date
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
2 changed files with 72 additions and 18 deletions

View File

@@ -12,3 +12,7 @@ You will find some [basic instructions](https://guide.openrndr.org/#/02_Getting_
- `run` runs the TemplateProgram
- `jar` creates an executable platform specific jar file with all dependencies
- `zipDistribution` creates a zip file containing the application jar and the data folder
## Cross builds
To create runnable jars for a platform different from the platform you use to build one uses `./gradlew jar --PtargetPlatform=<platform>`. The supported platforms are `windows`, `macos`, `linux-x64` and `linux-arm64`. Note that the `linux-arm64` platform will only work with OPENRNDR snapshot builds from master and OPENRNDR 0.3.39 (a future version).

View File

@@ -1,41 +1,85 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
/* the name of this project, default is the template version but you are free to change these */
group = "org.openrndr.template"
version = "0.3.9"
version = "0.3.10"
val applicationMainClass = "TemplateProgramKt"
/* Which additional (ORX) libraries should be added to this project. */
val orxFeatures = setOf(
// "orx-camera",
"orx-compositor",
// "orx-easing",
// "orx-filter-extension",
// "orx-file-watcher",
"orx-fx",
"orx-gui",
// "orx-integral-image",
// "orx-interval-tree",
"orx-image-fit",
// "orx-jumpflood",
// "orx-kinect-v1",
// "orx-kdtree",
// "orx-mesh-generators"
// "orx-midi",
// "orx-noclear",
"orx-noise",
// "orx-obj"
"orx-olive",
// "orx-osc"
// "orx-palette"
// "orx-runway"
"orx-shade-styles"
)
/* Which OPENRNDR libraries should be added to this project? */
val openrndrFeatures = setOf(
"panel",
"video"
)
/* Which version of OPENRNDR, ORX and Panel should be used? */
val openrndrUseSnapshot = false
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.38"
val openrndrVersion = if (openrndrUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.39"
val panelUseSnapshot = false
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.20"
val panelVersion = if (panelUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.21"
val orxUseSnapshot = false
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.46"
val orxVersion = if (orxUseSnapshot) "0.4.0-SNAPSHOT" else "0.3.47"
// supported features are: orx-camera, orx-compositor,orx-easing, orx-filter-extension,orx-file-watcher, orx-fx
// orx-integral-image, orx-interval-tree, orx-jumpflood, orx-kinect-v1, orx-kdtree, orx-mesh-generators,orx-midi, orx-no-clear,
// orx-noise, orx-obj, orx-olive, orx-osc, orx-palette, orx-runway
val orxFeatures = setOf("orx-noise", "orx-fx", "orx-olive")
//<editor-fold desc="This is code for OPENRNDR, no need to edit this .. most of the times">
val supportedPlatforms = setOf("windows", "macos", "linux-x64", "linux-arm64")
// supported features are: video, panel
val openrndrFeatures = setOf("video", "panel")
// --------------------------------------------------------------------------------------------------------------------
val openrndrOs = when (OperatingSystem.current()) {
val openrndrOs = if (project.hasProperty("targetPlatform")) {
val platform : String = project.property("targetPlatform") as String
if (platform !in supportedPlatforms) {
throw IllegalArgumentException("target platform not supported: $platform")
} else {
platform
}
} else when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> "windows"
OperatingSystem.MAC_OS -> "macos"
OperatingSystem.LINUX -> "linux-x64"
OperatingSystem.LINUX -> when(val h = DefaultNativePlatform("current").architecture.name) {
"x86-64" -> "linux-x64"
"aarch64" -> "linux-arm64"
else ->throw IllegalArgumentException("architecture not supported: $h")
}
else -> throw IllegalArgumentException("os not supported")
}
//</editor-fold>
enum class Logging {
NONE,
SIMPLE,
FULL
}
/* What type of logging should this project use? */
val applicationLogging = Logging.SIMPLE
val kotlinVersion = "1.3.61"
@@ -69,8 +113,14 @@ fun DependencyHandler.orxNatives(module: String): Any {
return "org.openrndr.extra:$module-natives-$openrndrOs:$orxVersion"
}
dependencies {
/* This is where you add additional (third-party) dependencies */
// implementation("org.jsoup:jsoup:1.12.2")
// implementation("com.google.code.gson:gson:2.8.6")
//<editor-fold desc="Managed dependencies">
runtimeOnly(openrndr("gl3"))
runtimeOnly(openrndrNatives("gl3"))
implementation(openrndr("openal"))
@@ -82,7 +132,6 @@ dependencies {
implementation(openrndr("filter"))
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core","1.3.3")
implementation("io.github.microutils", "kotlin-logging","1.7.8")
when(applicationLogging) {
@@ -113,7 +162,7 @@ dependencies {
}
if ("orx-kinect-v1" in orxFeatures) {
runtimeOnly("orx-kinect-v1")
runtimeOnly(orxNatives("orx-kinect-v1"))
}
if ("orx-olive" in orxFeatures) {
@@ -122,6 +171,7 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation("junit", "junit", "4.12")
//</editor-fold>
}
// --------------------------------------------------------------------------------------------------------------------