-
Notifications
You must be signed in to change notification settings - Fork 23
/
start.cmd
80 lines (70 loc) · 2.79 KB
/
start.cmd
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
71
72
73
74
75
76
77
78
79
80
@echo off
REM Modified for Leveryl by @CortexPE. (All I ask of you is, Please don't remove this line. Or you'll have to deal with a DMCA Take Down.)
REM Start Script options [WARNING: If you don't know these, Don't attempt to change it]
REM ----------------------------
REM Set to "yes" to automatically start the server up. DEFAULT: "no"
set DO_LOOP="no"
REM Transparency options [WARNING: THIS HAS ONLY BEEN TESTED ON Windows 10] DEFAULT: "off"
REM Set to "off" to disable...
REM Available Values: ["off","low","medium","high"]
set TRANSPARENCY_LEVEL="off"
REM Console Window Size: DEFAULT: CONSOLE_COLUMNS=88 | CONSOLE_ROWS=32
set CONSOLE_COLUMNS=88
set CONSOLE_ROWS=32
REM Console Font: DEFAULT: "Consolas"
set CONSOLE_FONT="Consolas"
REM ----------------------------
title Leveryl
cd /d %~dp0
tasklist /FI "IMAGENAME eq mintty.exe" 2>NUL | find /I /N "mintty.exe">NUL
if %ERRORLEVEL% equ 0 (
goto :loop
) else (
goto :start
)
:loop
tasklist /FI "IMAGENAME eq mintty.exe" 2>NUL | find /I /N "mintty.exe">NUL
if %ERRORLEVEL% equ 0 (
goto :loop
) else (
goto :start
)
:start
if exist bin\php\php.exe (
set PHP_BINARY=bin\php\php.exe
) else (
set PHP_BINARY=php
)
if exist PocketMine-MP.phar (
set POCKETMINE_FILE=PocketMine-MP.phar
) else if exist Leveryl.phar (
set POCKETMINE_FILE=Leveryl.phar
) else (
if exist src\pocketmine\PocketMine.php (
set POCKETMINE_FILE=src\pocketmine\PocketMine.php
) else (
msg * "ERROR: Couldn't find a valid Leveryl installation..."
pause
exit 1
)
)
if exist bin\php\php_wxwidgets.dll (
%PHP_BINARY% %POCKETMINE_FILE% --enable-gui %*
) else (
if exist bin\mintty.exe (
if exist assets\leveryl.ico (
start "" bin\mintty.exe -o Columns=%CONSOLE_COLUMNS% -o Rows=%CONSOLE_ROWS% -o AllowBlinking=0 -o FontQuality=3 -o Font=%CONSOLE_FONT% -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -o Transparency=%TRANSPARENCY_LEVEL% -h error -t "Leveryl" -i assets/leveryl.ico -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %*
) else (
if exist bin\pocketmine.ico (
start "" bin\mintty.exe -o Columns=%CONSOLE_COLUMNS% -o Rows=%CONSOLE_ROWS% -o AllowBlinking=0 -o FontQuality=3 -o Font=%CONSOLE_FONT% -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -o Transparency=%TRANSPARENCY_LEVEL% -h error -t "Leveryl" -i bin/pocketmine.ico -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %*
) else (
start "" bin\mintty.exe -o Columns=%CONSOLE_COLUMNS% -o Rows=%CONSOLE_ROWS% -o AllowBlinking=0 -o FontQuality=3 -o Font=%CONSOLE_FONT% -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -o Transparency=%TRANSPARENCY_LEVEL% -h error -t "Leveryl" -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %*
)
)
) else (
%PHP_BINARY% -c bin\php %POCKETMINE_FILE% %*
)
)
if %DO_LOOP% == "yes" (
goto :loop
)