Skip to content

Commit a5b516d

Browse files
jmalakPerditionC
authored andcommitted
exeflat: add support for response file to exeflat utility
the command line can overflow DOS max length that it fixes this issue
1 parent 2fb0956 commit a5b516d

File tree

3 files changed

+214
-139
lines changed

3 files changed

+214
-139
lines changed

ci_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ git clean -x -d -f -e test -e _output -e _downloads -e _watcom
7474
echo set XCPU=386
7575
echo set XFAT=32
7676
echo set XNASM='C:\\devel\\nasm\\nasm'
77+
echo set XUPX=upx --8086 --best
7778
echo set OLDPATH=%PATH%
7879
echo set PATH='%WATCOM%\\binw;C:\\bin;%OLDPATH%'
7980
} | unix2dos > config.bat

kernel/makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ production: ../bin/$(TARGET).sys
3636

3737
# -S to avoid showing expected relocations
3838
# 0x10 & 0x78 or 0x79 depending on compilation options
39-
kernel.sys: kernel.exe ../utils/exeflat.exe ../utils/upxentry.bin ../utils/upxdevic.bin
40-
..$(DIRSEP)utils$(DIRSEP)exeflat.exe kernel.exe kernel.sys $(LOADSEG) -S0x10 -S0x78 -S0x79 -E..$(DIRSEP)utils$(DIRSEP)upxentry.bin -D..$(DIRSEP)utils$(DIRSEP)upxdevic.bin $(UPXOPT) $(XUPX)
39+
kernel.sys: kernel.exe ../utils/exeflat.exe ../utils/upxentry.bin ../utils/upxdevic.bin exeflat.rsp
40+
..$(DIRSEP)utils$(DIRSEP)exeflat.exe kernel.exe kernel.sys $(LOADSEG) @exeflat.rsp
4141

4242
kernel.exe: $(TARGET).lnk $(OBJS) $(LIBS)
4343
$(LINK) @$(TARGET).lnk;
@@ -46,11 +46,21 @@ clobber: clean
4646
-$(RM) kernel.exe kernel.sys status.me
4747

4848
clean:
49-
-$(RM) *.obj *.bak *.crf *.xrf *.map *.lst *.cod *.err *.lnk
49+
-$(RM) *.obj *.bak *.crf *.xrf *.map *.lst *.cod *.err *.lnk *.rsp
5050

5151
# XXX: This is a very ugly way of linking the kernel, forced upon us by the
5252
# inability of Turbo `make' 2.0 to perform command line redirection. -- ror4
5353

54+
exeflat.rsp: makefile
55+
-$(RM) exeflat.rsp
56+
$(ECHOTO) exeflat.rsp -S0x10
57+
$(ECHOTO) exeflat.rsp -S0x78
58+
$(ECHOTO) exeflat.rsp -S0x79
59+
$(ECHOTO) exeflat.rsp -E..$(DIRSEP)utils$(DIRSEP)upxentry.bin
60+
$(ECHOTO) exeflat.rsp -D..$(DIRSEP)utils$(DIRSEP)upxdevic.bin
61+
$(ECHOTO) exeflat.rsp $(UPXOPT)
62+
$(ECHOTO) exeflat.rsp $(XUPX)
63+
5464
$(TARGET).lnk: turboc.cfg makefile ../mkfiles/generic.mak ../mkfiles/$(COMPILER).mak
5565
-$(RM) *.lnk
5666
$(ECHOTO) $(TARGET).lnk $(OBJS1)+

0 commit comments

Comments
 (0)