Skip to content

Commit

Permalink
build: add ptchsize as native build for cross-compilation
Browse files Browse the repository at this point in the history
ptchsize is build tool (used by FREECOM build) and also DOS target tool
now
in tools (DOS tools included in distribution) is DOS version
in utils (host native tools used by FREECOM build) is host OS version
  • Loading branch information
jmalak authored and PerditionC committed Dec 30, 2024
1 parent e1fe8a0 commit 327a24a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ cd ..
echo.
echo Patching heap size to 6KB
echo.
tools\ptchsize.exe command.com +6KB
tools\ptchsize.exe %CMD_NAME% +6KB
utils\ptchsize.exe command.com +6KB
utils\ptchsize.exe %CMD_NAME% +6KB

if %WITH_UPX%x == x goto alldone
if exist command.upx del command.upx >nul
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ cd ..
echo
echo Patching heap size to 6KB
echo
tools/ptchsize.exe command.com +6KB
utils/ptchsize.exe command.com +6KB

if [ $WITH_UPX = "yes" ]; then
rm -f command.upx
Expand Down
12 changes: 6 additions & 6 deletions mkdist.bat
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ set XMS_SWAP=Yes
dmake || quit
%_DBG setdos /y1 %+ %_DBG echo on
if not exist com.com goto ende
iff not exist tools\ptchsize.exe then
iff not exist utils\ptchsize.exe then
echo no PTCHSIZE
goto ende
endiff
tools\ptchsize.exe com.com +7KB
utils\ptchsize.exe com.com +7KB
if errorlevel 1 goto ende
move com.com packages\xmsswap.std\command.com
copy /b shell\com.exe +infores + criter\criter + criter\criter1 packages\localize.std\xmsswap.cln
Expand All @@ -97,11 +97,11 @@ ren /q config.h.backup config.h || cancel 21

if not x%err == x cancel %err
if not exist com.com goto ende
iff not exist tools\ptchsize.exe then
iff not exist utils\ptchsize.exe then
echo no PTCHSIZE
goto ende
endiff
tools\ptchsize.exe com.com +6KB
utils\ptchsize.exe com.com +6KB
if errorlevel 1 goto ende
move com.com packages\plainedt.std\command.com
if exist com.com goto ende
Expand All @@ -119,11 +119,11 @@ if not exist com.com goto ende
copy /b shell\com.exe +infores + criter\criter + criter\criter1 command.cln
ren com.com command.com
if exist com.com goto ende
iff not exist tools\ptchsize.exe then
iff not exist utils\ptchsize.exe then
echo no PTCHSIZE
goto ende
endiff
tools\ptchsize.exe command.com +6KB
utils\ptchsize.exe command.com +6KB
if errorlevel 1 goto ende

for %file in (tools\kssf.com tools\vspawn.com tools\ptchldrv.exe tools\ptchsize.exe) (if exist %file copy %file packages\plainedt.std\ %+ if exist %file move %file packages\binary.std\ %+ if exist %file goto ende)
Expand Down
5 changes: 3 additions & 2 deletions utils/makefile.mak
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CFG_DEPENDENCIES = makefile.mak
TOP=..
!include "$(TOP)/config.mak"

all: $(CFG) mktools.exe mkctxt.exe chunk.exe mkinfres.exe
all: $(CFG) mktools.exe mkctxt.exe chunk.exe mkinfres.exe ptchsize.exe

mktools.exe : ../config.h
mktools.exe : mktools.c ../config.h
ptchsize.exe : ptchsize.c ../tools/ptchsize.c
4 changes: 4 additions & 0 deletions utils/ptchsize.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
Redirection file to enable native host build of ptchsize utility
*/
#include "../tools/ptchsize.c"

0 comments on commit 327a24a

Please sign in to comment.