Skip to content

Commit 0e658f5

Browse files
author
stefan.vogt@byteproject.net
committed
adding "z5 by design choice" script
1 parent e9de49a commit 0e658f5

1 file changed

Lines changed: 199 additions & 0 deletions

File tree

Build/z5_all.sh

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
#!/bin/bash
2+
# builds all Z-machine v5 capable targets to z5:
3+
# Commodore 64, Commodore Amiga, Atari ST, Spectrum Next, MS-DOS, BBC Micro,
4+
# Acorn Electron, Commodore 128, Mega 65, Commodore Plus/4, classic Macintosh.
5+
6+
#read config file
7+
source config.sh
8+
9+
############### Commodore 64 ###############
10+
11+
#cleanup
12+
rm ${STORY}_c64.d64
13+
14+
#compile
15+
${WRAPPER} -5 ${STORY}.inf
16+
ruby Interpreters/Ozmoo/make.rb -t:c64 -dc:6:9 -cc:8 -ss1:"${LABEL}" -ss2:"Interactive Fiction" -ss3:"${SUBTITLE}" -sw:6 ${STORY}.z5
17+
18+
mv c64_${STORY}.d64 ${STORY}_c64.d64
19+
20+
############### Amiga ###############
21+
22+
#cleanup
23+
rm ${STORY}_amiga.adf
24+
25+
#compile
26+
${WRAPPER} -5 ${STORY}.inf
27+
28+
#prepare story
29+
cp ${STORY}.z5 Story.Data
30+
31+
#copy Amiga disk image template
32+
cp Interpreters/amiga_Infocom_z5.adf ./
33+
mv amiga_Infocom_z5.adf ${STORY}_amiga.adf
34+
35+
#add file to Amiga disk image
36+
xdftool ${STORY}_amiga.adf write Story.Data
37+
38+
#post cleanup
39+
rm Story.Data
40+
41+
############### Atari ST ###############
42+
43+
#cleanup
44+
rm ${STORY}_atarist.st
45+
46+
#compile
47+
${WRAPPER} -5 ${STORY}.inf
48+
49+
#prepare story
50+
cp ${STORY}.z5 STORY.DAT
51+
52+
#copy interpreter
53+
cp Interpreters/ATARIST.PRG ./
54+
mv ATARIST.PRG PLAY.PRG
55+
56+
#arrange resources
57+
#mkdir AUTO
58+
#cp Resources/INTRO.PRG ./AUTO/INTRO.PRG
59+
60+
#create ATARI disk image
61+
zip -v ${STORY}.zip PLAY.PRG PLAY.PRG
62+
zip -rv ${STORY}.zip STORY.DAT STORY.DAT
63+
#zip -rv ${STORY}.zip AUTO/INTRO.PRG AUTO/INTRO.PRG
64+
zip2st ${STORY}.zip ${STORY}.st
65+
66+
#post cleanup
67+
rm STORY.DAT
68+
rm PLAY.PRG
69+
rm ${STORY}.zip
70+
#rm -rf AUTO
71+
mv ${STORY}.st ${STORY}_atarist.st
72+
73+
############### Spectrum Next ###############
74+
75+
# the Speccy Next has built-in support for z5 so you may
76+
# distribute the z5 file directly
77+
78+
############### MS-DOS ###############
79+
80+
#copy resources
81+
cp ./Interpreters/FROTZ.EXE ./Releases/DOS/PUDDLE.EXE
82+
83+
#compile
84+
${WRAPPER} -5 ${STORY}.inf
85+
86+
#prepare story
87+
cp ${STORY}.z5 STORY.DAT
88+
89+
#place story in release directory
90+
mv STORY.DAT ./Releases/DOS/
91+
92+
############### BBC Micro / Acorn Electron ###############
93+
94+
#cleanup
95+
rm ${STORY}_bbc_elk.ssd
96+
97+
#compile
98+
${WRAPPER} -5 ${STORY}.inf
99+
cp ${STORY}.z5 ./Interpreters/beebOzmoo/
100+
#cp ./Resources/screen.bbc ./Interpreters/beebOzmoo
101+
cd Interpreters/beebOzmoo
102+
#python make-acorn.py -v --splash-image screen.bbc --splash-mode 2 --title "${STORY}" --subtitle "${SUBTITLE}" --default-fg-colour 7 --default-bg-colour 0 --default-mode-7-status-colour 6 ${STORY}.z5
103+
python make-acorn.py -v --title "${STORY}" --subtitle "${SUBTITLE}" --default-fg-colour 7 --default-bg-colour 0 --default-mode-7-status-colour 6 ${STORY}.z5
104+
rm ${STORY}.z5
105+
#rm screen.bbc
106+
mv ${STORY}.ssd ${STORY}_bbc_elk.ssd
107+
mv ${STORY}_bbc_elk.ssd ../../
108+
109+
cd ../../
110+
111+
############### Commodore 128 ###############
112+
113+
#cleanup
114+
rm ${STORY}_c128.d71
115+
116+
#compile
117+
${WRAPPER} -5 ${STORY}.inf
118+
cp ${STORY}.z5 ${STORY}_c128.z5
119+
#mv Interpreters/Ozmoo/asm/splashlines.tpl Interpreters/Ozmoo/asm/splashlines40.tpl
120+
#mv Interpreters/Ozmoo/asm/splashlines80.tpl Interpreters/Ozmoo/asm/splashlines.tpl
121+
ruby Interpreters/Ozmoo/make.rb -t:c128 -dc:6:9 -cc:8 -sw:6 ${STORY}_c128.z5
122+
#mv Interpreters/Ozmoo/asm/splashlines.tpl Interpreters/Ozmoo/asm/splashlines80.tpl
123+
#mv Interpreters/Ozmoo/asm/splashlines40.tpl Interpreters/Ozmoo/asm/splashlines.tpl
124+
125+
mv c128_${STORY}_c128.d71 ${STORY}_c128.d71
126+
127+
#remove obsolete files
128+
rm ${STORY}_c128.z5
129+
130+
############### Mega65 ###############
131+
132+
#cleanup
133+
rm ${STORY}_mega65.d81
134+
135+
#compile
136+
${WRAPPER} -5 ${STORY}.inf
137+
cp ${STORY}.z5 ./Interpreters/Ozmoo/
138+
cd Interpreters/Ozmoo
139+
#mv asm/splashlines.tpl asm/splashlines40.tpl
140+
#mv asm/splashlines80.tpl asm/splashlines.tpl
141+
ruby make.rb -t:mega65 -dc:6:9 -cc:8 -sw:6 ${STORY}.z5
142+
#mv asm/splashlines.tpl asm/splashlines80.tpl
143+
#mv asm/splashlines40.tpl asm/splashlines.tpl
144+
rm ${STORY}.z5
145+
mv mega65_${STORY}.d81 ${STORY}_mega65.d81
146+
mv ${STORY}_mega65.d81 ../../
147+
148+
cd ../../
149+
150+
############### Commodore Plus/4 ###############
151+
152+
#cleanup
153+
rm ${STORY}_plus4.d64
154+
155+
#copy resources
156+
#cp Resources/picplus4.mb .
157+
158+
#compile
159+
${WRAPPER} -5 ${STORY}.inf
160+
cp ${STORY}.z5 ${STORY}_plus4.z5
161+
ruby Interpreters/Ozmoo/make.rb -t:plus4 -dc:6:9 -cc:8 -ss1:"${LABEL}" -ss2:"Interactive Fiction" -ss3:"${SUBTITLE}" -sw:6 ${STORY}_plus4.z5
162+
#ruby Interpreters/Ozmoo/make.rb -t:plus4 -i picplus4.mb -dc:6:9 -sc:8 -cc:8 -ss1:"${LABEL}" -ss2:"Interactive Fiction" -ss3:"${SUBTITLE}" -sw:6 ${STORY}_plus4.z5
163+
164+
mv plus4_${STORY}_plus4.d64 ${STORY}_plus4.d64
165+
166+
#append directory art
167+
#cp Resources/dirart.d64 ./
168+
#mv ${STORY}_plus4.d64 mergep4.d64
169+
#d64merge mergep4.d64 dirart.d64 ${STORY}_plus4.d64
170+
171+
#remove obsolete files
172+
rm ${STORY}_plus4.z5
173+
#rm mergep4.d64
174+
#rm dirart.d64
175+
#rm picplus4.mb
176+
177+
############### Classic Macintosh ###############
178+
179+
#cleanup
180+
rm ${STORY}_mac.dsk
181+
182+
#copy resources
183+
cp ./Interpreters/ClassicMac_MaxZip.dsk ./
184+
mv ClassicMac_MaxZip.dsk ${STORY}_mac.dsk
185+
186+
#compile
187+
${WRAPPER} -5 ${STORY}.inf
188+
189+
#prepare story
190+
cp ${STORY}.z5 game.story
191+
192+
#place story on Macintosh 800k disk image
193+
hmount ${STORY}_mac.dsk
194+
hcopy game.story :
195+
hls
196+
humount
197+
198+
#post cleanup
199+
rm game.story

0 commit comments

Comments
 (0)