Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Inno Setup ISCmplr.dll in eigene Anwendung einbauen ? (https://www.delphipraxis.net/112857-inno-setup-iscmplr-dll-eigene-anwendung-einbauen.html)

Bernd Nowak 28. Apr 2008 13:17


Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
Hallo,
ich habe jetzt schon viel mit Inno gemacht aber ich habe ein paar Projekte, wo ich dem Benutzer mittels Delphi Applikation die Anpassung des Inno Skripts abnehmen möchte.
Ich könnte natürlich nur die Kommandozeilen Tools mitliefern und die Delphi Applikation dann so programmieren, das zuletzt das Kommando "iscc skriptname.iss" ausgeführt wird.
Es erscheint jedoch kein Fortschrittsbalken während der Abarbeitung und es muss doch einen Weg geben die ISCmplr.dll in eine eigene Anwendung zu integrieren.
Habe auch schon in der Mailingliste von Inno gesucht aber bin noch nicht fündig geworden ausser verweisen auf die Quelltexte.

Hat jemand sowas schon einmal realisiert und kann mir ein bisschen unter die Arme greifen ?

mkinzler 28. Apr 2008 13:27

Re: Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
InnoSetup ist doch in Delphi geschrieben. Ein Blick in den Source sollte eigentlich helfen.

Bernd Nowak 29. Apr 2008 08:07

Re: Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
Danke für den Hinweis. Ich habe mir mal die ISTool Sources heruntergeladen und nun ja, die sind in C(++) geschrieben. Die Lösung scheint in DlgCompile.cpp zu stecken aber bin zu blöd dafür da ich mit C++ noch nicht so viel gemacht habe.

jbg 29. Apr 2008 11:10

Re: Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
Zitat:

Zitat von Bernd Nowak
ISTool Sources

Du kannst auch die InnoSetup Sources herunterladen. Die enthalten den "Editor" Compil32.exe, der in Delphi geschrieben ist.

Bernd Nowak 29. Apr 2008 11:55

Re: Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
Schaue ich mir mal an. Habe zwar massig ??? nach kurzem Drübersehen aber vielleicht klärt sich das ja noch :)

MathiasSimmack 29. Apr 2008 14:54

Re: Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
Zitat:

Zitat von Bernd Nowak
ISCmplr.dll

Wie kommst du darauf, dass diese Bibliothek mit C geschrieben wurde? Das Ding ist ein normales Delphi-Projekt (ISCmplr.dpr)
Delphi-Quellcode:
function ISDllCompileScript(const Params: TCompileScriptParamsEx): Integer; stdcall;
function ISDllGetVersion: PCompilerVersionInfo; stdcall;

exports
  ISDllCompileScript,
  ISDllGetVersion;
Dürfte dann ab hier nicht mehr schwer sein.

Bernd Nowak 29. Apr 2008 15:24

Re: Inno Setup ISCmplr.dll in eigene Anwendung einbauen ?
 
Zitat:

Zitat von MathiasSimmack
Zitat:

Zitat von Bernd Nowak
ISCmplr.dll

Wie kommst du darauf, dass diese Bibliothek mit C geschrieben wurde? Das Ding ist ein normales Delphi-Projekt (ISCmplr.dpr)
Delphi-Quellcode:
function ISDllCompileScript(const Params: TCompileScriptParamsEx): Integer; stdcall;
function ISDllGetVersion: PCompilerVersionInfo; stdcall;

exports
  ISDllCompileScript,
  ISDllGetVersion;
Dürfte dann ab hier nicht mehr schwer sein.

Ich hatte mir gestern nur die Sources von ISTool angesehen, und die sind in C. Und das ISDllCompileScript exportiert wird hatte ich auch schon mit dem PE Explorer gesehen.
Was ich noch nicht gesehen habe ist welche Parameter übergeben werden (TCompileScriptParamsEx) und wie es gemacht wird, das man einen Fortschrittsbalken sieht.

Vielen Dank schonmal. Bin gar nicht auf die Idee gekommen mir die Source von ISCmplr anzusehen.

Also die Parameter die an ISDllCompielScript übergeben werden können scheint wohl dieser Record zu sein:

Delphi-Quellcode:
  TCompileScriptParamsEx = record
    Size: Cardinal;      { [in] Set to SizeOf(TCompileScriptParamsEx). }
    CompilerPath: PChar; { [in] The "compiler:" directory. This is the
                            directory which contains the *.e32 files. If this
                            is set to NULL, the compiler will use the directory
                            containing the compiler DLL/EXE. }
    SourcePath: PChar;   { [in] The default source directory, and directory to
                            look in for #include files. Normally, this is
                            the directory containing the script file. This
                            cannot be NULL. }
    CallbackProc: TCompilerCallbackProc;
                          { [in] The callback procedure which the compiler calls
                            to read the script and for status notification. }
    AppData: Longint;    { [in] Application-defined. AppData is passed to the
                            callback function. }
    Options: PChar;      { [in] Additional options. Each option is a
                            null-terminated string, and the final option is
                            followed by an additional null character.
                            If you do not wish to specify any options, set this
                            field to NULL or to point to a single null
                            character.

                            Currently supported options:

                            OutputBaseFilename=[filename]
                              Overrides any OutputBaseFilename setting in the
                              script; causes the compiler to use [filename]
                              instead.
                            OutputDir=[path]
                              Overrides any output directory in the script;
                              causes the compiler to use [path] instead. }
  end;
Aber irgendwie fehlt mir da das ISS skript und der Weg den Fortschrittsbalken zu setzen. Ich schätze das das etwas mit dem CallBack Proc zu tun hat.


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz