Rev 46 | Blame | Compare with Previous | Last modification | View Log | Download
; -- valmet.iss --; Copyright (C) 2008 RLD Automation; FL7.5.1, Windows 2003 + XP#pragma option -v+#pragma verboselevel 9#pragma spansymbol "_"#define Debug#define Company "RLD Automation";OS version and SP required#define SysVer "Windows 7 (with SP1 or higher)";Application definitions#define AppName "Datataker VS2012"#define AppId "DATATAKER"#define AppShort "Datataker";#define BaseDir "..\..\..\Flink"#define AppVersion GetFileVersion("..\release\"+AppShort+".exe")#define VCredist "Visual Studio redistributables X86"#define dotNET ".NET redistributables";Entry for ctlist file;#define CtList "val_pd_m val_pd_x val_pd_t val_pd_z val_pd_d";Key files to add;#define Key1 "val_bus";#define Key2 "val_type";#define Key3 "";#define Key4 "";#define Key5 "";Message files to add;#define Msg1 "valmet";#define Msg2 "valm_ac";#define Msg3 "Imx_ser"[Setup]AppName={#AppName}AppVerName={#AppName} {#AppVersion}, for {#SysVer}AppCopyright=Copyright © 2008 {#Company}.AppPublisher={#Company}AppPublisherURL=http://www.rldautomation.euAppSupportURL=http://www.rldautomation.euAppUpdatesURL=http://www.rldautomation.eu;AppVersion=1.0 ;{#AppVersion}OutputBaseFilename={#AppShort}Install{#AppVersion}OutputDir=.\SetupWizardImageFile=.\SetupModern23.bmpWizardSmallImageFile=.\SetupModernSmall15.bmpUninstallable=yesUninstallDisplayIcon={app}\{#AppShort}.exeUninstallDisplayName={#AppName}UninstallFilesDir={app}LicenseFile=.\license.txtInfoBeforeFile=.\infobefore.txtPrivilegesRequired=poweruserRestartIfNeededByRun=yes;AlwaysRestart=yesDisableStartupPrompt=yesDisableProgramGroupPage=noDiskSpanning=0DefaultDirName={pf}\{#AppShort}DefaultGroupName={#AppShort}DirExistsWarning=no;MinVersion=4,4UsePreviousAppDir=yesWizardStyle=modernUninstallStyle=modernWindowVisible=falseBackColor=clSilverBackColor2=clBlackBackColorDirection=toptobottom;WizardDebug=noAllowNoIcons=yesUsePreviousTasks=no[Types]Name: compact; Description: Datataker program only installationName: full; Description: Full installationName: custom; Description: Custom installation; Flags: iscustom[Components]Name: main; Description: {#AppName} Program; Types: compact full custom; Flags: fixedName: manual; Description: {#AppShort} User Guide; Types: full compactName: debug; Description: {#AppShort} Debug Viewer Support-files; Types: fullName: vcredist; Description: {#VCredist}; Types: full;Name: dotnet; Description: {#dotNET}; Types: full[Tasks];Name: startupicon; Description: "Start program after installation."; _; GroupDescription: "Additional options:"; Components: main;[Files];Datataker filesSource: ..\release\{#AppShort}.exe; DestDir: {app}; Components: mainSource: ..\release\{#AppShort}.map; DestDir: {app}; Components: mainSource: ..\release\{#AppShort}.map; DestDir: {localappdata}\CrashDumps\DataTaker; Components: mainSource: ..\{#AppShort}.ini; DestDir: {app}; Flags: onlyifdoesntexist; Components: main;Source: "MyProg-x64.exe"; DestDir: "{app}"; Check: IsWin64;;Source: "MyProg-x86.exe"; DestDir: "{app}"; Check: "not IsWin64";;Debug viewerSource: ..\..\DbgView\*; DestDir: {app}; Flags: ignoreversion; Components: debug;VS redistributablesSource: ..\..\VS-redistributables\vc2012redist_x86.exe; DestDir: {app}; Components: vcredistSource: ..\..\VS-redistributables\vc2012redist_x64.exe; DestDir: {app}; Check: "IsWin64"; _Components: vcredist;dotnet 3.x;Source: ..\..\dotNET\dotnetfx3.exe; DestDir: {app}; Components: dotnet;Source: ..\..\dotNET\dotnetfx35setup.exe; DestDir: {app}; Components: dotnet;DocumentationSource: {src}\*.pdf; DestDir: {app}; _Flags: external; Components: manual;Readme file;Source: ..\Im_bas.txt; DestDir: "{app}"; Flags: isreadme; Components: main[Registry];Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; _; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{pf}\datataker"; _; Check: NeedsAddPath('{pf}\datataker');Minidump settingsRoot: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: none; ValueName: ""; ValueData: ""; _Components: mainRoot: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: expandsz; ValueName: "DumpFolder"; _ValueData: "%LOCALAPPDATA%\CrashDumps"; _Flags: createvalueifdoesntexist; Components: mainRoot: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: dword; ValueName: "DumpCount"; _ValueData: "10"; _Flags: createvalueifdoesntexist; Components: mainRoot: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: dword; ValueName: "DumpType"; _ValueData: "1"; _Flags: createvalueifdoesntexist; Components: mainRoot: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\{#AppShort}.exe"; _ValueType: none; ValueName: ""; ValueData: ""; _Flags: createvalueifdoesntexist; Components: mainRoot: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\{#AppShort}.exe"; _ValueType: expandsz; ValueName: "DumpFolder"; _ValueData: "%LOCALAPPDATA%\CrashDumps\{#AppShort}"; _Flags: createvalueifdoesntexist; Components: main;Minidump x64Root: HKLM64; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: none; ValueName: ""; ValueData: ""; _Components: main; Check: "IsWin64";Root: HKLM64; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: expandsz; ValueName: "DumpFolder"; _ValueData: "%LOCALAPPDATA%\CrashDumps"; _Flags: createvalueifdoesntexist; Components: main; Check: "IsWin64";Root: HKLM64; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: dword; ValueName: "DumpCount"; _ValueData: "10"; _Flags: createvalueifdoesntexist; Components: main; Check: "IsWin64";Root: HKLM64; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"; _ValueType: dword; ValueName: "DumpType"; _ValueData: "1"; _Flags: createvalueifdoesntexist; Components: main; Check: "IsWin64";Root: HKLM64; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\{#AppShort}.exe"; _ValueType: none; ValueName: ""; ValueData: ""; _Flags: createvalueifdoesntexist; Components: main; Check: "IsWin64";Root: HKLM64; Subkey: "SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\{#AppShort}.exe"; _ValueType: expandsz; ValueName: "DumpFolder"; _ValueData: "%LOCALAPPDATA%\CrashDumps\{#AppShort}"; _Flags: createvalueifdoesntexist; Components: main; Check: "IsWin64";[Icons]Name: "{group}\DataTaker"; Filename: "{app}\datataker.exe"; WorkingDir: "{app}"Name: "{group}\Debug Viewer"; Filename: "{app}\Dbgview.exe"; WorkingDir: "{app}"; Components: debug;Name: "{commonstartup}\DataTaker"; Filename: "{app}\datataker.exe"; WorkingDir: "{app}";; Tasks: startupicon;[Run]Filename: {app}\vc2012redist_x86.exe; Parameters: /q; Flags: runhidden; _StatusMsg: Installing Visual Studion 2012 SP4 C++ redistributables x86...; _Components: vcredistFilename: {app}\vc2012redist_x64.exe; Parameters: /q; Flags: runhidden; _StatusMsg: Installing Visual Studion 2012 SP4 C++ redistributables x64...; _Check: "IsWin64"; Components: vcredistFilename: "{app}\datataker.exe"; Description: "Launch DataTaker application"; _Flags: postinstall nowait skipifsilent unchecked;;Filename: {app}\bin\dotnetfx3.exe; Parameters: /q; Flags: runhidden; _; StatusMsg: Installing .NET redistributables...; Components: dotnet;Filename: {app}\bin\dotnetfx35setup.exe; Parameters: /q; Flags: runhidden; _; StatusMsg: Installing .NET redistributables...; Components: dotnet[UninstallRun][InstallDelete][Messages]RunEntryShellExec=Yes, I would like to view the README fileBeveledLabel={#Company}#ifdef Debug#expr SaveToFile(AddBackslash(SourcePath) + "Preprocessed.iss")#endif[Code]varDriverList: String;TaskName: String;{ UserPage: TInputQueryWizardPage; }UsagePage: TInputOptionWizardPage;{ LightMsgPage: TOutputMsgWizardPage; }{ KeyPage: TInputQueryWizardPage; }{ ProgressPage: TOutputProgressWizardPage; }{ DataDirPage: TInputDirWizardPage; }FlVersion: String;function InitializeSetup(): Boolean;beginResult := True;end;procedure InitializeWizard;begin{ Create the pages }{ UserPage := CreateInputQueryPage(wpWelcome,'Personal Information', 'Who are you?','Please specify your name and the company for whom you work, then click Next.');UserPage.Add('Name:', False);UserPage.Add('Company:', False);}{ UsagePage := CreateInputOptionPage(wpWelcome,'FactoryLink Version Information', 'For which version are you installing the IM-BAS application?','Please select the correct version of FactoryLink, then click Next.',True, False);}{UsagePage.Add('FactoryLink 7.0, or FactoryLink 7++');} {selection 0}{UsagePage.Add('FactoryLink 7.1');} {selection 1}{UsagePage.Add('FactoryLink 7.2');} {selection 2}{UsagePage.Add('FactoryLink 7.5');} {selection 3}{ LightMsgPage := CreateOutputMsgPage(UsagePage.ID,'Personal Information', 'How will you use My Program?','Note: to enjoy all features My Program can offer and to support its development, ' +'you can switch to sponsored or paid mode at any time by selecting ''Usage Mode'' ' +'in the ''Help'' menu of My Program after the installation has completed.'#13#13 +'Click Back if you want to change your usage mode setting now, or click Next to ' +'continue with the installation.');}{KeyPage := CreateInputQueryPage(UsagePage.ID,'Personal Information', 'What''s your registration key?','Please specify your registration key and click Next to continue. If you don''t ' +'have a valid registration key, click Back to choose a different usage mode.');KeyPage.Add('Registration key:', False);ProgressPage := CreateOutputProgressPage('Personal Information','What''s your registration key?');DataDirPage := CreateInputDirPage(wpSelectDir,'Select Personal Data Directory', 'Where should personal data files be installed?','Select the folder in which Setup should install personal data files, then click Next.',False, '');DataDirPage.Add('');}{ Set default values, using settings that were stored last time if possible }{case GetPreviousData('FlVersion', '') of'light': UsagePage.SelectedValueIndex := 0;'sponsored': UsagePage.SelectedValueIndex := 1;'paid': UsagePage.SelectedValueIndex := 2;elseUsagePage.SelectedValueIndex := 3;end;}{DataDirPage.Values[0] := GetPreviousData('DataDir', '');}end;function rmNextButtonClick(CurPageID: Integer): Boolean;varI: Integer;begin{ Validate certain pages before allowing the user to proceed }{if CurPageId = UsagePage.ID then begincase UsagePage.SelectedValueIndex of0: FlVersion := 'FL70';1: FlVersion := 'FL71';2: FlVersion := 'FL72';elseFlVersion := 'FL75';end;end;}{if CurPageID = UserPage.ID then beginif UserPage.Values[0] = '' then beginMsgBox('You must enter your name.', mbError, MB_OK);Result := False;end else beginif DataDirPage.Values[0] = '' thenDataDirPage.Values[0] := 'C:\' + UserPage.Values[0];Result := True;end;end else}{if CurPageID = KeyPage.ID then begin}{ Just to show how 'OutputProgress' pages work.Always use a try..finally between the Show and Hide calls as shown below. }{ ProgressPage.SetText('Authorizing registration key...', '');ProgressPage.SetProgress(0, 0);ProgressPage.Show;tryfor I := 0 to 10 do beginProgressPage.SetProgress(I, 10);Sleep(100);end;finallyProgressPage.Hide;end;if KeyPage.Values[0] = 'inno' thenResult := Trueelse beginMsgBox('You must enter a valid registration key. (Hint: The key is "inno".)', mbError, MB_OK);Result := False;end;end else}Result := True;end;function NeedsAddPath(Param: string): boolean;varOrigPath: string;beginif not RegQueryStringValue(HKEY_LOCAL_MACHINE,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'Path', OrigPath)then beginResult := True;exit;end;// look for the path with leading and trailing semicolon// Pos() returns 0 if not foundResult := Pos(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0;if Result = True thenResult := Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0;end;