#FEATURE by cg
class: Filename
changed: #openTerminal
opening cmd does not seem to work under win7
must be checked.
--- a/Filename.st Tue Oct 18 16:08:03 2016 +0200
+++ b/Filename.st Tue Oct 18 16:08:48 2016 +0200
@@ -4418,30 +4418,44 @@
on unix, an xterm is opened."
OperatingSystem isOSXlike ifTrue:[
- "/ I dont know yet how to tell the terminal to
- "/ go to a particular directory.
- "/ therefore, use the built in terminal
- VT100TerminalView openShellIn:self pathName.
- ^ self.
+ "/ I dont know yet how to tell the terminal to
+ "/ go to a particular directory.
+ "/ therefore, use the built in terminal
+ VT100TerminalView openShellIn:self pathName.
+ ^ self.
+ ].
+ "/ using the code below seems to close the window immediately
+ "/ at least on win7.
+ "/ use out own terminal, to make sure.
+ (OperatingSystem isMSWINDOWSlike
+ and:[OperatingSystem isWin7Like]) ifTrue:[
+ "/ I dont know yet how to tell the terminal to
+ "/ go to a particular directory.
+ "/ therefore, use the built in terminal
+ VT100TerminalView openShellIn:self pathName.
+ ^ self.
].
[
- |cmd|
-
- OperatingSystem isOSXlike ifTrue:[
- cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal '
- ] ifFalse:[
- OperatingSystem isMSWINDOWSlike ifTrue:[
- cmd := 'c:\windows\System32\cmd.exe'
- ] ifFalse:[
- "/ VT100TerminalView openShellIn:self pathName
- cmd := 'xterm'
- ]
- ].
- OperatingSystem
- executeCommand:cmd
- inDirectory:self pathName.
+ |cmd|
+
+ OperatingSystem isOSXlike ifTrue:[
+ cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal '
+ ] ifFalse:[
+ OperatingSystem isMSWINDOWSlike ifTrue:[
+ cmd := #('c:\windows\System32\cmd.exe')
+ ] ifFalse:[
+ "/ VT100TerminalView openShellIn:self pathName
+ cmd := 'xterm'
+ ]
+ ].
+ OperatingSystem
+ executeCommand:cmd
+ inDirectory:self pathName
+ showWindow:#default.
] fork
+
+ "Modified: / 18-10-2016 / 16:08:15 / cg"
! !
!Filename methodsFor:'printing & storing'!