----------------------------------------------------------------------
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
This commit is contained in:
parent
37be797307
commit
7f8b965243
@ -206,7 +206,7 @@ $(BX_OBJS): $(BX_INCLUDES)
|
||||
bxversion.h:
|
||||
$(RM) -f bxversion.h
|
||||
echo '/////////////////////////////////////////////////////////////////////////' > bxversion.h
|
||||
echo '// $$Id: Makefile.in,v 1.94 2002-10-21 11:28:37 bdenney Exp $$' >> bxversion.h
|
||||
echo '// $$Id: Makefile.in,v 1.95 2002-10-21 11:38:38 bdenney Exp $$' >> bxversion.h
|
||||
echo '/////////////////////////////////////////////////////////////////////////' >> bxversion.h
|
||||
echo '// This file is generated by "make bxversion.h"' >> bxversion.h
|
||||
echo "#define VER_STRING \"$(VER_STRING)\"" >> bxversion.h
|
||||
@ -468,11 +468,15 @@ dist-clean: local-dist-clean
|
||||
# Build app on MacOS X
|
||||
###########################################
|
||||
APP=bochs.app
|
||||
SCRIPT=bochs.scpt
|
||||
MACOSX_STUFF=build/macosx
|
||||
MACOSX_STUFF_SRCDIR=$(srcdir)/$(MACOSX_STUFF)
|
||||
REZ=/Developer/Tools/Rez
|
||||
RINCLUDES=/System/Library/Frameworks/Carbon.framework/Libraries/RIncludes
|
||||
REZ_ARGS=-append -i $RINCLUDES -d SystemSevenOrLater=1 -useDF
|
||||
REZ_ARGS_SCRIPT=-append
|
||||
OSACOMPILE=/usr/bin/osacompile
|
||||
SETFILE=/Developer/Tools/Setfile
|
||||
|
||||
$(APP)/.build: bochs
|
||||
rm -f $(APP)/.build
|
||||
@ -486,6 +490,11 @@ $(APP)/.build: bochs
|
||||
$(MKDIR) -p $(APP)/Contents/Resources
|
||||
$(REZ) $(REZ_ARGS) $(MACOSX_STUFF_SRCDIR)/bochs.r -o $(APP)/Contents/Resources/bochs.rsrc
|
||||
$(CP) -f $(MACOSX_STUFF_SRCDIR)/bochs-icn.icns $(APP)/Contents/Resources
|
||||
rm -f $(SCRIPT)
|
||||
$(CP) -f $(MACOSX_STUFF_SRCDIR)/script.data $(SCRIPT)
|
||||
$(REZ) $(REZ_ARGS_SCRIPT) $(MACOSX_STUFF_SRCDIR)/script.r -o $(SCRIPT)
|
||||
$(OSACOMPILE) -o $(SCRIPT) $(MACOSX_STUFF_SRCDIR)/bochs.applescript
|
||||
$(SETFILE) -t "APPL" -c "aplt" $(SCRIPT)
|
||||
ls -ld $(APP)
|
||||
touch $(APP)/.build
|
||||
|
||||
|
1
bochs/build/macosx/bochs.applescript
Normal file
1
bochs/build/macosx/bochs.applescript
Normal file
@ -0,0 +1 @@
|
||||
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
|
BIN
bochs/build/macosx/script.data
Executable file
BIN
bochs/build/macosx/script.data
Executable file
Binary file not shown.
2712
bochs/build/macosx/script.r
Normal file
2712
bochs/build/macosx/script.r
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user