WindowsAppUtil and WindowsServiceUtil now do not have references to I2P itself

This commit is contained in:
eyedeekay
2024-03-19 20:37:08 -04:00
parent 8809ddaac7
commit 6d460a9042
6 changed files with 120 additions and 92 deletions

View File

@@ -17,17 +17,9 @@ public class WindowsAppUtil extends WindowsServiceUtil {
}
return null;
}
protected File selectHome() { // throws Exception {
File i2p = checkPathEnvironmentVariable("I2P_CONFIG");
String path_override = System.getenv("I2P_CONFIG");
if (i2p == null)
i2p = appImageHome();
return i2p;
}
protected File selectProgramFile() {
File i2p = checkPathEnvironmentVariable("I2P");
protected File selectHome() { // throws Exception {
File i2p = checkPathEnvironmentVariable("JPACKAGE_HOME");
if (i2p == null)
i2p = appImageHome();
return i2p;
@@ -90,12 +82,15 @@ public class WindowsAppUtil extends WindowsServiceUtil {
protected String appImageExe() {
File aih = appImageHome();
if (aih != null) {
// get the name of the aih directory itself, which will be the default
// name of the executable as well
String baseName = aih.getName();
switch (osName()) {
case "windows":
return "I2P.exe";
return baseName + ".exe";
case "mac":
case "linux":
return "./bin/I2P";
return "./bin/" + baseName;
}
}
return null;