From dfabcbc7e6d4d3a5357636bda9383b08f79adebc Mon Sep 17 00:00:00 2001 From: tth05 <36999320+tth05@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:35:54 +0200 Subject: [PATCH] Support new swing companion app --- .github/workflows/release.yml | 5 ++--- build.gradle | 2 +- .../minecraft_ta/totaldebug/DecompilationManager.java | 2 +- .../java/com/github/minecraft_ta/totaldebug/TotalDebug.java | 2 +- .../minecraft_ta/totaldebug/codeViewer/CompanionApp.java | 6 ++++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9dd90f..e67d1ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,9 +30,8 @@ jobs: release_name: Release ${{ github.ref }} body: | Changes in this Release - - Log files for companion app - - Improved reference search speed - - Added support to view reference search results in companion app + - JEI Integration for decompile keybind + - New companion app support draft: false prerelease: false - name: Upload jars to release diff --git a/build.gradle b/build.gradle index dbbb8c6..c1d25bf 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'com.github.johnrengelman.shadow' group = 'com.github.minecraft_ta' -version = '1.2.0' +version = '1.3.0' archivesBaseName = 'TotalDebug' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' diff --git a/src/main/java/com/github/minecraft_ta/totaldebug/DecompilationManager.java b/src/main/java/com/github/minecraft_ta/totaldebug/DecompilationManager.java index 23588f8..b182abf 100644 --- a/src/main/java/com/github/minecraft_ta/totaldebug/DecompilationManager.java +++ b/src/main/java/com/github/minecraft_ta/totaldebug/DecompilationManager.java @@ -65,7 +65,7 @@ public void setup() { } public void openGui(Class clazz) { - openGui(clazz, 0); + openGui(clazz, 1); } public void openGui(Class clazz, int line) { diff --git a/src/main/java/com/github/minecraft_ta/totaldebug/TotalDebug.java b/src/main/java/com/github/minecraft_ta/totaldebug/TotalDebug.java index f025341..58427cd 100644 --- a/src/main/java/com/github/minecraft_ta/totaldebug/TotalDebug.java +++ b/src/main/java/com/github/minecraft_ta/totaldebug/TotalDebug.java @@ -30,7 +30,7 @@ public class TotalDebug { public static final String MOD_ID = "total_debug"; public static final String MOD_NAME = "TotalDebug"; - public static final String VERSION = "1.2.0"; + public static final String VERSION = "1.3.0"; @Mod.Instance(MOD_ID) public static TotalDebug INSTANCE; diff --git a/src/main/java/com/github/minecraft_ta/totaldebug/codeViewer/CompanionApp.java b/src/main/java/com/github/minecraft_ta/totaldebug/codeViewer/CompanionApp.java index a7719c6..3a4cf1b 100644 --- a/src/main/java/com/github/minecraft_ta/totaldebug/codeViewer/CompanionApp.java +++ b/src/main/java/com/github/minecraft_ta/totaldebug/codeViewer/CompanionApp.java @@ -94,7 +94,7 @@ public void startAndConnect() { if (!isRunning()) { this.metafile.loadNewestCompanionAppVersion(); - Path exePath = this.appDir.resolve("TotalDebugCompanion.exe"); + Path exePath = this.appDir.resolve("TotalDebugCompanion.jar"); if (!Files.exists(exePath) || !this.metafile.currentCompanionAppVersion.equals(this.metafile.newestCompatibleCompanionAppVersion)) { @@ -307,11 +307,13 @@ private void startApp() { return; //TODO: linux - Path exePath = this.appDir.resolve("TotalDebugCompanion.exe"); + Path exePath = this.appDir.resolve("TotalDebugCompanion.jar"); Path logFile = createLogFile(); try { ProcessBuilder processBuilder = new ProcessBuilder( + this.appDir.resolve("bin").resolve("java.exe").toAbsolutePath().toString(), + "-jar", exePath.toAbsolutePath().toString(), "\"" + this.appDir.getParent().resolve(DecompilationManager.DECOMPILED_FILES_FOLDER).toAbsolutePath() + "\"" );