4416 on osx, a terminal app is opened, |
4416 on osx, a terminal app is opened, |
4417 on windows a cmd.exe window, |
4417 on windows a cmd.exe window, |
4418 on unix, an xterm is opened." |
4418 on unix, an xterm is opened." |
4419 |
4419 |
4420 OperatingSystem isOSXlike ifTrue:[ |
4420 OperatingSystem isOSXlike ifTrue:[ |
4421 "/ I dont know yet how to tell the terminal to |
4421 "/ I dont know yet how to tell the terminal to |
4422 "/ go to a particular directory. |
4422 "/ go to a particular directory. |
4423 "/ therefore, use the built in terminal |
4423 "/ therefore, use the built in terminal |
4424 VT100TerminalView openShellIn:self pathName. |
4424 VT100TerminalView openShellIn:self pathName. |
4425 ^ self. |
4425 ^ self. |
|
4426 ]. |
|
4427 "/ using the code below seems to close the window immediately |
|
4428 "/ at least on win7. |
|
4429 "/ use out own terminal, to make sure. |
|
4430 (OperatingSystem isMSWINDOWSlike |
|
4431 and:[OperatingSystem isWin7Like]) ifTrue:[ |
|
4432 "/ I dont know yet how to tell the terminal to |
|
4433 "/ go to a particular directory. |
|
4434 "/ therefore, use the built in terminal |
|
4435 VT100TerminalView openShellIn:self pathName. |
|
4436 ^ self. |
4426 ]. |
4437 ]. |
4427 |
4438 |
4428 [ |
4439 [ |
4429 |cmd| |
4440 |cmd| |
4430 |
4441 |
4431 OperatingSystem isOSXlike ifTrue:[ |
4442 OperatingSystem isOSXlike ifTrue:[ |
4432 cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal ' |
4443 cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal ' |
4433 ] ifFalse:[ |
4444 ] ifFalse:[ |
4434 OperatingSystem isMSWINDOWSlike ifTrue:[ |
4445 OperatingSystem isMSWINDOWSlike ifTrue:[ |
4435 cmd := 'c:\windows\System32\cmd.exe' |
4446 cmd := #('c:\windows\System32\cmd.exe') |
4436 ] ifFalse:[ |
4447 ] ifFalse:[ |
4437 "/ VT100TerminalView openShellIn:self pathName |
4448 "/ VT100TerminalView openShellIn:self pathName |
4438 cmd := 'xterm' |
4449 cmd := 'xterm' |
4439 ] |
4450 ] |
4440 ]. |
4451 ]. |
4441 OperatingSystem |
4452 OperatingSystem |
4442 executeCommand:cmd |
4453 executeCommand:cmd |
4443 inDirectory:self pathName. |
4454 inDirectory:self pathName |
|
4455 showWindow:#default. |
4444 ] fork |
4456 ] fork |
|
4457 |
|
4458 "Modified: / 18-10-2016 / 16:08:15 / cg" |
4445 ! ! |
4459 ! ! |
4446 |
4460 |
4447 !Filename methodsFor:'printing & storing'! |
4461 !Filename methodsFor:'printing & storing'! |
4448 |
4462 |
4449 printOn:aStream |
4463 printOn:aStream |