Changeset 8996

Show
Ignore:
Timestamp:
08/05/11 17:59:32 (23 months ago)
Author:
sampson
Message:

Updated Windows installer

Location:
branches/Orange-Branch/install-windows
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/install-windows/OrangeFS-Client/Script Files/Setup.Rul

    r8992 r8996  
    2323/* export prototype MyFunction(HWND); */ 
    2424 
    25 prototype InstallServices(); 
     25prototype InstallServices();  
     26prototype InstallDriver(); 
     27 
     28// global variables 
     29 
     30// 64-bit flag 
     31BOOL bIs64Bit; 
     32// Program Files and System directories for appropriate architecture 
     33STRING szProgramFilesDir, szSystemDir; 
    2634 
    2735//--------------------------------------------------------------------------- 
     
    3341function OnBegin() 
    3442begin 
    35         // TO DO: you may change default non-UI setting, for example 
    36         // 
    37         // You may also perform your custom initialization steps, check requirements, etc. 
     43    // Set directory locations based on architecture (32/64-bit) 
     44    bIs64Bit = SYSINFO.bIsWow64; 
     45    if (bIs64Bit) then 
     46        szProgramFilesDir = PROGRAMFILES64; 
     47        szSystemDir = WINSYSDIR64; 
     48    else 
     49        szProgramFilesDir = PROGRAMFILES; 
     50        szSystemDir = WINSYSDIR; 
     51    endif; 
    3852end; 
    3953//--------------------------------------------------------------------------- 
     
    136150    return 0; 
    137151end;                     
    138      
     152 
     153function InstallDriver() 
     154    STRING svExePath; 
     155begin                                                  
     156    svExePath = szProgramFilesDir ^ "\\Dokan\\DokanLibrary\\dokanctl.exe"; 
     157     
     158    LaunchAppAndWait(svExePath, "/i d", LAAW_OPTION_WAIT); 
     159end;     
     160 
    139161function InstallServices() 
    140162    NUMBER rc, line, error; 
     
    145167                               "DokanMounter", 
    146168                               "OrangeFS/Dokan driver interface service", 
    147                                PROGRAMFILES + "\\Dokan\\DokanLibrary\\mounter.exe", 
     169                               szProgramFilesDir ^ "\\Dokan\\DokanLibrary\\mounter.exe", 
    148170                               TRUE, 
    149171                               ""); 
     
    152174            Sprintf(errText, " (%d)", error); 
    153175            MessageBox("DokanMounter service installation failed:\n" + 
    154                         FormatMessage(error) + errText, SEVERE); 
     176                        FormatMessage(error) + errText + " " + 
     177                        szProgramFilesDir + "\\Dokan\\DokanLibrary\\mounter.exe", SEVERE); 
    155178        endif; 
    156179    endif; 
     
    159182                               "OrangeFS Client", 
    160183                               "Allows transparent access to Orange file systems.", 
    161                                INSTALLDIR + "\\orangefs-client -service", 
     184                               INSTALLDIR ^ "\\orangefs-client -service", 
    162185                               FALSE, 
    163186                               ""); 
     
    166189            Sprintf(errText, " (%d)", error); 
    167190            MessageBox("OrangeFS Client service installation failed:\n" + 
    168                         FormatMessage(error) + errText, SEVERE); 
     191                        FormatMessage(error) + errText + " " + 
     192                        INSTALLDIR + "\\orangefs-client -service", SEVERE); 
    169193        endif; 
    170194    endif; 
     
    188212    bOpt2   = FALSE; 
    189213     
    190     InstallServices();     
     214    InstallServices(); 
     215     
     216    InstallDriver();     
    191217 
    192218    if ( BATCH_INSTALL ) then