Compare commits
3 Commits
phase1-gui
...
master
Author | SHA1 | Date | |
---|---|---|---|
e3e7bf5ccd | |||
b386665e66 | |||
5e1ff6451c |
14
package.sh
Executable file
14
package.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
GIT=$(command -v git)
|
||||
HEAD=$(command -v head)
|
||||
CUT=$(command -v cut)
|
||||
|
||||
JAR_ARTIFACT="out/artifacts/Hajj_simulation_jar/Hajj-simulation.jar"
|
||||
|
||||
if [ -z $"GIT" ] || [ -z $"HEAD" ] || [ -z $"CUT" ]; then
|
||||
echo "Tools missing"
|
||||
exit 1
|
||||
else
|
||||
tar -cvf Hajj-Simulation-$(git log | head -n1 | cut -d' ' -f2).tar.gz $JAR_ARTIFACT run.sh
|
||||
fi
|
9
run.sh
Executable file
9
run.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
jav=$(command -v java)
|
||||
|
||||
if [ -z "$jav" ]; then
|
||||
>&2 echo "Can't find java installation"
|
||||
else
|
||||
java -jar out/artifacts/Hajj_simulation_jar/Hajj-simulation.jar
|
||||
fi
|
@ -32,6 +32,7 @@ public class MakkahCity {
|
||||
private static final Thread t = new Thread(inputListener,"InputThread-Makkah");
|
||||
private static boolean isAllRoutSet;
|
||||
private static final DataManeger dataManeger = new DataManeger();
|
||||
private static volatile boolean done_flag;
|
||||
//GUI
|
||||
private static boolean exit_flag;
|
||||
private static boolean pause_flag;
|
||||
@ -212,7 +213,10 @@ public class MakkahCity {
|
||||
btnExit.setFont(new Font("Rockwell", Font.PLAIN, 16));
|
||||
btnExit.setForeground(Color.white);
|
||||
btnExit.setBounds(888, 623, 166, 29);
|
||||
btnExit.addActionListener(actionEvent -> exit_flag = true);
|
||||
btnExit.addActionListener(actionEvent -> {
|
||||
if (pause_flag || done_flag) System.exit(0);
|
||||
else exit_flag = true;
|
||||
});
|
||||
|
||||
btnPause = new JButton("Pause");
|
||||
btnPause.setBackground(new Color(9,9,9));
|
||||
@ -530,6 +534,7 @@ public class MakkahCity {
|
||||
//lblArrivedToHotelsTime.setText(getDistTimeForLbl());
|
||||
}
|
||||
//When done show menu to analyze. Exit from menu too.
|
||||
done_flag = true;
|
||||
inputListener.pause();
|
||||
startMenu();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user