Thema: Delphi Kennt jemand InnoSetup ?

Einzelnen Beitrag anzeigen

moritz

Registriert seit: 18. Apr 2003
1.037 Beiträge
 
#14

Re: Kennt jemand InnoSetup ?

  Alt 15. Mär 2004, 20:44
Nimm das!

Zitat:
[Setup]
AppName=BirthdayRemember
AppVerName=BirthdayRemember 6.0.3
AppPublisher=Ich
AppPublisherURL=http://www.BirthdayRemember.de
AppSupportURL=http://www.BirthdayRemember.de
AppUpdatesURL=http://www.BirthdayRemember.de
DefaultDirName={pf}\BirthdayRemember
DefaultGroupName=BirthdayRemember
InfoBeforeFile=Hinweis.rtf
WizardImageFile=WizardImageFile.bmp
ShowLanguageDialog=yes
SolidCompression=yes
WizardSmallImageFile=WizardSmallImageFile.bmp
UninstallStyle=modern
CompressLevel=9
AllowCancelDuringInstall=no
ExtraDiskSpaceRequired=10240

[Languages]
Name: "de"; MessagesFile: "deutsch.isl"; InfoBeforeFile: "Hinweis.rtf"
Name: "en"; MessagesFile: "englisch.isl"; InfoBeforeFile: "HinweisEn.rtf"

[Tasks]
Name: "desktopicon"; Description: "Ein &Desktopicon erstellen"; GroupDescription: "Zusätzliche Icons:"; Flags: unchecked
Name: "quicklaunchicon"; Description: "Ein &Quicklaunchicon erstellen"; GroupDescription: "Zusätzliche Icons:"; Flags: unchecked

[Files]
Source: "..\Executable\BirthdayRemember.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Executable\BRCrypt.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Executable\StandardRememberSound.wav"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\Executable\languages\*.*"; DestDir: "{app}\languages\"; Flags: ignoreversion
Source: "..\Executable\manual\*.*"; DestDir: "{app}\manual\"; Flags: ignoreversion

[INI]
Filename: "{app}\BirthdayRemember.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.BirthdayRemember.de"

[Icons]
Name: "{group}\BirthdayRemember"; Filename: "{app}\BirthdayRemember.exe"
Name: "{group}\BirthdayRemember Hilfe"; Filename: "{app}\manual\index.html"
Name: "{group}\BirthdayRemember im Web"; Filename: "{app}\BirthdayRemember.url"
Name: "{group}\BirthdayRemember Deinstallieren"; Filename: "{uninstallexe}"
Name: "{userdesktop}\BirthdayRemember"; Filename: "{app}\BirthdayRemember.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\BirthdayRemember"; Filename: "{app}\BirthdayRemember.exe"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\manual\index.html"; Description: "ReadMe anzeigen"; Flags: nowait postinstall skipifsilent runmaximized shellexec
Filename: "{app}\BirthdayRemember.exe"; Description: "BirthdayRemember jetzt starten"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: files; Name: "{app}\languages\*.*"

[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run "; ValueName: "BirthdayRemember"; Flags: uninsdeletevalue;

[code]

procedure vLabelOnClick(Sender: TObject);
var
Dummy: Integer;
begin
InstShellExec('http://www.BirthdayRemember.de', '', '', SW_SHOWNORMAL, Dummy);
end;


function InitializeSetup(): Boolean;
var vString1,vString2: String;
begin
Result:=True;
if ActiveLanguage='de' then
begin
vString1:='BirthdayRemember läuft gerade. Bitte beenden Sie BirthdayRemember, bevor Sie das Setup starten.';
vString2:='Es kann sein, dass das Update nicht richtig ausgeführt werden kann. Wollen Sie trotzdem fortfahren?';
end else
begin
vString1:='BirthdayRemember is running at the moment. Please close BirthdayRemember and continue.';
vString2:='It could be that this update cannot be written succesfully. Continue everyway?';
end;
while FindWindowByWindowName('BirthdayRemember')<>0 do
begin
case MsgBox(vString1,mbConfirmation,MB_ABORTRETRYIGNORE ) of
idAbort: begin
Result:=False;
Break;
end;
idIgnore: if MsgBox(vString2,mbConfirmation,MB_YESNO)=idYes then
Break;
end;
end;
end;

procedure InitializeWizard();
var vLabel: TNewStaticText;
begin
vLabel := TNewStaticText.Create(WizardForm);
vLabel.Top := WizardForm.CancelButton.Top+5;
vLabel.Left := WizardForm.ClientWidth - WizardForm.CancelButton.Left - WizardForm.CancelButton.Width;
vLabel.Caption := 'http://www.BirthdayRemember.de';
vLabel.Font.Style := vLabel.Font.Style + [fsUnderLine];
vLabel.Font.Color := clBlue;
vLabel.Cursor := crHand;
vLabel.OnClick := @vLabelOnClick;
vLabel.Parent := WizardForm;
end;

function NextButtonClick(CurPage: Integer): Boolean;
begin
Result:=True
if CurPage=5 then
if DirExists(WizardForm.DirEdit.Text) and (FileExists(WizardForm.DirEdit.Text+'\BirthdayReme mber.exe') or FileExists(WizardForm.DirEdit.Text+'BirthdayRememb er.exe')) and (Not(FileExists(WizardForm.DirEdit.Text+'\BRCrypt. dll') or FileExists(WizardForm.DirEdit.Text+'BRCrypt.dll')) ) then
begin
Result:=False;
if ActiveLanguage='de' then
MsgBox('In dem Verzeichnis:'+#10#13+#10#13+WizardForm.DirEdit.Tex t+#10#13+#10#13+'ist bereits eine vorherige Version von BirthdayRemember installiert. Wenn sie BirthdayRemember 6.0.3 in dieses Verzeichnis installieren, kann es zu Datenverlust kommen. Bitte wählen Sie ein anderes Verzeichnis.'+#13#10+#13#10+'Im ReadMe finden Sie wichtige Informationen für den Import der Daten aus BirthdayRemember Version <= 5.5',MbInformation,Mb_Ok)
else
MsgBox('In the directory:'+#10#13+#10#13+WizardForm.DirEdit.Text+ #10#13+#10#13+'is already a previous version of BirthdayRemember installed. If you install BirthdayRemember 6.0.3 in this directory, entries could be deleted. Please select an other directory.'+#13#10+#13#10+'Im ReadMe finden Sie wichtige Informationen für den Import der Daten aus BirthdayRemember Version <= 5.5',MbInformation,Mb_Ok)
end;
end;
"Optimistisch ist diejenige Weltanschauung, die das Sein höher als das Nichts stellt und so die Welt und das Leben als etwas an sich Wertvolles bejaht."
Albert Schweitzer
  Mit Zitat antworten Zitat