Fix startup script for windows and bump version to 1.1.0
Gitea/Java-Installer/pipeline/head This commit looks good Details

snapshot v1.1.0
Jonas Letzbor 2023-05-07 19:53:54 +02:00
parent 3d63f17ca1
commit 5a198decb4
2 changed files with 11 additions and 9 deletions

View File

@ -6,8 +6,8 @@ plugins {
// Set version of programm // // Set version of programm //
version = "1.0.5" version = "1.1.0"
def version = "1.0.5" def version = "1.1.0"
group = "de.rpjosh" group = "de.rpjosh"

View File

@ -55,7 +55,7 @@ public class Installer {
conf.isInstallationStarted = true; conf.isInstallationStarted = true;
// Check if architecture is supported by this installer // Check if architecture is supported by this installer
if (InstallConfig.getOsType() != OSType.WINDOWS || InstallConfig.getOsType() != OSType.LINUX) { if (InstallConfig.getOsType() != OSType.WINDOWS && InstallConfig.getOsType() != OSType.LINUX) {
error = 6; error = 6;
System.err.println(Tr.get("installation_os_not_supported", System.getProperty("os.name"))); System.err.println(Tr.get("installation_os_not_supported", System.getProperty("os.name")));
return; return;
@ -155,7 +155,8 @@ public class Installer {
} catch (Exception ex) { } catch (Exception ex) {
System.out.println(Tr.get("failed") + "."); System.out.println(Tr.get("failed") + ".");
System.err.println("\n" + Tr.get("errorMessage") + ": "); System.err.println("\n" + Tr.get("errorMessage") + ": ");
ex.printStackTrace(); logger.log("e", ex, "");
error = 13; return; error = 13; return;
} }
System.out.println(Tr.get("successful") + "\n"); System.out.println(Tr.get("successful") + "\n");
@ -714,6 +715,7 @@ public class Installer {
+ "SET stop=\"false\"\n" + "SET stop=\"false\"\n"
+ "SET uninstall=\"false\"\n" + "SET uninstall=\"false\"\n"
+ "SET programOption=\n" + "SET programOption=\n"
+ "SET background=\"false\"\n"
+ "\n" + "\n"
+ ":: determine the number of given arguments and fill the array\n" + ":: determine the number of given arguments and fill the array\n"
+ "SET argCount=0\n" + "SET argCount=0\n"
@ -775,7 +777,7 @@ public class Installer {
+ "SET exitScript=0\n" + "SET exitScript=0\n"
+ "IF defined programOption IF %foreground% == \"falseDefault\" SET foreground=\"true\"\n" + "IF defined programOption IF %foreground% == \"falseDefault\" SET foreground=\"true\"\n"
+ "IF %foreground% == \"trueDefault\" SET foreground=\"true\"\n" + "IF %foreground% == \"trueDefault\" SET foreground=\"true\"\n"
+ "IF defined background IF %background% == \"true\" SET foreground=\"false\"\n" + "IF %background% == \"true\" SET foreground=\"false\"\n"
+ "\n" + "\n"
+ "IF %stop% == \"true\" (\n" + "IF %stop% == \"true\" (\n"
+ " wmic PROCESS Where \"name Like '%%java%%' AND CommandLine like '%%" + conf.getApplicationNameShort() + "%%'\" Call Terminate\n" + " wmic PROCESS Where \"name Like '%%java%%' AND CommandLine like '%%" + conf.getApplicationNameShort() + "%%'\" Call Terminate\n"
@ -1199,7 +1201,7 @@ public class Installer {
} }
/** /**
* Returns if the installation was successful (0 = successful, {@literal <}0 = error) * Returns if the installation was successful (0 = successful, {@literal >}0 = error)
* *
* @return the error code * @return the error code
*/ */