Provides builds for both LWJGL2 and LWJGL3.
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -18,11 +18,15 @@
|
|||||||
*.zip
|
*.zip
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.rar
|
*.rar
|
||||||
|
*.so
|
||||||
|
*.dll
|
||||||
|
/*/*.so
|
||||||
|
/*/*.dll
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
/local.properties
|
/local.properties
|
||||||
/build/
|
/build/
|
||||||
/library/build/
|
/*/build/
|
||||||
/.idea/
|
/.idea/
|
||||||
/.gradle/
|
/.gradle/
|
||||||
|
|||||||
99
build.gradle
99
build.gradle
@@ -8,101 +8,24 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.tools.ant.taskdefs.condition.Os
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id "application"
|
|
||||||
id "distribution"
|
|
||||||
id "com.github.johnrengelman.shadow" version "5.0.0"
|
|
||||||
id "edu.sc.seis.launch4j" version "2.4.5"
|
|
||||||
id "edu.sc.seis.macAppBundle" version "2.3.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
maven {
|
|
||||||
url "https://dl.bintray.com/jmonkeyengine/org.jmonkeyengine"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
jme3 = [version: '3.3.2-stable', g: 'org.jmonkeyengine']
|
jme3 = [version: '3.3.2-stable', g: 'org.jmonkeyengine']
|
||||||
versionNumber = 3
|
versionNumber = 2
|
||||||
}
|
}
|
||||||
|
version = "1.1"
|
||||||
|
|
||||||
dependencies {
|
task run {
|
||||||
// Logging
|
doFirst {
|
||||||
implementation "org.slf4j:slf4j-api:1.7.15"
|
print "WARNING: This project has two methods of execution: with LWJGL 2 and with LWJGL 3. Run the task desktopLegacy:run for the former and desktop:run for the latter."
|
||||||
implementation "org.slf4j:slf4j-simple:1.7.5"
|
|
||||||
|
|
||||||
implementation project(':library')
|
|
||||||
implementation "${jme3.g}:jme3-core:${jme3.version}"
|
|
||||||
implementation "${jme3.g}:jme3-desktop:${jme3.version}"
|
|
||||||
implementation "${jme3.g}:jme3-lwjgl3:${jme3.version}"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define the main class for the application
|
|
||||||
mainClassName = 'markil3.controller.Main'
|
|
||||||
version = "1.0"
|
|
||||||
versionNumber = 1
|
|
||||||
|
|
||||||
processResources {
|
|
||||||
from (".") {
|
|
||||||
include "LICENSE"
|
|
||||||
include "JME3-LICENSE"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
allprojects {
|
||||||
* TODO - The default zipped distributions are a bit of a mess.
|
repositories {
|
||||||
*/
|
jcenter()
|
||||||
jar {
|
maven {
|
||||||
baseName rootProject.name
|
url "https://dl.bintray.com/jmonkeyengine/org.jmonkeyengine"
|
||||||
version rootProject.version
|
}
|
||||||
manifest {
|
|
||||||
attributes "Main-Class": mainClassName,
|
|
||||||
"Class-Path": configurations.runtime.files.collect {
|
|
||||||
"lib/$it.name"
|
|
||||||
}.join(" "),
|
|
||||||
"Implementation-Title": rootProject.name,
|
|
||||||
"Implementation-Version": rootProject.version,
|
|
||||||
"Version-Code": versionNumber
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
archivesBaseName = rootProject.name
|
|
||||||
archiveClassifier = "universal"
|
|
||||||
version = rootProject.version
|
|
||||||
mainClassName = project.mainClassName
|
|
||||||
}
|
|
||||||
|
|
||||||
launch4j {
|
|
||||||
mainClassName = project.mainClassName
|
|
||||||
outfile = rootProject.name + "-" + project.version + "-windows.exe"
|
|
||||||
copyConfigurable = shadowJar.outputs.files
|
|
||||||
jar = shadowJar.getArchiveFile()
|
|
||||||
bundledJrePath = "jre"
|
|
||||||
//icon = new File(sourceSets.main.resources.srcDirs[0], "icon256.ico")
|
|
||||||
}
|
|
||||||
|
|
||||||
createExe.doLast({
|
|
||||||
println project.tasks.installDist.outputs.files.getClass()
|
|
||||||
for (file in new File(installDist.outputs.files[0], "lib").listFiles()) {
|
|
||||||
println file
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
macAppBundle {
|
|
||||||
mainClassName = project.mainClassName
|
|
||||||
icon = "myIcon.icns"
|
|
||||||
if (Os.isFamily(Os.FAMILY_MAC) && (appStyle == 'Oracle' || appStyle == 'universalJavaApplicationStub')) {
|
|
||||||
bundleJRE = true
|
|
||||||
}
|
|
||||||
javaProperties.put("apple.laf.useScreenMenuBar", "true")
|
|
||||||
backgroundImage = "doc/macbackground.png"
|
|
||||||
jarTask = "shadowJar"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
86
desktop/build.gradle
Normal file
86
desktop/build.gradle
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Markil 3. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "application"
|
||||||
|
id "distribution"
|
||||||
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
||||||
|
id "edu.sc.seis.launch4j" version "2.4.5"
|
||||||
|
id "edu.sc.seis.macAppBundle" version "2.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// Logging
|
||||||
|
implementation "org.slf4j:slf4j-api:1.7.15"
|
||||||
|
implementation "org.slf4j:slf4j-simple:1.7.5"
|
||||||
|
|
||||||
|
implementation project(':library')
|
||||||
|
implementation "${jme3.g}:jme3-core:${jme3.version}"
|
||||||
|
implementation "${jme3.g}:jme3-desktop:${jme3.version}"
|
||||||
|
implementation "${jme3.g}:jme3-lwjgl3:${jme3.version}"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the main class for the application
|
||||||
|
mainClassName = 'markil3.controller.Main'
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO - The default zipped distributions are a bit of a mess.
|
||||||
|
*/
|
||||||
|
jar {
|
||||||
|
baseName rootProject.name
|
||||||
|
version rootProject.version
|
||||||
|
manifest {
|
||||||
|
attributes "Main-Class": mainClassName,
|
||||||
|
"Class-Path": configurations.runtime.files.collect {
|
||||||
|
"lib/$it.name"
|
||||||
|
}.join(" "),
|
||||||
|
"Implementation-Title": rootProject.name,
|
||||||
|
"Implementation-Version": rootProject.version,
|
||||||
|
"Version-Code": versionNumber
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archivesBaseName = rootProject.name
|
||||||
|
archiveClassifier = "universal-lwjgl3"
|
||||||
|
version = rootProject.version
|
||||||
|
mainClassName = project.mainClassName
|
||||||
|
}
|
||||||
|
|
||||||
|
launch4j {
|
||||||
|
mainClassName = project.mainClassName
|
||||||
|
outfile = rootProject.name + "-" + rootProject.version + "-windows-lwjgl3.exe"
|
||||||
|
copyConfigurable = shadowJar.outputs.files
|
||||||
|
jar = shadowJar.archiveFile.get()
|
||||||
|
bundledJrePath = "jre"
|
||||||
|
//icon = new File(sourceSets.main.resources.srcDirs[0], "icon256.ico")
|
||||||
|
}
|
||||||
|
|
||||||
|
createExe.doLast({
|
||||||
|
println project.tasks.installDist.outputs.files.getClass()
|
||||||
|
for (file in new File(installDist.outputs.files[0], "lib").listFiles()) {
|
||||||
|
println file
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
macAppBundle {
|
||||||
|
mainClassName = project.mainClassName
|
||||||
|
icon = "myIcon.icns"
|
||||||
|
if (Os.isFamily(Os.FAMILY_MAC) && (appStyle == 'Oracle' || appStyle == 'universalJavaApplicationStub')) {
|
||||||
|
bundleJRE = true
|
||||||
|
}
|
||||||
|
javaProperties.put("apple.laf.useScreenMenuBar", "true")
|
||||||
|
backgroundImage = "doc/macbackground.png"
|
||||||
|
jarTask = "shadowJar"
|
||||||
|
}
|
||||||
82
desktopLegacy/build.gradle
Normal file
82
desktopLegacy/build.gradle
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2020 Markil 3. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "application"
|
||||||
|
id "distribution"
|
||||||
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
||||||
|
id "edu.sc.seis.launch4j" version "2.4.5"
|
||||||
|
id "edu.sc.seis.macAppBundle" version "2.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(project(':desktop')) {
|
||||||
|
exclude group: jme3.g, module: "jme3-lwjgl3"
|
||||||
|
}
|
||||||
|
implementation "${jme3.g}:jme3-lwjgl:${jme3.version}"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the main class for the application
|
||||||
|
mainClassName = 'markil3.controller.Main'
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO - The default zipped distributions are a bit of a mess.
|
||||||
|
*/
|
||||||
|
jar {
|
||||||
|
baseName rootProject.name
|
||||||
|
version rootProject.version
|
||||||
|
manifest {
|
||||||
|
attributes "Main-Class": mainClassName,
|
||||||
|
"Class-Path": configurations.runtime.files.collect {
|
||||||
|
"lib/$it.name"
|
||||||
|
}.join(" "),
|
||||||
|
"Implementation-Title": rootProject.name,
|
||||||
|
"Implementation-Version": rootProject.version,
|
||||||
|
"Version-Code": versionNumber
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archivesBaseName = rootProject.name
|
||||||
|
archiveClassifier = "universal-lwjgl2"
|
||||||
|
version = rootProject.version
|
||||||
|
mainClassName = project.mainClassName
|
||||||
|
}
|
||||||
|
|
||||||
|
launch4j {
|
||||||
|
mainClassName = project.mainClassName
|
||||||
|
outfile = rootProject.name + "-" + rootProject.version + "-windows-lwjgl2.exe"
|
||||||
|
copyConfigurable = shadowJar.outputs.files
|
||||||
|
jar = shadowJar.archiveFile.get()
|
||||||
|
bundledJrePath = "jre"
|
||||||
|
//icon = new File(sourceSets.main.resources.srcDirs[0], "icon256.ico")
|
||||||
|
}
|
||||||
|
|
||||||
|
createExe.doLast({
|
||||||
|
println project.tasks.installDist.outputs.files.getClass()
|
||||||
|
for (file in new File(installDist.outputs.files[0], "lib").listFiles()) {
|
||||||
|
println file
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
macAppBundle {
|
||||||
|
mainClassName = project.mainClassName
|
||||||
|
icon = "myIcon.icns"
|
||||||
|
if (Os.isFamily(Os.FAMILY_MAC) && (appStyle == 'Oracle' || appStyle == 'universalJavaApplicationStub')) {
|
||||||
|
bundleJRE = true
|
||||||
|
}
|
||||||
|
javaProperties.put("apple.laf.useScreenMenuBar", "true")
|
||||||
|
backgroundImage = "doc/macbackground.png"
|
||||||
|
jarTask = "shadowJar"
|
||||||
|
}
|
||||||
@@ -12,13 +12,6 @@ plugins {
|
|||||||
id "java-library"
|
id "java-library"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
maven {
|
|
||||||
url "https://dl.bintray.com/jmonkeyengine/org.jmonkeyengine"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceCompatibility = "1.8"
|
sourceCompatibility = "1.8"
|
||||||
targetCompatibility = "1.8"
|
targetCompatibility = "1.8"
|
||||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||||
@@ -33,7 +26,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
from ("..") {
|
from(".") {
|
||||||
include "LICENSE"
|
include "LICENSE"
|
||||||
include "JME3-LICENSE"
|
include "JME3-LICENSE"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,4 +16,6 @@ include 'services:webservice'
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = 'JMEControllerConfig'
|
rootProject.name = 'JMEControllerConfig'
|
||||||
include "library"
|
include "library"
|
||||||
|
include "desktop"
|
||||||
|
include "desktopLegacy"
|
||||||
Reference in New Issue
Block a user