fixed (?) incorrect handling of target directory with spaces
[public/netxms.git] / src / install / windows / common-webui.iss
CommitLineData
00b8b122
AK
1[Components]
2Name: "webui"; Description: "Web Interface"; Types: full compact custom; Flags: fixed
3Name: "jre"; Description: "Java Runtime Environment"; Types: full
4
5[Run]
6Filename: {app}\WebUI\prunsrv.exe; Parameters: "//IS/nxWebUI {code:GenerateInstallParameters}"; WorkingDir: "{app}\WebUI"; StatusMsg: "Installing WebUI service..."; Flags: runhidden
7Filename: {app}\WebUI\prunsrv.exe; Parameters: "//ES//nxWebUI"; WorkingDir: "{app}\WebUI"; StatusMsg: "Starting WebUI service..."; Flags: runhidden
8
9[UninstallRun]
10Filename: {app}\WebUI\prunsrv.exe; Parameters: "//SS//nxWebUI"; WorkingDir: "{app}\WebUI"; StatusMsg: "Stopping WebUI service..."; Flags: runhidden
11Filename: {app}\WebUI\prunsrv.exe; Parameters: "//DS//nxWebUI"; WorkingDir: "{app}\WebUI"; StatusMsg: "Removing WebUI service..."; Flags: runhidden
12
13[Code]
7bc443f8
AK
14var
15 DetailsPage : TInputQueryWizardPage;
16
417408e5 17Procedure InitializeWizard;
7bc443f8
AK
18begin
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';
25end;
26
417408e5 27Function GetJettyPort(Param: String): String;
7bc443f8
AK
28begin
29 result := DetailsPage.Values[0];
30end;
31
00b8b122
AK
32Function GenerateInstallParameters(Param: String): String;
33var
34 strJvmArgument: String;
35begin
8a6ae353 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')
00b8b122
AK
37
38 if IsComponentSelected('jre') then
39 begin
7bc443f8 40 strJvmArgument := strJvmArgument + ExpandConstant(' --Jvm="{app}\bin\jre\bin\server\jvm.dll"');
00b8b122 41 end;
7bc443f8 42
417408e5 43 strJvmArgument := strJvmArgument + ' ++JvmOptions=-Djetty.port=' + GetJettyPort('');
7bc443f8 44
00b8b122
AK
45 Result := strJvmArgument;
46
47 (* MsgBox(strJvmArgument, mbInformation, MB_OK); *)
48end;
8a6ae353 49