diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/GameServer.exe b/L2J_Mobius_01.0_Ertheia/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_01.0_Ertheia/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/GameServer.vbs b/L2J_Mobius_01.0_Ertheia/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_01.0_Ertheia/dist/login/LoginServer.exe b/L2J_Mobius_01.0_Ertheia/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_01.0_Ertheia/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_01.0_Ertheia/dist/login/LoginServer.vbs b/L2J_Mobius_01.0_Ertheia/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_01.0_Ertheia/dist/login/RegisterGameServer.bat b/L2J_Mobius_01.0_Ertheia/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_01.0_Ertheia/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_01.0_Ertheia/dist/login/RegisterGameServer.vbs b/L2J_Mobius_01.0_Ertheia/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_01.0_Ertheia/dist/login/SQLAccountManager.bat b/L2J_Mobius_01.0_Ertheia/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_01.0_Ertheia/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_01.0_Ertheia/dist/login/SQLAccountManager.vbs b/L2J_Mobius_01.0_Ertheia/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_01.0_Ertheia/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_02.5_Underground/dist/game/GameServer.exe b/L2J_Mobius_02.5_Underground/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_02.5_Underground/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_02.5_Underground/dist/game/GameServer.vbs b/L2J_Mobius_02.5_Underground/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_02.5_Underground/dist/login/LoginServer.exe b/L2J_Mobius_02.5_Underground/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_02.5_Underground/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_02.5_Underground/dist/login/LoginServer.vbs b/L2J_Mobius_02.5_Underground/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_02.5_Underground/dist/login/RegisterGameServer.bat b/L2J_Mobius_02.5_Underground/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_02.5_Underground/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_02.5_Underground/dist/login/RegisterGameServer.vbs b/L2J_Mobius_02.5_Underground/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_02.5_Underground/dist/login/SQLAccountManager.bat b/L2J_Mobius_02.5_Underground/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_02.5_Underground/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_02.5_Underground/dist/login/SQLAccountManager.vbs b/L2J_Mobius_02.5_Underground/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_02.5_Underground/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_03.0_Helios/dist/game/GameServer.exe b/L2J_Mobius_03.0_Helios/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_03.0_Helios/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_03.0_Helios/dist/game/GameServer.vbs b/L2J_Mobius_03.0_Helios/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_03.0_Helios/dist/login/LoginServer.exe b/L2J_Mobius_03.0_Helios/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_03.0_Helios/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_03.0_Helios/dist/login/LoginServer.vbs b/L2J_Mobius_03.0_Helios/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_03.0_Helios/dist/login/RegisterGameServer.bat b/L2J_Mobius_03.0_Helios/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_03.0_Helios/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_03.0_Helios/dist/login/RegisterGameServer.vbs b/L2J_Mobius_03.0_Helios/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_03.0_Helios/dist/login/SQLAccountManager.bat b/L2J_Mobius_03.0_Helios/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_03.0_Helios/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_03.0_Helios/dist/login/SQLAccountManager.vbs b/L2J_Mobius_03.0_Helios/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_03.0_Helios/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/GameServer.exe b/L2J_Mobius_04.0_GrandCrusade/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_04.0_GrandCrusade/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/GameServer.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/GameServer.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/login/LoginServer.exe b/L2J_Mobius_04.0_GrandCrusade/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_04.0_GrandCrusade/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/login/LoginServer.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/login/RegisterGameServer.bat b/L2J_Mobius_04.0_GrandCrusade/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_04.0_GrandCrusade/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/login/RegisterGameServer.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/login/SQLAccountManager.bat b/L2J_Mobius_04.0_GrandCrusade/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_04.0_GrandCrusade/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/login/SQLAccountManager.vbs b/L2J_Mobius_04.0_GrandCrusade/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_04.0_GrandCrusade/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_05.0_Salvation/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_05.0_Salvation/dist/game/GameServer.exe b/L2J_Mobius_05.0_Salvation/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_05.0_Salvation/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_05.0_Salvation/dist/game/GameServer.vbs b/L2J_Mobius_05.0_Salvation/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_05.0_Salvation/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_05.0_Salvation/dist/login/LoginServer.exe b/L2J_Mobius_05.0_Salvation/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_05.0_Salvation/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_05.0_Salvation/dist/login/LoginServer.vbs b/L2J_Mobius_05.0_Salvation/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_05.0_Salvation/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_05.0_Salvation/dist/login/RegisterGameServer.bat b/L2J_Mobius_05.0_Salvation/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_05.0_Salvation/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_05.0_Salvation/dist/login/RegisterGameServer.vbs b/L2J_Mobius_05.0_Salvation/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_05.0_Salvation/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_05.0_Salvation/dist/login/SQLAccountManager.bat b/L2J_Mobius_05.0_Salvation/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_05.0_Salvation/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_05.0_Salvation/dist/login/SQLAccountManager.vbs b/L2J_Mobius_05.0_Salvation/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_05.0_Salvation/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_05.5_EtinasFate/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/GameServer.exe b/L2J_Mobius_05.5_EtinasFate/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_05.5_EtinasFate/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/GameServer.vbs b/L2J_Mobius_05.5_EtinasFate/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_05.5_EtinasFate/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_05.5_EtinasFate/dist/login/LoginServer.exe b/L2J_Mobius_05.5_EtinasFate/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_05.5_EtinasFate/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_05.5_EtinasFate/dist/login/LoginServer.vbs b/L2J_Mobius_05.5_EtinasFate/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_05.5_EtinasFate/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_05.5_EtinasFate/dist/login/RegisterGameServer.bat b/L2J_Mobius_05.5_EtinasFate/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_05.5_EtinasFate/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_05.5_EtinasFate/dist/login/RegisterGameServer.vbs b/L2J_Mobius_05.5_EtinasFate/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_05.5_EtinasFate/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_05.5_EtinasFate/dist/login/SQLAccountManager.bat b/L2J_Mobius_05.5_EtinasFate/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_05.5_EtinasFate/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_05.5_EtinasFate/dist/login/SQLAccountManager.vbs b/L2J_Mobius_05.5_EtinasFate/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_05.5_EtinasFate/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_06.0_Fafurion/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/GameServer.exe b/L2J_Mobius_06.0_Fafurion/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_06.0_Fafurion/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/GameServer.vbs b/L2J_Mobius_06.0_Fafurion/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_06.0_Fafurion/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_06.0_Fafurion/dist/login/LoginServer.exe b/L2J_Mobius_06.0_Fafurion/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_06.0_Fafurion/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_06.0_Fafurion/dist/login/LoginServer.vbs b/L2J_Mobius_06.0_Fafurion/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_06.0_Fafurion/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_06.0_Fafurion/dist/login/RegisterGameServer.bat b/L2J_Mobius_06.0_Fafurion/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_06.0_Fafurion/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_06.0_Fafurion/dist/login/RegisterGameServer.vbs b/L2J_Mobius_06.0_Fafurion/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_06.0_Fafurion/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_06.0_Fafurion/dist/login/SQLAccountManager.bat b/L2J_Mobius_06.0_Fafurion/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_06.0_Fafurion/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_06.0_Fafurion/dist/login/SQLAccountManager.vbs b/L2J_Mobius_06.0_Fafurion/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_06.0_Fafurion/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/GameServer.exe b/L2J_Mobius_07.0_PreludeOfWar/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_07.0_PreludeOfWar/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/GameServer.vbs b/L2J_Mobius_07.0_PreludeOfWar/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/login/LoginServer.exe b/L2J_Mobius_07.0_PreludeOfWar/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_07.0_PreludeOfWar/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/login/LoginServer.vbs b/L2J_Mobius_07.0_PreludeOfWar/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/login/RegisterGameServer.bat b/L2J_Mobius_07.0_PreludeOfWar/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/login/RegisterGameServer.vbs b/L2J_Mobius_07.0_PreludeOfWar/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/login/SQLAccountManager.bat b/L2J_Mobius_07.0_PreludeOfWar/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/login/SQLAccountManager.vbs b/L2J_Mobius_07.0_PreludeOfWar/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/GameServer.exe b/L2J_Mobius_08.2_Homunculus/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_08.2_Homunculus/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/GameServer.vbs b/L2J_Mobius_08.2_Homunculus/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_08.2_Homunculus/dist/login/LoginServer.exe b/L2J_Mobius_08.2_Homunculus/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_08.2_Homunculus/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_08.2_Homunculus/dist/login/LoginServer.vbs b/L2J_Mobius_08.2_Homunculus/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_08.2_Homunculus/dist/login/RegisterGameServer.bat b/L2J_Mobius_08.2_Homunculus/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_08.2_Homunculus/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_08.2_Homunculus/dist/login/RegisterGameServer.vbs b/L2J_Mobius_08.2_Homunculus/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_08.2_Homunculus/dist/login/SQLAccountManager.bat b/L2J_Mobius_08.2_Homunculus/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_08.2_Homunculus/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_08.2_Homunculus/dist/login/SQLAccountManager.vbs b/L2J_Mobius_08.2_Homunculus/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_08.2_Homunculus/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/GameServer.exe b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/GameServer.vbs b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/LoginServer.exe b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/LoginServer.vbs b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/RegisterGameServer.bat b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/RegisterGameServer.vbs b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/SQLAccountManager.bat b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/SQLAccountManager.vbs b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/GameServer.exe b/L2J_Mobius_10.1_MasterClass/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_10.1_MasterClass/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_10.1_MasterClass/dist/game/GameServer.vbs b/L2J_Mobius_10.1_MasterClass/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_10.1_MasterClass/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.exe b/L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.vbs b/L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.bat b/L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.vbs b/L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.bat b/L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.vbs b/L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_10.2_MasterClass/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/GameServer.exe b/L2J_Mobius_10.2_MasterClass/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_10.2_MasterClass/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/GameServer.vbs b/L2J_Mobius_10.2_MasterClass/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_10.2_MasterClass/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_10.2_MasterClass/dist/login/LoginServer.exe b/L2J_Mobius_10.2_MasterClass/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_10.2_MasterClass/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_10.2_MasterClass/dist/login/LoginServer.vbs b/L2J_Mobius_10.2_MasterClass/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_10.2_MasterClass/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_10.2_MasterClass/dist/login/RegisterGameServer.bat b/L2J_Mobius_10.2_MasterClass/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_10.2_MasterClass/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_10.2_MasterClass/dist/login/RegisterGameServer.vbs b/L2J_Mobius_10.2_MasterClass/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_10.2_MasterClass/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_10.2_MasterClass/dist/login/SQLAccountManager.bat b/L2J_Mobius_10.2_MasterClass/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_10.2_MasterClass/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_10.2_MasterClass/dist/login/SQLAccountManager.vbs b/L2J_Mobius_10.2_MasterClass/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_10.2_MasterClass/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.bat b/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.bat deleted file mode 100644 index 7490a14628..0000000000 --- a/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.bat +++ /dev/null @@ -1,3 +0,0 @@ -@title Account Manager -@java -cp Server.jar org.l2jmobius.tools.accountmanager.AccountManager -@pause diff --git a/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.vbs b/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.vbs new file mode 100644 index 0000000000..0c2e75ac22 --- /dev/null +++ b/L2J_Mobius_C1_HarbingersOfWar/dist/AccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Account Manager"" " & path & "java -cp Server.jar org.l2jmobius.tools.accountmanager.AccountManager", 1, False diff --git a/L2J_Mobius_C1_HarbingersOfWar/dist/Server.exe b/L2J_Mobius_C1_HarbingersOfWar/dist/Server.exe deleted file mode 100644 index 03039f67ff..0000000000 Binary files a/L2J_Mobius_C1_HarbingersOfWar/dist/Server.exe and /dev/null differ diff --git a/L2J_Mobius_C1_HarbingersOfWar/dist/Server.vbs b/L2J_Mobius_C1_HarbingersOfWar/dist/Server.vbs new file mode 100644 index 0000000000..7771d8619f --- /dev/null +++ b/L2J_Mobius_C1_HarbingersOfWar/dist/Server.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar Server.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Server terminated abnormally!", vbOKOnly, "Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/GameServer.exe b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/game/GameServer.vbs b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/LoginServer.exe b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/LoginServer.vbs b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/RegisterGameServer.bat b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/RegisterGameServer.bat deleted file mode 100644 index e0f650364f..0000000000 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.GameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/RegisterGameServer.vbs b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/SQLAccountManager.bat b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_C4_ScionsOfDestiny/dist/login/SQLAccountManager.vbs b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_C6_Interlude/dist/game/GameServer.exe b/L2J_Mobius_C6_Interlude/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_C6_Interlude/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_C6_Interlude/dist/game/GameServer.vbs b/L2J_Mobius_C6_Interlude/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_C6_Interlude/dist/login/LoginServer.exe b/L2J_Mobius_C6_Interlude/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_C6_Interlude/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_C6_Interlude/dist/login/LoginServer.vbs b/L2J_Mobius_C6_Interlude/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_C6_Interlude/dist/login/RegisterGameServer.bat b/L2J_Mobius_C6_Interlude/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_C6_Interlude/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/login/RegisterGameServer.vbs b/L2J_Mobius_C6_Interlude/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_C6_Interlude/dist/login/SQLAccountManager.bat b/L2J_Mobius_C6_Interlude/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_C6_Interlude/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_C6_Interlude/dist/login/SQLAccountManager.vbs b/L2J_Mobius_C6_Interlude/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_C6_Interlude/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/GameServer.exe b/L2J_Mobius_CT_0_Interlude/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_CT_0_Interlude/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_CT_0_Interlude/dist/game/GameServer.vbs b/L2J_Mobius_CT_0_Interlude/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_CT_0_Interlude/dist/login/LoginServer.exe b/L2J_Mobius_CT_0_Interlude/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_CT_0_Interlude/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_CT_0_Interlude/dist/login/LoginServer.vbs b/L2J_Mobius_CT_0_Interlude/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_CT_0_Interlude/dist/login/RegisterGameServer.bat b/L2J_Mobius_CT_0_Interlude/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_CT_0_Interlude/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/login/RegisterGameServer.vbs b/L2J_Mobius_CT_0_Interlude/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_CT_0_Interlude/dist/login/SQLAccountManager.bat b/L2J_Mobius_CT_0_Interlude/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_CT_0_Interlude/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_CT_0_Interlude/dist/login/SQLAccountManager.vbs b/L2J_Mobius_CT_0_Interlude/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_CT_0_Interlude/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/GameServer.exe b/L2J_Mobius_CT_2.4_Epilogue/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_CT_2.4_Epilogue/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/GameServer.vbs b/L2J_Mobius_CT_2.4_Epilogue/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/login/LoginServer.exe b/L2J_Mobius_CT_2.4_Epilogue/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_CT_2.4_Epilogue/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/login/LoginServer.vbs b/L2J_Mobius_CT_2.4_Epilogue/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/login/RegisterGameServer.bat b/L2J_Mobius_CT_2.4_Epilogue/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_CT_2.4_Epilogue/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/login/RegisterGameServer.vbs b/L2J_Mobius_CT_2.4_Epilogue/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/login/SQLAccountManager.bat b/L2J_Mobius_CT_2.4_Epilogue/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_CT_2.4_Epilogue/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/login/SQLAccountManager.vbs b/L2J_Mobius_CT_2.4_Epilogue/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_CT_2.4_Epilogue/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/GameServer.exe b/L2J_Mobius_CT_2.6_HighFive/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_CT_2.6_HighFive/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/GameServer.vbs b/L2J_Mobius_CT_2.6_HighFive/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/login/LoginServer.exe b/L2J_Mobius_CT_2.6_HighFive/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_CT_2.6_HighFive/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/login/LoginServer.vbs b/L2J_Mobius_CT_2.6_HighFive/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/login/RegisterGameServer.bat b/L2J_Mobius_CT_2.6_HighFive/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/login/RegisterGameServer.vbs b/L2J_Mobius_CT_2.6_HighFive/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/login/SQLAccountManager.bat b/L2J_Mobius_CT_2.6_HighFive/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/login/SQLAccountManager.vbs b/L2J_Mobius_CT_2.6_HighFive/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/GameServer.exe b/L2J_Mobius_Classic_2.0_Saviors/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_2.0_Saviors/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/GameServer.vbs b/L2J_Mobius_Classic_2.0_Saviors/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/login/LoginServer.exe b/L2J_Mobius_Classic_2.0_Saviors/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_2.0_Saviors/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_2.0_Saviors/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_2.0_Saviors/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_2.0_Saviors/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_2.0_Saviors/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_2.0_Saviors/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/GameServer.exe b/L2J_Mobius_Classic_2.5_Zaken/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_2.5_Zaken/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/GameServer.vbs b/L2J_Mobius_Classic_2.5_Zaken/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/login/LoginServer.exe b/L2J_Mobius_Classic_2.5_Zaken/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_2.5_Zaken/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_2.5_Zaken/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_2.5_Zaken/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_2.5_Zaken/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_2.5_Zaken/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_2.5_Zaken/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_2.5_Zaken/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_2.5_Zaken/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/GameServer.exe b/L2J_Mobius_Classic_2.7_Antharas/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_2.7_Antharas/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/GameServer.vbs b/L2J_Mobius_Classic_2.7_Antharas/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/login/LoginServer.exe b/L2J_Mobius_Classic_2.7_Antharas/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_2.7_Antharas/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_2.7_Antharas/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_2.7_Antharas/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_2.7_Antharas/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_2.7_Antharas/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_2.7_Antharas/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_2.7_Antharas/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_2.7_Antharas/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/GameServer.exe b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/GameServer.vbs b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/LoginServer.exe b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/GameServer.exe b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/GameServer.vbs b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/LoginServer.exe b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/GameServer.exe b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/GameServer.vbs b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/LoginServer.exe b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Classic_Interlude/dist/game/GameServer.exe b/L2J_Mobius_Classic_Interlude/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Classic_Interlude/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_Interlude/dist/game/GameServer.vbs b/L2J_Mobius_Classic_Interlude/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_Interlude/dist/login/LoginServer.exe b/L2J_Mobius_Classic_Interlude/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Classic_Interlude/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Classic_Interlude/dist/login/LoginServer.vbs b/L2J_Mobius_Classic_Interlude/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Classic_Interlude/dist/login/RegisterGameServer.bat b/L2J_Mobius_Classic_Interlude/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Classic_Interlude/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Classic_Interlude/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Classic_Interlude/dist/login/SQLAccountManager.bat b/L2J_Mobius_Classic_Interlude/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Classic_Interlude/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Classic_Interlude/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Classic_Interlude/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/GameServer.exe b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/GameServer.vbs b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/LoginServer.exe b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/LoginServer.vbs b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/RegisterGameServer.bat b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/SQLAccountManager.bat b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/GameServer.exe b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/GameServer.vbs b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/LoginServer.exe b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/LoginServer.vbs b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/RegisterGameServer.bat b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/SQLAccountManager.bat b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/GameServer.exe b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/GameServer.vbs b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/LoginServer.exe b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/LoginServer.vbs b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/RegisterGameServer.bat b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/SQLAccountManager.bat b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_GS.exe b/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_GS.exe deleted file mode 100644 index b6b0580506..0000000000 Binary files a/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_GS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_GS.vbs b/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_GS.vbs new file mode 100644 index 0000000000..7c70ae8fbb --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_GS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_GS.jar", 0, False diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_LS.exe b/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_LS.exe deleted file mode 100644 index 2cf544e0ca..0000000000 Binary files a/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_LS.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_LS.vbs b/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_LS.vbs new file mode 100644 index 0000000000..9cd9d5e92a --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/db_installer/Database_Installer_LS.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Database Installer" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run path & "java -jar Database_Installer_LS.jar", 0, False diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/GameServer.exe b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/GameServer.exe deleted file mode 100644 index e00b860ac3..0000000000 Binary files a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/GameServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/GameServer.vbs b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/GameServer.vbs new file mode 100644 index 0000000000..1c3f3a7419 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/GameServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/GameServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Game Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Game Server terminated abnormally!", vbOKOnly, "Game Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/LoginServer.exe b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/LoginServer.exe deleted file mode 100644 index 026d53f271..0000000000 Binary files a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/LoginServer.exe and /dev/null differ diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/LoginServer.vbs b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/LoginServer.vbs new file mode 100644 index 0000000000..e570974f7a --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/LoginServer.vbs @@ -0,0 +1,49 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Login Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Load java.cfg parameters. +Dim parameters +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("java.cfg", 1) +parameters = file.ReadLine() +file.Close +Set file = Nothing + +'Load GUI configuration. +window = 1 +Set file = CreateObject("Scripting.FileSystemObject").OpenTextFile("config\Interface.ini", 1) +Do While Not file.AtEndOfStream + If Replace(LCase(file.ReadLine()), " ", "") = "enablegui=true" Then + window = 0 + Exit Do + End If +Loop +file.Close +Set file = Nothing + +'Generate command. +command = path & "java " & parameters & " -jar ../libs/LoginServer.jar" +If window = 1 Then + command = "cmd /c start ""L2J Mobius - Login Server Console"" " & command +End If + +'Run the server. +exitcode = 0 +Do + exitcode = shell.Run(command, window, True) + If exitcode <> 0 And exitcode <> 2 Then '0 Terminated - 2 Restarted + MsgBox "Login Server terminated abnormally!", vbOKOnly, "Login Server" + End If +Loop While exitcode = 2 diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/RegisterGameServer.bat b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/RegisterGameServer.bat deleted file mode 100644 index 59bbd69348..0000000000 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/RegisterGameServer.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -title Register Game Server -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/RegisterGameServer.vbs b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/RegisterGameServer.vbs new file mode 100644 index 0000000000..cbe04f7cc9 --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/RegisterGameServer.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Register Game Server" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - Register Game Server"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.gsregistering.BaseGameServerRegister -c", 1, False diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/SQLAccountManager.bat b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/SQLAccountManager.bat deleted file mode 100644 index b4febb96f6..0000000000 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/SQLAccountManager.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -title SQL Account Manager -color 17 -java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager -if %errorlevel% == 0 ( -echo. -echo Execution successful -echo. -) else ( -echo. -echo An error has occurred while running the L2J Account Manager! -echo. -echo Possible reasons for this to happen: -echo. -echo - Missing .jar files or ../libs directory. -echo - MySQL server not running or incorrect MySQL settings: -echo check ./config/loginserver.ini -echo - Wrong data types or values out of range were provided: -echo specify correct values for each required field -echo. -) -pause \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/login/SQLAccountManager.vbs b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/SQLAccountManager.vbs new file mode 100644 index 0000000000..fc06b606ff --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/login/SQLAccountManager.vbs @@ -0,0 +1,18 @@ +'Get Java path. +Dim path +Set shell = WScript.CreateObject("WScript.Shell") +path = shell.Environment.Item("JAVA_HOME") +If path = "" Then + MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "SQL Account Manager" +Else + If InStr(path, "\bin") = 0 Then + path = path + "\bin\" + Else + path = path + "\" + End If + path = Replace(path, "\\", "\") + path = Replace(path, "Program Files", "Progra~1") +End If + +'Run the installer. +shell.Run "cmd /c start ""L2J Mobius - SQL Account Manager"" " & path & "java -Djava.util.logging.config.file=console.cfg -cp ./../libs/* org.l2jmobius.tools.accountmanager.SQLAccountManager", 1, False