Skip to content

Commit

Permalink
CI: Use FreeDOS kernel and FreeCOM
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbird committed Feb 24, 2024
1 parent a79814e commit 4b4fac2
Showing 1 changed file with 70 additions and 10 deletions.
80 changes: 70 additions & 10 deletions ci_prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,91 @@ cd _downloads

HERE=$(pwd)

#IBIBLIO_PATH='http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/devel'
IBIBLIO_PATH='https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.3/devel'
#IBIBLIO_PATH='http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos'
IBIBLIO_PATH='https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.3'

BASE=${IBIBLIO_PATH}/base

# get FreeDOS kernel
[ -f kernel.zip ] || wget --no-verbose ${BASE}/kernel.zip

# get FreeCOM
[ -f freecom.zip ] || wget --no-verbose ${BASE}/freecom.zip

DEVEL=${IBIBLIO_PATH}/devel

# get gnumake for DOS
[ -f djgpp_mk.zip ] || wget --no-verbose ${IBIBLIO_PATH}/djgpp_mk.zip
[ -f djgpp_mk.zip ] || wget --no-verbose ${DEVEL}/djgpp_mk.zip

# get nasm for DOS
[ -f nasm.zip ] || wget --no-verbose ${IBIBLIO_PATH}/nasm.zip
[ -f nasm.zip ] || wget --no-verbose ${DEVEL}/nasm.zip

# get upx for DOS
[ -f upx.zip ] || wget --no-verbose ${IBIBLIO_PATH}/upx.zip
[ -f upx.zip ] || wget --no-verbose ${DEVEL}/upx.zip

# grab ia16-gcc from ibiblio.org
[ -f i16gcc.zip ] || wget --no-verbose ${IBIBLIO_PATH}/i16gcc.zip
[ -f i16newli.zip ] || wget --no-verbose ${IBIBLIO_PATH}/i16newli.zip
[ -f i16butil.zip ] || wget --no-verbose ${IBIBLIO_PATH}/i16butil.zip
[ -f i16lbi86.zip ] || wget --no-verbose ${IBIBLIO_PATH}/i16lbi86.zip
[ -f i16gcc.zip ] || wget --no-verbose ${DEVEL}/i16gcc.zip
[ -f i16newli.zip ] || wget --no-verbose ${DEVEL}/i16newli.zip
[ -f i16butil.zip ] || wget --no-verbose ${DEVEL}/i16butil.zip
[ -f i16lbi86.zip ] || wget --no-verbose ${DEVEL}/i16lbi86.zip

# get watcom for DOS
[ -f watcomc.zip ] || wget --no-verbose ${IBIBLIO_PATH}/watcomc.zip
[ -f watcomc.zip ] || wget --no-verbose ${DEVEL}/watcomc.zip

mkdir -p ${HOME}/.dosemu/drive_c
cd ${HOME}/.dosemu/drive_c && (

mkdir -p bin

unzip -L -q ${HERE}/kernel.zip
cp -p bin/kernl386.sys ./kernel.sys

unzip -L -q ${HERE}/freecom.zip
cp -p bin/command.com ./command.com

{
echo 'DOS=UMB,HIGH'
echo 'dosdata=umb'
echo 'lastdrive=Z'
echo 'files=40'
echo 'stacks=0'
echo 'buffers=10'
echo 'device=d:\\dosemu\\emufs.sys'
echo 'device=d:\\dosemu\\umb.sys'
echo 'devicehigh=d:\\dosemu\\ems.sys'
echo 'devicehigh=d:\\dosemu\\cdrom.sys'
echo 'install=d:\\dosemu\\emufs.com'
echo 'shellhigh=command.com /e:1024 /k d:\\fdautoem.bat'
} | unix2dos > fdconfig.sys

{
echo '@echo off'
echo 'rem autoexec.bat for DOSEMU + FreeDOS'
echo 'path d:\\dosemu'
echo 'rem this is needed when booting from dosemu-freedos-bin'
echo 'if exist f:\\gnu\\nul path %PATH%;f:\\bin;f:\\gnu'
echo 'if exist c:\\bin\\nul path %PATH%;c:\\bin'
echo 'set HELPPATH=f:\\help'
echo 'if exist c:\\help\\nul set HELPPATH=c:\\help'
echo 'if exist c:\\tmp\\nul goto noswapdrv'
echo 'if exist e:\\tmp\\nul call swapdrv.bat c: e:'
echo ':noswapdrv'
echo 'set TEMP=c:\\tmp'
echo 'if not exist %TEMP%\\nul mkdir %TEMP%'
echo 'emusound -e'
echo 'emumouse c 1'
echo 'prompt $P$G'
echo 'rem uncomment to load another bitmap font'
echo 'rem lh display con=(vga,437,2)'
echo 'rem mode con codepage prepare=((850) f:\\cpi\\ega.cpx)'
echo 'rem mode con codepage select 850'
echo 'rem chcp 850'
echo 'echo Welcome to dosemu2!'
echo 'system -s DOSEMU_VERSION'
echo 'echo Build %DOSEMU_VERSION%'
echo 'call exechlp.bat -ep'
} | unix2dos > fdautoem.off

unzip -L -q ${HERE}/djgpp_mk.zip
cp -p devel/djgpp/bin/make.exe bin/.
unzip -L -q ${HERE}/upx.zip
Expand Down

0 comments on commit 4b4fac2

Please sign in to comment.