Skip to content

Commit

Permalink
fix minor bug (if you cant fix it then remove it!)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-coded committed Oct 22, 2023
1 parent b6e4731 commit a479383
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/nexia/installer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ public ResourceBundle newBundle(String baseName, Locale locale, String format, C

public static void main(String[] args) throws UnsupportedLookAndFeelException, ClassNotFoundException, InstantiationException, IllegalAccessException {

os = OS.LINUX;

if(System.getProperty("os.name").startsWith("Windows")){
os = OS.WINDOWS;
System.setProperty("javax.net.ssl.trustStoreType", "WINDOWS-ROOT");
}

if(System.getProperty("os.name").startsWith("lin"))
os = OS.LINUX;

if(System.getProperty("os.name").startsWith("mac"))
os = OS.MAC;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,8 @@ public void launch() throws IOException {
throw new RuntimeException(Main.BUNDLE.getString("installer.exception.no.launcher.directory"));
}

final ProfileInstaller profileInstaller = new ProfileInstaller(mcPath);
ProfileInstaller.LauncherType launcherType;
String launcherThing = "";

// can you tell i have no fucking idea what im doing?
if(InstallerHelper.createProfile.isSelected()) {
List<ProfileInstaller.LauncherType> types = profileInstaller.getInstalledLauncherTypes();

if (types.isEmpty()) {
throw new RuntimeException(Main.BUNDLE.getString("installer.exception.no.launcher.profile"));
} else {
launcherType = InstallerUtils.showLauncherTypeSelection();

if (launcherType == null) {
return;
}

launcherThing = "-launcher " + launcherType.name;
}
}

System.out.println("Installing Fabric " + gameVersion.getVersion() + " (" + gameVersion.getCodeName() + ")");
String[] cmd2 = new String[]{"java", "-jar", "cache/" + getJarFile().getName(), "client", "-dir" + "\"" + mcPath.toAbsolutePath() + "\"", "-mcversion", gameVersion.codeName, launcherThing};
String[] cmd2 = new String[]{"java", "-jar", "cache/" + getJarFile().getName(), "client", "-dir" + "\"" + mcPath.toAbsolutePath() + "\"", "-mcversion", gameVersion.codeName};


try {
Expand Down

0 comments on commit a479383

Please sign in to comment.