-
Notifications
You must be signed in to change notification settings - Fork 40
/
run-server.bat
49 lines (41 loc) · 1.36 KB
/
run-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
@ECHO OFF
REM Copyright 2012 Google Inc. All Rights Reserved.
REM blk-game compiled server run script
SET DIR=%~dp0
IF NOT EXIST %DIR%\node_modules\blk-server\server\ GOTO NOT_NPM_INSTALL
SET DIR=%DIR%\node_modules\blk-server\
:NOT_NPM_INSTALL
REM Populate these values with those given to you by the browser admin
SET BROWSER_URL="http://gf-browser.appspot.com/"
SET SERVER_ID=""
SET SERVER_KEY=""
REM TCP port the server will be listening on
SET LISTEN_PORT=1338
REM Name for the server in the browser
SET SERVER_NAME="Server #1"
REM Maximum number of users allowed at any given time - limit based on CPU/RAM
SET USER_COUNT=8
REM Path to store maps/temp data
SET FILESYSTEM=fs\
REM Map file
SET MAP_PATH=maps\map01\
REM Map generator name; 'flat', 'noise', 'improved', or some custom value
SET MAP_GENERATOR="improved"
REM Map random number generator seed
SET MAP_SEED=0
SET JSFILE="server.js"
IF NOT "%1" == "--debug" GOTO NOT_DEBUG
SET JSFILE="server-uncompiled.js"
:NOT_DEBUG
node %DIR%\server\\%JSFILE% ^
--browserUrl=%BROWSER_URL% ^
--serverId=%SERVER_ID% ^
--serverKey=%SERVER_KEY% ^
--listenPort=%LISTEN_PORT% ^
--serverName=%SERVER_NAME% ^
--userCount=%USER_COUNT% ^
--filesystem=%FILESYSTEM% ^
--mapPath=%MAP_PATH% ^
--mapGenerator=%MAP_GENERATOR% ^
--mapSeed=%MAP_SEED% ^
%*