Subversion Repositories SvarDOS

Rev

Rev 1212 | Rev 1465 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1212 Rev 1261
Line 1... Line 1...
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-2023 Mateusz Viste
6
#
6
#
7
# This script builds floppy and CD images. It should be executed each time that
7
# This script builds floppy and CD images. It should be executed each time that
8
# a CORE package has been modified or the build script changed. This is usually
8
# a CORE package has been modified or the build script changed. This is usually
9
# done by the cron.sh script, itself called by a cron job.
9
# done by the cron.sh script, itself called by a cron job.
10
#
10
#
Line 12... Line 12...
12
#
12
#
13
 
13
 
14
### parameters block starts here ############################################
14
### parameters block starts here ############################################
15
 
15
 
16
REPOROOT=`realpath ./packages`
16
REPOROOT=`realpath ./packages`
-
 
17
REPOROOTCORE=`realpath ./packages-core`
17
CUSTFILES=`realpath ./files`
18
CUSTFILES=`realpath ./files`
18
 
19
 
19
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
20
GENISOIMAGE=''    # can be mkisofs, genisoimage or empty for autodetection
20
 
21
 
21
### parameters block ends here ##############################################
22
### parameters block ends here ##############################################
Line 57... Line 58...
57
# abort if anything fails
58
# abort if anything fails
58
set -e
59
set -e
59
 
60
 
60
 
61
 
61
# list of packages to be part of CORE (always installed)
62
# list of packages to be part of CORE (always installed)
62
COREPKGS=`ls -1 'packages/core' | grep -o '^[a-z]*'`
63
COREPKGS=`ls -1 'packages-core' | grep -o '^[a-z]*'`
63
 
64
 
64
# list of packages to be part of EXTRA (only sometimes installed, typically drivers)
65
# list of packages to be part of EXTRA (only sometimes installed, typically drivers)
65
EXTRAPKGS="pcntpk udvd2"
66
EXTRAPKGS="pcntpk udvd2"
66
 
67
 
67
# all packages
68
# all packages
Line 143... Line 144...
143
mkdir "$CDROOT"
144
mkdir "$CDROOT"
144
mkdir "$FLOPROOT"
145
mkdir "$FLOPROOT"
145
 
146
 
146
# add CORE packages to CDROOT + create the list of packages on floppy
147
# add CORE packages to CDROOT + create the list of packages on floppy
147
for pkg in $COREPKGS ; do
148
for pkg in $COREPKGS ; do
148
  cp "$REPOROOT/core/$pkg.svp" "$CDROOT/"
149
  cp "$REPOROOTCORE/$pkg.svp" "$CDROOT/"
149
  echo "$pkg" >> "$FLOPROOT/install.lst"
150
  echo "$pkg" >> "$FLOPROOT/install.lst"
150
done
151
done
151
 
152
 
152
# add EXTRA packages to CDROOT (but not in the list of packages to install)
153
# add EXTRA packages to CDROOT (but not in the list of packages to install)
153
for pkg in $EXTRAPKGS ; do
154
for pkg in $EXTRAPKGS ; do
Line 160... Line 161...
160
echo
161
echo
161
 
162
 
162
# prepare the content of the boot (install) floppy, unzipping everything
163
# prepare the content of the boot (install) floppy, unzipping everything
163
# in lowercase (-L) to avoid any case mismatching later in the build process
164
# in lowercase (-L) to avoid any case mismatching later in the build process
164
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
165
cp -r "$CUSTFILES/floppy/"* "$FLOPROOT/"
165
unzip -CLj "$REPOROOT/core/cpidos.svp" 'cpi/ega*.cpx' -d "$FLOPROOT/"
166
unzip -CLj "$REPOROOTCORE/cpidos.svp" 'cpi/ega*.cpx' -d "$FLOPROOT/"
166
unzip -CLj "$REPOROOT/core/svarcom.svp" command.com -d "$FLOPROOT/"
167
unzip -CLj "$REPOROOTCORE/svarcom.svp" command.com -d "$FLOPROOT/"
167
unzip -CLj "$REPOROOT/core/display.svp" bin/display.exe -d "$FLOPROOT/"
168
unzip -CLj "$REPOROOTCORE/display.svp" bin/display.exe -d "$FLOPROOT/"
168
unzip -CLj "$REPOROOT/core/edit.svp" bin/edit.exe -d "$FLOPROOT/"
169
unzip -CLj "$REPOROOTCORE/edit.svp" bin/edit.exe -d "$FLOPROOT/"
169
unzip -CLj "$REPOROOT/core/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
170
unzip -CLj "$REPOROOTCORE/fdapm.svp" bin/fdapm.com -d "$FLOPROOT/"
170
unzip -CLj "$REPOROOT/core/fdisk.svp" bin/fdisk.exe bin/fdiskpt.ini -d "$FLOPROOT/"
171
unzip -CLj "$REPOROOTCORE/fdisk.svp" bin/fdisk.exe bin/fdiskpt.ini -d "$FLOPROOT/"
171
unzip -CLj "$REPOROOT/core/format.svp" bin/format.exe -d "$FLOPROOT/"
172
unzip -CLj "$REPOROOTCORE/format.svp" bin/format.exe -d "$FLOPROOT/"
172
unzip -CLj "$REPOROOT/core/kernel.svp" bin/kernel.sys bin/sys.com -d "$FLOPROOT/"
173
unzip -CLj "$REPOROOTCORE/kernel.svp" bin/kernel.sys bin/sys.com -d "$FLOPROOT/"
173
unzip -CLj "$REPOROOT/core/mem.svp" bin/mem.exe -d "$FLOPROOT/"
174
unzip -CLj "$REPOROOTCORE/mem.svp" bin/mem.exe -d "$FLOPROOT/"
174
unzip -CLj "$REPOROOT/core/mode.svp" bin/mode.com -d "$FLOPROOT/"
175
unzip -CLj "$REPOROOTCORE/mode.svp" bin/mode.com -d "$FLOPROOT/"
175
unzip -CLj "$REPOROOT/core/more.svp" bin/more.exe -d "$FLOPROOT/"
176
unzip -CLj "$REPOROOTCORE/more.svp" bin/more.exe -d "$FLOPROOT/"
176
unzip -CLj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
177
unzip -CLj "$REPOROOTCORE/pkg.svp" bin/pkg.exe -d "$FLOPROOT/"
177
 
178
 
178
# generate a simple autoexec.bat file
179
# generate a simple autoexec.bat file
179
echo '@ECHO OFF' > "$FLOPROOT/autoexec.bat"
180
echo '@ECHO OFF' > "$FLOPROOT/autoexec.bat"
180
echo '' >> "$FLOPROOT/autoexec.bat"
181
echo '' >> "$FLOPROOT/autoexec.bat"
181
echo 'REM Load DISPLAY driver if present' >> "$FLOPROOT/autoexec.bat"
182
echo 'REM Load DISPLAY driver if present' >> "$FLOPROOT/autoexec.bat"
Line 271... Line 272...
271
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
272
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
272
echo 'ECHO  SVARDOS SETUP COMPLETED' >> "$DOSEMUDIR/install.bat"
273
echo 'ECHO  SVARDOS SETUP COMPLETED' >> "$DOSEMUDIR/install.bat"
273
echo 'ECHO   PLEASE RESTART DOSEMU' >> "$DOSEMUDIR/install.bat"
274
echo 'ECHO   PLEASE RESTART DOSEMU' >> "$DOSEMUDIR/install.bat"
274
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
275
echo 'ECHO -------------------------' >> "$DOSEMUDIR/install.bat"
275
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
276
echo 'ECHO.' >> "$DOSEMUDIR/install.bat"
276
unzip -Cj "$REPOROOT/core/kernel.svp" bin/kernel.sys -d "$DOSEMUDIR/"
277
unzip -Cj "$REPOROOTCORE/kernel.svp" bin/kernel.sys -d "$DOSEMUDIR/"
277
unzip -CLj "$REPOROOT/core/svarcom.svp" command.com -d "$DOSEMUDIR/"
278
unzip -CLj "$REPOROOTCORE/svarcom.svp" command.com -d "$DOSEMUDIR/"
278
mv "$DOSEMUDIR/command.com" "$DOSEMUDIR/cmd.com"
279
mv "$DOSEMUDIR/command.com" "$DOSEMUDIR/cmd.com"
279
unzip -Cj "$REPOROOT/core/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
280
unzip -Cj "$REPOROOTCORE/pkg.svp" bin/pkg.exe -d "$DOSEMUDIR/"
280
# CONFIG.SYS
281
# CONFIG.SYS
281
echo 'FILES=25' >> "$DOSEMUDIR/config.sys"
282
echo 'FILES=25' >> "$DOSEMUDIR/config.sys"
282
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
283
echo 'DOS=HIGH,UMB' >> "$DOSEMUDIR/config.sys"
283
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
284
echo 'DOSDATA=UMB' >> "$DOSEMUDIR/config.sys"
284
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"
285
echo 'DEVICE=D:\dosemu\emufs.sys' >> "$DOSEMUDIR/config.sys"