-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgramm.bat
More file actions
70 lines (61 loc) · 2 KB
/
Programm.bat
File metadata and controls
70 lines (61 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
REM Konfigurationsdatei einlesen
for /F "tokens=1,2 delims==" %%A in (config.ini) do (
set %%A=%%B
)
REM Entferne die Anführungszeichen aus dem Pfad
set serverPath=%serverPath:"=%
REM Fenstertitel
Title "%windowTitle%"
REM Standardwert für txAdminPort setzen, falls in der Config nichts angegeben wurde
if "%txAdminPort%"=="" set txAdminPort=40120
REM Existiert ein Serverpfad in der Config?
if "%serverPath%"=="" (
color 04
echo.
@REM echo FEHLER: Der Pfad zur FXServer.exe muss in der Konfigurationsdatei angegeben werden.
echo ERROR: The path to the FXServer.exe have to be set in the config file.
echo.
pause
exit /b
)
REM Prüfe ob Serverpfad ist default
if "%serverPath%"=="Path/to/FXServer.exe" (
color 04
echo.
@REM echo FEHLER: Der Pfad zur FXServer.exe wurde nicht eingestellt. Mit dem default Pfad funktioniert das starten nicht.
echo ERROR: The path to the FXServer.exe wasn't set. With the default path the starting don't work.
echo.
pause
exit /b
)
REM Prüfe ob Pfad auf FXServer.exe endet
if "%serverPath:~-12%" == "FXServer.exe" (
REM Prüfe ob FXServer.exe in dem angegebenen Pfad existiert
if not exist "%serverPath%" (
color 04
echo.
@REM echo FEHLER: In dem angegebenen Pfad existiert keine FXServer.exe
echo ERROR: FXServer.exe does not exist in the specified path.
echo.
pause
exit /b
)
) else (
color 04
echo.
@REM echo FEHLER: Der Pfad muss zur FXServer.exe führen.
echo ERROR: The path must lead to the FXServer.exe.
echo.
pause
exit /b
)
REM Aufbau des Startbefehls basierend auf enableProfile
if /I "%enableProfile%"=="true" (
REM Profile aktivieren, wenn enableProfile auf true steht
"%serverPath%" +set serverProfile "%profile%" +set txAdminPort "%txAdminPort%"
) else (
REM Standardbefehl ohne Profil
"%serverPath%" +set txAdminPort "%txAdminPort%"
)
pause