浏览代码

BETA: Minor update/format in few bat files, also removed unused/non-working power shell scripts.

MELERIX 12 年之前
父节点
当前提交
05a435bd77

+ 21 - 13
L2J_Server_BETA/dist/game/startGameServer.bat

@@ -1,29 +1,37 @@
 @echo off
 title Game Server Console
+
 :start
 echo Starting L2J Game Server.
 echo.
-REM -------------------------------------
-REM Default parameters for a basic server.
+
 java -Djava.util.logging.manager=com.l2jserver.util.L2LogManager -Xms1024m -Xmx1024m -cp ./../libs/*;l2jserver.jar com.l2jserver.gameserver.GameServer
-REM
-REM If you have a big server and lots of memory, you could experiment for example with
-REM java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts
-REM -------------------------------------
-if ERRORLEVEL 2 goto restart
+
+REM NOTE: If you have a powerful machine, you could modify/add some extra parameters for performance, like:
+REM -Xms1536m
+REM -Xmx3072m
+REM -XX:+AggressiveOpts
+REM Use this parameters carefully, some of them could cause abnormal behavior, deadlocks, etc.
+REM More info here: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
+
 if ERRORLEVEL 1 goto error
+if ERRORLEVEL 2 goto restart
 goto end
-:restart
+
+:error
 echo.
-echo Admin Restart ...
+echo Game Server Terminated Abnormally!
 echo.
-goto start
-:error
+goto end
+
+:restart
 echo.
-echo Server terminated abnormally
+echo Admin Restarted Game Server.
 echo.
+goto start
+
 :end
 echo.
-echo server terminated
+echo Game Server Terminated.
 echo.
 pause

+ 0 - 30
L2J_Server_BETA/dist/game/startGameServer.ps1

@@ -1,30 +0,0 @@
-$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
-$a = (Get-Host).UI.RawUI
-$a.WindowTitle = "L2J - Game Server Console"
-
-do
-{
-    switch ($LASTEXITCODE)
-    {
-        -1 { cls; "Starting L2J Game Server."; break; }
-        2 { cls; "Restarting L2J Game Server."; break; }
-    }
-    ""
-    # -------------------------------------
-    # Default parameters for a basic server.
-    java "-Djava.util.logging.manager=com.l2jserver.util.L2LogManager" -Xms1024m -Xmx1024m -cp "./../libs/*;l2jserver.jar" com.l2jserver.gameserver.GameServer
-    #
-    # If you have a big server and lots of memory, you could experiment for example with
-    # java -server -Xmx1536m -Xms1024m -Xmn512m -XX:PermSize=256m -XX:SurvivorRatio=8 -Xnoclassgc -XX:+AggressiveOpts
-    # -------------------------------------
-}
-while ($LASTEXITCODE -like 2)
-
-if ($LASTEXITCODE -like 1)
-{
-    "Server Terminated Abnormally";
-}
-else 
-{
-    "Server Terminated";
-}

+ 0 - 4
L2J_Server_BETA/dist/login/RegisterGameServer.ps1

@@ -1,4 +0,0 @@
-$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
-$a = (Get-Host).UI.RawUI
-$a.WindowTitle = "L2J - Register Game Server"
-java "-Djava.util.logging.config.file=console.cfg" -cp "./../libs/*;l2jlogin.jar" com.l2jserver.tools.gsregistering.BaseGameServerRegister -c

+ 16 - 9
L2J_Server_BETA/dist/login/startLoginServer.bat

@@ -1,23 +1,30 @@
 @echo off
 title Login Server Console
+
 :start
 echo Starting L2J Login Server.
 echo.
-java -Xms128m -Xmx128m  -cp ./../libs/*;l2jlogin.jar com.l2jserver.loginserver.L2LoginServer
-if ERRORLEVEL 2 goto restart
+
+java -Xms128m -Xmx128m -cp ./../libs/*;l2jlogin.jar com.l2jserver.loginserver.L2LoginServer
+
 if ERRORLEVEL 1 goto error
+if ERRORLEVEL 2 goto restart
 goto end
-:restart
+
+:error
 echo.
-echo Admin Restart ...
+echo Login Server terminated abnormally!
 echo.
-goto start
-:error
+goto end
+
+:restart
 echo.
-echo Server terminated abnormally
+echo Admin Restarted Login Server.
 echo.
+goto start
+
 :end
 echo.
-echo server terminated
+echo Login Server Terminated.
 echo.
-pause
+pause

+ 0 - 23
L2J_Server_BETA/dist/login/startLoginServer.ps1

@@ -1,23 +0,0 @@
-$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
-$a = (Get-Host).UI.RawUI
-$a.WindowTitle = "L2J - Login Server Console"
-$LASTEXITCODE = -1
-do
-{
-    switch ($LASTEXITCODE)
-    {
-        -1 { cls; "Starting L2J Login Server."; break; }
-        2 { cls; "Restarting L2J Login Server."; break; }
-    }
-    java -Xms128m -Xmx128m  -cp "./../libs/*;l2jlogin.jar" com.l2jserver.loginserver.L2LoginServer
-}
-while ($LASTEXITCODE -like 2)
-
-if ($LASTEXITCODE -like 1)
-{
-    "Server Terminate Abnormally";
-}
-else 
-{
-    "Server Terminated";
-}

+ 0 - 24
L2J_Server_BETA/dist/login/startSQLAccountManager.ps1

@@ -1,24 +0,0 @@
-$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
-$a = (Get-Host).UI.RawUI
-$a.WindowTitle = "L2J - SQL Account Manager"
-java "-Djava.util.logging.config.file=console.cfg" -cp "./../libs/*;l2jlogin.jar" com.l2jserver.tools.accountmanager.SQLAccountManager 2> $null
-if ($LASTEXITCODE -like 0)
-{
-    ""
-    "Execution successful"
-    ""
-}
-else
-{
-    ""
-    "An error has occurred while running the L2J Account Manager!"
-    ""
-    "Possible reasons for this to happen:"
-    ""
-    "Missing .jar files or ../libs directory."
-    "- MySQL server not running or incorrect MySQL settings:"
-    "   check ./config/loginserver.properties"
-    "- Wrong data types or values out of range were provided:"
-    "   specify correct values for each required field"
-    ""
-}