mirror of
https://github.com/nasa/trick.git
synced 2025-06-17 22:58:25 +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:
@ -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();
|
||||
|
Reference in New Issue
Block a user