From 57f55f17f3abf962b6e17b8d2a3b7217db78a75e Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 7 Sep 2020 03:41:37 +0200 Subject: 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. --- logo/build.xml | 9 +++-- logo/manifest_xlogo | 2 +- 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 @@ - + + @@ -156,11 +157,12 @@ + @@ -179,6 +181,7 @@ + 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; - } - } - } } -- cgit v1.2.3