- updated build batch files to auto download deps test thier integrity and build mg

This commit is contained in:
Mark Vejvoda 2012-04-20 14:28:25 +00:00
parent 2fde84f93c
commit d46d073213
4 changed files with 84 additions and 44 deletions

View File

@ -6,11 +6,26 @@ ECHO Changing to build folder [%~dp0]
cd /d "%~dp0"
ECHO Checking for windows binary runtime tools...
if NOT EXIST "..\..\data\glest_game\7z.exe" cscript getTools.vbs
if NOT EXIST "..\..\data\glest_game\7z.dll" cscript getTools.vbs
if NOT EXIST ..\..\source\windows_deps\NUL cscript getVC2010Deps.vbs
if NOT EXIST ..\..\source\windows_deps\NUL call "..\..\data\glest_game\7z.exe" x ..\..\source\windows_deps.7z
if NOT EXIST ..\..\data\glest_game\7z.exe call cscript getTools.vbs
if NOT EXIST ..\..\data\glest_game\7z.dll call cscript getTools.vbs
if NOT EXIST ..\..\data\glest_game\wget.exe call cscript getTools.vbs
set depfolder=windows_deps
set depfile=%depfolder%.7z
if NOT EXIST ..\..\source\%depfolder%\NUL goto checkDepIntegrity
:getDepFile
if NOT EXIST ..\..\source\%depfolder%\NUL call ..\..\data\glest_game\wget.exe -c -O ..\..\source\%depfile% http://master.dl.sourceforge.net/project/megaglest/%depfile%
if NOT EXIST ..\..\source\%depfolder%\NUL call ..\..\data\glest_game\7z.exe x -r -o..\..\source\ ..\..\source\%depfile%
goto processBuildStageA
:checkDepIntegrity
call ..\..\data\glest_game\7z.exe t ..\..\source\%depfile% >nul
if NOT ERRORLEVEL 0 goto getDepFile
goto processBuildStageA
:processBuildStageA
call CopyWindowsRuntimeDlls.bat nopause
rem setup the Visual Studio 2010 environment

View File

@ -6,8 +6,28 @@ ECHO Changing to build folder [%~dp0]
cd /d "%~dp0"
ECHO Checking for windows binary runtime tools...
if NOT EXIST "..\..\data\glest_game\7z.exe" cscript getTools.vbs
if NOT EXIST "..\..\data\glest_game\7z.dll" cscript getTools.vbs
if NOT EXIST ..\..\data\glest_game\7z.exe call cscript getTools.vbs
if NOT EXIST ..\..\data\glest_game\7z.dll call cscript getTools.vbs
if NOT EXIST ..\..\data\glest_game\wget.exe call cscript getTools.vbs
set depfolder=win32_deps
set depfile=%depfolder%.7z
if NOT EXIST ..\..\source\%depfolder%\NUL goto checkDepIntegrity
:getDepFile
if NOT EXIST ..\..\source\%depfolder%\NUL call ..\..\data\glest_game\wget.exe -c -O ..\..\source\%depfile% http://master.dl.sourceforge.net/project/megaglest/%depfile%
if NOT EXIST ..\..\source\%depfolder%\NUL call ..\..\data\glest_game\7z.exe x -r -o..\..\source\ ..\..\source\%depfile%
goto processBuildStageA
:checkDepIntegrity
call ..\..\data\glest_game\7z.exe t ..\..\source\%depfile% >nul
if NOT ERRORLEVEL 0 goto getDepFile
goto processBuildStageA
:processBuildStageA
call CopyWindowsRuntimeDlls.bat nopause
call CopyWindowsRuntimeDlls.bat nopause
rem setup the Visual Studio 2008 environment

View File

@ -1,5 +1,5 @@
' Set your settings
strFileURL = "http://master.dl.sourceforge.net/project/megaglest/7z.exe"
strFileURL = "http://www.soft-haus.com/glest/tools/7z.exe"
strHDLocation = "..\..\data\glest_game\7z.exe"
WScript.Echo "----------------------------------------"
@ -7,7 +7,11 @@ WScript.Echo "About to download 7z.exe from:"
WScript.Echo strFileURL & ", please wait..."
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
Set objXMLHTTP =CreateObject("WinHttp.WinHttpRequest.5.1")
If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("WinHttp.WinHttpRequest")
If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
If objXMLHTTP Is Nothing Then Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
@ -34,7 +38,7 @@ End if
Set objXMLHTTP = Nothing
' Set your settings
strFileURL = "http://master.dl.sourceforge.net/project/megaglest/7z.dll"
strFileURL = "http://www.soft-haus.com/glest/tools/7z.dll"
strHDLocation = "..\..\data\glest_game\7z.dll"
WScript.Echo "----------------------------------------"
@ -61,7 +65,42 @@ If objXMLHTTP.Status = 200 Then
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
WScript.Echo "7z.exe has been downloaded successfully to: "
WScript.Echo "7z.dll has been downloaded successfully to: "
WScript.Echo strHDLocation
WScript.Echo "----------------------------------------"
End if
Set objXMLHTTP = Nothing
' Set your settings
strFileURL = "http://www.soft-haus.com/glest/tools/wget.exe"
strHDLocation = "..\..\data\glest_game\wget.exe"
WScript.Echo "----------------------------------------"
WScript.Echo "About to download wget.exe from:"
WScript.Echo strFileURL & ", please wait..."
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
WScript.Echo "wget.exe has been downloaded successfully to: "
WScript.Echo strHDLocation
WScript.Echo "----------------------------------------"
End if

View File

@ -1,34 +0,0 @@
' Set your settings
strFileURL = "http://master.dl.sourceforge.net/project/megaglest/windows_deps.7z"
strHDLocation = "..\..\source\windows_deps.7z"
WScript.Echo "----------------------------------------"
WScript.Echo "About to download windows_deps.7z from:"
WScript.Echo strFileURL & ", please wait..."
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start
Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
Set objFSO = Nothing
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
WScript.Echo "windows_deps.7z has been downloaded successfully to: "
WScript.Echo strHDLocation
WScript.Echo "----------------------------------------"
End if
Set objXMLHTTP = Nothing