Autor Beitrag
Alpha_Wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Fr 02.09.05 13:26 
Hallo Leute,

ich arbeite mit Inno Setup 5.0.8.

Wenn ich dort nun einen Skript geniere und mein eigenes Setup laufen lassen kommt ja am Anfang..:

Setup installiert TestProgramm v0.9.3.39 ...

Nun die Version meines Delphi Programms würde ich gerne im Skript auslesen.. und dann einfach hinter Testprogramm ausgeben. Somit muss ich das Inno Setup nur kompilieren und nicht jedes mal wenn ich eine neue Version hab im Skript Änderungen vornehmen.

Kann mir da jemand helfen?

Danke
Alpha_Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Mo 05.09.05 10:10 
Da es hier doch einige gibt die wohl das gleiche brauchen hier meine Lösung:


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
-------------Inno-Code------------------------------
#define AppName "TestProgramm"
#define AppExeName "TestProgramm.exe"
#define ExePath ".\unterordner\TestProgramm.exe"

[Code]
#if fileExists(ExePath) == false
      #error Exepath does not exist!
    #endif
    #define AppVersion GetFileVersion(ExePath)


[Setup]
AppName={#AppName}
AppVerName={#AppName} {#AppVersion}
...

[Tasks]
...

[Files]
...

[Icons]
...

[Run]
Filename: {app}\{#AppExeName}; Description: {cm:LaunchProgram, {AppVerName}}; Flags: nowait postinstall skipifsilent
-------------Inno-Code-Ende-------------------------

Vielleicht hilft es dem ein oder anderen..

Moderiert von user profile iconChristian S.: Enthaltenen Code-Tag maskiert und Code-Tags eingefügt
MisterBum
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 107



BeitragVerfasst: Mo 05.09.05 11:10 
Hier findet Ihr alles zu Inno:

innosetup.planet-sou.../index.php?&ID=1
Alpha_Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Do 08.09.05 13:03 
user profile iconMisterBum hat folgendes geschrieben:
Hier findet Ihr alles zu Inno:

innosetup.planet-sou.../index.php?&ID=1


Alles ist wohl arg übetrieben... die Community dort ist noch ziemlich klein und ich habe dort bis jetzt noch niemanden online gesehen.. nungut... aber was noch nicht ist kann ja noch werden =) aber danke für den link.

Hätte jetzt noch eine Frage..

Wie kann ich zB wenn die Installation startet ein Word-Dokument öffnen?

Exec hab ich probiert -

FileOpen hab ich probiert -

aber es funktioniert einfach nicht.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure InitializeWizard();
begin
  int FileOpen('.\bin\Release Notes\1.0.0.6.doc');
end;


Der Compiler bringt immer Invalid number of parameters.. aber egal was ich ihm gebe da kommt immer diese Meldung mehr nicht.


In der Hilfe steht aber nur beschrieben:

Zitat:

int FileOpen(str)


Ich denke aber sowieso das FileOpen nicht stimmen kann.. hat jemand eine Idee was ich da tun muss?

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Alpha_Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Do 08.09.05 14:54 
Hm.. lohnt sich anscheinend nicht hier diese fragen zu stellen (nicht böse gemeint) man kann ja nicht alles wissen :wink:

Ich sollte fast ma n tut schreiben..*g*

Hier meine Lösung:

ausblenden Quelltext
1:
2:
[Run]
Filename: {app}\Release Notes\1.0.0.6.doc; Description: Show Release Notes; Flags: Postinstall shell
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 08.09.05 15:10 
user profile iconAlpha_Wolf hat folgendes geschrieben:
aber es funktioniert einfach nicht.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure InitializeWizard();
begin
  int FileOpen('.\bin\Release Notes\1.0.0.6.doc');
end;



Das Int deutet wahrscheinlich auf den Rückgabeparameter hin, oder?
Alpha_Wolf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Do 08.09.05 15:25 
Jap stimmt ^^

Nur irgendwie hatte ich es nicht geschafft das er mir was brauchbares zurückgeliefert hat.. bis ich das gefunden hab:

Zitat:

This function opens a text file for reading and returns the file handle (or zero on failure) to be used in subsequent calls to File* functions.


Und ich wusste das es dafür was ich vorhatte nicht gedacht war. Aber Lösung ist ja bereits vorhanden =)