diff --git a/java/net/i2p/router/WinLauncher.java b/java/net/i2p/router/WinLauncher.java index d628dc7..7b580e2 100644 --- a/java/net/i2p/router/WinLauncher.java +++ b/java/net/i2p/router/WinLauncher.java @@ -89,8 +89,9 @@ public class WinLauncher extends CopyConfigDir { File home = homeDir(); boolean continuerunning = promptServiceStartIfAvailable("i2p"); - if (!continuerunning){ - logger.severe("Service startup failure, please start I2P service with services.msc"); + if (!continuerunning) { + logger.severe( + "Service startup failure, please start I2P service with services.msc"); System.exit(2); } @@ -121,12 +122,14 @@ public class WinLauncher extends CopyConfigDir { System.exit(0); } i2pRouter = new Router(routerConfig(), System.getProperties()); - if (i2pRouter.saveConfig("routerconsole.browser", null)) { - logger.info("removed routerconsole.browser config"); - } - if (i2pRouter.saveConfig("routerconsole.browser", - appImageExe() + " -noproxycheck")) { - logger.info("updated routerconsole.browser config " + appImageExe()); + if (!isInstalled("i2p")) { + if (i2pRouter.saveConfig("routerconsole.browser", null)) { + logger.info("removed routerconsole.browser config"); + } + if (i2pRouter.saveConfig("routerconsole.browser", + appImageExe() + " -noproxycheck")) { + logger.info("updated routerconsole.browser config " + appImageExe()); + } } logger.info("Router is configured"); diff --git a/java/net/i2p/router/WindowsServiceUtil.java b/java/net/i2p/router/WindowsServiceUtil.java index 71b34c2..03347ec 100644 --- a/java/net/i2p/router/WindowsServiceUtil.java +++ b/java/net/i2p/router/WindowsServiceUtil.java @@ -106,7 +106,7 @@ public class WindowsServiceUtil { } public static boolean promptServiceStartIfAvailable(String serviceName) { - if (osName() != "windows"){ + if (osName() != "windows") { return true; } if (isInstalled(serviceName)) { @@ -116,7 +116,8 @@ public class WindowsServiceUtil { "It appears you have an existing I2P service installed.\n"; message += "However, it is not running yet. Please start it through `services.msc`.\n"; - message +="If you click \"No\", the jpackage router will be launched instead.\n"; + message += + "If you click \"No\", the jpackage router will be launched instead.\n"; a = JOptionPane.showConfirmDialog(null, message, "I2P Service detected not running", JOptionPane.YES_NO_OPTION); @@ -137,6 +138,10 @@ public class WindowsServiceUtil { return true; } + public static String ServiceUpdaterString() { + return "http://tc73n4kivdroccekirco7rhgxdg5f3cjvbaapabupeyzrqwv5guq.b32.i2p/news.su3"; + } + public static String getServiceState(String serviceName) { String stateString = "uninstalled"; int state = getServiceStateInt(serviceName);