Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezfit:clarujust:ezfit_optimizer_clarujust_installation [2009/11/20 09:38]
smayr
ezfit:clarujust:ezfit_optimizer_clarujust_installation [2009/12/24 08:47] (current)
smayr
Line 154: Line 154:
  
 The Clarujust installer should probably check that ezFIT has been installed (by checking the path and version in the Windows registry), and then it can proceed with the installation. The Clarujust installer should probably check that ezFIT has been installed (by checking the path and version in the Windows registry), and then it can proceed with the installation.
- 
 ===== Sample Script ===== ===== Sample Script =====
-This sample script shows how to check if ezFIT (Stand-alone) is installed on the system, and if it is not, then we install it.  It also describes how to get the installation path from the Windows registry.  Please notea similar logic needs to be implemented for the ezFIT for Noah version.+This sample script shows how to check if ezFIT (Stand-alone) is installed on the system, and if it is not, then we install it.  It also describes how to get the installation path from the Windows registry.  Please notea similar logic needs to be implemented to check for ezFIT for Noah version installation, since either can be present in the system.
  
 <code inno> <code inno>
Line 172: Line 171:
  
 [Run] [Run]
-Filename: {src}\ezfit-setup.exe; Description: {cm:LaunchProgram,ezfit.exe}; Flags: skipifdoesntexist; Check: NoValidEzFitExists +Filename: {src}\ezfit-setup.exe; Description: {cm:LaunchProgram,ezfit.exe}; Flags: skipifdoesntexist; Check: NoValidEzFitExists('4.212009121601'
 ... ...
  
Line 181: Line 180:
 function GetEzfitPath(): string; forward; function GetEzfitPath(): string; forward;
 function GetEzfitVersion(): string; forward; function GetEzfitVersion(): string; forward;
-function NoValidEzFitExists(ValidVer: string): Boolean; forward;+function NoValidEzFitExists(ValidVersion: string): Boolean; forward;
 ... ...
  
Line 235: Line 234:
 //  If there is a valid installation, we do not reinstall ezFIT, that is why //  If there is a valid installation, we do not reinstall ezFIT, that is why
 //  we check for no valid install in order to execute ezFIT installer. //  we check for no valid install in order to execute ezFIT installer.
-// parameters : void+// parameters : ValidVersion: string.  Format: V.vvBBBBBBBBBB 
 +//              V = Major version 
 +//              v = Minor version 
 +//              B = Build number 
 +//              Example: 4.212009121601 -> version 4.21, build 2009-12-16 (number 01)
 // return     : T if no valid installation, F if there is a valid installation // return     : T if no valid installation, F if there is a valid installation
 //---------------------------------------------------------------------------- //----------------------------------------------------------------------------
Line 244: Line 247:
 begin begin
   result := False;  // A valid ezFIT install exists already   result := False;  // A valid ezFIT install exists already
-  if GetEzfitPath() <> '' then begin+  if (GetEzfitPath() <> ''then begin
      curVer     := StrToInt(copy(GetEzfitVersion(), 1, 4));      curVer     := StrToInt(copy(GetEzfitVersion(), 1, 4));
-     validVer   := StrToInt(copy(ValidVersion, 1, 4));+     validVer   := StrToInt(copy(ValidVersion,      1, 4));
      curBuild   := StrToInt(copy(GetEzfitVersion(), 5, 10));      curBuild   := StrToInt(copy(GetEzfitVersion(), 5, 10));
-     validBuild := StrToInt(copy(ValidVersion, 5, 10)); +     validBuild := StrToInt(copy(ValidVersion,      5, 10)); 
-     if (curVer< validVer) or (curBuild< validBuild) then begin+     if ((curVer < validVer) or (curBuild < validBuild)) then begin
        result := True;  // No valid ezFIT install exists        result := True;  // No valid ezFIT install exists
      end;      end;