diff options
Diffstat (limited to 'Nightbuild2008.cmd')
-rw-r--r-- | Nightbuild2008.cmd | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/Nightbuild2008.cmd b/Nightbuild2008.cmd index ad0b415ba..f3f1ca4cb 100644 --- a/Nightbuild2008.cmd +++ b/Nightbuild2008.cmd @@ -1,17 +1,20 @@ @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: -:: - UploadVersion.ftp FTP command template for uploading the version to the web :: 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 :: +:: The sript creates a symbol store (a database of PDB files) that can be used as a single entry in MSVC's symbol path, +:: then any executable / crashdump built by this script can be debugged and its symbols will be found automatically by MSVC, +:: without the users needing to specify the build version or anything. +:: In order to support pruning the symstore, a per-month store is created, so that old months can be removed when no longer needed. +:: :: This script expects a few tools on specific paths, you can pass the correct paths for your system as env vars "zip" and "vc" :: This script assumes that "git", "symstore" and "touch" are available on PATH. :: git comes from msysgit :: symstore comes from Microsoft's Debugging Tools for Windows :: touch comes from unxtools -:: This script is locale-dependent +:: This script is locale-dependent, because it parses the output of "time" and "date" shell commands :: 7-zip executable (by default it should be on PATH): @@ -23,6 +26,23 @@ if %vc%a == a set vc="vcbuild.exe" +:: Check that the required environment vars are available: +if "a%ftppass%" == "a" ( + echo You need to set FTP password in the ftppass environment variable to upload the files + goto haderror +) +if "a%ftpuser%" == "a" ( + echo You need to set FTP username in the ftpuser environment variable to upload the files + goto haderror +) +if "a%ftpsite%" == "a" ( + echo You need to set FTP server in the ftpsite environment variable to upload the files + goto haderror +) + + + + :: Get the date and time into vars: For /f "tokens=2-4 delims=/. " %%a in ('date /t') do ( set MYYEAR=%%c @@ -31,11 +51,6 @@ For /f "tokens=2-4 delims=/. " %%a in ('date /t') do ( ) For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set MYTIME=%%a_%%b) -echo MYYEAR = %MYYEAR% -echo MYMONTH = %MYMONTH% -echo MYDAY = %MYDAY% -echo MYTIME = %MYTIME% - echo Performing nightbuild of MC-Server @@ -45,9 +60,6 @@ echo Performing nightbuild of MC-Server set DONOTPAUSE=y :: Update the sources to the latest revision: -del src\Bindings.cpp -del src\Bindings.h -git checkout -- src\Bindings.* git pull if errorlevel 1 goto haderror @@ -69,7 +81,9 @@ if errorlevel 1 goto haderror :: Test if the version is already present, using a "tagfile" that we create upon successful build -set TAGFILE=Install\built_%COMMITID%.tag +set TAGFOLDER=Install\%MYYEAR%_%MYMONTH%\ +set TAGFILE=%TAGFOLDER%built_%COMMITID%.tag +echo Tag file: %TAGFILE% if exist %TAGFILE% ( echo Latest version already present, bailing out goto end @@ -78,13 +92,13 @@ if exist %TAGFILE% ( :: Update the Bindings: -del src\Bindings.cpp -del src\Bindings.h echo Updating Lua bindings +del src\Bindings\Bindings.cpp +del src\Bindings\Bindings.h set ALLTOLUA_WAIT=N -cd src +cd src\Bindings call AllToLua.bat -cd .. +cd ..\.. @@ -123,18 +137,6 @@ if errorlevel 1 goto haderror :: upload to the FTP: :upload -if "a%ftppass%" == "a" ( - echo You need to set FTP password in the ftppass environment variable to upload the files - goto end -) -if "a%ftpuser%" == "a" ( - echo You need to set FTP username in the ftpuser environment variable to upload the files - goto end -) -if "a%ftpsite%" == "a" ( - echo You need to set FTP server in the ftpsite environment variable to upload the files - goto end -) ncftpput -p %ftppass% -u %ftpuser% -T temp_ %ftpsite% / Install\MCServer_Win_%FILESUFFIX%.7z if errorlevel 1 goto haderror ncftpput -p %ftppass% -u %ftpuser% -T temp_ %ftpsite% /PDBs Install\PDBs_%FILESUFFIX%.7z @@ -145,6 +147,7 @@ echo Upload finished. :: Create the tagfile so that we know that this CommitID has been built already +mkdir %TAGFOLDER% touch %TAGFILE% |