Compiler un projet Delphi à l'aide d'un Batch

@Echo off
Echo ******* Building *******

if exist .cfg ren .cfg .cf~
if exist DCC32.cfg ren DCC32.cfg DCC32.cf~
rem # Make console target, unless overridden later
echo -M -CC >> DCC32.cfg
echo -$A+ >> DCC32.cfg
echo -$B- >> DCC32.cfg
echo -$C+ >> DCC32.cfg
echo -$D- >> DCC32.cfg
echo -$G+ >> DCC32.cfg
echo -$H+ >> DCC32.cfg
echo -$I+ >> DCC32.cfg
echo -$J- >> DCC32.cfg
echo -$L- >> DCC32.cfg
echo -$M- >> DCC32.cfg
echo -$O+ >> DCC32.cfg
echo -$P+ >> DCC32.cfg
echo -$Q- >> DCC32.cfg
echo -$R- >> DCC32.cfg
echo -$T- >> DCC32.cfg
echo -$U- >> DCC32.cfg
echo -$V+ >> DCC32.cfg
echo -$W- >> DCC32.cfg
echo -$X+ >> DCC32.cfg
echo -$Y2 >> DCC32.cfg
rem # ShowHints
echo -H >> DCC32.cfg
rem # ShowWarnings
echo -W >> DCC32.cfg
rem # ImageBase
echo -K$41000000 >> DCC32.cfg
rem # OutputDir
echo -E"%OpusTools%" >> DCC32.cfg
rem # OutputDir
echo -LN"%OpusTools%" >> DCC32.cfg
rem # Packages
echo -LUvcl50;vclx50 >> DCC32.cfg
rem # SearchPath
echo -U"" >> DCC32.cfg
rem # SearchPath
echo -R"" >> DCC32.cfg
rem # SearchPath
echo -O"" >> DCC32.cfg
rem # SearchPath
echo -I"" >> DCC32.cfg
rem # BuildAll
echo -B >> DCC32.cfg
rem # Min/MaxStackSize
echo -M16384,1048576 >> DCC32.cfg

"BinDCC32.exe" .dpr %1 %2 %3 %4 %5 %6 %7 %8 %9
if errorlevel 1 goto GotError
goto Finish

rem # Got an error. Wait for user input
:GotError
echo Error!
pause

:Finish
del DCC32.cfg
if exist DCC32.cf~ ren DCC32.cf~ DCC32.cfg
if exist .cf~ ren .cf~ .cfg
Echo ******* Done. *******

:End
==================================================================
Adapter l'exemple à votre projet
=> Fichier du projet
Ex : Project1
=> répertoire Delphi
Ex : C:ProgrammeBorlandDelphi5
=> répertoire des unités
Ex : "C:DevLib;C:DevLibBase"
Ajouter un commentaire
Pseudo
Adresse email
Site internet (optionnel)
Votre commentaire
Fiche de l'article
Mise a jour14/09/2002
VisualisationVu 1860 fois
PublicInternaute zz
CategorieDelphi - Trucs et astuces - Autre categorie
Auteur de l'article
SwissDelphiCenter SwissDelphiCenter
connecté le 02/11/2011
329 articles dans la section
Contacter l'auteur