Changeset 4051 for trunk/scripts

Show
Ignore:
Timestamp:
01/26/08 07:52:26 (12 months ago)
Author:
pmoura
Message:

Updated the Windows installer to check for an outdated Logtalk user directory.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/scripts/windows/logtalk.iss

    r4050 r4051  
    162162 
    163163procedure InitializeWizard; 
     164var 
     165  Version, InstalledVersion: Cardinal; 
     166  LOGTALKHOME: String; 
    164167begin 
    165168  Explanation := 'Select the folder in which Setup should install Logtalk user data files, then click Next.' 
     
    185188    WarningPage := CreateOutputMsgPage(wpWelcome, 
    186189  'Information', 'Please read the following important information before continuing.', Warning); 
     190  end; 
     191  if RegQueryDWordValue(HKLM, 'Software\Logtalk\', 'Version', Version) then 
     192    InstalledVersion := Version 
     193  else if RegQueryStringValue(HKLM, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment\', 'LOGTALKHOME', LOGTALKHOME) and DirExists(LOGTALKHOME) then 
     194    InstalledVersion := 0 
     195  else 
     196    InstalledVersion := -1; 
     197  if IsAdminLoggedOn and (InstalledVersion >= 0) and (InstalledVersion < 2313) then 
     198  begin 
     199    Warning := 'You have an older version of Logtalk installed whose configuration files are incompatible with this new version (configuration files are stored in your Logtalk user data folder).' 
     200               + Chr(13) + Chr(13) 
     201               + 'You must updade your Logtalk user data folder by performing a full installation.' 
     202               + Chr(13) + Chr(13) 
     203               + 'All aditional Logtalk users on your computer must also use this installer to update their Logtalk user data folders.'; 
     204    WarningPage := CreateOutputMsgPage(wpWelcome, 
     205  'Warning', 'Logtalk user data folder update required.', Warning); 
    187206  end 
    188207end;