nxhttpd traces removed
[public/netxms.git] / src / install / windows / common.iss
CommitLineData
b260e88e
VK
1[Dirs]\r
2Name: "{app}\etc"\r
3Name: "{app}\database"\r
4Name: "{app}\var\backgrounds"\r
5Name: "{app}\var\images"\r
6Name: "{app}\var\packages"\r
7Name: "{app}\var\shared"\r
8\r
9[Registry]\r
69f5e9af
VK
10Root: HKLM; Subkey: "Software\NetXMS"; Flags: uninsdeletekeyifempty; Components: server\r
11Root: HKLM; Subkey: "Software\NetXMS\Server"; Flags: uninsdeletekey; Components: server\r
12Root: HKLM; Subkey: "Software\NetXMS\Server"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Components: server\r
b260e88e
VK
13Root: HKLM; Subkey: "Software\NetXMS\Server"; ValueType: string; ValueName: "ConfigFile"; ValueData: "{app}\etc\netxmsd.conf"; Components: server\r
14\r
15[Run]\r
ea50695d
VK
16Filename: "{app}\var\rm.exe"; Parameters: "-f ""{app}\bin\*.manifest"""; WorkingDir: "{app}\bin"; StatusMsg: "Removing old manifest files..."; Flags: runhidden\r
17Filename: "{app}\var\rm.exe"; Parameters: "-rf ""{app}\bin\Microsoft.VC80.*"""; WorkingDir: "{app}\var"; StatusMsg: "Removing old CRT files..."; Flags: runhidden\r
18Filename: "{app}\var\rm.exe"; Parameters: "-rf ""{app}\lib\ndd\Microsoft.VC80.CRT"""; WorkingDir: "{app}\var"; StatusMsg: "Removing old CRT files..."; Flags: runhidden\r
aa6875b7 19Filename: "{app}\var\vcredist.exe"; WorkingDir: "{app}\var"; StatusMsg: "Installing Visual C++ runtime..."; Flags: waituntilterminated\r
b260e88e
VK
20Filename: "{app}\bin\nxmibc.exe"; Parameters: "-z -d ""{app}\var\mibs"" -o ""{app}\var\mibs\netxms.mib"""; WorkingDir: "{app}\bin"; StatusMsg: "Compiling MIB files..."; Flags: runhidden; Components: server\r
21Filename: "{app}\bin\nxconfig.exe"; Parameters: "--create-agent-config"; WorkingDir: "{app}\bin"; StatusMsg: "Creating agent's configuration file..."; Components: server\r
22Filename: "{app}\bin\nxagentd.exe"; Parameters: "-c ""{app}\etc\nxagentd.conf"" -I"; WorkingDir: "{app}\bin"; StatusMsg: "Installing agent service..."; Flags: runhidden; Components: server\r
23Filename: "{app}\bin\nxagentd.exe"; Parameters: "-s"; WorkingDir: "{app}\bin"; StatusMsg: "Starting agent service..."; Flags: runhidden; Components: server\r
24Filename: "{app}\bin\nxconfig.exe"; Parameters: "--configure-if-needed"; WorkingDir: "{app}\bin"; StatusMsg: "Running server configuration wizard..."; Components: server\r
25Filename: "{app}\bin\nxdbmgr.exe"; Parameters: "-c ""{app}\etc\netxmsd.conf"" upgrade"; WorkingDir: "{app}\bin"; StatusMsg: "Upgrading database..."; Flags: runhidden; Components: server\r
26Filename: "{app}\bin\netxmsd.exe"; Parameters: "--check-service"; WorkingDir: "{app}\bin"; StatusMsg: "Checking core service configuration..."; Flags: runhidden; Components: server\r
27Filename: "{app}\bin\netxmsd.exe"; Parameters: "-s"; WorkingDir: "{app}\bin"; StatusMsg: "Starting core service..."; Flags: runhidden; Components: server\r
b260e88e
VK
28\r
29[UninstallRun]\r
b260e88e
VK
30Filename: "{app}\bin\netxmsd.exe"; Parameters: "-S"; StatusMsg: "Stopping core service..."; RunOnceId: "StopCoreService"; Flags: runhidden; Components: server\r
31Filename: "{app}\bin\netxmsd.exe"; Parameters: "-R"; StatusMsg: "Uninstalling core service..."; RunOnceId: "DelCoreService"; Flags: runhidden; Components: server\r
32Filename: "{app}\bin\nxagentd.exe"; Parameters: "-S"; StatusMsg: "Stopping agent service..."; RunOnceId: "StopAgentService"; Flags: runhidden; Components: server\r
33Filename: "{app}\bin\nxagentd.exe"; Parameters: "-R"; StatusMsg: "Uninstalling agent service..."; RunOnceId: "DelAgentService"; Flags: runhidden; Components: server\r
34\r
35[Code]\r
36Var\r
37 HttpdSettingsPage: TInputQueryWizardPage;\r
38 flagStartConsole: Boolean;\r
39\r
40Function InitializeSetup(): Boolean;\r
41Var\r
42 i, nCount : Integer;\r
43 param : String;\r
44Begin\r
45 // Set default values for flags\r
46 flagStartConsole := FALSE;\r
47\r
48 // Parse command line parameters\r
49 nCount := ParamCount;\r
50 For i := 1 To nCount Do Begin\r
51 param := ParamStr(i);\r
52\r
53 If Pos('/RUNCONSOLE', param) = 1 Then Begin\r
54 flagStartConsole := TRUE;\r
55 End;\r
56 End;\r
57 \r
58 Result := TRUE;\r
59End;\r
60\r
61Procedure DeinitializeSetup;\r
62Var\r
63 strExecName: String;\r
64 iResult: Integer;\r
65Begin\r
66 If flagStartConsole Then Begin\r
67 strExecName := ExpandConstant('{app}\bin\nxcon.exe');\r
68 If FileExists(strExecName) Then\r
69 Begin\r
70 Exec(strExecName, '', ExpandConstant('{app}\bin'), SW_SHOW, ewNoWait, iResult);\r
71 End;\r
72 End;\r
73End;\r
74\r
75Procedure StopAllServices;\r
76Var\r
77 iResult: Integer;\r
78Begin\r
79 Exec('net.exe', 'stop NetXMSCore', ExpandConstant('{app}\bin'), 0, ewWaitUntilTerminated, iResult);\r
b260e88e
VK
80 Exec('net.exe', 'stop NetXMSAgentdW32', ExpandConstant('{app}\bin'), 0, ewWaitUntilTerminated, iResult);\r
81End;\r
82\r
83Procedure InitializeWizard;\r
84Begin\r
85 HttpdSettingsPage := CreateInputQueryPage(wpSelectTasks,\r
86 'Select Master Server', 'Where is master server for web interface?',\r
87 'Please enter host name or IP address of NetXMS master server. NetXMS web interface you are installing will provide connectivity to that server.');\r
88 HttpdSettingsPage.Add('NetXMS server:', False);\r
89 HttpdSettingsPage.Values[0] := GetPreviousData('MasterServer', 'localhost');\r
90End;\r
91\r
92Procedure RegisterPreviousData(PreviousDataKey: Integer);\r
93Begin\r
94 SetPreviousData(PreviousDataKey, 'MasterServer', HttpdSettingsPage.Values[0]);\r
95End;\r
96\r
97Function ShouldSkipPage(PageID: Integer): Boolean;\r
98Begin\r
99 If PageID = HttpdSettingsPage.ID Then\r
100 Result := not IsComponentSelected('websrv')\r
101 Else\r
102 Result := False;\r
103End;\r
104\r
105Function GetMasterServer(Param: String): String;\r
106Begin\r
107 Result := HttpdSettingsPage.Values[0];\r
108End;\r