(file) Return to OpenPegasus.iss CVS log (file) (dir) Up to [Pegasus] / pegasus / installs / InnoSetup

  1 se.gupta 1.1 ; Script generated by the Inno Setup Script Wizard.
  2              ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3              
  4              ; define the macros for repository directory and the namespaces here.
  5              
  6              #define REPOSITORY "'repository'"
  7              #define NS_PG_INTERNAL "'root/PG_Internal'"
  8 anusha.kandepu 1.2 
  9                    ifeq ($(PEGASUS_INTEROP_NAMESPACE),root/interop)
 10                    #define NS_PG_INTEROP  "'root/interop'"
 11                    else
 12                    ifeq ($(PEGASUS_INTEROP_NAMESPACE),interop)
 13                    #define NS_PG_INTEROP  "'interop'"
 14                    else
 15 se.gupta       1.1 #define NS_PG_INTEROP  "'root/PG_InterOp'"
 16 anusha.kandepu 1.2 endif
 17                    endif
 18                    
 19 se.gupta       1.1 #define NS_CIMV2 "'root/cimv2'"
 20                    
 21                    ; define the Schema version to be used for building up the repository.
 22                    #define VER "'27'"
 23                    
 24                    ; define the OpenPegasus version for the installable
 25                    #define OPEN_PEGASUS_VERSION "2.4"
 26                    
 27                    #define SystemRootdir  ReadReg(HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","SystemRoot")
 28                    #define PegasusRootDir GetEnv('PEGASUS_HOME')
 29                    
 30                    
 31                    [Registry]
 32                    Root: HKLM; Subkey: "Software\OpenPegasus"; Flags: createvalueifdoesntexist uninsdeletekey
 33                    Root: HKLM; Subkey: "Software\OpenPegasus"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"
 34                    Root: HKLM; Subkey: "Software\OpenPegasus"; ValueType: string; ValueName: "Version"; ValueData: "{#OPEN_PEGASUS_VERSION}"
 35                    Root: HKLM; Subkey: SYSTEM\CurrentControlSet\Control\Session Manager\Environment;ValueType: expandsz; ValueName: Path; ValueData: "{reg:HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment,Path};{app}\OpenPegasus\bin"
 36                    
 37                    [Setup]
 38                    AppName=OpenPegasus
 39                    AppVerName=OpenPegasus {#OPEN_PEGASUS_VERSION}
 40 se.gupta       1.1 AppPublisher=Open Pegasus Community
 41                    AppPublisherURL=http://www.openpegasus.org
 42                    AppSupportURL=http://www.openpegasus.org
 43                    AppUpdatesURL=http://www.openpegasus.org
 44                    DefaultDirName={pf}\OpenPegasus
 45                    DefaultGroupName=OpenPegasus
 46                    
 47                    [Files]
 48                    Source: "{#PegasusRootDir}\bin\cimserver.exe" ; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 49                    Source: "{#PegasusRootDir}\bin\UserAuthProvider.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 50                    Source: "{#PegasusRootDir}\bin\pegCLIClientLib.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 51                    Source: "{#PegasusRootDir}\bin\pegclient.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 52                    Source: "{#PegasusRootDir}\bin\pegcliutils.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 53                    Source: "{#PegasusRootDir}\bin\pegcommon.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 54                    Source: "{#PegasusRootDir}\bin\pegcompiler.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 55                    Source: "{#PegasusRootDir}\bin\pegconfig.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 56                    Source: "{#PegasusRootDir}\bin\pegexportclient.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 57                    Source: "{#PegasusRootDir}\bin\pegexportserver.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 58                    Source: "{#PegasusRootDir}\bin\peggetoopt.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 59                    Source: "{#PegasusRootDir}\bin\peghandlerservice.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 60                    Source: "{#PegasusRootDir}\bin\pegindicationservice.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 61 se.gupta       1.1 Source: "{#PegasusRootDir}\bin\peglistener.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 62                    Source: "{#PegasusRootDir}\bin\pegprm.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 63                    Source: "{#PegasusRootDir}\bin\pegprovider.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 64                    Source: "{#PegasusRootDir}\bin\pegprovidermanager.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 65                    Source: "{#PegasusRootDir}\bin\pegrepository.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 66                    Source: "{#PegasusRootDir}\bin\pegserver.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 67                    Source: "{#PegasusRootDir}\bin\peguser.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 68                    Source: "{#PegasusRootDir}\bin\pegwql.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 69                    Source: "{#PegasusRootDir}\bin\ProviderRegistrationProvider.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 70                    Source: "{#PegasusRootDir}\bin\pegauthentication.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 71                    Source: "{#PegasusRootDir}\bin\OSProvider.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 72                    Source: "{#PegasusRootDir}\bin\ConfigSettingProvider.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 73                    Source: "{#PegasusRootDir}\bin\NamespaceProvider.dll"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 74                    ; System files
 75                    Source: "{#SystemRootdir}\system32\msvcp71.dll"; DestDir: "{app}\OpenPegasus\bin"; Check: MSVCPlusPlusDotNetInstalled
 76                    Source: "{#SystemRootdir}\system32\msvcr71.dll"; DestDir: "{app}\OpenPegasus\bin"; Check: MSVCPlusPlusDotNetInstalled
 77                    ; With the above files cimserver runs
 78                    
 79                    ; This is for schemas
 80                    Source: "{#PegasusRootDir}\Schemas\*.*"; DestDir: "{app}\OpenPegasus\Schemas"; Flags: ignoreversion recursesubdirs
 81                    ;Other seven CIMServer Utilities
 82 se.gupta       1.1 Source: "{#PegasusRootDir}\bin\cimmof.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 83                    Source: "{#PegasusRootDir}\bin\cimmofl.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 84                    Source: "{#PegasusRootDir}\bin\cimauth.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 85                    Source: "{#PegasusRootDir}\bin\cimprovider.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 86                    Source: "{#PegasusRootDir}\bin\cimconfig.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 87                    Source: "{#PegasusRootDir}\bin\cimuser.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 88                    
 89                    ; The following are the test clients, to add more clients to your installable, refer to commented lines below.
 90                    Source: "{#PegasusRootDir}\bin\CLI.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 91                    ;Source: "{#PegasusRootDir}\bin\WebClient.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 92                    ;Source: "{#PegasusRootDir}\bin\wbemexec.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 93                    ;Source: "{#PegasusRootDir}\bin\CGIClient.exe"; DestDir: "{app}\OpenPegasus\bin"; Flags: ignoreversion
 94                    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
 95                    
 96                    ; The following are optional sections for future usage. Refer to help file of Inno Setup for help on these sections.
 97                    [InstallDelete]
 98                    
 99                    [INI]
100                    
101                    [Tasks]
102                    
103 se.gupta       1.1 [Icons]
104                    
105                    [Run]
106                    ; NOTE: The following entry contains an English phrase ("Launch"). You are free to translate it into another language if required.
107                    Filename: "{app}\OpenPegasus\bin\cimserver.exe"; Parameters: " -install"; BeforeInstall: InformUser; Check: CIMServerAsWINService
108                    Filename: "{app}\OpenPegasus\bin\cimserver.exe"; Parameters: " -start"; Check: CIMServerAsWINService; AfterInstall: BuildRepository
109                    Filename: "{app}\OpenPegasus\bin\cimserver.exe"; Parameters: " "; Flags: nowait; BeforeInstall: InformUser; Check: CIMServerAsAnExe; AfterInstall: BuildRepository
110                    
111                    [UninstallDelete]
112                    Type: filesandordirs; Name: "{app}\OpenPegasus"
113                    
114                    [UninstallRun]
115                    Filename: "{app}\OpenPegasus\bin\cimserver.exe"; Parameters: " -stop"; Check: CIMServiceExists
116                    Filename: "{app}\OpenPegasus\bin\cimserver.exe"; Parameters: " -remove" ; Check: CIMServiceExists
117                    
118                    ; If the user chooses not to install cimserver as a windows service, then we give a wait of 10000 milliseconds
119                    ; so that before the repository starts getting builded , cimserver is started. CIMMOFL doesn't seem to help here.
120                    [Code]
121                    
122                    var
123                      Cimservice: Boolean;
124 se.gupta       1.1 
125                    procedure InformUser();
126                    begin
127                    MsgBox('There will be a series of Dos prompts opening and closing before the installation finishes, this may take some time.',mbInformation,MB_OK);
128                    end;
129                    
130                    procedure BuildRepository();
131                    var
132                    appPath, params,dirname,filename,cimmof : String;
133                    resultCode: Integer;
134                    begin
135                    appPath := ExpandConstant('{app}') + '\OpenPegasus';
136                    cimmof := appPath + '\bin\cimmof.exe';
137                    AddQuotes(cimmof);
138                    
139                    if not Cimservice then
140                       MsgBox('Please wait until Cimserver starts (Cmd prompt will show "Cimserver 2.4 , started".',mbInformation,MB_OK);
141                    
142                    dirname := appPath + '\Schemas\CIM' + {#VER};
143                    filename := appPath+ '\Schemas\CIM' + {#VER} + '\Core' + {#VER}+'_Qualifiers.mof';
144                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_PG_INTERNAL} + '  ' + AddQuotes(filename);
145 se.gupta       1.1 InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
146                    
147                    dirname := appPath + '\Schemas\Pegasus\Internal\VER20';
148                    filename := appPath+ '\Schemas\Pegasus\Internal\VER20\PG_InternalSchema20.mof';
149                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_PG_INTERNAL} + '  ' + AddQuotes(filename);
150                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
151                    
152                    dirname := appPath + '\Schemas\CIM' + {#VER};
153                    filename := appPath+ '\Schemas\CIM' + {#VER} + '\CIM_Core' + {#VER}+'.mof';
154                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_PG_INTEROP} + '  ' + AddQuotes(filename);
155                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
156                    
157                    dirname := appPath + '\Schemas\CIM' + {#VER};
158                    filename := appPath+ '\Schemas\CIM' + {#VER} + '\CIM_Event' + {#VER}+'.mof';
159                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_PG_INTEROP} + '  ' + AddQuotes(filename);
160                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
161                    
162                    dirname := appPath + '\Schemas\Pegasus\InterOP\VER20';
163                    filename := appPath+ '\Schemas\Pegasus\InterOp\VER20\PG_InterOpSchema20.mof';
164                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_PG_INTEROP} + '  ' + AddQuotes(filename);
165                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
166 se.gupta       1.1 
167                    dirname := appPath + '\Schemas\CIM' + {#VER};
168                    filename := appPath+ '\Schemas\CIM' + {#VER} + '\CIM_Schema' + {#VER}+'.mof';
169                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_CIMV2} + '  ' + AddQuotes(filename);
170                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
171                    
172                    dirname := appPath + '\Schemas\Pegasus\ManagedSystem\VER20';
173                    filename := appPath+ '\Schemas\Pegasus\ManagedSystem\VER20\PG_ManagedSystemSchema20.mof';
174                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_CIMV2} + '  ' + AddQuotes(filename);
175                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
176                    
177                    dirname := appPath + '\Schemas\Pegasus\ManagedSystem\VER20';
178                    filename := appPath+ '\Schemas\Pegasus\ManagedSystem\VER20\PG_ManagedSystemSchema20R.mof';
179                    params := ' -R  ' + {#REPOSITORY} + ' -I  ' + AddQuotes(dirname) +' -n  ' + {#NS_PG_INTEROP} + '  ' + AddQuotes(filename);
180                    InstExec(cimmof,params, appPath, True, False, SW_SHOWNORMAL, resultCode);
181                    
182                    end;
183                    
184                    function InitializeSetup(): Boolean;
185                    var
186                    OpenPegasusFound: Boolean;
187 se.gupta       1.1 str : String;
188                    begin
189                    str :=  'SOFTWARE\OpenPegasus';
190                    OpenPegasusFound := RegKeyExists(HKLM,str);
191                    if not OpenPegasusFound then
192                    begin
193                      Result := True
194                      Cimservice := MsgBox('Would you like to install OpenPegasus as a Windows Service', mbConfirmation, MB_YESNO) = idYes;
195                    end
196                    else
197                    begin
198                       MsgBox('OpenPegasus is already installed , please uninstall the old version first.(Setup will exit)',mbInformation,MB_OK);
199                       Result := False;
200                    end
201                    end;
202                    
203                    function NeedRestart(): Boolean;
204                    begin
205                      Result := True
206                    end;
207                    
208 se.gupta       1.1 function MSVCPlusPlusDotNetInstalled(): Boolean;
209                    begin
210                    Result := True;
211                    if FileExists(ExpandConstant('{#SystemRootDir}\System32\msvcp71.dll')) then
212                      begin
213                        if FileExists(ExpandConstant('{#SystemRootDir}\System32\msvcp71.dll')) then
214                          begin
215                            Result := False;
216                          end;
217                      end;
218                    end;
219                    
220                    function CIMServerAsWINService: Boolean;
221                    begin
222                    Result := Cimservice;
223                    end;
224                    
225                    function CIMServerAsAnExe: Boolean;
226                    begin
227                      Result := False;
228                    if not Cimservice then
229 se.gupta       1.1 begin
230                      Result := True;
231                    end;
232                    end;
233                    
234                    function CIMServiceExists:Boolean;
235                    begin
236                      Result := False;
237                    if Cimservice then
238                    begin
239                      Result := True;
240                    end;
241                    end;
242                    
243                    
244                    
245                    
246                    
247                    
248                    
249                    
250 se.gupta       1.1 
251                    

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2