mirror of
https://github.com/jeremysrand/Apple2BuildPipeline.git
synced 2024-12-11 03:53:01 +00:00
Only try to launch Virtual ][ if building from Mac OSX. Enforce Prodos and DOS 3.3 filename limits when creating the disk image.
This commit is contained in:
parent
f79de893c9
commit
b6b8942068
3
Makefile
3
Makefile
@ -16,7 +16,7 @@ include make/head.mk
|
||||
# target, where in memory to put it, etc.
|
||||
|
||||
# The name of your system or binary file to build goes here:
|
||||
PGM=example
|
||||
PGM=notaslon
|
||||
|
||||
# Set the config you are building for. See these pages for details:
|
||||
# http://cc65.github.io/cc65/doc/apple2.html#s4
|
||||
@ -33,6 +33,7 @@ PGM=example
|
||||
# MACHINE = apple2enh-system
|
||||
# MACHINE = apple2enh-loader
|
||||
# MACHINE = apple2enh-reboot
|
||||
MACHINE = apple2-loader
|
||||
|
||||
# Uncomment and set this to your starting address in Apple ][ memory
|
||||
# if necessary:
|
||||
|
BIN
make/V2Make.scpt
BIN
make/V2Make.scpt
Binary file not shown.
@ -28,6 +28,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2enh)
|
||||
@ -38,6 +39,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2-dos33)
|
||||
@ -48,6 +50,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=30
|
||||
;;
|
||||
|
||||
apple2enh-dos33)
|
||||
@ -58,6 +61,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=30
|
||||
;;
|
||||
|
||||
apple2-system)
|
||||
@ -68,6 +72,7 @@ case "$MACHINE" in
|
||||
HASHEADER=0
|
||||
FILETYPE="sys"
|
||||
TARGETFILE=`basename $PROGRAM`.system
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2enh-system)
|
||||
@ -78,6 +83,7 @@ case "$MACHINE" in
|
||||
HASHEADER=0
|
||||
FILETYPE="sys"
|
||||
TARGETFILE=`basename $PROGRAM`.system
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2-loader)
|
||||
@ -88,6 +94,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2-reboot)
|
||||
@ -98,6 +105,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2enh-loader)
|
||||
@ -108,6 +116,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=15
|
||||
;;
|
||||
|
||||
apple2enh-reboot)
|
||||
@ -118,6 +127,7 @@ case "$MACHINE" in
|
||||
HASHEADER=1
|
||||
FILETYPE="bin"
|
||||
TARGETFILE=`basename $PROGRAM`
|
||||
MAXFILENAMELEN=8
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -126,6 +136,12 @@ case "$MACHINE" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ ${#TARGETFILE} -gt $MAXFILENAMELEN ]
|
||||
then
|
||||
echo "The filename $TARGETFILE exceeds the max name length of the filesystem ($MAXFILENAMELEN)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$TEMPLATE" ]
|
||||
then
|
||||
echo "Cannot file template disk image $TEMPLATE"
|
||||
@ -141,7 +157,14 @@ fi
|
||||
|
||||
if [ $RENAMELOADER -eq 1 ]
|
||||
then
|
||||
java -jar "$APPLECOMMANDER" -e "$DISKIMAGE" LOADER.SYSTEM | java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$TARGETFILE".system sys
|
||||
LOADERFILE=${TARGETFILE}.system
|
||||
if [ ${#LOADERFILE} -gt $MAXFILENAMELEN ]
|
||||
then
|
||||
echo "The filename $LOADERFILE exceeds the max name length of the filesystem ($MAXFILENAMELEN)"
|
||||
rm -f "$DISKIMAGE"
|
||||
exit 1
|
||||
fi
|
||||
java -jar "$APPLECOMMANDER" -e "$DISKIMAGE" LOADER.SYSTEM | java -jar "$APPLECOMMANDER" -p "$DISKIMAGE" "$LOADERFILE" sys
|
||||
java -jar "$APPLECOMMANDER" -d "$DISKIMAGE" LOADER.SYSTEM
|
||||
fi
|
||||
|
||||
|
@ -25,6 +25,12 @@ LINK_ARGS=
|
||||
|
||||
EXECCMD=
|
||||
|
||||
ALLTARGET=$(DISKIMAGE)
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
ALLTARGET=execute
|
||||
endif
|
||||
|
||||
ifneq ($(START_ADDR),)
|
||||
# If the MACHINE is set to an option which does not support a variable start
|
||||
# address, then error.
|
||||
@ -32,6 +38,7 @@ ifneq ($(START_ADDR),)
|
||||
$(error You cannot change start address with this machine type)
|
||||
endif
|
||||
else
|
||||
# If not set, then use the default for the config as per cc65 documentation
|
||||
ifneq ($(filter $(MACHINE), apple2 apple2-dos33 apple2enh apple2enh-dos33),)
|
||||
START_ADDR=803
|
||||
endif
|
||||
@ -60,7 +67,7 @@ endif
|
||||
|
||||
.PHONY: all execute clean
|
||||
|
||||
all: execute
|
||||
all: $(ALLTARGET)
|
||||
|
||||
clean:
|
||||
rm -f $(PGM)
|
||||
|
Loading…
Reference in New Issue
Block a user