|
From: Arkady V.B. <ar...@be...> - 2004-01-31 20:51:30
|
Hi!
31-=F1=CE=D7-2004 16:35 _l...@ga... (Luchezar Georgiev) wrote to Fre=
eDOS-kernel
<fre...@li...>:
LG> I tried to replace UPX with aPack 0.99b by Joergen Ibsen (a.k.a. Jibz=
), and
LG> thus saved 1.3 KB of compressed kernel size! Here's the trick: As DOS=
4GW
LG> set XUPX=3Ddos4gw c:\bin\apack.le -x1 kernel.exe
To find the best compression level, I use next batch (for NDOS/4DOS)=
:
______________O\_/_________________________________\_/O______________
@echo off
if not "%1"=3D=3D"@" goto main
if not "%4"=3D=3D"" goto next
apack -x %2%3 %2.0
%0 @ %2 %3 1 0
:next
if "%4"=3D=3D"4" goto end
apack -x%4 %2%3 %2.%4
iff %@filesize[%2.%4] lt %@filesize[%2.%5] then
del %2.%5>nul
%0 @ %2 %3 %@eval[%4+1] %4
else
del %2.%4>nul
%0 @ %2 %3 %@eval[%4+1] %5
endiff
:main
if "%1"=3D=3D"" %0 *.com *.exe
for %%f in (%&) do call %0 @ %@name[%%f] .%@ext[%%f]
:end
_____________________________________________________________________
O/~\ /~\O
How to run:
- to pack all files in current directory: "packall.btm *.*"
- to pack prog.exe and all .com files in current directory:
"packall.btm prog.exe *.com"
- to pack c:\release\kernel.exe: "packall.btm c:\release\kernel.btm"
Packed files will be placed _in current directory_, with original name, a=
nd
numeric extension, which is equal to (best) method, which was used to pac=
k
this file.
|