Skip to content

Commit

Permalink
NEW: Created release :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
Engin1980 committed Mar 11, 2018
1 parent b7df0d7 commit 125f18c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .idea/artifacts/JAtcSim.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions JAtcSim/src/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Manifest-Version: 1.0
Class-Path: EXmlSerialization.jar eng.eSystem.jar hamcrest-core-1.3.ja
r junit-4.12.jar junit-4.12.jar junit.jar hamcrest-core-1.3.jar
Main-Class: eng.jAtcSim.JAtcSim

33 changes: 33 additions & 0 deletions JAtcSim/src/eng/jAtcSim/JAtcSim.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Calendar;

/**
Expand Down Expand Up @@ -66,6 +68,7 @@ public static void main(String[] args) {
public static void startSimulation(StartupSettings startupSettings) {


resolveShortXmlFileNamesInStartupSettings(appSettings, startupSettings);
XmlLoadHelper.saveStartupSettings(startupSettings, appSettings.getStartupSettingsFile());

XmlLoadedData data;
Expand Down Expand Up @@ -117,6 +120,36 @@ public static void startSimulation(StartupSettings startupSettings) {
simPack.startPack();
}

private static void resolveShortXmlFileNamesInStartupSettings(AppSettings appSettings, StartupSettings startupSettings) {
Path tmp;
Path appPath;
appPath = appSettings.applicationFolder;

tmp = Paths.get(startupSettings.files.areaXmlFile);
if (tmp.isAbsolute()) {
tmp = appPath.relativize(tmp);
startupSettings.files.areaXmlFile = tmp.toString();
}

tmp = Paths.get(startupSettings.files.fleetsXmlFile);
if (tmp.isAbsolute()) {
tmp = appPath.relativize(tmp);
startupSettings.files.fleetsXmlFile = tmp.toString();
}

tmp = Paths.get(startupSettings.files.planesXmlFile);
if (tmp.isAbsolute()) {
tmp = appPath.relativize(tmp);
startupSettings.files.planesXmlFile = tmp.toString();
}

tmp = Paths.get(startupSettings.files.trafficXmlFile);
if (tmp.isAbsolute()) {
tmp = appPath.relativize(tmp);
startupSettings.files.trafficXmlFile = tmp.toString();
}
}

public static void quit() {

}
Expand Down

0 comments on commit 125f18c

Please sign in to comment.