Replaced executable and batch files with VBScript.
This commit is contained in:
Binary file not shown.
18
L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.vbs
vendored
Normal file
18
L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_GS.vbs
vendored
Normal file
@@ -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
|
Binary file not shown.
18
L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.vbs
vendored
Normal file
18
L2J_Mobius_10.1_MasterClass/dist/db_installer/Database_Installer_LS.vbs
vendored
Normal file
@@ -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
|
BIN
L2J_Mobius_10.1_MasterClass/dist/game/GameServer.exe
vendored
BIN
L2J_Mobius_10.1_MasterClass/dist/game/GameServer.exe
vendored
Binary file not shown.
49
L2J_Mobius_10.1_MasterClass/dist/game/GameServer.vbs
vendored
Normal file
49
L2J_Mobius_10.1_MasterClass/dist/game/GameServer.vbs
vendored
Normal file
@@ -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
|
Binary file not shown.
49
L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.vbs
vendored
Normal file
49
L2J_Mobius_10.1_MasterClass/dist/login/LoginServer.vbs
vendored
Normal file
@@ -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
|
@@ -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
|
18
L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.vbs
vendored
Normal file
18
L2J_Mobius_10.1_MasterClass/dist/login/RegisterGameServer.vbs
vendored
Normal file
@@ -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
|
@@ -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
|
18
L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.vbs
vendored
Normal file
18
L2J_Mobius_10.1_MasterClass/dist/login/SQLAccountManager.vbs
vendored
Normal file
@@ -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
|
Reference in New Issue
Block a user