Autor Beitrag
LonghornUser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Di 29.09.09 12:59 
Hallo,

wie stelle ich es an, dass ich per Kommandozeile (Shellexecute, ...) ein Delphi 2009-Projekt compiled bekomme, ohne dass ich das Projekt starten lassen und von Hand F9 drücken muss ?

Vielen Dank !

Ciao LHUser
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 29.09.09 13:15 
Kommandozeilenversion verwenden (dcc32.exe)

_________________
Markus Kinzler.
Tastaro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 414
Erhaltene Danke: 23



BeitragVerfasst: Di 29.09.09 13:36 
Aus Automatisierungsgründen hab ich das mit Delphi2007 gemacht.
Ob es mit 2009 genauso funktioniert weiß ich nicht:

In meinem Programm bau ich mir das Startkommando so zusammen:
ausblenden Delphi-Quelltext
1:
2:
3:
strStart := strDelphiPath + '\bin\bds.exe ' + strProject + ' -ns -b';
if strResultFile <> '' then
   strStart := strStart + ' -o' + strResultFile;

Beste Grüße
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 29.09.09 14:09 
Wie gesagt, würde ich der Kommandozeilenversion des Kompilers den Vorzug geben

_________________
Markus Kinzler.
Tastaro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 414
Erhaltene Danke: 23



BeitragVerfasst: Di 29.09.09 14:17 
user profile iconmkinzler hat folgendes geschrieben Zum zitierten Posting springen:
Wie gesagt, würde ich der Kommandozeilenversion des Kompilers den Vorzug geben


Danach wurde aber nicht gefragt.
Bei Delphi 7 hatten wir hier auch schon den Effekt, dass ein Programm das mit dem Kommandozeilencompiler erzeugt wurde sich anders verhielt als eines das mit der IDE erzeugt wurde. Warum auch immer. Mir war es damals zu dumm danach zu suchen und seitdem compilieren wir probemlos mit der IDE.

Beste Grüße
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 29.09.09 17:18 
Natürlich kann man immer die ganze IDE mit allen PiPaPo laden. Der schenller Weg ist aber die Kommandozeilenversion.

_________________
Markus Kinzler.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Di 29.09.09 18:24 
Vielen Dank für eure Antworten! Ich wüsste auch nicht, warum die Kommandozeilenvariante nicht funktionieren sollte.

Allerdings bin ich bei der IDE auf der sichereren Seite. Ich schaue mir das ganze morgen mal genauer an ;)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 30.09.09 01:09 
user profile iconTastaro hat folgendes geschrieben Zum zitierten Posting springen:
Bei Delphi 7 hatten wir hier auch schon den Effekt, dass ein Programm das mit dem Kommandozeilencompiler erzeugt wurde sich anders verhielt als eines das mit der IDE erzeugt wurde.
Der Unterschied ist, dass die Kommandozeilenversion die Pfade nicht ausliest. Das heißt, wenn man die Pfade in der IDE anders gesetzt hat als für die Kommandozeilenversion, dann kommt auch ggf. eine andere Exe heraus.
Zudem starten die neuen IDEs nicht mehr ganz so schnell wie die von <= D7.

Ich habe hier ein kleines Projekt veröffentlicht, das automatisch die Pfade an die Kommandozeilenversion übergibt und ein Projekt kompiliert. Das müsste nur schnell für Delphi 2009 angepasst werden:
www.delphi-forum.de/viewtopic.php?t=41748
dummzeuch
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 593
Erhaltene Danke: 5


Delphi 5 ent, Delphi 6 bis Delphi XE8 pro
BeitragVerfasst: Mi 30.09.09 21:36 
user profile iconLonghornUser hat folgendes geschrieben Zum zitierten Posting springen:

wie stelle ich es an, dass ich per Kommandozeile (Shellexecute, ...) ein Delphi 2009-Projekt compiled bekomme, ohne dass ich das Projekt starten lassen und von Hand F9 drücken muss ?


Seit Delphi 2007 benutzt Delphi msbuild. Die .dproj-Datei ist ein Projekt fuer dieses Tool und im Startmenue gibt es einen Eintrag, der eine Kommandozeile so initialisiert aufruft, dass man mit

msbuild meinprojekt.dproj

ein Executable erzeugen kann. Das Ergebnis sollte das gleiche sein wie wenn man in der IDE compiliert, inclusive der Suchpfade und Pre- und Post-Build Events. Ich benutze das, um mittels automatischer Build-Scripte ohne die IDE zu starten ein Executable zu erzeugen.

(Sorry fuer die schwammigen Formulierungeen, ich habe gerade keine Delphi-Installation hier und auch keines meiner Build-Scripte, um das nachzusehen.)

twm