Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:

- name: Package install
run: ./ci_prereq.sh
env:
TC201_ARCHIVE_PATHNAME: ${{ vars.TC201_ARCHIVE_PATHNAME }}
TC201_ARCHIVE_FILENAME: ${{ vars.TC201_ARCHIVE_FILENAME }}
TC201_ARCHIVE_PASSPHRASE: ${{ secrets.TC201_ARCHIVE_PASSPHRASE }}

- name: build
run: ./ci_build.sh
Expand Down
4 changes: 3 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ echo.
echo Process COUNTRY +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo.
cd ..\country
%MAKE% DIRSEP=\ CP=copy production
set TMAKE=%MAKE%
if "%COMPILER%" == "TC2" set TMAKE=c:\bin\make
%TMAKE% DIRSEP=\ CP=copy production
if errorlevel 1 goto abort-cd

echo.
Expand Down
12 changes: 6 additions & 6 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ mv -n bin/country.sys _output/wc/.
# echo set MAKE=make
# echo set XCPU=386
# echo set XFAT=32
# echo set XNASM='C:\\devel\\nasm\\nasm'
# echo set XNASM=nasm
# echo set OLDPATH=%PATH%
# echo set PATH='C:\\devel\\i16gnu\\bin;C:\\bin;%OLDPATH%'
# echo set PATH='C:\\devel\\i16gnu\\bin;C:\\devel\\nasm;C:\\bin;%OLDPATH%'
#} | unix2dos > config.bat

#dosemu -td -q -K . -E "build.bat"
Expand All @@ -63,10 +63,10 @@ git clean -x -d -f -e test -e _output -e _downloads -e _watcom
echo set MAKE=wmake /ms
echo set XCPU=386
echo set XFAT=32
echo set XNASM='C:\\devel\\nasm\\nasm'
echo set XNASM=nasm
echo set XUPX=upx --8086 --best
echo set OLDPATH=%PATH%
echo set PATH='%WATCOM%\\binw;C:\\bin;%OLDPATH%'
echo set PATH='%WATCOM%\\binw;C:\\devel\\nasm;C:\\bin;%OLDPATH%'
echo set DOS4G=QUIET
} | unix2dos > config.bat

Expand All @@ -83,14 +83,14 @@ if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
echo set COMPILER=TC2
echo set TC2_BASE='C:\\tc201'
echo set MAKE=make
echo set XCPU=386
echo set XCPU=86
echo set XFAT=32
echo set XNASM=nasm
echo set OLDPATH=%PATH%
echo set PATH='%TC2_BASE%;C:\\devel\\nasm;C:\\bin;%OLDPATH%'
} | unix2dos > config.bat

dosemu -td -q -K . -E "build.bat lfn"
dosemu -td -q -K . -E "build.bat"
mv -n bin/KTC*.map bin/KTC*.sys _output/tc_dos/.
mv -n bin/country.sys _output/tc_dos/.
# TC share
Expand Down
24 changes: 20 additions & 4 deletions ci_prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ HERE=$(pwd)
[ -f ow-snapshot.tar.xz ] || wget --no-verbose https://github.com/open-watcom/open-watcom-v2/releases/download/Current-build/ow-snapshot.tar.xz
tar -C ../_watcom -xf ow-snapshot.tar.xz

#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'
IBIBLIO_PATH='https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/1.4'

BASE=${IBIBLIO_PATH}/base

Expand All @@ -37,7 +36,7 @@ BASE=${IBIBLIO_PATH}/base
DEVEL=${IBIBLIO_PATH}/devel

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

# get nasm for DOS
[ -f nasm.zip ] || wget --no-verbose ${DEVEL}/nasm.zip
Expand All @@ -54,6 +53,12 @@ DEVEL=${IBIBLIO_PATH}/devel
# get watcom for DOS
[ -f watcomc.zip ] || wget --no-verbose ${DEVEL}/watcomc.zip

# get Turbo C 2.01 (maybe encrypted) tar file
if [ -n "${TC201_ARCHIVE_FILENAME}" ] && [ ! -f ${TC201_ARCHIVE_FILENAME} ] ; then
echo "Downloading Turbo C 2.01"
wget --no-verbose ${TC201_ARCHIVE_PATHNAME}/${TC201_ARCHIVE_FILENAME}
fi

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

Expand All @@ -67,7 +72,7 @@ cd ${HOME}/.dosemu/drive_c && (
cp -p /usr/share/dosemu/dosemu2-cmds-0.3/c/fdconfig.sys .

# Development files
unzip -LL -q ${HERE}/djgpp_mk.zip
unzip -LL -q ${HERE}/dj_make.zip
cp -p devel/djgpp/bin/make.exe bin/.
unzip -LL -q ${HERE}/upx.zip
cp -p devel/upx/upx.exe bin/.
Expand All @@ -84,4 +89,15 @@ cd ${HOME}/.dosemu/drive_c && (

unzip -LL -q ${HERE}/watcomc.zip
echo PATH to watcom binaries is 'c:/devel/watcomc/binw'

# Turbo C
if [ -f ${HERE}/${TC201_ARCHIVE_FILENAME} ] && [ -n "${TC201_ARCHIVE_PASSPHRASE}" ] ; then
echo Decrypting and unpacking Turbo C 2.01
echo "${TC201_ARCHIVE_PASSPHRASE}" | gpg --decrypt --batch --passphrase-fd 0 ${HERE}/${TC201_ARCHIVE_FILENAME} | tar -jxf -
elif [ -f ${HERE}/${TC201_ARCHIVE_FILENAME} ] ; then
echo Unpacking Turbo C 2.01
tar -jxf ${HERE}/${TC201_ARCHIVE_FILENAME}
else
echo No Turbo C 2.01 archive available
fi
)
4 changes: 2 additions & 2 deletions ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ ! -f _output/wc_dos/KWC38632.sys ] ; then
exit 1
fi

if [ ! -f _output/tc_dos/KTC38632.sys ] && [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
if [ ! -f _output/tc_dos/KTC8632.sys ] && [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
echo Turbo C 2.01 built kernel not present
exit 1
fi
Expand All @@ -42,7 +42,7 @@ then
exit 2
fi
if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
if ! ./test.sh ../_output/tc_dos/KTC38632.sys disktcd boottcd 'boot tcd: '
if ! ./test.sh ../_output/tc_dos/KTC8632.sys disktcd boottcd 'boot tcd: '
then
echo 'Turbo C 2.01 boot test failed'
exit 2
Expand Down
2 changes: 1 addition & 1 deletion kernel/dosfns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ struct dhdr FAR *IsDevice(const char FAR * fname)
BOOL IsShareInstalled(BOOL recheck)
{
extern unsigned char ASMPASCAL share_check(void);
//DebugPrintf(("Share_check at %p and share_installed at %p\n", (void far *)&share_check, (void far *)&share_installed));
/*DebugPrintf(("Share_check at %p and share_installed at %p\n", (void far *)&share_check, (void far *)&share_installed));*/
if (recheck == FALSE)
return share_installed;
if (share_check() == 0xff)
Expand Down