Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#13

Re: Mindestgröße eines Programms

  Alt 28. Mär 2006, 22:17
Das:
Code:
@ECHO OFF
IF (%OS%) == (Windows_NT) SETLOCAL
SET PATH=\borland\delphi9\bin;%PATH%

FOR %%i IN (Hello?.exe) DO DEL %%i
FOR %%i IN (*.dcu) DO DEL %%i

REM -- ANSI --

dcc32.exe -Q System -M -y -Z -$D-
dcc32.exe -Q SysInit -M -y -Z -$D-
ECHO.
dcc32.exe Hello.dpr
ECHO.
FOR %%i IN (*.dcu) DO DEL %%i

bin\ResHacker -delete Hello.exe,Hello.exe,RCDATA,DVCLAL, > NUL
bin\ResHacker -delete Hello.exe,Hello.exe,RCDATA,PACKAGEINFO, > NUL
bin\StripReloc /B /C Hello.exe > NUL
MOVE Hello.exe HelloA.exe
HelloA.exe
ECHO ExitCode: %ERRORLEVEL%
ECHO.

REM -- UNICODE --

dcc32.exe -Q System -M -y -Z -$D- -DUNICODE
dcc32.exe -Q SysInit -M -y -Z -$D- -DUNICODE
ECHO.
dcc32.exe Hello.dpr -DUNICODE
ECHO.
FOR %%i IN (*.dcu) DO DEL %%i

bin\ResHacker -delete Hello.exe,Hello.exe,RCDATA,DVCLAL, > NUL
bin\ResHacker -delete Hello.exe,Hello.exe,RCDATA,PACKAGEINFO, > NUL
bin\StripReloc /B /C Hello.exe > NUL
MOVE Hello.exe HelloW.exe
HelloW.exe
ECHO ExitCode: %ERRORLEVEL%
ECHO.

IF (%OS%) == (Windows_NT) ENDLOCAL
PAUSE
Aber das ist nebensächlich. Hauptsächlich liegt es daran, dass er selbstgeschriebene System.pas und SysInit.pas Units benutzt hat, die wirklich nur das Nötigste enthalten.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat