mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
TerminalLauncher now works on MacOS
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk/ipscan@88 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
eeece5bb01
commit
78e31293be
@ -40,9 +40,12 @@ public class TerminalLauncher {
|
||||
|
||||
Runtime.getRuntime().exec(batFile.getAbsolutePath(), null, workingDir);
|
||||
}
|
||||
else
|
||||
if (Platform.MAC_OS) {
|
||||
Runtime.getRuntime().exec(new String[] {"osascript", "-e", "tell application \"Terminal\" to do script \"" + execString + "\""}, null, workingDir);
|
||||
}
|
||||
else { // assume Linux or other Unix
|
||||
// TODO: maybe gnome-terminal, konsole, and MacOS-specific terminal should be tried as well...
|
||||
// TODO: it seems that MacOS can use the $TERM environment variable to launch a terminal
|
||||
// TODO: maybe gnome-terminal or konsole should be tried as well...
|
||||
Runtime.getRuntime().exec(new String[] {"xterm", "-e", "bash", "-c", execString + ";bash"}, null, workingDir);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user