shift
done
tar --transform="s|Dist/($ARCH/)*|Acess/|x" -zcf Releases/Acess2_latest_${ARCH}_bin.tar.gz Dist/$ARCH Dist/Acess2.$ARCH.gz
-mdeltree b:/Acess2 2>&1 >/dev/null || true
-mcopy -s Dist/$ARCH/ b:/Acess2
-mcopy Dist/Acess2* b:/Acess2/Acess2.gz
+IMGNAME=AcessRelease.img
+./Tools/BootFloppy/MakeDiskImage $IMGNAME
+mcopy -i $IMGNAME -s Dist/$ARCH/ ::/Acess2
+mcopy -i $IMGNAME Dist/Acess2* ::/Acess2/Acess2.gz
gzip -c AcessRelease.img > Releases/Acess2_latest_${ARCH}.img.gz
MODULES += IPStack # So the other modules are loaded before it
#DYNMODS := USB/Core
#DYNMODS += Filesystems/InitRD
+
+# BUILD_DIST=y - Install to ./Dist
+ifneq ($(BUILD_DIST),)
+ DISTROOT := $(ACESSDIR)/Dist
+ xCP := cp
+ xMKDIR := mkdir -p
+endif
echo "Usage: $0 <image>" >&2
exit 1
fi
+DIR=`dirname $0`
IMGNAME=$1
dd if=/dev/zero of="$IMGNAME" bs=512 count=2880
mformat -i "$IMGNAME" ::/ -f 1440 -v Acess
-dd if=stage1 bs=1 seek=0 count=3 "of=$IMGNAME" conv=notrunc
-dd if=stage1 bs=1 skip=$((0x3E)) seek=$((0x3E)) "of=$IMGNAME" conv=notrunc
+dd if=$DIR/stage1 bs=1 seek=0 count=3 "of=$IMGNAME" conv=notrunc
+dd if=$DIR/stage1 bs=1 skip=$((0x3E)) seek=$((0x3E)) "of=$IMGNAME" conv=notrunc
mmd -i "$IMGNAME" ::/boot
-mcopy stage1 stage2 -i "$IMGNAME" ::/boot/
+mcopy $DIR/stage1 $DIR/stage2 -i "$IMGNAME" ::/boot/
/bin/echo -ne '\x23' | dd seek=$((0x44)) bs=1 count=1 "of=$IMGNAME" conv=notrunc
-mcopy menu.lst -i "$IMGNAME" ::/boot/
+mcopy $DIR/menu.lst -i "$IMGNAME" ::/boot/
timeout 1
-title Acess2 (x86,FDD)
- kernel /Acess2/Acess2.x86.gz /System=fat:/Devices/fdd/0 /Acess=/System/Acess2/x86
+title Acess2 (FDD)
+ kernel /Acess2/Acess2.gz /System=fat:/Devices/fdd/0 /Acess=/System/Acess2/