mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +00:00
Add batch files to start GUIs under Windows
Added a couple of batch files in the java GUI area so they can be used with Windows. Made an addition in TrickApplication.java to add the .bat suffix to script calls when using Windows. Fixes #47
This commit is contained in:
parent
6aff648c0d
commit
7ecfcad90a
2
bin/java/bat/README
Normal file
2
bin/java/bat/README
Normal file
@ -0,0 +1,2 @@
|
||||
The batch files in these directories may be used to start up some Trick GUIs on Windows machines.
|
||||
|
2
bin/java/bat/sim_control.bat
Normal file
2
bin/java/bat/sim_control.bat
Normal file
@ -0,0 +1,2 @@
|
||||
set TRICK_HOME=%~dp0..
|
||||
java -cp %TRICK_HOME%\dist\*;%TRICK_HOME%\lib\* trick.simcontrol.SimControlApplication %~1 %~2
|
2
bin/java/bat/sniffer.bat
Normal file
2
bin/java/bat/sniffer.bat
Normal file
@ -0,0 +1,2 @@
|
||||
set TRICK_HOME=%~dp0..
|
||||
java -cp %TRICK_HOME%\dist\*;%TRICK_HOME%\lib\* trick.sniffer.SimSnifferApplication %*
|
2
bin/java/bat/tv.bat
Normal file
2
bin/java/bat/tv.bat
Normal file
@ -0,0 +1,2 @@
|
||||
set TRICK_HOME=%~dp0..
|
||||
java -cp %TRICK_HOME%\dist\*;%TRICK_HOME%\lib\* trick.tv.TVApplication %~1 %~2
|
@ -725,12 +725,14 @@ public abstract class TrickApplication extends SingleFrameApplication implements
|
||||
* @param arguments the parameters to pass to the application
|
||||
*/
|
||||
protected static void launchTrickApplication(String executable, String arguments) {
|
||||
if ( System.getProperty("os.name").startsWith("Windows") ) {
|
||||
executable = executable + ".bat" ;
|
||||
}
|
||||
try {
|
||||
ProcessBuilder process = new ProcessBuilder(UIUtils.getTrickBin() +
|
||||
File.separator + executable, arguments);
|
||||
// TODO: Uncomment these when we move to Java 1.7 again
|
||||
//process.redirectOutput(ProcessBuilder.Redirect.INHERIT);
|
||||
//process.redirectError(ProcessBuilder.Redirect.INHERIT);
|
||||
process.redirectOutput(ProcessBuilder.Redirect.INHERIT);
|
||||
process.redirectError(ProcessBuilder.Redirect.INHERIT);
|
||||
process.start();
|
||||
} catch (IOException ioException) {
|
||||
ioException.printStackTrace();
|
||||
|
Loading…
x
Reference in New Issue
Block a user