- need to include 7z.dll for windows users for archive extraction to work

This commit is contained in:
Mark Vejvoda 2011-05-27 18:21:46 +00:00
parent 4c7a2729d5
commit b24e1142f4
4 changed files with 53 additions and 15 deletions

View File

@ -216,6 +216,7 @@ Section "${APNAME} (required)"
File "..\..\..\data\glest_game\megaglest_configurator.exe"
File "..\..\..\data\glest_game\megaglest_g3dviewer.exe"
File "..\..\..\data\glest_game\7z.exe"
File "..\..\..\data\glest_game\7z.dll"
File "..\..\..\data\glest_game\configuration.xml"
File "..\..\..\data\glest_game\megaglest.ico"
File "..\..\..\data\glest_game\glest.ini"

View File

@ -177,6 +177,7 @@ Section "${APNAME} (required)"
File "..\..\..\data\glest_game\megaglest_configurator.exe"
File "..\..\..\data\glest_game\megaglest_g3dviewer.exe"
File "..\..\..\data\glest_game\7z.exe"
File "..\..\..\data\glest_game\7z.dll"
File "..\..\..\data\glest_game\glest.ini"
File "..\..\..\data\glest_game\glestkeys.ini"
File "..\..\..\data\glest_game\servers.ini"

View File

@ -7,6 +7,7 @@ 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
call CopyWindowsRuntimeDlls.bat nopause
rem setup the Visual Studio 2008 environment

View File

@ -12,23 +12,58 @@ objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
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
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
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 "7z.exe has been downloaded successfully to: "
WScript.Echo strHDLocation
WScript.Echo "----------------------------------------"
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
WScript.Echo "7z.exe has been downloaded successfully to: "
WScript.Echo strHDLocation
WScript.Echo "----------------------------------------"
End if
Set objXMLHTTP = Nothing
Set objXMLHTTP = Nothing
' Set your settings
strFileURL = "http://master.dl.sourceforge.net/project/megaglest/7z.dll"
strHDLocation = "..\..\data\glest_game\7z.dll"
WScript.Echo "----------------------------------------"
WScript.Echo "About to download 7z.dll 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 "7z.exe has been downloaded successfully to: "
WScript.Echo strHDLocation
WScript.Echo "----------------------------------------"
End if
Set objXMLHTTP = Nothing