diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index 6c0f534b5b..c6cf068778 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -33,6 +33,7 @@ Release template (copy/paste this for new release): - configurable Open Loop Boost vertical axis #4778 - In Launch Control, add RPM Hysterisis #5610 - reduce JRE download complexity #6569 + - simpler basic firmware updater #5577 ### Fixed - knock logic not activated until any configuration change via TS #6462 diff --git a/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java b/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java index aac1e8475f..c2e5bb66b6 100644 --- a/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java +++ b/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java @@ -7,6 +7,7 @@ import com.rusefi.core.FileUtil; import com.rusefi.core.preferences.storage.PersistentConfiguration; import com.rusefi.core.ui.AutoupdateUtil; import com.rusefi.core.ui.FrameHelper; +import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; @@ -22,7 +23,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; public class Autoupdate { - private static final int VERSION = 20240531; + private static final int VERSION = 20240603; private static final String LOGO_PATH = "/com/rusefi/"; private static final String LOGO = LOGO_PATH + "logo.png"; @@ -60,18 +61,18 @@ public class Autoupdate { BundleUtil.BundleInfo bundleInfo = BundleUtil.parse(bundleFullName); String branchName = bundleInfo.getBranchName(); - if (args.length > 0 && args[0].equalsIgnoreCase("release")) { + @NotNull String firstArgument = args.length > 0 ? args[0] : ""; + + if (firstArgument.equalsIgnoreCase("basic-ui")) { + doDownload(bundleInfo, UpdateMode.ALWAYS); + } else if (args.length > 0 && args[0].equalsIgnoreCase("release")) { + // this branch needs progress for custom boards! System.out.println("Release update requested"); downloadAndUnzipAutoupdate(bundleInfo, UpdateMode.ALWAYS, ConnectionAndMeta.BASE_URL_RELEASE); } else { UpdateMode mode = getMode(); if (mode != UpdateMode.NEVER) { - System.out.println("Snapshot requested"); - if (branchName.equals("snapshot")) { - downloadAndUnzipAutoupdate(bundleInfo, mode, ConnectionAndMeta.getBaseUrl()+ ConnectionAndMeta.AUTOUPDATE); - } else { - downloadAndUnzipAutoupdate(bundleInfo, mode, ConnectionAndMeta.getBaseUrl() + "/lts/" + branchName + ConnectionAndMeta.AUTOUPDATE); - } + doDownload(bundleInfo, mode); } else { System.out.println("Update mode: NEVER"); } @@ -79,6 +80,15 @@ public class Autoupdate { startConsole(args); } + private static void doDownload(BundleUtil.BundleInfo bundleInfo, UpdateMode mode) { + if (bundleInfo.getBranchName().equals("snapshot")) { + System.out.println("Snapshot requested"); + downloadAndUnzipAutoupdate(bundleInfo, mode, ConnectionAndMeta.getBaseUrl()+ ConnectionAndMeta.AUTOUPDATE); + } else { + downloadAndUnzipAutoupdate(bundleInfo, mode, ConnectionAndMeta.getBaseUrl() + "/lts/" + bundleInfo.getBranchName() + ConnectionAndMeta.AUTOUPDATE); + } + } + private static void startConsole(String[] args) { try { // we want to make sure that files are available to write so we use reflection to get lazy class initialization diff --git a/misc/console_launcher/rusefi_updater.exe b/misc/console_launcher/rusefi_updater.exe index d106d5a0b6..1476331d3e 100644 Binary files a/misc/console_launcher/rusefi_updater.exe and b/misc/console_launcher/rusefi_updater.exe differ diff --git a/misc/console_launcher/rusefi_updater.xml b/misc/console_launcher/rusefi_updater.xml index 6d5ca2a703..d71487f220 100644 --- a/misc/console_launcher/rusefi_updater.xml +++ b/misc/console_launcher/rusefi_updater.xml @@ -2,7 +2,7 @@ true gui - console\rusefi_console.jar + console\rusefi_autoupdate.jar c:\stuff\rusefi\misc\console_launcher\rusefi_updater.exe basic-ui