Commit | Line | Data |
---|---|---|
00b8b122 AK |
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] | |
7bc443f8 AK |
14 | var |
15 | DetailsPage : TInputQueryWizardPage; | |
16 | ||
417408e5 | 17 | Procedure InitializeWizard; |
7bc443f8 AK |
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 | ||
417408e5 | 27 | Function GetJettyPort(Param: String): String; |
7bc443f8 AK |
28 | begin |
29 | result := DetailsPage.Values[0]; | |
30 | end; | |
31 | ||
00b8b122 AK |
32 | Function GenerateInstallParameters(Param: String): String; |
33 | var | |
34 | strJvmArgument: String; | |
35 | begin | |
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); *) | |
48 | end; | |
8a6ae353 | 49 |