diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-22 10:02:11 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-22 10:02:11 +0100 |
commit | d1deba5b565dc8b40d40699c1b58ceb02743c72c (patch) | |
tree | 1bec925c4c3922fe814e2a6ab193ffad8f2c17cb /Nightbuild2008.cmd | |
parent | Restricted windows crash dump generating code to 32-bit platforms only due to inline assembly (diff) | |
download | cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.tar cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.tar.gz cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.tar.bz2 cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.tar.lz cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.tar.xz cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.tar.zst cuberite-d1deba5b565dc8b40d40699c1b58ceb02743c72c.zip |
Diffstat (limited to '')
-rw-r--r-- | Nightbuild2008.cmd | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/Nightbuild2008.cmd b/Nightbuild2008.cmd new file mode 100644 index 000000000..a08e7ea99 --- /dev/null +++ b/Nightbuild2008.cmd @@ -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
\ No newline at end of file |