From 393533a480750b599539889ef30e34078cef9669 Mon Sep 17 00:00:00 2001 From: Emanuel Rabina Date: Sat, 12 Mar 2022 23:42:24 +1300 Subject: [PATCH] Undo platform-specific bundles - doesn't save much --- CHANGELOG.md | 1 - build.gradle | 10 ---------- redhorizon-cli/build.gradle | 19 +++++++++---------- redhorizon-engine/build.gradle | 16 +++++++--------- 4 files changed, 16 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c4a9fc..199bd612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ Changelog - Update LWJGL to 3.3.0+ and ImGui to 1.86.0+ for better support of M1 macs (note that this is using Java 11 which only has an x86 release, so will be running using Rosetta) - - Create platform-specific bundles to keep download size down - Improve UI scaling to go with any OS display scaling settings ### 0.34.0 diff --git a/build.gradle b/build.gradle index 788c7d65..5f104c2e 100644 --- a/build.gradle +++ b/build.gradle @@ -14,15 +14,6 @@ * limitations under the License. */ -import org.gradle.internal.os.OperatingSystem - -def os = OperatingSystem.current() -def targetPlatform = findProperty('targetPlatform') ?: - os == OperatingSystem.MAC_OS ? 'macos' : - os == OperatingSystem.WINDOWS ? 'windows' : - System.getenv('CI') as boolean ? 'linux' : - null - // Global configuration allprojects { group = 'nz.net.ultraq.redhorizon' @@ -55,7 +46,6 @@ subprojects { reflectionsVersion = '0.10.2' slf4jVersion = '1.7.32' } - ext.targetPlatform = targetPlatform dependencies { implementation 'nz.net.ultraq.groovy:groovy-extensions:2.0.0' diff --git a/redhorizon-cli/build.gradle b/redhorizon-cli/build.gradle index af820370..267ff3ed 100644 --- a/redhorizon-cli/build.gradle +++ b/redhorizon-cli/build.gradle @@ -18,6 +18,15 @@ plugins { id 'application' } +import org.gradle.internal.os.OperatingSystem + +def os = OperatingSystem.current() +def targetPlatform = findProperty('targetPlatform') ?: + os == OperatingSystem.MAC_OS ? 'macos' : + os == OperatingSystem.WINDOWS ? 'windows' : + System.getenv('CI') as boolean ? 'linux' : + null + dependencies { implementation project(':redhorizon-classic') implementation project(':redhorizon-engine') @@ -46,12 +55,6 @@ application { distributions { main { contents { - if (targetPlatform == 'windows') { - exclude 'bin/redhorizon' - } - else { - exclude 'bin/redhorizon.bat' - } // Have to mention explicitly because of the subproject layout from('..') { include 'CHANGELOG.md' @@ -65,7 +68,3 @@ distributions { distTar { enabled = false } - -distZip { - archiveClassifier = targetPlatform -} diff --git a/redhorizon-engine/build.gradle b/redhorizon-engine/build.gradle index e0b5d527..afa40907 100644 --- a/redhorizon-engine/build.gradle +++ b/redhorizon-engine/build.gradle @@ -16,9 +16,6 @@ description = 'Core rendering engine for Red Horizon' -def lwjglNatives = "natives-${targetPlatform}" -def imguiNatives = "imgui-java-natives-${targetPlatform}" - dependencies { implementation project(':redhorizon-events') implementation project(':redhorizon-filetypes') @@ -34,10 +31,11 @@ dependencies { implementation 'org.lwjgl:lwjgl-opengl' implementation "org.reflections:reflections:${reflectionsVersion}" - runtimeOnly "io.github.spair:${imguiNatives}:${imguiVersion}" - runtimeOnly "io.github.spair:${imguiNatives}:${imguiVersion}" - runtimeOnly "org.lwjgl:lwjgl::${lwjglNatives}" - runtimeOnly "org.lwjgl:lwjgl-glfw::${lwjglNatives}" - runtimeOnly "org.lwjgl:lwjgl-openal::${lwjglNatives}" - runtimeOnly "org.lwjgl:lwjgl-opengl::${lwjglNatives}" + ['natives-macos', 'natives-windows'].each { natives -> + runtimeOnly "io.github.spair:imgui-java-${natives}:${imguiVersion}" + runtimeOnly "org.lwjgl:lwjgl::${natives}" + runtimeOnly "org.lwjgl:lwjgl-glfw::${natives}" + runtimeOnly "org.lwjgl:lwjgl-openal::${natives}" + runtimeOnly "org.lwjgl:lwjgl-opengl::${natives}" + } }