7f8b965243
Patch name: patch.macosx-console-launch-script Author: Jeremy Parsons <brefin@mac.com> Date: Wed Oct 16 2002 Detailed description: Since the Carbon gui does not yet have a console window of its own, then it can't be configured from the gui (only the command line) and stdout/stderr both go to the console. As a shortcut, I offer this patch consisting of this file and build/macosx/script.data build/macosx/script.r build/macosx/bochs.applescript script.data and script.r are taken from a script compiled into an application. Flattened out to be checked in. (osacompile can produce runnable scripts, but wants to create them for the classic environment, so I use these files as part of a workaround) When bochs.app is built, it also builds bochs.scpt. To use bochs.scpt you put both bochs.app and bochs.scpt into the directory with your bochsrc.txt. bochs.scpt is an applescript that when run notes the current directory, then tells the terminal application to open a window, cd to the current directory, and run bochs from the commandline. ---------------------------------------------------------------------- Modified Files: Makefile.in Added Files: build/macosx/bochs.applescript build/macosx/script.data build/macosx/script.r
1 line
929 B
AppleScript
1 line
929 B
AppleScript
property bochs_path : "bochs.app/Contents/MacOS/bochs"
|
|
|
|
set script_name to name of (info for (path to me))
|
|
set script_path to POSIX path of (path to me)
|
|
|
|
-- replace target string using delimiters
|
|
set AppleScript's text item delimiters to the script_name
|
|
set the text_item_list to every text item of the script_path
|
|
set AppleScript's text item delimiters to ""
|
|
set the script_path to the text_item_list as string
|
|
|
|
tell application "Terminal"
|
|
activate
|
|
do script "cd " & script_path & ";" & bochs_path
|
|
-- Wait for Terminal to change the name first, then change it to ours
|
|
delay 1
|
|
set AppleScript's text item delimiters to "/"
|
|
set the text_item_list to every text item of the script_path
|
|
set AppleScript's text item delimiters to ""
|
|
set next_to_last to ((count of text_item_list) - 1)
|
|
set the folder_name to item next_to_last of text_item_list
|
|
set name of front window to "Running bochs in ../" & folder_name & "/"
|
|
end tell |