1
0

First attempt at an automated nightbuild script

git-svn-id: http://mc-server.googlecode.com/svn/trunk@308 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-02-22 09:02:11 +00:00
parent e2e261dd17
commit d1deba5b56
12 changed files with 239 additions and 0 deletions

View File

@ -0,0 +1 @@
set WCREV=$WCREV$

16
Install/Zip2008.list Normal file
View File

@ -0,0 +1,16 @@
MCServer.exe
Plugins
webadmin
banned.example.ini
furnace.txt
groups.example.ini
items.ini
Lua-LICENSE.txt
MersenneTwister-LICENSE.txt
monsters.ini
recipes.txt
settings.example.ini
terrain.ini
users.example.ini
webadmin.example.ini
whitelist.example.ini

View File

@ -0,0 +1,7 @@
VC2008\Release\*.pdb
VC2008\Release\JsonCpp\*.pdb
VC2008\Release\Lua\*.pdb
VC2008\Release\ToLua\*.pdb
VC2008\Release\webserver\*.pdb
VC2008\Release\zlib*.pdb

View File

@ -0,0 +1,7 @@
user Username
Password
binary
put ..\MCServer_Win_$WCREV$.7z
cd PDBs
put ..\MCServer_Win_$WCREV$_PDBs.7z
quit

View File

@ -0,0 +1,43 @@
// The Mersenne Twister is an algorithm for generating random numbers. It
// was designed with consideration of the flaws in various other generators.
// The period, 2^19937-1, and the order of equidistribution, 623 dimensions,
// are far greater. The generator is also fast; it avoids multiplication and
// division, and it benefits from caches and pipelines. For more information
// see the inventors' web page at
// http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
// Reference
// M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally
// Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on
// Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30.
// Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
// Copyright (C) 2000 - 2009, Richard J. Wagner
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The names of its contributors may not be used to endorse or promote
// products derived from this software without specific prior written
// permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

98
Nightbuild2008.cmd Normal file
View File

@ -0,0 +1,98 @@
rem @echo off
:: Nightbbuild2008.cmd
:: This script is run every night to produce a new version of MCServer, backup its PDB files and upload the packages to web.
:: These sub-scripts are used:
:: - WCRev.cmd together with subwcrev templating to obtain the version number as an environment var
:: - UploadVersion.ftp FTP command template for uploading the version to the web (not included in the SVN, because it contains confidential passwords! Use your own)
:: When run without parameters, this script pauses at the end and waits for a keypress.
:: To run in an automated scheduler, add any parameter to disable waiting for a keystroke
::
:: This script expects a few tools on specific paths, you can pass the correct paths for your system as env vars "7z", "vc" and "tsvn"
:: 7-zip executable (by default it should be on PATH):
if %zip%a == a set zip=7z
:: Visual C++ compiler executable name:
if %vc%a == a set vc="vcbuild.exe"
:: TortoiseProc executable (for updating to the latest version):
if %tsvn%a== a set tsvn="c:\program files\tortoisesvn\bin\tortoiseproc.exe"
:: Subwcrev (from TortoiseSVN, for querying revision number; by default in PATH):
if %subwcrev%a == a set subwcrev=subwcrev
set DONOTPAUSE=y
:: Update the sources to the latest revision:
start "tsvn src" /b /min /wait %tsvn% /command:update /path:. /closeonend:1
if errorlevel 1 goto haderror
:: Copy all *.template files into their non-template versions, substituting SVN keywords:
for /r %%X in (*.template) do (
%subwcrev% . "%%X" "%%~dpX%%~nX"
if errorlevel 1 goto haderror
)
:: Get the revision number into WCREV env var
call Install\WCVersion.cmd
echo WCREV = %WCREV%
echo Setting up VS environment...
call "%VS90COMNTOOLS%\vsvars32.bat"
echo Compiling MCServer...
title MCS Nightbuild
start "vc" /b /wait /low /min %vc% /r vc2008\MCServer.sln "Release|Win32"
if errorlevel 1 goto haderror
:: Use 7-zip to compress the resulting files into a single file:
:: Note: the output filename here must be the same as in the upload_win.ftp.template script
copy VC2008\Release\MCServer.exe MCServer.exe
%zip% a -mx9 -y MCServer_Win_%WCREV%.7z -scsWIN @Install\Zip2008.list
if errorlevel 1 goto haderror
:: Also pack PDBs into a separate archive:
:: Note: the output filename here must be the same as in the upload_win.ftp.template script
%zip% a -mx9 -y MCServer_Win_%WCREV%_PDBs.7z -scsWIN @Install\Zip2008_PDBs.list
if errorlevel 1 goto haderror
:: upload to FTP using the upload_win.ftp (.template) script
ftp -n -s:Install\upload_win.ftp xoft.cz
goto end
:haderror
echo an error was encountered, check command output above
pause
goto finished
:end
if "a%1" == "a" pause
:finished

3
banned.example.ini Normal file
View File

@ -0,0 +1,3 @@
[Banned]
;PlayerName=1

17
groups.example.ini Normal file
View File

@ -0,0 +1,17 @@
[Admins]
Permissions=*
Color=c
[Mods]
Color=5
Inherits=Vips
Permissions=core.time,core.item
[Vips]
Permissions=core.teleport
Color=2
Inherits=Default
[Default]
Permissions=core.help,core.playerlist,core.pluginlist,core.spawn
Color=7

27
settings.example.ini Normal file
View File

@ -0,0 +1,27 @@
[Server]
Port=25565
MaxPlayers=42
Description=MCServer - Slightly more custom!
[Worlds]
DefaultWorld=world
;World=world_sexy
[Plugins]
;Squirrel=SquirrelChatLog
[HelpPlugin]
ShowPluginNames=1
[Physics]
Water=0
[Monsters]
AnimalsOn=0
AnimalSpawnInterval=10
Types=Spider,Chicken,Cow,Pig,Sheep,Squid,Enderman,Zombiepigman,Cavespider,Creeper,Ghast,Silverfish,Skeleton,Slime,Spider,Zombie
[Authentication]
Server=session.minecraft.net
Address=/game/checkserver.jsp?user=%USERNAME%&serverId=%SERVERID%
Authenticate=0

8
users.example.ini Normal file
View File

@ -0,0 +1,8 @@
[SomeAdmin]
Groups=Admins
[FancyModerator]
Groups=Moderators
[ImportantPerson]
Groups=Vips

6
webadmin.example.ini Normal file
View File

@ -0,0 +1,6 @@
[WebAdmin]
Enabled=1
Port=8080
[User:admin]
Password=admin

6
whitelist.example.ini Normal file
View File

@ -0,0 +1,6 @@
[WhiteListSettings]
WhiteListOn=0
[WhiteList]
;PlayerName=1