diff options
author | Sven Gothel <[email protected]> | 2020-09-07 03:41:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-09-07 17:34:22 +0200 |
commit | 57f55f17f3abf962b6e17b8d2a3b7217db78a75e (patch) | |
tree | 3e43caf71c3506c9f2cbcb60b98d6791f5d99a48 /logo | |
parent | b99c615dd24670545caa978803c8549a3bb65154 (diff) |
JogAmp: build.xml, manifest: Add jogamp-fat.jar; Lanceur.java: Replace all java3d natives and OS with jogamp-fat.jar
Also use min language 1.8 for Java >= 8.
Using JogAmp's Java3D + jogamp-fat.jar (JOGL etc),
already satisfies all platform depenencies required for the supported platforms.
Diffstat (limited to 'logo')
-rw-r--r-- | logo/build.xml | 9 | ||||
-rw-r--r-- | logo/manifest_xlogo | 2 | ||||
-rw-r--r-- | logo/src/Lanceur.java | 104 |
3 files changed, 18 insertions, 97 deletions
diff --git a/logo/build.xml b/logo/build.xml index 7b8e61a..037c527 100644 --- a/logo/build.xml +++ b/logo/build.xml @@ -72,8 +72,9 @@ <include name="linux/**"/> <include name="solaris/**"/> <include name="jh.jar"/> - <include name="j3dcore.jar"/> + <include name="jogamp-fat.jar"/> <include name="vecmath.jar"/> + <include name="j3dcore.jar"/> <include name="j3dutils.jar"/> <include name="jl1.0.1.jar"/> <include name="log4j-api-2.1.jar"/> @@ -156,11 +157,12 @@ <target name="compile" depends="copy.static.files"> <!-- <echo> ${ant.java.version}</echo> --> <javac - source="1.6" encoding="utf8" - target="1.6" + source="1.8" encoding="utf8" + target="1.8" srcdir="src" destdir="deploy/" includeantruntime="false"> <classpath> + <pathelement location="jogamp-fat.jar"/> <pathelement location="vecmath.jar"/> <pathelement location="j3dcore.jar"/> <pathelement location="j3dutils.jar"/> @@ -179,6 +181,7 @@ <target name="copy.static.files" depends="create.deploy"> <copy todir="deploy/"> <fileset dir="."> + <include name="jogamp-fat.jar"/> <include name="vecmath.jar"/> <include name="j3dcore.jar"/> <include name="j3dutils.jar"/> diff --git a/logo/manifest_xlogo b/logo/manifest_xlogo index abf2fc8..37646e3 100644 --- a/logo/manifest_xlogo +++ b/logo/manifest_xlogo @@ -1,2 +1,2 @@ Main-Class: xlogo.Logo -Class-Path: jh.jar vecmath.jar j3dcore.jar j3dutils.jar jl1.0.1.jar log4j-api-2.1.jar log4j-core-2.1.jar org.json-20131017.jar
\ No newline at end of file +Class-Path: jh.jar jogamp-fat.jar vecmath.jar j3dcore.jar j3dutils.jar jl1.0.1.jar log4j-api-2.1.jar log4j-core-2.1.jar org.json-20131017.jar diff --git a/logo/src/Lanceur.java b/logo/src/Lanceur.java index 3e26c16..3298c55 100644 --- a/logo/src/Lanceur.java +++ b/logo/src/Lanceur.java @@ -212,12 +212,6 @@ public class Lanceur { // Linux //InputStream lib; - OS os = OS.valueOf(osName, arch); - - for (Library lib : os.getLibraries()) { - copy2Tmp(lib); - } - } private void initTmpFolder() { @@ -330,30 +324,17 @@ public class Lanceur { */ enum Library { TMP_XLOGO("tmp_xlogo.jar"), - - JH("jh.jar"), - VECMATH("vecmath.jar"), - J3D_CORE("j3dcore.jar"), - J3D_UTILS("j3dutils.jar"), - JLAYER("jl1.0.1.jar"), - LOG4J_API("log4j-api-2.1.jar"), - LOG4J_CORE("log4j-core-2.1.jar"), - ORG_JSON("org.json-20131017.jar"), - - LIN_AMD64_J3D_CORE("linux/amd64/", "libj3dcore-ogl.so"), - LIN_X86_J3D_CORE_OGL("linux/x86/", "libj3dcore-ogl.so"), - LIN_X86_J3D_CORE_OGL_CG("linux/x86/", "libj3dcore-ogl-cg.so"), - - WIN_AMD64_J3D_CORE("windows/amd64/", "j3dcore-ogl.dll"), - WIN_X86_J3D_CORE_D3D("windows/x86/", "j3dcore-d3d.dll"), - WIN_X86_J3D_CORE_OGL("windows/x86/", "j3dcore-ogl.dll"), - WIN_X86_J3D_CORE_CG("windows/x86/", "j3dcore-ogl-cg.dll"), - WIN_X86_J3D_CORE_OGL_CHK("windows/x86/", "j3dcore-ogl-chk.dll"), - WIN_AMD64_J3D_CORE_OGL("windows/amd64/", "j3dcore-ogl.dll"), - - SOL_X86_LIB_J3D_CORE("solaris/i386/", "libj3dcore-ogl.so"), - SOL_AMD64_LIB_J3D_CORE("solaris/amd64/","libj3dcore-ogl.so"), ; - + + JH("jh.jar"), + JOGAMP("jogamp-fat.jar"), + VECMATH("vecmath.jar"), + J3D_CORE("j3dcore.jar"), + J3D_UTILS("j3dutils.jar"), + JLAYER("jl1.0.1.jar"), + LOG4J_API("log4j-api-2.1.jar"), + LOG4J_CORE("log4j-core-2.1.jar"), + ORG_JSON("org.json-20131017.jar"); + private String path; private String libName; @@ -387,67 +368,4 @@ public class Lanceur { return new File(location.getAbsolutePath() + File.separator + libName); } } - - /** - * These represent different operating systems and architectures. They provide system specific {@link Library}s - * @author Marko - * - */ - enum OS { - WINDOWS_AMD64( - Library.WIN_AMD64_J3D_CORE, - Library.WIN_AMD64_J3D_CORE_OGL), - WINDOWS_X86( - Library.WIN_X86_J3D_CORE_D3D, - Library.WIN_X86_J3D_CORE_OGL, - Library.WIN_X86_J3D_CORE_CG, - Library.WIN_X86_J3D_CORE_OGL_CHK), - LINUX_AMD64( - Library.LIN_AMD64_J3D_CORE), - LINUX_86( - Library.LIN_X86_J3D_CORE_OGL, - Library.LIN_X86_J3D_CORE_OGL_CG), - SOLARIS_86( - Library.SOL_X86_LIB_J3D_CORE), - SOLARIS_AMD64( - Library.SOL_AMD64_LIB_J3D_CORE), - MAC, - UNKNOWN; - - private Library[] osLibs = new Library[0]; - - OS(Library... osLibs) { - this.osLibs = osLibs; - } - - public Library[] getLibraries() { - return osLibs; - } - - public static OS valueOf(String os, String arch) { - if (os.indexOf("linux") != -1) { - return (arch.indexOf("86") != -1) ? LINUX_86 : LINUX_AMD64; - } - else if (os.indexOf("windows") != -1) { - return (arch.indexOf("86") != -1) ? WINDOWS_X86 : WINDOWS_AMD64; - } - else if (os.indexOf("mac") != -1) { - return MAC; - } - else if (os.indexOf("sunos") != -1) { - if (arch.indexOf("86") != -1) { - return SOLARIS_86; - } - else if (arch.indexOf("amd64") != -1) { - return SOLARIS_AMD64; - } - else { - return UNKNOWN; - } - } - else { - return UNKNOWN; - } - } - } } |