fixed (?) incorrect handling of target directory with spaces
[public/netxms.git] / src / install / windows / common-webui.iss
1 [Components]
2 Name: "webui"; Description: "Web Interface"; Types: full compact custom; Flags: fixed
3 Name: "jre"; Description: "Java Runtime Environment"; Types: full
4
5 [Run]
6 Filename: {app}\WebUI\prunsrv.exe; Parameters: "//IS/nxWebUI {code:GenerateInstallParameters}"; WorkingDir: "{app}\WebUI"; StatusMsg: "Installing WebUI service..."; Flags: runhidden
7 Filename: {app}\WebUI\prunsrv.exe; Parameters: "//ES//nxWebUI"; WorkingDir: "{app}\WebUI"; StatusMsg: "Starting WebUI service..."; Flags: runhidden
8
9 [UninstallRun]
10 Filename: {app}\WebUI\prunsrv.exe; Parameters: "//SS//nxWebUI"; WorkingDir: "{app}\WebUI"; StatusMsg: "Stopping WebUI service..."; Flags: runhidden
11 Filename: {app}\WebUI\prunsrv.exe; Parameters: "//DS//nxWebUI"; WorkingDir: "{app}\WebUI"; StatusMsg: "Removing WebUI service..."; Flags: runhidden
12
13 [Code]
14 var
15 DetailsPage : TInputQueryWizardPage;
16
17 Procedure InitializeWizard;
18 begin
19 DetailsPage := CreateInputQueryPage(wpSelectComponents,
20 'Server Settings',
21 'Web interface server server settings',
22 'Please check default settings and adjust them if required');
23 DetailsPage.Add('Port:', False);
24 DetailsPage.Values[0] := '8787';
25 end;
26
27 Function GetJettyPort(Param: String): String;
28 begin
29 result := DetailsPage.Values[0];
30 end;
31
32 Function GenerateInstallParameters(Param: String): String;
33 var
34 strJvmArgument: String;
35 begin
36 strJvmArgument := ExpandConstant('--DisplayName="NetXMS WebUI" --Description="NetXMS Web Interface (jetty)" --Install="{app}\WebUI\prunsrv.exe" --LogPath="{app}\WebUI\logs" --LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=jvm --StopMode=jvm --Jvm=auto ++JvmOptions=-Djetty.home="{app}\WebUI" ++JvmOptions=-DSTOP.PORT=8087 ++JvmOptions=-DSTOP.KEY=downB0y ++JvmOptions=-Djetty.logs="{app}\WebUI\logs" ++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true ++JvmOptions=-XX:MaxPermSize=128M ++JvmOptions=-XX:+CMSClassUnloadingEnabled ++JvmOptions=-XX:+CMSPermGenSweepingEnabled --Classpath="{app}\WebUI\start.jar" --StartClass=org.eclipse.jetty.start.Main ++StartParams=OPTIONS=All ++StartParams="{app}\WebUI\etc\jetty.xml" ++StartParams="{app}\WebUI\etc\jetty-deploy.xml" ++StartParams="{app}\WebUI\etc\jetty-contexts.xml" --StopClass=org.eclipse.jetty.start.Main ++StopParams=--stop')
37
38 if IsComponentSelected('jre') then
39 begin
40 strJvmArgument := strJvmArgument + ExpandConstant(' --Jvm="{app}\bin\jre\bin\server\jvm.dll"');
41 end;
42
43 strJvmArgument := strJvmArgument + ' ++JvmOptions=-Djetty.port=' + GetJettyPort('');
44
45 Result := strJvmArgument;
46
47 (* MsgBox(strJvmArgument, mbInformation, MB_OK); *)
48 end;
49