mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 23:07:41 +01:00
v0.5.2 ! Upped the bash & batch game. Can run from any directory,
auto-adaptation to jar files in lib, creation, use, and preservation upon update or reinstall of a startup customization file (Max JVM memory, custom java binary and custom JVM options as environment variables). This is valid for all OS types (bash or batch startup) and all installation methods (zip and nsis). Robustified a stupid version management for workspace settings.
This commit is contained in:
@@ -23,6 +23,8 @@ public class WorkspaceSettings {
|
||||
|
||||
public static final String VERSION_KEY = "ATCS_Version";
|
||||
public static final String FILENAME = "workspace_settings.json";
|
||||
|
||||
public static final int SETTINGS_VERSION = 1;
|
||||
|
||||
public Workspace parent;
|
||||
public File file;
|
||||
@@ -61,10 +63,10 @@ public class WorkspaceSettings {
|
||||
reader = new FileReader(f);
|
||||
@SuppressWarnings("rawtypes")
|
||||
Map jsonSettings = (Map) parser.parse(reader);
|
||||
String version = (String) jsonSettings.get(VERSION_KEY);
|
||||
Integer version = (Integer) jsonSettings.get(VERSION_KEY);
|
||||
if (version != null) {
|
||||
if ("v0.5.2".equals(version)) {
|
||||
loadv052(jsonSettings);
|
||||
if (version >= 1) {
|
||||
loadv1(jsonSettings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +90,7 @@ public class WorkspaceSettings {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private void loadv052(Map jsonSettings) {
|
||||
private void loadv1(Map jsonSettings) {
|
||||
for (Setting s : settings) {
|
||||
s.readFromJson(jsonSettings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user