Subversion Repositories SvarDOS

Rev

Rev 836 | Rev 847 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 836 Rev 838
1
#!/bin/bash
1
#!/bin/bash
2
#
2
#
3
# SvarDOS build script
3
# SvarDOS build script
4
# http://svardos.org
4
# http://svardos.org
5
# Copyright (C) 2016-2022 Mateusz Viste
5
# Copyright (C) 2016-2022 Mateusz Viste
6
#
6
#
7
# This script generates the SvarDOS repository index and builds floppy and CD
7
# This script generates the SvarDOS repository index and builds floppy and CD
8
# images. It should be executed each time that a CORE package has been
8
# images. It should be executed each time that a CORE package has been
9
# modified, added or removed.
9
# modified, added or removed.
10
#
10
#
11
# usage: ./build.sh outputdir [noclean]
11
# usage: ./build.sh outputdir [noclean]
12
#
12
#
13
 
13
 
14
### parameters block starts here ############################################
14
### parameters block starts here ############################################
15
 
15
 
16
CURDATE=`date +%Y%m%d`
16
CURDATE=`date +%Y%m%d`
17
REPOROOT=`realpath ./packages`
17
REPOROOT=`realpath ./packages`
18
CUSTFILES=`realpath ./files`
18
CUSTFILES=`realpath ./files`
19
 
19
 
20
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
20
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
21
 
21
 
22
### parameters block ends here ##############################################
22
### parameters block ends here ##############################################
23
 
23
 
24
# look for mandatory output dir
24
# look for mandatory output dir
25
if [ "x$1" == "x" ] ; then
25
if [ "x$1" == "x" ] ; then
26
  echo "usage: build.sh outputdir [noclean] > logfile"
26
  echo "usage: build.sh outputdir [noclean] > logfile"
27
  exit 1
27
  exit 1
28
fi
28
fi
29
PUBDIR=`realpath "$1"`/$CURDATE.staging
29
PUBDIR=`realpath "$1"`/$CURDATE.staging
30
 
30
 
31
CDROOT="$PUBDIR/tmp_cdroot.build"
31
CDROOT="$PUBDIR/tmp_cdroot.build"
32
FLOPROOT="$PUBDIR/tmp_floproot.build"
32
FLOPROOT="$PUBDIR/tmp_floproot.build"
33
 
33
 
34
 
34
 
35
# auto-detect whether to use mkisofs or genisoimage
35
# auto-detect whether to use mkisofs or genisoimage
36
 
36
 
37
if [ "x$GENISOIMAGE" == "x" ] ; then
37
if [ "x$GENISOIMAGE" == "x" ] ; then
38
mkisofs --help 2> /dev/null
38
mkisofs --help 2> /dev/null
39
if [ $? -eq 0 ] ; then
39
if [ $? -eq 0 ] ; then
40
  GENISOIMAGE='mkisofs'
40
  GENISOIMAGE='mkisofs'
41
fi
41
fi
42
fi
42
fi
43
 
43
 
44
if [ "x$GENISOIMAGE" == "x" ] ; then
44
if [ "x$GENISOIMAGE" == "x" ] ; then
45
genisoimage --help 2> /dev/null
45
genisoimage --help 2> /dev/null
46
if [ $? -eq 0 ] ; then
46
if [ $? -eq 0 ] ; then
47
  GENISOIMAGE='genisoimage'
47
  GENISOIMAGE='genisoimage'
48
fi
48
fi
49
fi
49
fi
50
 
50
 
51
if [ "x$GENISOIMAGE" == "x" ] ; then
51
if [ "x$GENISOIMAGE" == "x" ] ; then
52
  echo "ERROR: neither genisoimage nor mkisofs was found on this system"
52
  echo "ERROR: neither genisoimage nor mkisofs was found on this system"
53
  exit 1
53
  exit 1
54
fi
54
fi
55
 
55
 
56
 
56
 
57
# abort if anything fails
57
# abort if anything fails
58
set -e
58
set -e
59
 
59
 
60
 
60
 
61
# list of packages to be part of CORE (always installed)
61
# list of packages to be part of CORE (always installed)
62
COREPKGS=`ls -1 'packages/core' | grep -o '^[a-z]*'`
62
COREPKGS=`ls -1 'packages/core' | grep -o '^[a-z]*'`
63
 
63
 
64
# list of packages to be part of EXTRA (only sometimes installed, typically drivers)
64
# list of packages to be part of EXTRA (only sometimes installed, typically drivers)
65
EXTRAPKGS="pcntpk udvd2"
65
EXTRAPKGS="pcntpk udvd2"
66
 
66
 
67
# all packages
67
# all packages
68
ALLPKGS="$COREPKGS $EXTRAPKGS"
68
ALLPKGS="$COREPKGS $EXTRAPKGS"
69
 
69
 
70
 
70
 
71
# prepares image for floppy sets of:
71
# prepares image for floppy sets of:
72
# $1 cylinders
72
# $1 cylinders
73
# $2 heads (sides)
73
# $2 heads (sides)
74
# $3 sectors per track
74
# $3 sectors per track
75
# $4 size
75
# $4 size
76
# $5 where to put a copy of the image (optional)
76
# $5 where to put a copy of the image (optional)
77
function prep_flop {
77
function prep_flop {
78
  mkdir $4
78
  mkdir $4
79
  mformat -C -t $1 -h $2 -s $3 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$4/disk1.img"
79
  mformat -C -t $1 -h $2 -s $3 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$4/disk1.img"
80
  mcopy -sQm -i "$4/disk1.img" "$FLOPROOT/"* ::/
80
  mcopy -sQm -i "$4/disk1.img" "$FLOPROOT/"* ::/
81
 
81
 
82
  # now populate the floppies
82
  # now populate the floppies
83
  curdisk=1
83
  curdisk=1
84
  for p in $ALLPKGS ; do
84
  for p in $ALLPKGS ; do
85
    # if copy fails, then probably the floppy is full - try again after
85
    # if copy fails, then probably the floppy is full - try again after
86
    # creating an additional floppy image
86
    # creating an additional floppy image
87
    if ! mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
87
    if ! mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
88
      curdisk=$((curdisk+1))
88
      curdisk=$((curdisk+1))
89
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$4/disk$curdisk.img"
89
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$4/disk$curdisk.img"
90
      mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/
90
      mcopy -mi "$4/disk$curdisk.img" "$CDROOT/$p.svp" ::/
91
    fi
91
    fi
92
  done
92
  done
93
 
93
 
94
  # add a short readme
94
  # add a short readme
95
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$4/readme.txt"
95
  echo "This directory contains a set of $curdisk floppy images of the SvarDOS distribution in the $4 KB floppy format." > "$4/readme.txt"
96
  echo "" >> "$4/readme.txt"
96
  echo "" >> "$4/readme.txt"
97
  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." >> "$4/readme.txt"
97
  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." >> "$4/readme.txt"
98
  echo "" >> "$4/readme.txt"
98
  echo "" >> "$4/readme.txt"
99
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.osdn.io" >> "$4/readme.txt"
99
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.osdn.io" >> "$4/readme.txt"
100
 
100
 
101
  unix2dos "$4/readme.txt"
101
  unix2dos "$4/readme.txt"
102
 
102
 
103
  # make a copy of the image, if requested
103
  # make a copy of the image, if requested
104
  if [ "x$5" != "x" ] ; then
104
  if [ "x$5" != "x" ] ; then
105
    cp "$4/disk1.img" $5
105
    cp "$4/disk1.img" $5
106
  fi
106
  fi
107
 
107
 
108
  # zip the images (and remove them at the same time)
108
  # zip the images (and remove them at the same time)
109
  rm -f "$PUBDIR/svardos-floppy-$4k.zip"
109
  rm -f "$PUBDIR/svardos-floppy-$4k.zip"
110
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$4k.zip" $4/*
110
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$4k.zip" $4/*
111
 
111
 
112
  # clean up
112
  # clean up
113
  rmdir $4
113
  rmdir $4
114
}
114
}
115
 
115
 
116
 
116
 
117
### actual code flow starts here ############################################
117
### actual code flow starts here ############################################
118
 
118
 
119
# remember where I am, so I can get back here once all is done
119
# remember where I am, so I can get back here once all is done
120
origdir=`pwd`
120
origdir=`pwd`
121
 
121
 
122
echo "###############################################################################"
122
echo "###############################################################################"
123
echo " STARTING BUILD $CURDATE"
123
echo " STARTING BUILD $CURDATE"
124
echo "###############################################################################"
124
echo "###############################################################################"
125
echo "dest dir: $PUBDIR"
125
echo "dest dir: $PUBDIR"
126
echo "current time is `date` and it's a beautiful day somewhere in the world"
126
echo "current time is `date` and it's a beautiful day somewhere in the world"
127
echo
127
echo
128
 
128
 
129
mkdir "$PUBDIR"
129
mkdir "$PUBDIR"
130
mkdir "$CDROOT"
130
mkdir "$CDROOT"
131
mkdir "$FLOPROOT"
131
mkdir "$FLOPROOT"
132
 
132
 
133
# add CORE packages to CDROOT + create the list of packages on floppy
133
# add CORE packages to CDROOT + create the list of packages on floppy
134
for pkg in $COREPKGS ; do
134
for pkg in $COREPKGS ; do
135
  cp "$REPOROOT/core/$pkg.svp" "$CDROOT/"
135
  cp "$REPOROOT/core/$pkg.svp" "$CDROOT/"
136
  echo "$pkg" >> "$FLOPROOT/install.lst"
136
  echo "$pkg" >> "$FLOPROOT/install.lst"
137
done
137
done
138
 
138
 
139
# add EXTRA packages to CDROOT (but not in the list of packages to install)
139
# add EXTRA packages to CDROOT (but not in the list of packages to install)
140
for pkg in $EXTRAPKGS ; do
140
for pkg in $EXTRAPKGS ; do
141
  cp "$REPOROOT/$pkg.svp" "$CDROOT/"
141
  cp "$REPOROOT/$pkg.svp" "$CDROOT/"
142
done
142
done
143
 
143
 
144
 
144
 
145
echo
145
echo
146
echo "### Populating the floppy root at $FLOPROOT"
146
echo "### Populating the floppy root at $FLOPROOT"
147
echo
147
echo
148
 
148
 
149
# prepare the content of the boot (install) floppy
149
# prepare the content of the boot (install) floppy
150
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
150
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
151
unzip -Cj "$REPOROOT/core/cpidos.svp" 'cpi/ega*.cpx' -d "$FLOPROOT/"
151
unzip -Cj "$REPOROOT/core/cpidos.svp" 'cpi/ega*.cpx' -d "$FLOPROOT/"
152
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$FLOPROOT/"
152
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$FLOPROOT/"
153
unzip -Cj "$REPOROOT/core/display.svp" bin/display.exe -d "$FLOPROOT/"
153
unzip -Cj "$REPOROOT/core/display.svp" bin/display.exe -d "$FLOPROOT/"
154
unzip -Cj "$REPOROOT/core/edit.svp" bin/edit.exe -d "$FLOPROOT/"
154
unzip -Cj "$REPOROOT/core/edit.svp" bin/edit.exe -d "$FLOPROOT/"
155
unzip -Cj "$REPOROOT/core/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
155
unzip -Cj "$REPOROOT/core/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
156
unzip -Cj "$REPOROOT/core/fdisk.svp" bin/fdisk.exe bin/fdiskpt.ini -d "$FLOPROOT/"
156
unzip -Cj "$REPOROOT/core/fdisk.svp" bin/fdisk.exe bin/fdiskpt.ini -d "$FLOPROOT/"
157
unzip -Cj "$REPOROOT/core/format.svp" bin/format.exe -d "$FLOPROOT/"
157
unzip -Cj "$REPOROOT/core/format.svp" bin/format.exe -d "$FLOPROOT/"
158
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys bin/sys.com -d "$FLOPROOT/"
158
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys bin/sys.com -d "$FLOPROOT/"
159
unzip -Cj "$REPOROOT/core/mem.svp" bin/mem.exe -d "$FLOPROOT/"
159
unzip -Cj "$REPOROOT/core/mem.svp" bin/mem.exe -d "$FLOPROOT/"
160
unzip -Cj "$REPOROOT/core/mode.svp" bin/mode.com -d "$FLOPROOT/"
160
unzip -Cj "$REPOROOT/core/mode.svp" bin/mode.com -d "$FLOPROOT/"
161
unzip -Cj "$REPOROOT/core/more.svp" bin/more.exe -d "$FLOPROOT/"
161
unzip -Cj "$REPOROOT/core/more.svp" bin/more.exe -d "$FLOPROOT/"
162
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
162
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
163
 
163
 
164
echo
164
echo
165
echo "### Creating floppy images"
165
echo "### Creating floppy images"
166
echo
166
echo
167
 
167
 
168
# build the boot (CD) floppy image
168
# build the boot (CD) floppy image
169
export MTOOLS_NO_VFAT=1
169
export MTOOLS_NO_VFAT=1
170
#mformat -C -f 2880 -v SVARDOS -B "$CUSTFILES/floppy.mbr" -i "$CDROOT/boot.img"
-
 
171
#mcopy -sQm -i "$CDROOT/boot.img" "$FLOPROOT/"* ::/
-
 
172
 
170
 
173
# prepare images for floppies in different sizes (args are C H S SIZE)
171
# prepare images for floppies in different sizes (args are C H S SIZE)
174
prep_flop 80 2 36 2880 "$CDROOT/boot.img"
172
prep_flop 80 2 36 2880 "$CDROOT/boot.img"
175
prep_flop 80 2 18 1440
173
prep_flop 80 2 18 1440
176
prep_flop 80 2 15 1200
174
prep_flop 80 2 15 1200
177
prep_flop 80 2  9  720
175
prep_flop 80 2  9  720
178
#prep_flop 96 64 32 98304 "$PUBDIR/svardos-zip100.img" # ZIP 100M (for USB boot in "USB-ZIP mode")
-
 
179
 
176
 
180
echo
177
echo
181
echo "### Computing DOSEMU.zip"
178
echo "### Computing DOSEMU.zip"
182
echo
179
echo
183
 
180
 
184
# prepare the DOSEMU boot zip
181
# prepare the DOSEMU boot zip
185
DOSEMUDIR="$PUBDIR/tmp_dosemu-prep-files.build"
182
DOSEMUDIR="$PUBDIR/tmp_dosemu-prep-files.build"
186
mkdir "$DOSEMUDIR"
183
mkdir "$DOSEMUDIR"
187
# INSTALL.BAT
184
# INSTALL.BAT
188
echo 'IF NOT EXIST C:\TEMP\NUL MKDIR C:\TEMP' >> "$DOSEMUDIR/install.bat"
185
echo 'IF NOT EXIST C:\TEMP\NUL MKDIR C:\TEMP' >> "$DOSEMUDIR/install.bat"
189
echo 'mkdir %DOSDIR%' >> "$DOSEMUDIR/install.bat"
186
echo 'mkdir %DOSDIR%' >> "$DOSEMUDIR/install.bat"
190
echo 'mkdir %DOSDIR%\cfg' >> "$DOSEMUDIR/install.bat"
187
echo 'mkdir %DOSDIR%\cfg' >> "$DOSEMUDIR/install.bat"
191
echo 'ECHO # pkg config file - specifies locations where packages should be installed >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
188
echo 'ECHO # pkg config file - specifies locations where packages should be installed >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
192
echo 'ECHO DIR PROGS C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
189
echo 'ECHO DIR PROGS C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
193
echo 'ECHO DIR GAMES C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
190
echo 'ECHO DIR GAMES C:\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
194
echo 'ECHO DIR DRIVERS C:\DRIVERS\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
191
echo 'ECHO DIR DRIVERS C:\DRIVERS\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
195
echo 'ECHO DIR DEVEL C:\DEVEL\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
192
echo 'ECHO DIR DEVEL C:\DEVEL\ >> %DOSDIR%\cfg\pkg.cfg' >> "$DOSEMUDIR/install.bat"
196
for p in $COREPKGS ; do
193
for p in $COREPKGS ; do
197
  cp "$CDROOT/$p.svp" "$DOSEMUDIR/"
194
  cp "$CDROOT/$p.svp" "$DOSEMUDIR/"
198
  echo "pkg install $p.svp" >> "$DOSEMUDIR/install.bat"
195
  echo "pkg install $p.svp" >> "$DOSEMUDIR/install.bat"
199
  echo "del $p.svp" >> "$DOSEMUDIR/install.bat"
196
  echo "del $p.svp" >> "$DOSEMUDIR/install.bat"
200
done
197
done
201
echo 'ECHO my_ip = dhcp >> %DOSDIR%\CFG\WATTCP.CFG' >> "$DOSEMUDIR/install.bat"
198
echo 'ECHO my_ip = dhcp >> %DOSDIR%\CFG\WATTCP.CFG' >> "$DOSEMUDIR/install.bat"
202
echo 'del pkg.exe' >> "$DOSEMUDIR/install.bat"
199
echo 'del pkg.exe' >> "$DOSEMUDIR/install.bat"
203
echo 'ECHO SHELLHIGH=C:\SVARDOS\BIN\COMMAND.COM /P >> C:\CONFIG.SYS' >> "$DOSEMUDIR/install.bat"
200
echo 'ECHO SHELLHIGH=C:\SVARDOS\BIN\COMMAND.COM /P >> C:\CONFIG.SYS' >> "$DOSEMUDIR/install.bat"
204
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
201
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
205
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
202
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
206
echo 'ECHO  SVARDOS SETUP COMPLETED ' >> "$DOSEMUDIR/install.bat"
203
echo 'ECHO  SVARDOS SETUP COMPLETED ' >> "$DOSEMUDIR/install.bat"
207
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
204
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
208
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
205
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
209
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys -d "$DOSEMUDIR/"
206
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys -d "$DOSEMUDIR/"
210
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$DOSEMUDIR/"
207
unzip -Cj "$REPOROOT/core/command.svp" bin/command.com -d "$DOSEMUDIR/"
211
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
208
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
212
# CONFIG.SYS
209
# CONFIG.SYS
213
echo 'FILES=50' >> "$DOSEMUDIR/config.sys"
210
echo 'FILES=50' >> "$DOSEMUDIR/config.sys"
214
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
211
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
215
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
212
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
216
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"
213
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"
217
echo 'DEVICE=D:\dosemu\umb.sys' >> "$DOSEMUDIR/config.sys"
214
echo 'DEVICE=D:\dosemu\umb.sys' >> "$DOSEMUDIR/config.sys"
218
echo 'DEVICEHIGH=D:\dosemu\ems.sys' >> "$DOSEMUDIR/config.sys"
215
echo 'DEVICEHIGH=D:\dosemu\ems.sys' >> "$DOSEMUDIR/config.sys"
219
echo 'INSTALL=D:\dosemu\emufs.com' >> "$DOSEMUDIR/config.sys"
216
echo 'INSTALL=D:\dosemu\emufs.com' >> "$DOSEMUDIR/config.sys"
220
# AUTOEXEC.BAT
217
# AUTOEXEC.BAT
221
echo "@ECHO OFF" >> "$DOSEMUDIR/autoexec.bat"
218
echo "@ECHO OFF" >> "$DOSEMUDIR/autoexec.bat"
222
echo 'SET DOSDIR=C:\SVARDOS' >> "$DOSEMUDIR/autoexec.bat"
219
echo 'SET DOSDIR=C:\SVARDOS' >> "$DOSEMUDIR/autoexec.bat"
223
echo 'SET WATTCP.CFG=%DOSDIR%\CFG' >> "$DOSEMUDIR/autoexec.bat"
220
echo 'SET WATTCP.CFG=%DOSDIR%\CFG' >> "$DOSEMUDIR/autoexec.bat"
224
echo 'SET DIRCMD=/p/ogne' >> "$DOSEMUDIR/autoexec.bat"
221
echo 'SET DIRCMD=/p/ogne' >> "$DOSEMUDIR/autoexec.bat"
225
echo 'SET TEMP=C:\TEMP' >> "$DOSEMUDIR/autoexec.bat"
222
echo 'SET TEMP=C:\TEMP' >> "$DOSEMUDIR/autoexec.bat"
226
echo 'PATH %DOSDIR%\BIN' >> "$DOSEMUDIR/autoexec.bat"
223
echo 'PATH %DOSDIR%\BIN' >> "$DOSEMUDIR/autoexec.bat"
227
echo "" >> "$DOSEMUDIR/autoexec.bat"
224
echo "" >> "$DOSEMUDIR/autoexec.bat"
228
echo "REM *** this is a one-time setup script used only during first initialization ***" >> "$DOSEMUDIR/autoexec.bat"
225
echo "REM *** this is a one-time setup script used only during first initialization ***" >> "$DOSEMUDIR/autoexec.bat"
229
echo 'IF EXIST INSTALL.BAT CALL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
226
echo 'IF EXIST INSTALL.BAT CALL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
230
echo 'IF EXIST INSTALL.BAT DEL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
227
echo 'IF EXIST INSTALL.BAT DEL INSTALL.BAT' >> "$DOSEMUDIR/autoexec.bat"
231
echo "" >> "$DOSEMUDIR/autoexec.bat"
228
echo "" >> "$DOSEMUDIR/autoexec.bat"
232
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
229
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
233
echo "ECHO Welcome to SvarDOS (powered by DOSEMU)! Type HELP if you are lost." >> "$DOSEMUDIR/autoexec.bat"
230
echo "ECHO Welcome to SvarDOS (powered by DOSEMU)! Type HELP if you are lost." >> "$DOSEMUDIR/autoexec.bat"
234
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
231
echo "ECHO." >> "$DOSEMUDIR/autoexec.bat"
235
rm -f "$PUBDIR/svardos-dosemu.zip"
232
rm -f "$PUBDIR/svardos-dosemu.zip"
236
zip -rm9jk "$PUBDIR/svardos-$CURDATE-dosemu.zip" "$DOSEMUDIR"
233
zip -rm9jk "$PUBDIR/svardos-$CURDATE-dosemu.zip" "$DOSEMUDIR"
237
rmdir "$DOSEMUDIR"
234
rmdir "$DOSEMUDIR"
238
 
235
 
239
echo
236
echo
240
echo "### Computing the USB image"
237
echo "### Computing the USB image"
241
echo
238
echo
242
 
239
 
243
# prepare the USB bootable image
240
# prepare the USB bootable image
244
USBIMG=$PUBDIR/svardos-usb.img
241
USBIMG=$PUBDIR/svardos-usb.img
245
cp files/boot-svardos.img $USBIMG
242
cp files/boot-svardos.img $USBIMG
246
mcopy -sQm -i "$USBIMG@@32256" "$FLOPROOT/"* ::/
243
mcopy -sQm -i "$USBIMG@@32256" "$FLOPROOT/"* ::/
247
for p in $ALLPKGS ; do
244
for p in $ALLPKGS ; do
248
  mcopy -mi "$USBIMG@@32256" "$CDROOT/$p.svp" ::/
245
  mcopy -mi "$USBIMG@@32256" "$CDROOT/$p.svp" ::/
249
done
246
done
250
 
247
 
251
# compress the USB image
248
# compress the USB image
252
zip -mj9 "$PUBDIR/svardos-$CURDATE-usb.zip" "$USBIMG"
249
zip -mj9 "$PUBDIR/svardos-$CURDATE-usb.zip" "$USBIMG"
253
 
250
 
254
# prepare the USB-ZIP bootable image
-
 
255
#USBZIPIMG=$PUBDIR/svardos-usbzip.img
-
 
256
#cat files/usb-zip.mbr "$PUBDIR/svardos-zip100.img" > $USBZIPIMG
-
 
257
 
-
 
258
echo
251
echo
259
echo "### Generating ISO CD image"
252
echo "### Generating ISO CD image"
260
echo
253
echo
261
 
254
 
262
CDISO="$PUBDIR/svardos-$CURDATE-cd.iso"
255
CDISO="$PUBDIR/svardos-$CURDATE-cd.iso"
263
CDZIP="$PUBDIR/svardos-$CURDATE-cd.zip"
256
CDZIP="$PUBDIR/svardos-$CURDATE-cd.zip"
264
 
257
 
265
# delete previous (if any) iso
-
 
266
#echo "cleaning up old versions..."
-
 
267
#rm -f "$CDISO" "$CDZIP"
-
 
268
 
-
 
269
$GENISOIMAGE -input-charset cp437 -b boot.img -iso-level 1 -f -V SVARDOS -o "$CDISO" "$CDROOT/boot.img"
258
$GENISOIMAGE -input-charset cp437 -b boot.img -iso-level 1 -f -V SVARDOS -o "$CDISO" "$CDROOT/boot.img"
270
 
259
 
271
# compress the ISO
260
# compress the ISO
272
zip -mj9 "$CDZIP" "$CDISO"
261
zip -mj9 "$CDZIP" "$CDISO"
273
 
262
 
274
# cleanup temporary things
263
# cleanup temporary things
275
if [ "x$2" != "xnoclean" ] ; then
264
if [ "x$2" != "xnoclean" ] ; then
276
  echo
265
  echo
277
  echo "### Clenup of temporary directories:"
266
  echo "### Clenup of temporary directories:"
278
  echo "# $CDROOT"
267
  echo "# $CDROOT"
279
  echo "# $FLOPROOT"
268
  echo "# $FLOPROOT"
280
  echo
269
  echo
281
  rm -rf "$CDROOT" "$FLOPROOT"
270
  rm -rf "$CDROOT" "$FLOPROOT"
282
fi
271
fi
283
 
272
 
284
cd "$origdir"
273
cd "$origdir"
285
 
274
 
286
#cd svnlschk
-
 
287
#./webgen.sh
-
 
288
#cd ..
-
 
289
 
-
 
290
echo
275
echo
291
echo "### ALL DONE! ###"
276
echo "### ALL DONE! ###"
292
 
277
 
293
exit 0
278
exit 0
294
 
279