diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ed4bc31a..ef675fb1 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -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 diff --git a/build.bat b/build.bat index 1c5caa90..c200b3a9 100644 --- a/build.bat +++ b/build.bat @@ -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. diff --git a/ci_build.sh b/ci_build.sh index b10882f3..db33986a 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -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" @@ -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 @@ -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 diff --git a/ci_prereq.sh b/ci_prereq.sh index 3f6113c9..c8bf0329 100755 --- a/ci_prereq.sh +++ b/ci_prereq.sh @@ -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 @@ -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 @@ -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 && ( @@ -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/. @@ -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 ) diff --git a/ci_test.sh b/ci_test.sh index 6f0b6391..ed56975f 100755 --- a/ci_test.sh +++ b/ci_test.sh @@ -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 @@ -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 diff --git a/kernel/dosfns.c b/kernel/dosfns.c index 4c613ebd..4bfcbe3b 100644 --- a/kernel/dosfns.c +++ b/kernel/dosfns.c @@ -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)