- need to include 7z.dll for windows users for archive extraction to work
This commit is contained in:
parent
4c7a2729d5
commit
b24e1142f4
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue