Change the build action to just build the binary and the disk image. Add a default shared scheme to the project template and hook up the execute action so that a build just builds but a build and run does a build and launches the emulator. Launch the shell command directly using orca on the Xcode console using a custom scheme.

This commit is contained in:
Jeremy Rand 2017-08-29 23:27:04 -04:00
parent 4c7835f7d5
commit 7d51c6e2cc
8 changed files with 76 additions and 6 deletions

View File

@ -18,6 +18,12 @@ fi
cd make
$EMULATORPATH
# This magic ensure that clicking stop in Xcode results in the emulator terminating.
$EMULATORPATH &
PID=$!
trap 'kill $PID' SIGTERM SIGINT SIGHUP EXIT
wait
exit 0

View File

@ -7,11 +7,13 @@ export PATH := $(PATH):$(ORCA_BIN)
CWD=$(shell pwd)
DISKIMAGE=$(PGM).2mg
ALLTARGET=execute
ALLTARGET=$(DISKIMAGE)
EXECTARGET=executeGUI
DISKIMAGEDEST=.
ifeq ($(TARGETTYPE),shell)
FILETYPE=exe
EXECTARGET=executeShell
ALLTARGET=$(PGM)
else ifeq ($(TARGETTYPE),desktop)
FILETYPE=s16
@ -68,7 +70,7 @@ ALL_DEPS=$(C_DEPS) $(ASM_DEPS) $(REZ_DEPS)
EXECCMD=
.PHONY: all execute clean
.PHONY: all execute executeShell executeGUI clean
.PRECIOUS: $(ASM_MACROS)
@ -123,11 +125,13 @@ endif
$(DISKIMAGE): $(PGM)
make/createDiskImage "$(DISKIMAGE)" "$(PGM)" "$(DISKIMAGEDEST)"
execute: $(DISKIMAGE)
make/launchEmulator
execute: $(EXECTARGET)
executeGUI: $(DISKIMAGE)
make/launchEmulator -doit
executeShell: $(PGM)
$(ORCA) $(PGM)
$(ORCA) ./$(PGM)
%.a: %.c
$(COMPILE) $< $(CFLAGS) --noroot

View File

@ -16,6 +16,7 @@
<string>make/orca-rez</string>
<string>make/system601.2mg</string>
<string>make/tail.mk</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
@ -99,6 +100,15 @@
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>

View File

@ -18,6 +18,7 @@
<string>make/orca-rez</string>
<string>make/system601.2mg</string>
<string>make/tail.mk</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
@ -111,6 +112,15 @@
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>

View File

@ -18,6 +18,7 @@
<string>make/orca-rez</string>
<string>make/system601.2mg</string>
<string>make/tail.mk</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
@ -110,6 +111,15 @@
<dict>
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>

View File

@ -18,6 +18,7 @@
<string>make/orca-rez</string>
<string>make/system601.2mg</string>
<string>make/tail.mk</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
@ -111,6 +112,15 @@
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>

View File

@ -12,6 +12,7 @@
<string>make/orca-macgen</string>
<string>make/orca-rez</string>
<string>make/tail.mk</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
@ -67,6 +68,15 @@
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>

View File

@ -12,6 +12,7 @@
<string>make/orca-macgen</string>
<string>make/orca-rez</string>
<string>make/tail.mk</string>
<string>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</string>
</array>
<key>Definitions</key>
<dict>
@ -67,6 +68,15 @@
<key>Path</key>
<string>Makefile</string>
</dict>
<key>../___PACKAGENAME___.xcodeproj/xcshareddata/xcschemes/___PACKAGENAME___.xcscheme</key>
<dict>
<key>Group</key>
<array>
<string>Supporting Files</string>
</array>
<key>Path</key>
<string>___PACKAGENAME___.xcscheme</string>
</dict>
</dict>
<key>Kind</key>
<string>Xcode.Xcode3.ProjectTemplateUnitKind</string>