Subversion Repositories SvarDOS

Rev

Rev 2184 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
134 mv_fox 1
#!/bin/bash
11 mv_fox 2
#
180 mateuszvis 3
# SvarDOS build script
791 mateusz.vi 4
# http://svardos.org
1698 mateusz.vi 5
#
1670 mateusz.vi 6
# Copyright (C) 2016-2024 Mateusz Viste
148 mv_fox 7
#
847 mateusz.vi 8
# This script builds floppy and CD images. It should be executed each time that
852 mateusz.vi 9
# a CORE package has been modified or the build script changed. This is usually
10
# done by the cron.sh script, itself called by a cron job.
11 mv_fox 11
#
854 mateusz.vi 12
# usage: ./build.sh outputdir buildver [noclean] > logfile
194 mateuszvis 13
#
2 mv_fox 14
 
11 mv_fox 15
### parameters block starts here ############################################
16
 
632 mateusz.vi 17
REPOROOT=`realpath ./packages`
1261 mateusz.vi 18
REPOROOTCORE=`realpath ./packages-core`
148 mv_fox 19
CUSTFILES=`realpath ./files`
2 mv_fox 20
 
171 mv_fox 21
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
22
 
11 mv_fox 23
### parameters block ends here ##############################################
24
 
854 mateusz.vi 25
# look for mandatory output dir and build id
26
if [ "x$2" == "x" ] ; then
27
  echo "usage: build.sh outputdir buildver [noclean]"
836 mateusz.vi 28
  exit 1
29
fi
854 mateusz.vi 30
CURDATE="$2"
31
PUBDIR=`realpath "$1"`
836 mateusz.vi 32
 
33
CDROOT="$PUBDIR/tmp_cdroot.build"
34
FLOPROOT="$PUBDIR/tmp_floproot.build"
35
 
36
 
171 mv_fox 37
# auto-detect whether to use mkisofs or genisoimage
38
 
39
if [ "x$GENISOIMAGE" == "x" ] ; then
180 mateuszvis 40
mkisofs --help 2> /dev/null
171 mv_fox 41
if [ $? -eq 0 ] ; then
42
  GENISOIMAGE='mkisofs'
43
fi
44
fi
45
 
46
if [ "x$GENISOIMAGE" == "x" ] ; then
180 mateuszvis 47
genisoimage --help 2> /dev/null
171 mv_fox 48
if [ $? -eq 0 ] ; then
49
  GENISOIMAGE='genisoimage'
50
fi
51
fi
52
 
53
if [ "x$GENISOIMAGE" == "x" ] ; then
54
  echo "ERROR: neither genisoimage nor mkisofs was found on this system"
55
  exit 1
56
fi
57
 
180 mateuszvis 58
# abort if anything fails
59
set -e
134 mv_fox 60
 
61
 
1920 mateusz.vi 62
# list of packages to be part of CORE (always installed), sort them from
63
# biggest to smallest to try utilizing the floppy disk space as efficiently
64
# as possible. -L means 'dereference', ie. look at the filesize of the target
65
# file, not the symlink.
66
COREPKGS=`ls -1LS 'packages-core' | grep -o '^[a-zA-Z0-9]*'`
192 mateuszvis 67
 
68
 
69
 
246 mateuszvis 70
# prepares image for floppy sets of:
71
# $1 cylinders
72
# $2 heads (sides)
73
# $3 sectors per track
74
# $4 size
849 mateusz.vi 75
# $5 working directory (for temporary files etc)
1527 mateusz.vi 76
# $6 name of the set (eg. "1440k" or "1440k-EN")
1750 mateusz.vi 77
# $7 list of packages
78
# $8 where to put a copy of the image (optional)
194 mateuszvis 79
function prep_flop {
1527 mateusz.vi 80
  WORKDIR="$5/$6"
1750 mateusz.vi 81
  LIST=$7
2168 mateusz.vi 82
  DISKPREFIX="svdos-$6-disk"
849 mateusz.vi 83
  mkdir "$WORKDIR"
2168 mateusz.vi 84
  mformat -C -t $1 -h $2 -s $3 -v $CURDATE -B "$CUSTFILES/floppy.mbr" -i "$WORKDIR/$DISKPREFIX-1.img"
2167 mateusz.vi 85
 
86
  # copy basic files (installer, startup files...)
2168 mateusz.vi 87
  mcopy -sQm -i "$WORKDIR/$DISKPREFIX-1.img" "$FLOPROOT/"* ::/
196 mateuszvis 88
 
2167 mateusz.vi 89
  # generate the INSTALL.LST file
90
  for pkg in $7 ; do
91
    echo "$pkg" >> "$WORKDIR/install.lst"
92
  done
2168 mateusz.vi 93
  mcopy -i "$WORKDIR/$DISKPREFIX-1.img" "$WORKDIR/install.lst" ::/
2167 mateusz.vi 94
  rm "$WORKDIR/install.lst"
95
 
96
  # now populate the floppies with *.svp packages
196 mateuszvis 97
  curdisk=1
1127 mateusz.vi 98
 
99
  while [ ! -z "$LIST" ] ; do
100
 
101
    unset PENDING
102
    for p in $LIST ; do
103
      # if copy fails, then probably the floppy is full - try other packages
104
      # but remember all that fails so they will be retried on a new floppy
2168 mateusz.vi 105
      if ! mcopy -mi "$WORKDIR/$DISKPREFIX-$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
1127 mateusz.vi 106
        PENDING="$PENDING $p"
107
      fi
108
    done
109
 
110
    LIST="$PENDING"
111
    # if there are any pending items, then create a new floppy and try pushing pending packages to it
112
    if [ ! -z "$PENDING" ] ; then
196 mateuszvis 113
      curdisk=$((curdisk+1))
2168 mateusz.vi 114
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$WORKDIR/$DISKPREFIX-$curdisk.img"
196 mateuszvis 115
    fi
1127 mateusz.vi 116
 
194 mateuszvis 117
  done
196 mateuszvis 118
 
205 mateuszvis 119
  # add a short readme
849 mateusz.vi 120
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$WORKDIR/readme.txt"
121
  echo "" >> "$WORKDIR/readme.txt"
122
  echo "These images are raw floppy disk dumps. To write them on an actual floppy disk, you have to use a low-level sector copying tool, like dd." >> "$WORKDIR/readme.txt"
123
  echo "" >> "$WORKDIR/readme.txt"
862 mateusz.vi 124
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.org" >> "$WORKDIR/readme.txt"
205 mateuszvis 125
 
849 mateusz.vi 126
  unix2dos "$WORKDIR/readme.txt"
205 mateuszvis 127
 
2168 mateusz.vi 128
  # make a copy of the (first) image, if requested
1750 mateusz.vi 129
  if [ "x$8" != "x" ] ; then
2168 mateusz.vi 130
    cp "$WORKDIR/$DISKPREFIX-1.img" $8
279 mateuszvis 131
  fi
132
 
196 mateuszvis 133
  # zip the images (and remove them at the same time)
1527 mateusz.vi 134
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$6.zip" "$WORKDIR"/*
196 mateuszvis 135
 
136
  # clean up
849 mateusz.vi 137
  rmdir "$WORKDIR"
194 mateuszvis 138
}
139
 
140
 
134 mv_fox 141
### actual code flow starts here ############################################
142
 
148 mv_fox 143
# remember where I am, so I can get back here once all is done
11 mv_fox 144
origdir=`pwd`
145
 
836 mateusz.vi 146
echo "###############################################################################"
147
echo " STARTING BUILD $CURDATE"
148
echo "###############################################################################"
149
echo "dest dir: $PUBDIR"
150
echo "current time is `date` and it's a beautiful day somewhere in the world"
151
echo
152
 
189 mateuszvis 153
mkdir "$CDROOT"
192 mateuszvis 154
mkdir "$FLOPROOT"
189 mateuszvis 155
 
192 mateuszvis 156
# add CORE packages to CDROOT + create the list of packages on floppy
195 mateuszvis 157
for pkg in $COREPKGS ; do
1261 mateusz.vi 158
  cp "$REPOROOTCORE/$pkg.svp" "$CDROOT/"
192 mateuszvis 159
done
160
 
1750 mateusz.vi 161
# add some extra packages to CDROOT but not in the list of packages to install
162
cp "$REPOROOT/pcntpk.svp" "$CDROOT/"
163
cp "$REPOROOT/videcdd-2.14.svp" "$CDROOT/videcdd.svp"
2184 mateusz.vi 164
cp "$REPOROOT/provox-7.05.svp" "$CDROOT/provox.svp"
300 mateuszvis 165
 
1750 mateusz.vi 166
#
300 mateuszvis 167
 
1750 mateusz.vi 168
 
836 mateusz.vi 169
echo
170
echo "### Populating the floppy root at $FLOPROOT"
171
echo
172
 
862 mateusz.vi 173
# prepare the content of the boot (install) floppy, unzipping everything
174
# in lowercase (-L) to avoid any case mismatching later in the build process
192 mateuszvis 175
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
1922 mateusz.vi 176
unzip -CLj "$REPOROOTCORE/cpidos.svp" 'cpi/ega.cpx' -d "$FLOPROOT/"
1925 mateusz.vi 177
unzip -CLj "$REPOROOTCORE/cpidos.svp" 'cpi/ega3.cpx' -d "$FLOPROOT/"
178
unzip -CLj "$REPOROOTCORE/cpidos.svp" 'cpi/ega6.cpx' -d "$FLOPROOT/"
179
unzip -CLj "$REPOROOTCORE/cpidos.svp" 'cpi/ega9.cpx' -d "$FLOPROOT/"
1922 mateusz.vi 180
unzip -CLj "$REPOROOTCORE/cpidos.svp" 'cpi/ega10.cpx' -d "$FLOPROOT/"
1261 mateusz.vi 181
unzip -CLj "$REPOROOTCORE/svarcom.svp" command.com -d "$FLOPROOT/"
182
unzip -CLj "$REPOROOTCORE/display.svp" bin/display.exe -d "$FLOPROOT/"
183
unzip -CLj "$REPOROOTCORE/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
1478 mateusz.vi 184
unzip -CLj "$REPOROOTCORE/fdisk.svp" bin/fdisk.exe -d "$FLOPROOT/"
1261 mateusz.vi 185
unzip -CLj "$REPOROOTCORE/format.svp" bin/format.exe -d "$FLOPROOT/"
1833 mateusz.vi 186
unzip -CLj "$REPOROOTCORE/kernledr.svp" kernel.sys -d "$FLOPROOT/"
1261 mateusz.vi 187
unzip -CLj "$REPOROOTCORE/mem.svp" bin/mem.exe -d "$FLOPROOT/"
188
unzip -CLj "$REPOROOTCORE/mode.svp" bin/mode.com -d "$FLOPROOT/"
1499 mateusz.vi 189
unzip -CLj "$REPOROOTCORE/more.svp" bin/more.com -d "$FLOPROOT/"
1261 mateusz.vi 190
unzip -CLj "$REPOROOTCORE/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
1465 mateusz.vi 191
unzip -CLj "$REPOROOTCORE/sved.svp" bin/sved.com -d "$FLOPROOT/"
1809 bernd.boec 192
unzip -CLj "$REPOROOTCORE/sys.svp" bin/sys.com -d "$FLOPROOT/"
192 mateuszvis 193
 
2183 mateusz.vi 194
# generate a simple AUTOEXEC.BAT
195
cat <<EOF > "$FLOPROOT/autoexec.bat"
196
@ECHO OFF
197
DISPLAY CON=(EGA,,1)
198
FDAPM ADV:REG
199
 
200
ECHO.
201
ECHO  ********************
202
ECHO   WELCOME TO SVARDOS
203
ECHO  ********************
204
ECHO  build: $CURDATE
205
ECHO.
206
 
207
REM Load PROVOX screen reader if present
2184 mateusz.vi 208
IF NOT EXIST PROVOX7.EXE GOTO INSTALL
2183 mateusz.vi 209
CLS
2187 mateusz.vi 210
ECHO This svardos build comes with the provox screen reader preinstalled
211
ECHO.
212
ECHO It outputs speech to a Braille n Speak device that has to be connected to
213
ECHO the first serial port of your computer
214
ECHO.
215
ECHO The installation of the SvarDOS system is about to begin
216
ECHO Press any key to continue
217
ECHO.
2184 mateusz.vi 218
PROVOX7.EXE
219
PV7.EXE INIT BNS > NUL
2187 mateusz.vi 220
PAUSE
2183 mateusz.vi 221
 
222
:INSTALL
223
INSTALL
224
EOF
867 mateusz.vi 225
unix2dos "$FLOPROOT/autoexec.bat"
862 mateusz.vi 226
 
2183 mateusz.vi 227
# generate a simple CONFIG.SYS
228
cat <<EOF > "$FLOPROOT/config.sys"
229
LASTDRIVE=Z
230
FILES=8
231
BUFFERS=10
232
SHELL=COMMAND.COM /e:512 /p
233
EOF
234
unix2dos "$FLOPROOT/config.sys"
867 mateusz.vi 235
 
2183 mateusz.vi 236
 
836 mateusz.vi 237
echo
862 mateusz.vi 238
echo "### Computing the USB image"
239
echo
240
 
241
# prepare the USB bootable image
242
USBIMG=$PUBDIR/svardos-usb.img
243
cp files/boot-svardos.img $USBIMG
1808 bttr 244
mlabel -i "$USBIMG@@32256" ::$CURDATE
862 mateusz.vi 245
mcopy -sQm -i "$USBIMG@@32256" "$FLOPROOT/"* ::/
1750 mateusz.vi 246
for p in $COREPKGS ; do
862 mateusz.vi 247
  mcopy -mi "$USBIMG@@32256" "$CDROOT/$p.svp" ::/
248
done
249
 
250
# compress the USB image
251
zip -mj9 "$PUBDIR/svardos-$CURDATE-usb.zip" "$USBIMG"
252
 
253
 
254
echo
836 mateusz.vi 255
echo "### Creating floppy images"
256
echo
1212 mateusz.vi 257
echo "You might notice a lot of DISK FULL warnings below. Do not worry, these"
258
echo "are expected and are perfectly normal. It is a side effect of trying to"
259
echo "fit as many packages as possible on the floppy sets."
260
echo
836 mateusz.vi 261
 
194 mateuszvis 262
# build the boot (CD) floppy image
192 mateuszvis 263
export MTOOLS_NO_VFAT=1
264
 
246 mateuszvis 265
# prepare images for floppies in different sizes (args are C H S SIZE)
1750 mateusz.vi 266
prep_flop 80 2 36 2880 "$PUBDIR" "2.88M" "$COREPKGS pcntpk videcdd" "$CDROOT/boot.img"
267
prep_flop 80 2 18 1440 "$PUBDIR" "1.44M" "$COREPKGS pcntpk"
268
prep_flop 80 2 15 1200 "$PUBDIR" "1.2M" "$COREPKGS"
269
prep_flop 80 2  9  720 "$PUBDIR" "720K" "$COREPKGS"
1926 mateusz.vi 270
prep_flop 40 2  9  360 "$PUBDIR" "360K" "$COREPKGS"
194 mateuszvis 271
 
2169 mateusz.vi 272
# BNS-enabled (screen reader) 2.88M build
2184 mateusz.vi 273
unzip -CLj "$CDROOT/provox.svp" drivers/provox/provox7.exe -d "$FLOPROOT/"
274
unzip -CLj "$CDROOT/provox.svp" drivers/provox/pv7.exe -d "$FLOPROOT/"
2169 mateusz.vi 275
prep_flop 80 2 36 2880 "$PUBDIR" "2.88M-BNS" "$COREPKGS pcntpk videcdd provox" "$CDROOT/bootbns.img"
2184 mateusz.vi 276
rm "$FLOPROOT/provox7.exe"
277
rm "$FLOPROOT/pv7.exe"
862 mateusz.vi 278
 
2169 mateusz.vi 279
 
280
 
836 mateusz.vi 281
echo
282
echo "### Computing DOSEMU.zip"
283
echo
284
 
321 mateuszvis 285
# prepare the DOSEMU boot zip
836 mateusz.vi 286
DOSEMUDIR="$PUBDIR/tmp_dosemu-prep-files.build"
321 mateuszvis 287
mkdir "$DOSEMUDIR"
322 mateuszvis 288
# INSTALL.BAT
624 mateuszvis 289
echo 'IF NOT EXIST C:\TEMP\NUL MKDIR C:\TEMP' >> "$DOSEMUDIR/install.bat"
322 mateuszvis 290
echo 'mkdir %DOSDIR%' >> "$DOSEMUDIR/install.bat"
291
echo 'mkdir %DOSDIR%\cfg' >> "$DOSEMUDIR/install.bat"
292
echo 'ECHO # pkg config file - specifies locations where packages should be installed >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
1670 mateusz.vi 293
echo 'ECHO DIR BIN %DOSDIR% >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
322 mateuszvis 294
echo 'ECHO DIR PROGS C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
295
echo 'ECHO DIR GAMES C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
296
echo 'ECHO DIR DRIVERS C:\DRIVERS\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
297
echo 'ECHO DIR DEVEL C:\DEVEL\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
321 mateuszvis 298
for p in $COREPKGS ; do
700 mateusz.vi 299
  cp "$CDROOT/$p.svp" "$DOSEMUDIR/"
300
  echo "pkg install $p.svp" >> "$DOSEMUDIR/install.bat"
301
  echo "del $p.svp" >> "$DOSEMUDIR/install.bat"
321 mateuszvis 302
done
322 mateuszvis 303
echo 'ECHO my_ip = dhcp >> %DOSDIR%\CFG\WATTCP.CFG' >> "$DOSEMUDIR/install.bat"
304
echo 'del pkg.exe' >> "$DOSEMUDIR/install.bat"
1103 mateusz.vi 305
echo 'DEL C:\CONFIG.SYS' >> "$DOSEMUDIR/install.bat"
306
echo 'COPY C:\CONFIG.NEW C:\CONFIG.SYS' >> "$DOSEMUDIR/install.bat"
307
echo 'DEL C:\CONFIG.NEW' >> "$DOSEMUDIR/install.bat"
308
echo 'SET COMSPEC=C:\COMMAND.COM' >> "$DOSEMUDIR/install.bat"
309
echo 'DEL C:\CMD.COM' >> "$DOSEMUDIR/install.bat"
322 mateuszvis 310
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
311
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
1103 mateusz.vi 312
echo 'ECHO  SVARDOS SETUP COMPLETED' >> "$DOSEMUDIR/install.bat"
313
echo 'ECHO   PLEASE RESTART DOSEMU' >> "$DOSEMUDIR/install.bat"
322 mateuszvis 314
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
315
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
1833 mateusz.vi 316
unzip -Cj "$REPOROOTCORE/kernledr.svp" kernel.sys -d "$DOSEMUDIR/"
1261 mateusz.vi 317
unzip -CLj "$REPOROOTCORE/svarcom.svp" command.com -d "$DOSEMUDIR/"
1103 mateusz.vi 318
mv "$DOSEMUDIR/command.com" "$DOSEMUDIR/cmd.com"
1261 mateusz.vi 319
unzip -Cj "$REPOROOTCORE/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
322 mateuszvis 320
# CONFIG.SYS
1103 mateusz.vi 321
echo 'FILES=25' >> "$DOSEMUDIR/config.sys"
322 mateuszvis 322
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
326 mateuszvis 323
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
325 mateuszvis 324
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"
322 mateuszvis 325
echo 'DEVICE=D:\dosemu\umb.sys' >> "$DOSEMUDIR/config.sys"
325 mateuszvis 326
echo 'DEVICEHIGH=D:\dosemu\ems.sys' >> "$DOSEMUDIR/config.sys"
322 mateuszvis 327
echo 'INSTALL=D:\dosemu\emufs.com' >> "$DOSEMUDIR/config.sys"
1103 mateusz.vi 328
cp "$DOSEMUDIR/config.sys" "$DOSEMUDIR/config.new"
329
echo 'SHELL=C:\CMD.COM /P' >> "$DOSEMUDIR/config.sys"
330
echo 'SHELL=C:\COMMAND.COM /P' >> "$DOSEMUDIR/config.new"
322 mateuszvis 331
# AUTOEXEC.BAT
321 mateuszvis 332
echo "@ECHO OFF" >> "$DOSEMUDIR/autoexec.bat"
322 mateuszvis 333
echo 'SET DOSDIR=C:\SVARDOS' >> "$DOSEMUDIR/autoexec.bat"
334
echo 'SET WATTCP.CFG=%DOSDIR%\CFG' >> "$DOSEMUDIR/autoexec.bat"
335
echo 'SET DIRCMD=/p/ogne' >> "$DOSEMUDIR/autoexec.bat"
624 mateuszvis 336
echo 'SET TEMP=C:\TEMP' >> "$DOSEMUDIR/autoexec.bat"
1670 mateusz.vi 337
echo 'PATH %DOSDIR%' >> "$DOSEMUDIR/autoexec.bat"
322 mateuszvis 338
echo "" >> "$DOSEMUDIR/autoexec.bat"
1103 mateusz.vi 339
echo 'IF NOT EXIST INSTALL.BAT GOTO NORMBOOT' >> "$DOSEMUDIR/autoexec.bat"
322 mateuszvis 340
echo "REM *** this is a one-time setup script used only during first initialization ***" >> "$DOSEMUDIR/autoexec.bat"
1103 mateusz.vi 341
echo 'CALL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
342
echo 'DEL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
343
echo 'GOTO ENDOFFILE' >> "$DOSEMUDIR/autoexec.bat"
322 mateuszvis 344
echo "" >> "$DOSEMUDIR/autoexec.bat"
1103 mateusz.vi 345
echo ":NORMBOOT" >> "$DOSEMUDIR/autoexec.bat"
321 mateuszvis 346
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
347
echo "ECHO Welcome to SvarDOS (powered by DOSEMU)! Type HELP if you are lost." >> "$DOSEMUDIR/autoexec.bat"
348
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
1103 mateusz.vi 349
echo ":ENDOFFILE" >> "$DOSEMUDIR/autoexec.bat"
321 mateuszvis 350
rm -f "$PUBDIR/svardos-dosemu.zip"
643 mateusz.vi 351
zip -rm9jk "$PUBDIR/svardos-$CURDATE-dosemu.zip" "$DOSEMUDIR"
321 mateuszvis 352
rmdir "$DOSEMUDIR"
353
 
836 mateusz.vi 354
echo
2169 mateusz.vi 355
echo "### Generating ISO CD images"
836 mateusz.vi 356
echo
357
 
2169 mateusz.vi 358
# normal
643 mateusz.vi 359
CDISO="$PUBDIR/svardos-$CURDATE-cd.iso"
360
CDZIP="$PUBDIR/svardos-$CURDATE-cd.zip"
279 mateuszvis 361
$GENISOIMAGE -input-charset cp437 -b boot.img -iso-level 1 -f -V SVARDOS -o "$CDISO" "$CDROOT/boot.img"
2169 mateusz.vi 362
zip -mj9 "$CDZIP" "$CDISO"
2 mv_fox 363
 
2169 mateusz.vi 364
# BNS-enabled
365
CDISO="$PUBDIR/svardos-$CURDATE-cd-bns.iso"
366
CDZIP="$PUBDIR/svardos-$CURDATE-cd-bns.zip"
367
$GENISOIMAGE -input-charset cp437 -b bootbns.img -iso-level 1 -f -V SVARDOS -o "$CDISO" "$CDROOT/bootbns.img"
204 mateuszvis 368
zip -mj9 "$CDZIP" "$CDISO"
369
 
1616 mateusz.vi 370
 
371
 
372
###############################################################################
1772 mateusz.vi 373
# compute the svardos stub, useful for migrating alien DOS systems to SvarDOS #
374
###############################################################################
375
 
376
echo
377
echo "### generating the pkgstub zip archive"
378
 
379
mkdir "$PUBDIR"/pkgstub
380
unzip -jC "$REPOROOTCORE"/pkgnet.svp bin/pkgnet.exe -d "$PUBDIR"/pkgstub
381
unzip -jC "$REPOROOTCORE"/pkg.svp bin/pkg.exe -d "$PUBDIR"/pkgstub
382
 
383
cat <<EOF > "$PUBDIR"/pkgstub/readme.txt
384
 
385
        SvarDOS stub, or how to plant a SvarDOS seed in a foreign land
386
        --------------------------------------------------------------
387
 
388
This archive contains files that allow to install a SvarDOS stub within
389
another DOS system. This makes it possible to use the SvarDOS online repository
390
of packages on non-SvarDOS systems, assuming you have a network card connected
391
to the internet and a suitable packet driver.
392
 
393
If you do not have internet connectivity, then you will still be able to
394
install SvarDOS packages (*.SVP) once you copy them to your PC. You can fetch
395
SvarDOS packages at <http://svardos.org>.
396
 
397
Follow the guide now:
398
 
399
=======================================
400
MKDIR C:\\SVARDOS
401
MKDIR C:\\SVARDOS\\CFG
402
 
403
SET WATTCP.CFG=C:\\SVARDOS\\CFG
404
SET DOSDIR=C:\\SVARDOS
405
SET LANG=EN
406
SET PATH=%PATH%;C:\SVARDOS
407
 
408
COPY *.EXE C:\\SVARDOS\\
409
COPY *.CFG C:\\SVARDOS\CFG\\
410
=======================================
411
 
412
If in doubt, reach out to us at <http://svardos.org>.
413
EOF
414
 
415
cat <<EOF > "$PUBDIR"/pkgstub/wattcp.cfg
416
# Rely on DHCP by default
417
my_ip = dhcp
418
 
419
# modify (and uncomment) these if you have a fix IP setup:
420
#
421
#my_ip = 0.0.0.0  ; IP address
422
#netmask = 255.255.255.0  ; netmask
423
#nameserver = 0.0.0.0  ; primary DNS, mandatory if not using DHCP
424
#nameserver = 0.0.0.0  ; secondary DNS, optional
425
#gateway = 0.0.0.0  ; default gateway
426
EOF
427
 
428
cat <<EOF > "$PUBDIR"/pkgstub/pkg.cfg
429
# pkg config file - specifies locations where SvarDOS packages will be installed
430
 
431
# SvarDOS core files
432
DIR BIN C:\\SVARDOS\\
433
 
434
# General location for programs
435
DIR PROGS C:\\
436
 
437
# Games
438
DIR GAMES C:\\
439
 
440
# Drivers
441
DIR DRIVERS C:\\DRIVERS\\
442
 
443
# Development tools
444
DIR DEVEL C:\\DEVEL\\
445
EOF
446
 
447
zip -m -k9jr "$PUBDIR"/svarstub.zip "$PUBDIR"/pkgstub
448
rmdir "$PUBDIR"/pkgstub
449
 
450
 
451
 
452
###############################################################################
1616 mateusz.vi 453
# cleanup all temporary things                                                #
454
###############################################################################
455
 
836 mateusz.vi 456
if [ "x$2" != "xnoclean" ] ; then
457
  echo
904 bttr 458
  echo "### Cleanup of temporary directories:"
836 mateusz.vi 459
  echo "# $CDROOT"
460
  echo "# $FLOPROOT"
461
  echo
194 mateuszvis 462
  rm -rf "$CDROOT" "$FLOPROOT"
463
fi
189 mateuszvis 464
 
11 mv_fox 465
cd "$origdir"
466
 
836 mateusz.vi 467
echo
468
echo "### ALL DONE! ###"
16 mv_fox 469
 
2 mv_fox 470
exit 0