Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add ptchsize as native build for cross-compilation #137

Merged
merged 1 commit into from
Dec 30, 2024
Merged
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: 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"