From fadf9710747fc25f1106721b51406555689163fb Mon Sep 17 00:00:00 2001 From: Willem Date: Tue, 15 Mar 2022 16:53:12 +0100 Subject: [PATCH] Added warp-hash update and check --- gdxapp4d-boot-desktop/local-override.xml | 12 ++--- gdxapp4d-chain-default-apps/pom.xml | 44 +++++++++++++++++ gdxapp4d-chain-default-music/pom.xml | 31 ++++++++++++ gdxapp4d-chain-dep-osgi-scr/pom.xml | 31 ++++++++++++ gdxapp4d-chain-font-unicode4d/pom.xml | 9 ++++ gdxapp4d-chain-sys-default/pom.xml | 31 ++++++++++++ gdxapp4d-chain-sys-engine/pom.xml | 47 +++++++++++++++---- gdxapp4d-chain-vrlib/pom.xml | 35 ++++++++++++++ .../unicode4d/TestConvFont.java | 14 +++--- gdxapp4d-lib-warpme/pom.xml | 20 ++++++++ .../warpme/hash/WaterShotAddict.java | 11 +++++ .../gdxapp4d/tos4/GDXAppTos4Activator.java | 34 +++++++------- 12 files changed, 282 insertions(+), 37 deletions(-) diff --git a/gdxapp4d-boot-desktop/local-override.xml b/gdxapp4d-boot-desktop/local-override.xml index 3a42a416..f9ea9aea 100644 --- a/gdxapp4d-boot-desktop/local-override.xml +++ b/gdxapp4d-boot-desktop/local-override.xml @@ -1,20 +1,20 @@ - ../gdxapp4d-chain-sys-engine/src/main/chain - ../gdxapp4d-chain-sys-default/src/main/chain + ../gdxapp4d-chain-sys-engine/target/chain + ../gdxapp4d-chain-sys-default/target/chain - ../gdxapp4d-chain-dep-osgi-scr/src/main/chain + ../gdxapp4d-chain-dep-osgi-scr/target/chain ../gdxapp4d-chain-font-unicode4d/target/chain - ../gdxapp4d-chain-default-music/src/main/chain - ../gdxapp4d-chain-default-apps/src/main/chain + ../gdxapp4d-chain-default-music/target/chain + ../gdxapp4d-chain-default-apps/target/chain ../gdxapp4d-app-calculator/target/classes ../gdxapp4d-app-hewallet/target/classes ../gdxapp4d-app-tosamp/target/classes ../gdxapp4d-app-notepad/target/classes ../gdxapp4d-app-glyphdemo/target/classes - ../gdxapp4d-chain-vrlib/src/main/chain + ../gdxapp4d-chain-vrlib/target/chain ../gdxapp4d-vrgem4/target/classes ../gdxapp4d-vrsys5/target/classes diff --git a/gdxapp4d-chain-default-apps/pom.xml b/gdxapp4d-chain-default-apps/pom.xml index ecbc37b4..a45dd6bf 100644 --- a/gdxapp4d-chain-default-apps/pom.xml +++ b/gdxapp4d-chain-default-apps/pom.xml @@ -14,6 +14,12 @@ ${project.version} provided + + love.distributedrebirth.gdxapp4d + gdxapp4d-app-glyphdemo + ${project.version} + provided + love.distributedrebirth.gdxapp4d gdxapp4d-app-hewallet @@ -33,4 +39,42 @@ provided + + + + maven-antrun-plugin + + + package + + + + + + + + + + + + + + + + + + + + + + + + + run + + + + + + \ No newline at end of file diff --git a/gdxapp4d-chain-default-music/pom.xml b/gdxapp4d-chain-default-music/pom.xml index 86332b74..005e8982 100644 --- a/gdxapp4d-chain-default-music/pom.xml +++ b/gdxapp4d-chain-default-music/pom.xml @@ -7,4 +7,35 @@ gdxapp4d-chain-default-music pom + + + + maven-antrun-plugin + + + package + + + + + + + + + + + + + + + + + + run + + + + + + \ No newline at end of file diff --git a/gdxapp4d-chain-dep-osgi-scr/pom.xml b/gdxapp4d-chain-dep-osgi-scr/pom.xml index 40f2f17b..c6deee7c 100644 --- a/gdxapp4d-chain-dep-osgi-scr/pom.xml +++ b/gdxapp4d-chain-dep-osgi-scr/pom.xml @@ -7,4 +7,35 @@ gdxapp4d-chain-dep-osgi-scr pom + + + + maven-antrun-plugin + + + package + + + + + + + + + + + + + + + + + + run + + + + + + \ No newline at end of file diff --git a/gdxapp4d-chain-font-unicode4d/pom.xml b/gdxapp4d-chain-font-unicode4d/pom.xml index aa1397ec..54e356e0 100644 --- a/gdxapp4d-chain-font-unicode4d/pom.xml +++ b/gdxapp4d-chain-font-unicode4d/pom.xml @@ -19,6 +19,15 @@ + + + + + + + + + diff --git a/gdxapp4d-chain-sys-default/pom.xml b/gdxapp4d-chain-sys-default/pom.xml index 4f6d3ae2..025beecb 100644 --- a/gdxapp4d-chain-sys-default/pom.xml +++ b/gdxapp4d-chain-sys-default/pom.xml @@ -7,4 +7,35 @@ gdxapp4d-chain-sys-default pom + + + + maven-antrun-plugin + + + package + + + + + + + + + + + + + + + + + + run + + + + + + \ No newline at end of file diff --git a/gdxapp4d-chain-sys-engine/pom.xml b/gdxapp4d-chain-sys-engine/pom.xml index 3de93adc..b9230443 100644 --- a/gdxapp4d-chain-sys-engine/pom.xml +++ b/gdxapp4d-chain-sys-engine/pom.xml @@ -1,10 +1,41 @@ - 4.0.0 - - love.distributedrebirth.gdxapp4d - gdxapp4d - 0.0.1-SNAPSHOT - - gdxapp4d-chain-sys-engine - pom + 4.0.0 + + love.distributedrebirth.gdxapp4d + gdxapp4d + 0.0.1-SNAPSHOT + + gdxapp4d-chain-sys-engine + pom + + + + maven-antrun-plugin + + + package + + + + + + + + + + + + + + + + + + run + + + + + + \ No newline at end of file diff --git a/gdxapp4d-chain-vrlib/pom.xml b/gdxapp4d-chain-vrlib/pom.xml index 8e5cf62d..272ad304 100644 --- a/gdxapp4d-chain-vrlib/pom.xml +++ b/gdxapp4d-chain-vrlib/pom.xml @@ -21,4 +21,39 @@ provided + + + + maven-antrun-plugin + + + package + + + + + + + + + + + + + + + + + + + + + + run + + + + + + \ No newline at end of file diff --git a/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java b/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java index 02ccc062..a3c644c1 100644 --- a/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java +++ b/gdxapp4d-lib-unicodezd/src/test/java/love/distributedrebirth/unicode4d/TestConvFont.java @@ -32,17 +32,17 @@ public class TestConvFont { } // manually run; - // gdxapp4d-chain-sys-unicode4d/src/main/nodejs$ npm install - // gdxapp4d-chain-sys-unicode4d/src/main/nodejs$ ./conv-font.sh ../chain/plane0/ ../../../target/chain2/plane0/ - // gdxapp4d-chain-sys-unicode4d/src/main/nodejs$ ./conv-font.sh ../chain/plane1/ ../../../target/chain2/plane1/ - // gdxapp4d-chain-sys-unicode4d/src/main/nodejs$ ./conv-font.sh ../chain/plane2/ ../../../target/chain2/plane2/ + // gdxapp4d-chain-font-unicode4d/src/main/nodejs$ npm install + // gdxapp4d-chain-font-unicode4d/src/main/nodejs$ ./conv-font.sh ../chain/plane0/ ../../../target/chain2/plane0/ + // gdxapp4d-chain-font-unicode4d/src/main/nodejs$ ./conv-font.sh ../chain/plane1/ ../../../target/chain2/plane1/ + // gdxapp4d-chain-font-unicode4d/src/main/nodejs$ ./conv-font.sh ../chain/plane2/ ../../../target/chain2/plane2/ public void run() { - System.out.println("Starting conversion."); + System.out.println("Starting conversion;"); try { // NOTE: Are in order like the FontAtlas of ImGui - String in = "../gdxapp4d-chain-sys-unicode4d/target/chain2/"; - String out = "../gdxapp4d-chain-sys-unicode4d/target/chain/"; + String in = "../gdxapp4d-chain-font-unicode4d/target/chain2/"; + String out = "../gdxapp4d-chain-font-unicode4d/target/chain/"; conf("code-2000", new File(in+"plane0/code-2000.ttf.xml"), new File(out+"plane0/code-2000.ttf4d")); conf("fa-solid-900", new File(in+"plane0/fa-solid-900.ttf.xml"), new File(out+"plane0/fa-solid-900.ttf4d")); diff --git a/gdxapp4d-lib-warpme/pom.xml b/gdxapp4d-lib-warpme/pom.xml index 8ac2541e..c9e8ce39 100644 --- a/gdxapp4d-lib-warpme/pom.xml +++ b/gdxapp4d-lib-warpme/pom.xml @@ -17,4 +17,24 @@ x4o-driver + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.3.0 + + + copy-dependencies + package + + copy-dependencies + + + + + + + + \ No newline at end of file diff --git a/gdxapp4d-lib-warpme/src/main/java/love/distributedrebirth/warpme/hash/WaterShotAddict.java b/gdxapp4d-lib-warpme/src/main/java/love/distributedrebirth/warpme/hash/WaterShotAddict.java index 690dbd6b..8d7eb61d 100644 --- a/gdxapp4d-lib-warpme/src/main/java/love/distributedrebirth/warpme/hash/WaterShotAddict.java +++ b/gdxapp4d-lib-warpme/src/main/java/love/distributedrebirth/warpme/hash/WaterShotAddict.java @@ -16,6 +16,17 @@ import love.distributedrebirth.warpme.Warpᵐᵉ; @BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天") public class WaterShotAddict { + public static void main(String[] args) { + try { + WaterShotAddict addict = new WaterShotAddict(); + addict.updateWarpHashes(new File(args[0])); + System.exit(0); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + } + public boolean validateWarpChainLink(File folder) throws FileNotFoundException, X4OConnectionException, SAXException, IOException, NoSuchAlgorithmException { File fileWarpHash = new File(folder, Warpᵐᵉ.WARP_HASH); if (!fileWarpHash.exists()) { diff --git a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java index e1784d44..9d5544ab 100644 --- a/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java +++ b/gdxapp4d-tos4/src/main/java/love/distributedrebirth/gdxapp4d/tos4/GDXAppTos4Activator.java @@ -5,6 +5,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; +import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collection; import java.util.Hashtable; @@ -39,6 +40,7 @@ import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpSea; import love.distributedrebirth.gdxapp4d.tos4.service.SystemWarpShip; import love.distributedrebirth.gdxapp4d.tos4.service.SystemGdxTerminal; import love.distributedrebirth.warpme.Warpᵐᵉ; +import love.distributedrebirth.warpme.hash.WaterShotAddict; import love.distributedrebirth.warpme.sea.WaterOcean; import love.distributedrebirth.warpme.sea.WaterOceanDriver; import love.distributedrebirth.warpme.sea.WaterSeaChain; @@ -336,22 +338,22 @@ public class GDXAppTos4Activator implements BundleActivator { } LOG.debug("loadWaterOcean key={} home={}",key, waterHome); -// File waterHash = new File(waterHome, Warpᵐᵉ.WARP_HASH); -// if (!waterHash.exists()) { -// logger.accept("ERROR: Missing file: "+waterHash); -// return 1; -// } -// WaterShotAddict addict = new WaterShotAddict(); -// try { -// if (!addict.validateWarpChainLink(waterHome)) { -// logger.accept("ERROR: Invalid hash in: "+waterHash); -// return 1; -// } -// } catch (NoSuchAlgorithmException | X4OConnectionException | SAXException | IOException e) { -// e.printStackTrace(); -// logger.accept("ERROR: "+e.getMessage()); -// return 1; -// } + File waterHash = new File(waterHome, Warpᵐᵉ.WARP_HASH); + if (!waterHash.exists()) { + logger.accept("ERROR: Missing file: "+waterHash); + return 1; + } + WaterShotAddict addict = new WaterShotAddict(); + try { + if (!addict.validateWarpChainLink(waterHome)) { + logger.accept("ERROR: Invalid hash in: "+waterHash); + return 1; + } + } catch (NoSuchAlgorithmException | X4OConnectionException | SAXException | IOException e) { + e.printStackTrace(); + logger.accept("ERROR: "+e.getMessage()); + return 1; + } File waterSea = new File(waterHome, Warpᵐᵉ.WARP_SEA);