Merge pull request #24 from Greelan/pz

Add ability for user to add custom Java and server arguments
This commit is contained in:
PhonicUK 2022-01-09 14:55:03 +00:00 committed by GitHub
commit 90117ad56c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 3 deletions

View File

@ -17,9 +17,9 @@ App.BaseDirectory=./project-zomboid/380870/
App.ExecutableWin=380870\jre64\bin\java.exe App.ExecutableWin=380870\jre64\bin\java.exe
App.ExecutableLinux=380870/ProjectZomboid64 App.ExecutableLinux=380870/ProjectZomboid64
App.WorkingDir=380870 App.WorkingDir=380870
App.LinuxCommandLineArgs=-Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m -- App.LinuxCommandLineArgs=-Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m {{CustomJavaArgs}} --
App.WindowsCommandLineArgs=-Djava.awt.headless=true -Dzomboid.znetlog=1 -Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Djava.library.path=natives/;natives/win64/;. -cp java/*;java/ zombie.network.GameServer -statistic 0 -- App.WindowsCommandLineArgs=-Djava.awt.headless=true -Dzomboid.znetlog=1 -Dzomboid.steam={{SteamInt}} -Duser.home=./ -Xmx{{MaxMemory}}m -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Djava.library.path=natives/;natives/win64/;. {{CustomJavaArgs}} -cp java/*;java/ zombie.network.GameServer -statistic 0 --
App.CommandLineArgs={{$PlatformArgs}} -port {{$ApplicationPort1}} -steamport1 {{$ApplicationPort2}} -steamport2 {{$ApplicationPort3}} {{$FormattedArgs}} App.CommandLineArgs={{$PlatformArgs}} -port {{$ApplicationPort1}} -steamport1 {{$ApplicationPort2}} -steamport2 {{$ApplicationPort3}} {{CustomServerArgs}} {{$FormattedArgs}}
App.AppSettings={} App.AppSettings={}
App.EnvironmentVariables={"PATH":"./jre64/bin:%PATH%","LD_LIBRARY_PATH":"./linux64:./natives:./:./jre64/lib/amd64:%LD_LIBRARY_PATH%","LD_PRELOAD":"./jre64/lib/libjsig.so","PZ_CLASSPATH":"java/*;java/","SteamAppId":"108600"} App.EnvironmentVariables={"PATH":"./jre64/bin:%PATH%","LD_LIBRARY_PATH":"./linux64:./natives:./:./jre64/lib/amd64:%LD_LIBRARY_PATH%","LD_PRELOAD":"./jre64/lib/libjsig.so","PZ_CLASSPATH":"java/*;java/","SteamAppId":"108600"}
App.CommandLineParameterFormat=-{0} {1} App.CommandLineParameterFormat=-{0} {1}

View File

@ -54,5 +54,29 @@
"ParamFieldName": "MaxMemory", "ParamFieldName": "MaxMemory",
"IncludeInCommandLine": false, "IncludeInCommandLine": false,
"DefaultValue": "4096" "DefaultValue": "4096"
},
{
"DisplayName": "Additional Java Startup Parameters",
"Category": "Server Settings",
"Description": "Additional Java arguments (not server arguments) as startup parameters that are not otherwise set by AMP. Use with care. Example: -Ddebug",
"Keywords": "custom,java,arguments,parameters",
"FieldName": "CustomJavaArgs",
"InputType": "text",
"IsFlagArgument": false,
"ParamFieldName": "CustomJavaArgs",
"IncludeInCommandLine": false,
"DefaultValue": ""
},
{
"DisplayName": "Additional Server Startup Parameters",
"Category": "Server Settings",
"Description": "Additional server arguments (not Java arguments) as startup parameters that are not otherwise set by AMP. Use with care. Example: -ip 192.168.1.10",
"Keywords": "custom,server,arguments,parameters",
"FieldName": "CustomServerArgs",
"InputType": "text",
"IsFlagArgument": false,
"ParamFieldName": "CustomServerArgs",
"IncludeInCommandLine": false,
"DefaultValue": ""
} }
] ]