Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download
; -- xychart.iss --; Copyright (C) 2003 RLD Automation; FL8.0, Windows 2003, XP#pragma option -v+#pragma verboselevel 9#define Debug;FactoryLink version#define FlVer "Fl802";FactoryLink and/or OS version and SP required#define SysVer "FL8.0 Windows 7, 2008, 2003, XP (with SP2 or higher)";Application definitions#define AppName "FactoryLink Conversion Task"#define AppId "FL_CONV"#define AppShort "FL_Conv"#define BaseDir "..\..\..\Flink"#define AppVersion GetFileVersion(BaseDir+"\Bin\"+FlVer+"\"+AppShort+".exe")#define VCredist "Visual Studio redistributables X86"#define dotNET ".NET redistributables";Entry for ctlist file#define CtList "conv_adt conv_ad conv_dat conv_da conv_amt conv_am";Key files to add#define Key1 ""#define Key2 ""#define Key3 ""#define Key4 ""#define Key5 ""#define Key6 ""#define Key7 ""#define Key8 "";Message files to add#define Msg1 "fl_conv"#define Msg2 "fl_cvaac"#define Msg3 "fl_cvdac"#define Msg4 "fl_cvmac"#define Msg5 ""[Setup]AppName={#AppName}AppVerName={#AppName} {#AppVersion}, for {#SysVer}AppCopyright=Copyright © 2012 RLD Automation.OutputBaseFilename={#AppShort}InstallOutputDir=..\..\Setup\{#FlVer}WizardImageFile=..\Siemens.bmpWizardSmallImageFile=..\SetupModernSmall25.bmpUninstallable=falseUninstallDisplayIcon={app}\{#AppShort}.exeUninstallDisplayName={#AppName}UninstallFilesDir={app}AppPublisher=RLD Automation NederlandAppVersion={#AppVersion}AppPublisherURL=http://www.rldautomation.euAppSupportURL=http://www.rldautomation.euAppUpdatesURL=http://www.rldautomation.euLicenseFile=..\license.txtInfoBeforeFile=..\infobefore.txtPrivilegesRequired=admin;RestartComputer=noDisableStartupPrompt=yesDisableProgramGroupPage=yesDiskSpanning=0DefaultDirName={code:GetPrgDir|{pf}\{#AppShort}};DefaultGroupName=Wizard Information SystemsDirExistsWarning=noMinVersion=0,5.0UsePreviousAppDir=yesWizardStyle=modernWindowVisible=falseBackColor=clSilverBackColor2=clBlackBackColorDirection=toptobottom;WizardDebug=no[Types]Name: full; Description: Full installation;Name: "compact"; Description: "Compact installation"Name: custom; Description: Custom installation; Flags: iscustom[Components]Name: main; Description: {#AppName}; Types: full custom; Flags: fixedName: manual; Description: {#AppShort} Task Manual; Types: fullName: debug; Description: {#AppShort} Task Debug Support-files; Types: fullName: vcredist; Description: {#VCredist}; Types: fullName: dotnet; Description: {#dotNET}; Types: full[Files];FactoryLink filesSource: {#BaseDir}\Ac\{#AppShort}.ac; DestDir: {app}\ac; Components: mainSource: {#BaseDir}\Bin\{#FlVer}\{#AppShort}.exe; DestDir: {app}\bin; Flags: ignoreversion; Components: main;Source: {#BaseDir}\Bin\{#FlVer}\{#AppShort}.map; DestDir: {app}\bin; Flags: ignoreversion; Components: debugSource: {#BaseDir}\Bin\RLDTitle.exe; DestDir: {app}\bin; Flags: uninsneveruninstall; Components: mainSource: {#BaseDir}\Ctgen\{#AppShort}.ctg; DestDir: {app}\ctgen; Components: mainSource: {#BaseDir}\Ctgen\{#AppShort}.rtm; DestDir: {app}\ctgen; Components: mainSource: {#BaseDir}\Help\en\{#AppShort}.hlp; DestDir: {app}\help\de; Components: mainSource: {#BaseDir}\Help\en\{#AppShort}.hlp; DestDir: {app}\help\en; Components: mainSource: {#BaseDir}\Help\en\{#AppShort}.hlp; DestDir: {app}\help\fr; Components: main#if (len(Key1) > 0)Source: {#BaseDir}\Key\En\{#Key1}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key1}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key1}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key2) > 0)Source: {#BaseDir}\Key\En\{#Key2}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key2}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key2}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key3) > 0)Source: {#BaseDir}\Key\En\{#Key3}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key3}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key3}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key4) > 0)Source: {#BaseDir}\Key\En\{#Key4}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key4}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key4}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key5) > 0)Source: {#BaseDir}\Key\En\{#Key5}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key5}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key5}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key6) > 0)Source: {#BaseDir}\Key\En\{#Key6}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key6}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key6}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key7) > 0)Source: {#BaseDir}\Key\En\{#Key7}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key7}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key7}.key; DestDir: {app}\key\fr; Components: main#endif#if (len(Key8) > 0)Source: {#BaseDir}\Key\En\{#Key8}.key; DestDir: {app}\key\de; Components: mainSource: {#BaseDir}\Key\En\{#Key8}.key; DestDir: {app}\key\en; Components: mainSource: {#BaseDir}\Key\En\{#Key8}.key; DestDir: {app}\key\fr; Components: main#endif;Source: {#BaseDir}\Mps\801\{#AppShort}.mps; DestDir: {app}\mps\en; Components: mainSource: {#BaseDir}\Msg\En\{#AppShort}.txt; DestDir: {app}\msg\de; Components: mainSource: {#BaseDir}\Msg\En\{#AppShort}.txt; DestDir: {app}\msg\en; Components: mainSource: {#BaseDir}\Msg\En\{#AppShort}.txt; DestDir: {app}\msg\fr; Components: main#if (len(Msg1) > 0)Source: {#BaseDir}\Msg\En\{#Msg1}.txt; DestDir: {app}\msg\de; Components: mainSource: {#BaseDir}\Msg\En\{#Msg1}.txt; DestDir: {app}\msg\en; Components: mainSource: {#BaseDir}\Msg\En\{#Msg1}.txt; DestDir: {app}\msg\fr; Components: main#endif#if (len(Msg2) > 0)Source: {#BaseDir}\Msg\En\{#Msg2}.txt; DestDir: {app}\msg\de; Components: mainSource: {#BaseDir}\Msg\En\{#Msg2}.txt; DestDir: {app}\msg\en; Components: mainSource: {#BaseDir}\Msg\En\{#Msg2}.txt; DestDir: {app}\msg\fr; Components: main#endif#if (len(Msg3) > 0)Source: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\de; Components: mainSource: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\en; Components: mainSource: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\fr; Components: main#endif#if (len(Msg4) > 0)Source: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\de; Components: mainSource: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\en; Components: mainSource: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\fr; Components: main#endif#if (len(Msg5) > 0)Source: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\de; Components: mainSource: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\en; Components: mainSource: {#BaseDir}\Msg\En\{#Msg3}.txt; DestDir: {app}\msg\fr; Components: main#endif;Debug viewerSource: ..\..\..\..\DebugView\*; DestDir: {app}\bin; Flags: ignoreversion; Components: debug;VS redistributablesSource: \Tecnomatix\Projects\vcredist\vcredist2008sp1_x86.exe; DestDir: {app}\bin; Components: vcredist;dotnet 3.xSource: \Tecnomatix\Projects\vcredist\dotnetfx3.exe; DestDir: {app}\bin; Components: dotnetSource: \Tecnomatix\Projects\vcredist\dotnetfx35setup.exe; DestDir: {app}\bin; Components: dotnet;Protection;Source: {#BaseDir}\bin\inst_seq.exe; DestDir: {app}; Flags: deleteafterinstall; Components: main;Source: {#BaseDir}\opt\rld.opt; DestDir: {app}\opt; Flags: onlyifdoesntexist; Components: main;Source: {src}\rld.opt; DestDir: {app}; Flags: deleteafterinstall external skipifsourcedoesntexist; Components: main;DocumentationSource: {src}\{#AppShort}.pdf; DestDir: {app}\..\Documentation\English; Flags: external skipifsourcedoesntexist; Components: manual[Registry][Run]Filename: {app}\bin\acctmgr.exe; Parameters: -c -d -v; Check: AddTitle('{#AppShort},{#CtList}'); Flags: runminimized; StatusMsg: Updating FactoryLink account manager index...; Components: mainFilename: {app}\inst_seq.exe; Parameters: "-M{#AppId} -S""{app}\rld.opt"""; Flags: runminimized; StatusMsg: Updating RLD protection...; Components: mainFilename: {app}\bin\mkhelp.exe; Flags: runminimized; StatusMsg: Updating FactoryLik help file index...; Components: main[UninstallRun]Filename: {app}\bin\RLDTitle.exe; Parameters: " /REMOVE={#AppId}"; Flags: runminimized; StatusMsg: Updating FactoryLink account manager index...; Components: mainFilename: {app}\bin\acctmgr.exe; Parameters: -c -d -v; Check: RemoveTitle('{#AppShort}'); Flags: runminimized; StatusMsg: Updating FactoryLink account manager index...; Components: main[InstallDelete];Type: files; Name: "{app}\FlInstall.exe"[Messages]RunEntryShellExec=Yes, I would like to view the README fileBeveledLabel=Tecnomatix#ifdef Debug#expr SaveToFile(AddBackslash(SourcePath) + "Preprocessed.iss")#endif[Code]function InitializeSetup(): Boolean;beginResult := True;end;{Read the FactoryLink directory from the autostart service program location,using the environment variable FLINK will result in a directory withshort names. By using the autostart server the long names are found, andthe setup progam will use these names instead of the notation in short}function GetPrgDir(S: String): String;varMyDir: String;begin{read the autostart service directory, filename and extension}RegQueryStringValue( HKEY_LOCAL_MACHINE, 'System\CurrentControlSet\Control\Session Manager\Environment', 'FLINK', MyDir);{return default in case no directory is found}if (Length( MyDir) <= 0) then beginMyDir := S;end;{return the directory to install the program}Result := MyDir;end;{Add a AC line for the current task to the titles file, add a lineto the CTlist file. The taskname and ct-line are specified in thefunction-parameter: taskname,ct-line}function AddTitle( MyEntry: String): Boolean;varMyText: TArrayOfString;MyFile: String;MyAC: String;MyCT: String;k: Integer;bText: Boolean;found: Integer;begin{first file to load is th etitles file in the AC directory}MyFile := GetPrgDir( '') + '\ac\titles';bText := LoadStringsFromFile( MyFile, MyText);{AC entry looks like: taskname.ac}k := Pos( ',', MyEntry);if k = 0 then k := Pos( ':', MyEntry);MyAC := Copy( MyEntry, 0, k-1) + '.ac';MyCT := MyEntry;{StrSet( ':', k, MyCt);}MyCT := Copy( MyEntry, 0, k-1) + ':' + Copy( MyEntry, k+1, Length(MyEntry) - k){search for ac entry}found := 0;k := 0;while (k < GetArrayLength(MyText)) and (found = 0) do beginfound := Pos( MyAC, MyText[ k]);k := k + 1;end;{if the entry is not found, add a line to the titles file}if (found = 0) then beginSetArrayLength(MyText, GetArrayLength(MyText)+1);MyText[ GetArrayLength(MyText)-1] := MyAC;SaveStringsToFile( MyFile, MyText, false);end;{add entry to ctlist file}MyFile := GetPrgDir( '') + '\ctgen\ctlist';bText := LoadStringsFromFile( MyFile, MyText);{search for ctgen entry}found := 0;k := 0;while (k < GetArrayLength(MyText)) and (found = 0) do beginfound := Pos( MyCT, MyText[ k]);k := k + 1;end;{if the entry is not found, add a line to the ctlist file}if (found = 0) then beginSetArrayLength(MyText, GetArrayLength(MyText)+1);MyText[ GetArrayLength(MyText)-1] := MyCT;SaveStringsToFile( MyFile, MyText, false);end;{return always true, ac file must be installed, this functiononly adds a line to the titles file}Result := True;end;{Remove a AC line for the current task in the titles file, and removea line in the CTlist file the entry is specified with the task namein the function-parameter}function RemoveTitle( MyEntry: String): Boolean;varMyText: TArrayOfString;MyFile: String;MyAC: String;MyCT: String;Temp: String;k: Integer;found: Integer;bText: Boolean;beginMyAC := MyEntry + '.ac';MyCT := MyEntry + ':';{search the task name in the ctlist file}MyFile := GetPrgDir( '') + '\ctgen\ctlist';SetArrayLength( MyText, 0);bText := LoadStringsFromFile( MyFile, MyText);{search for the task name}for k:=0 to GetArrayLength(MyText)-1 do beginTemp := MyText[ k];if (found = 0) thenfound := Pos( MyCT, MyText[ k]);{if the entry is found, remove the line from the titles file}if (found <> 0) then beginif ((k+1) < GetArrayLength(MyText)) then beginMyText[ k] := MyText[ k+1];end else {begin;}MyText[ k] := '';end;end;if (found <> 0) then begin{shorten array with one}SetArrayLength( MyText, GetArrayLength( MyText) - 1);SaveStringsToFile( MyFile, MyText, false);end;{search the task name in the titles file}MyFile := GetPrgDir( '') + '\ac\titles';bText := LoadStringsFromFile( MyFile, MyText);found := 0;{search for the task name}for k:=0 to GetArrayLength(MyText)-1 do beginTemp := MyText[ k];if (found = 0) thenfound := Pos( MyAC, MyText[ k]);{if the entry is found, remove the line from the titles file}if (found <> 0) then beginif ((k+1) < GetArrayLength(MyText)) then beginMyText[ k] := MyText[ k+1];end else {begin;}MyText[ k] := '';end;end;if (found <> 0) then begin{shorten array with one}SetArrayLength( MyText, GetArrayLength( MyText) - 1);SaveStringsToFile( MyFile, MyText, false);end;{return always true, ac file must be removed}Result := True;end;