-
Notifications
You must be signed in to change notification settings - Fork 92
/
start-server.bat
50 lines (41 loc) · 1.1 KB
/
start-server.bat
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
@echo off
rem Aura
rem Server start up script
rem -------------------------------------------------------------------------
rem Tries to start the server passed as first argument (LoginServer,
rem WorldServer, MsgrServer), from bin\ or its sub-folders
rem (Release and Debug). If no argument is passed it calls all start bats,
rem to start all servers.
rem -------------------------------------------------------------------------
if "%1" == "" goto NO_ARGS
set FILENAME=%1
rem Check for a build in bin\ first
if not exist bin\%FILENAME%.exe goto SUB_RELEASE
set PATH=bin\
goto RUN
rem Huh, maybe there's a build in bin\Release?
:SUB_RELEASE
IF NOT EXIST bin\Release\%FILENAME%.exe GOTO SUB_DEBUG
set PATH=bin\Release\
goto RUN
rem Mah... come here debug!
:SUB_DEBUG
IF NOT EXIST bin\Debug\%FILENAME%.exe GOTO ERROR
set PATH=bin\Debug\
rem Go, go, go!
:RUN
echo Running %FILENAME% from %PATH%
%windir%\system32\ping -n 2 127.0.0.1 > nul
cls
cd %PATH%
%FILENAME%.exe
exit
rem Now I'm a saaad panda qq
:ERROR
echo Couldn't find %FILENAME%.exe
pause
exit
:NO_ARGS
start start-login
start start-channel
start start-web