summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-07-29 19:53:41 +0200
committermadmaxoft <github@xoft.cz>2013-07-29 19:53:41 +0200
commit3920e872f71e4fb99411cb2ba45b0fd27402a8d1 (patch)
treec24fe0f8545ce6a5c12d9f64b99a77daefe0d15f
parentRemoved settings.ini and webadmin.ini, made them into *.example.ini (diff)
downloadcuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.tar
cuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.tar.gz
cuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.tar.bz2
cuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.tar.lz
cuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.tar.xz
cuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.tar.zst
cuberite-3920e872f71e4fb99411cb2ba45b0fd27402a8d1.zip
Diffstat (limited to '')
-rw-r--r--.gitignore5
-rw-r--r--Install/.gitignore3
-rw-r--r--Nightbuild2008.cmd77
-rw-r--r--source/Bindings.cpp2
-rw-r--r--source/Bindings.h2
5 files changed, 59 insertions, 30 deletions
diff --git a/.gitignore b/.gitignore
index 0f5712848..b8a60a580 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,10 +3,11 @@ MCServer/MCServer
ChunkWorxSave.ini
doxy/
Profiling
-SymSrv
+Symbols
cloc-ignored.txt
cloc.xml
cloc.xsl
*.ncb
*.user
-*.suo \ No newline at end of file
+*.suo
+/EveryNight.cmd
diff --git a/Install/.gitignore b/Install/.gitignore
new file mode 100644
index 000000000..4f8f2e7cb
--- /dev/null
+++ b/Install/.gitignore
@@ -0,0 +1,3 @@
+MCServer.exe
+*.7z
+*.tag \ No newline at end of file
diff --git a/Nightbuild2008.cmd b/Nightbuild2008.cmd
index b1d5ad3e7..fdd5d3de1 100644
--- a/Nightbuild2008.cmd
+++ b/Nightbuild2008.cmd
@@ -2,12 +2,16 @@
:: 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 :)
+:: - 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
::
-:: This script expects a few tools on specific paths, you can pass the correct paths for your system as env vars "zip", "vc" and "tsvn"
+:: 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
:: 7-zip executable (by default it should be on PATH):
@@ -16,14 +20,21 @@ 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
+:: Get the date and time into vars:
+For /f "tokens=2-4 delims=/. " %%a in ('date /t') do (
+ set MYYEAR=%%c
+ set MYMONTH=%%b
+ set MYDAY=%%a
+)
+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
@@ -36,31 +47,28 @@ set DONOTPAUSE=y
:: Update the sources to the latest revision:
del source\Bindings.cpp
del source\Bindings.h
-start "tsvn src" /b /min /wait %tsvn% /command:update /path:. /closeonend:1
+git checkout -- source\Bindings.*
+git pull
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 Git commit ID into an environment var
+For /f "tokens=1 delims=/. " %%a in ('git log -1 --oneline --no-abbrev-commit') do (set COMMITID=%%a)
+if errorlevel 1 goto haderror
-:: Get the revision number into WCREV env var
-call Install\WCVersion.cmd
-echo WCREV = %WCREV%
-
-:: Test if the version is already present
-if exist Install\MCServer_Win_%WCREV%.7z (
+:: Test if the version is already present, using a "tagfile" that we create upon successful build
+set TAGFILE=Install\built_%COMMITID%.tag
+if exist %TAGFILE% (
echo Latest version already present, bailing out
goto end
)
-:: Update Bindings.cpp
+:: Update the Bindings:
del source\Bindings.cpp
del source\Bindings.h
echo Updating Lua bindings
@@ -85,16 +93,16 @@ 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
+set FILESUFFIX=%MYYEAR%_%MYMONTH%_%MYDAY%_%MYTIME%_%COMMITID%
+echo FILESUFFIX=%FILESUFFIX%
copy MCServer\MCServer.exe Install\MCServer.exe
cd Install
-%zip% a -mx9 -y MCServer_Win_%WCREV%.7z -scsWIN @Zip2008.list
+%zip% a -mx9 -y MCServer_Win_%FILESUFFIX%.7z -scsWIN @Zip2008.list
if errorlevel 1 goto haderror
cd ..
:: 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 Install\MCServer_Win_%WCREV%_PDBs.7z -scsWIN @Install\Zip2008_PDBs.list
+%zip% a -mx9 -y Install\PDBs_%FILESUFFIX%.7z -scsWIN @Install\Zip2008_PDBs.list
if errorlevel 1 goto haderror
@@ -115,15 +123,32 @@ 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_%WCREV%.7z
+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\MCServer_Win_%WCREV%_PDBs.7z
+ncftpput -p %ftppass% -u %ftpuser% -T temp_ %ftpsite% /PDBs Install\PDBs_%FILESUFFIX%.7z
if errorlevel 1 goto haderror
echo Upload finished.
+:: Create the tagfile so that we know that this CommitID has been built already
+touch %TAGFILE%
+
+
+
+
+
+:: Add the symbols to a global symbol cache
+:: We want per-month symbol caches, so that the old ones can be easily deleted
+set SYMBOLS=Symbols\%MYYEAR%_%MYMONTH%\
+echo Storing symbols in %SYMBOLS%
+
+symstore add /f MCServer\MCServer.* /s %SYMBOLS% /t MCServer
+if errorlevel 1 goto haderror
+
+
+
goto end
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index 910b48007..40927fe96 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 07/29/13 10:58:05.
+** Generated automatically by tolua++-1.0.92 on 07/29/13 19:22:49.
*/
#ifndef __cplusplus
diff --git a/source/Bindings.h b/source/Bindings.h
index 67779643d..b2f26025c 100644
--- a/source/Bindings.h
+++ b/source/Bindings.h
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 07/29/13 10:58:06.
+** Generated automatically by tolua++-1.0.92 on 07/29/13 19:22:49.
*/
/* Exported function */