Subversion Repositories factorylink.fl_red

Rev

Blame | Last modification | View Log | Download

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=FactoryLink ISO-TP4 Driver
AppVerName=ISO-TP4 Driver 2.0
DisableStartupPrompt=yes
DirExistsWarning=no
AppPublisher=Wizard Information Systems B.V.
AppPublisherURL=http://www.wizinfosys.nl
AppSupportURL=http://www.wizinfosys.nl
AppUpdatesURL=http://www.wizinfosys.nl
AppVersion=2.0
DefaultDirName={code:GetPrgDir|{pf}\im_bas}
;DefaultGroupName=FactoryLink ISO-TP4 Driver
DisableProgramGroupPage=yes
; uncomment the following line if you want your installation to run on NT 3.51 too.
; MinVersion=4,3.51
Uninstallable=yes
UninstallDisplayIcon={app}\bin\iso_tp4.exe
UninstallDisplayName=FactoryLink ISO-TP4 Driver
;UninstallFilesDir={app}\bin
OutputBaseFilename=SetUp
OutputDir=..\Setup\Fl70
WizardImageFile=WizModernImg06.bmp
LicenseFile=license.txt

[Types]
Name: "full"; Description: "Full installation"
;Name: "compact"; Description: "Compact installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: "main"; Description: "ISO-TP4 Driver"; Types: full custom; Flags: fixed
Name: "iox"; Description: "IO Translator"; Types: full

[Files]
Source: ".\ac\iso_tp4.ac"; DestDir: "{app}\ac"; CopyMode: alwaysoverwrite; Components: main
Source: ".\ctgen\iso_tp4.ctg"; DestDir: "{app}\ctgen"; Components: main
Source: ".\ctgen\iso_tp4.rtm"; DestDir: "{app}\ctgen"; Components: main
Source: ".\flnti\700\iso_tp4.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: main
;Source: ".\flnti\700\windebug\iso_tp4.exe"; DestDir: "{app}\bin"
Source: ".\flnti\700\CnfStack.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: main
;Source: ".\flnti\700\ntxtib.dll"; DestDir: "{app}\bin"
Source: ".\flnti\700\RLDTitle.exe"; DestDir: "{app}\bin"; Flags: uninsneveruninstall; Components: main
Source: ".\help\de\iso_tp4.hlp"; DestDir: "{app}\hlp\de"; Components: main
Source: ".\help\en\iso_tp4.hlp"; DestDir: "{app}\hlp\en"; Components: main
Source: ".\help\fr\iso_tp4.hlp"; DestDir: "{app}\hlp\fr"; Components: main
Source: ".\key\de\iso_tp4.key"; DestDir: "{app}\key\de"; Components: main
Source: ".\key\de\tp4_prio.key"; DestDir: "{app}\key\de"; Components: main
Source: ".\key\de\tp4_type.key"; DestDir: "{app}\key\de"; Components: main
Source: ".\key\en\iso_tp4.key"; DestDir: "{app}\key\en"; Components: main
Source: ".\key\en\tp4_prio.key"; DestDir: "{app}\key\en"; Components: main
Source: ".\key\en\tp4_type.key"; DestDir: "{app}\key\en"; Components: main
Source: ".\key\fr\iso_tp4.key"; DestDir: "{app}\key\fr"; Components: main
Source: ".\key\fr\tp4_prio.key"; DestDir: "{app}\key\fr"; Components: main
Source: ".\key\fr\tp4_type.key"; DestDir: "{app}\key\fr"; Components: main
Source: ".\msg\de\iso_tp4.txt"; DestDir: "{app}\msg\de"; Components: main
Source: ".\msg\de\isotp_ac.txt"; DestDir: "{app}\msg\de"; Components: main
Source: ".\msg\en\iso_tp4.txt"; DestDir: "{app}\msg\en"; Components: main
Source: ".\msg\en\isotp_ac.txt"; DestDir: "{app}\msg\en"; Components: main
Source: ".\msg\fr\iso_tp4.txt"; DestDir: "{app}\msg\fr"; Components: main
Source: ".\msg\fr\isotp_ac.txt"; DestDir: "{app}\msg\fr"; Components: main

Source: "..\..\ioxlator.002\install\ac\ioxlator.ac"; DestDir: "{app}\ac"; CopyMode: alwaysoverwrite; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\ac\ioxlator.acr"; DestDir: "{app}\ac"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\ac\ioxlator.h"; DestDir: "{app}\ac"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\ctgen\ioxlator.ctg"; DestDir: "{app}\ctgen"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\ctgen\ioxlator.rtm"; DestDir: "{app}\ctgen"; Flags: uninsneveruninstall; Components: iox
;Source: "..\..\ioxlator.002\install\flnti\700\ioxlator.exe"; DestDir: "{app}\bin"; Flags: uninsneveruninstall; Components: iox
;Source: "..\..\ioxlator.002\install\flnti\700\windebug\ioxlator.exe"; DestDir: "{app}\bin"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\flnti\700\RLDTitle.exe"; DestDir: "{app}\bin"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\help\de\ioxlator.hlp"; DestDir: "{app}\hlp\de"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\help\en\ioxlator.hlp"; DestDir: "{app}\hlp\en"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\help\fr\ioxlator.hlp"; DestDir: "{app}\hlp\fr"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\key\en\iox_cnv.key"; DestDir: "{app}\key\de"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\key\en\iox_wr.key"; DestDir: "{app}\key\de"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\key\en\iox_cnv.key"; DestDir: "{app}\key\en"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\key\en\iox_wr.key"; DestDir: "{app}\key\en"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\key\en\iox_cnv.key"; DestDir: "{app}\key\fr"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\key\en\iox_wr.key"; DestDir: "{app}\key\fr"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\msg\en\ioxlator.txt"; DestDir: "{app}\msg\de"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\msg\en\iox_ac.txt"; DestDir: "{app}\msg\de"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\msg\en\ioxlator.txt"; DestDir: "{app}\msg\en"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\msg\en\iox_ac.txt"; DestDir: "{app}\msg\en"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\msg\en\ioxlator.txt"; DestDir: "{app}\msg\fr"; Flags: uninsneveruninstall; Components: iox
Source: "..\..\ioxlator.002\install\msg\en\iox_ac.txt"; DestDir: "{app}\msg\fr"; Flags: uninsneveruninstall; Components: iox

;Documentation
Source: "{src}\iso_tp4.pdf";  DestDir: "{app}\..\Documentation\en"; Flags: external skipifsourcedoesntexist; Components: main
Source: "{src}\ioxlator.pdf"; DestDir: "{app}\..\Documentation\en"; Flags: external skipifsourcedoesntexist; Components: iox

;Wizard protection management
Source: ".\opt\wizard.opt"; DestDir: "{app}\opt"; CopyMode: onlyifdoesntexist; Components: main
Source: "{src}\wizard.opt"; DestDir: "{app}"; Flags: deleteafterinstall external; Components: main
Source: "..\..\fl\700\flnti\bin\inst_seq.exe"; DestDir: "{app}"; Flags: deleteafterinstall; Components: main

;Honeywell IPC620 systems
Source: ".\plc\ipc620\*"; DestDir: "{app}\plc\ipc620"; Components: main

;SIEMENS S5 PLC's
Source: ".\plc\s5\*"; DestDir: "{app}\plc\s5"; Components: main

;SIEMENS S7 S300 and S400 range
Source: ".\plc\s7\SinecH1.zip"; DestDir: "{app}\plc\s7"; Components: main

; begin VC system files
; (Note: Scroll to the right to see the full lines!)
;Source: ".\VcRt\asycfilt.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall
;Source: ".\VcRt\atla.dll";     DestName: "atl.dll"; DestDir: "{sys}"; MinVersion: 4, 0; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\atlu.dll";     DestName: "atl.dll"; DestDir: "{sys}"; MinVersion: 0, 4; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\comcat.dll";   DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\mfc42.dll";    DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\mfc42u.dll";   DestDir: "{sys}"; MinVersion: 0, 4; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\msvcirt.dll";  DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall
;Source: ".\VcRt\msvcp60.dll";  DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall
;Source: ".\VcRt\msvcrt.dll";   DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall
;Source: ".\VcRt\oleaut32.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\olepro32.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regserver
;Source: ".\VcRt\stdole2.tlb";  DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall regtypelib
; end VC system files

;Readme file
Source: "Iso-Tp4.txt"; DestDir: "{app}"; Flags: isreadme; Components: main

[Icons]
;Name: "{group}\FactoryLi nk ISO-TP4 Driver"; Filename: "{app}\MyProg.exe"

[Run]                          Check: MyTitles;
Filename: "{app}\bin\acctmgr.exe"; Parameters: "-c -d -v"; Check: MyTitles; Flags: runminimized; StatusMsg: "Update FactoryLink account manager index..."; Components: main
Filename: "{app}\inst_seq.exe"; Parameters: "-MISO_TP4 -S{app}\wizard.opt"; Flags: runminimized; StatusMsg: "Update Wizard protection..."; Components: main
Filename: "{app}\bin\mkhelp.exe"; Flags: runminimized; StatusMsg: "Update FactoryLik help file index..."; Components: main
Filename: "{app}\bin\CnfStack.exe"; Flags: runminimized postinstall unchecked; StatusMsg: "Configuring stack..."; Components: main

[UninstallRun]
Filename: "{app}\bin\RLDTitle.exe"; Parameters: " /REMOVE=iso_tp4"; Flags: runminimized; StatusMsg: "Update FactoryLink account manager index..."; Components: main
Filename: "{app}\bin\acctmgr.exe"; Parameters: "-c -d -v"; Check: RemoveTitle(iso_tp4); Flags: runminimized; StatusMsg: "Update FactoryLink account manager index..."; Components: main

[InstallDelete]

[Messages]
RunEntryShellExec=Yes, I would like to view the README file

[Registry]
Root: HKLM; Subkey: "SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP"; ValueType: String; ValueName: ""; ValueData: "NC_TASKGROUP"; Flags: noerror createvalueifdoesntexist; Components: main
Root: HKLM; Subkey: "SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP"; ValueType: String; ValueName: "Opened Icon"; ValueData: "folderclosed"; Flags: createvalueifdoesntexist; Components: main
Root: HKLM; Subkey: "SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP"; ValueType: String; ValueName: "Closed Icon"; ValueData: "folderopened"; Flags: createvalueifdoesntexist; Components: main
Root: HKLM; Subkey: "SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP"; ValueType: String; ValueName: "Description"; ValueData: "Task Group"; Flags: createvalueifdoesntexist; Components: main
Root: HKLM; Subkey: "SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP"; ValueType: String; ValueName: "TG_CAPTION Device Interfaces"; ValueData: "Device Interfaces"; Flags: createvalueifdoesntexist; Components: main
Root: HKLM; Subkey: "SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP"; ValueType: String; ValueName: "Task Group Device Interfaces"; ValueData: "{code:GetDriverString}"; Components: main

[Code]
var
  DriverList: String;
  TaskName: String;

function InitializeSetup(): Boolean;
begin

  TaskName := 'iso_tp4';

  RegQueryStringValue(HKLM, 'SOFTWARE\USDATA\FactoryLink\Configuration Explorer\Menus\Node Classes\NC_TASKGROUP', 'Task Group Drivers', DriverList);

  if (DriverList = '') then begin
  
    DriverList := 'scale,ioxlator,edi_dev,te__,mbus,modp,mbustcp,sqrd,ab__,ab__rapd,netdtl,ktdtl,gene,asyn,omrn,sdrv,siem,h1mp,ti__,omux,ov60,mist,ldnr,t405,reli,gem_,dan2,eibi,apac2,bn90,dmod,es__,moor,rocm,tmdm,rmdm,hdp_rocm,bris,profibus,sinec_h1,s_3964r,stple,stplcnfg';
  end;

  if (Pos(TaskName,  DriverList) = 0) then begin
  
    DriverList := DriverList + ',' + TaskName;
  end;
  
  Result := True;
end;

function GetDriverString(DefaultInput: String): String;
begin
  { Return the driver list }
  Result := DriverList;
end;

{Read the FactoryLink directory from the autostart service program location,
 using the environment variable FLINK will result in a directory with
 short names. By using the autostart server the long names are found, and
 the setup progam will use these names instead of the notation in short}
function GetPrgDir(S: String): String;
var
  MyDir: String;
begin

  {read the autostart service directory, filename and extension}
  RegQueryStringValue( HKEY_LOCAL_MACHINE, 'System\CurrentControlSet\Services\FactoryLink Autostart Service', 'ImagePath', MyDir);

  {remove the filename and last '\' character}
  MyDir := ExtractFileDir( MyDir);

  {now the bin subdir is removed.....}
  MyDir := ExtractFileDir( MyDir);

  {return default in case no directory is found}
  if (Length( MyDir) <= 0) then begin
    MyDir := 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 line
 to the CTlist file. The taskname and ct-line are specified in the
 function-parameter: taskname,ct-line}
function AddTitle( MyEntry: String): Boolean;
var
  MyText: TArrayOfString;
  MyFile: String;
  MyAC: String;
  MyCT: String;
  k: Integer;
  found: Integer;
begin

  {first file to load is th etitles file in the AC directory}
  MyFile := GetPrgDir( '') + '\ac\titles';
  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);

  {search for ac entry}
  found := 0;
  k := 0;
  while (k < GetArrayLength(MyText)) and (found = 0) do begin

    found := 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 begin

    SetArrayLength(MyText, GetArrayLength(MyText)+1);
    MyText[ GetArrayLength(MyText)-1] := MyAC;
    SaveStringsToFile( MyFile, MyText, false);
  end;

  {add entry to ctlist file}
  MyFile := GetPrgDir( '') + '\ctgen\ctlist';
  LoadStringsFromFile( MyFile, MyText);

  {search for ctgen entry}
  found := 0;
  k := 0;
  while (k < GetArrayLength(MyText)) and (found = 0) do begin

    found := 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 begin

    SetArrayLength(MyText, GetArrayLength(MyText)+1);
    MyText[ GetArrayLength(MyText)-1] := MyCT;
    SaveStringsToFile( MyFile, MyText, false);
  end;

  {return always true, ac file must be installed, this function
   only adds a line to the titles file}
  Result := True;
end;

{Remove a AC line for the current task in the titles file, and remove
 a line in the CTlist file the entry is specified with the task name
 in the function-parameter}
function RemoveTitle( MyEntry: String): Boolean;
var
  MyText: TArrayOfString;
  MyFile: String;
  MyAC: String;
  MyCT: String;
  Temp: String;
  k: Integer;
  found: Integer;
begin

  MyAC := MyEntry + '.ac';
  MyCT := MyEntry + ':';

  {search the task name in the ctlist file}
  MyFile := GetPrgDir( '') + '\ctgen\ctlist';
  SetArrayLength( MyText, 0);
  LoadStringsFromFile( MyFile, MyText);

  {search for the task name}
  for k:=0 to GetArrayLength(MyText)-1 do begin

    Temp := MyText[ k];
    if (found = 0) then
      found := Pos( MyCT, MyText[ k]);

    {if the entry is found, remove the line from the titles file}
    if (found <> 0) then begin

      if ((k+1) < GetArrayLength(MyText)) then begin

        MyText[ 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';
  LoadStringsFromFile( MyFile, MyText);
  found := 0;

  {search for the task name}
  for k:=0 to GetArrayLength(MyText)-1 do begin

    Temp := MyText[ k];
    if (found = 0) then
      found := Pos( MyAC, MyText[ k]);

    {if the entry is found, remove the line from the titles file}
    if (found <> 0) then begin

      if ((k+1) < GetArrayLength(MyText)) then begin

        MyText[ 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;

{Add both task entries in TITLES en CTLIST file}
function MyTitles(): Boolean;
begin
  AddTitle( 'iso_tp4,iso_tp4m iso_tp4x iso_tp4p iso_tp4d')
  AddTitle( 'ioxlator,ioxlatet ioxlated ioxlatep ioxlatem');
  Result := True;
end;