]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10696: [Build-System] Update 7za to 1701 on windows.
authorAndrey Volk <andywolk@gmail.com>
Wed, 27 Sep 2017 21:39:30 +0000 (00:39 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 27 Sep 2017 21:39:30 +0000 (00:39 +0300)
libs/win32/util.vbs

index c04a034c8ee0f37a40bd3b1486a3b6ad3343a32f..e8bfce9953777e4b06a56c2b67a49bc19afd11c5 100644 (file)
@@ -107,28 +107,28 @@ Sub GetCompressionTools(DestFolder)
        tries = 0\r
        max_tries = 10\r
        If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If\r
-       If Not FSO.FileExists(DestFolder & "7za.exe") Then\r
+       If Not FSO.FileExists(DestFolder & "7za1701.exe") Then\r
                On Error Resume Next\r
                Set MyFile = FSO.CreateTextFile(DestFolder & "7za.tag", False)\r
                If Err <> 0 Then Wscript.echo("Downloading 7za: " & DestFolder & "7za.tag - " & Err.Description) End If\r
                On Error Goto 0\r
                If Not IsEmpty(MyFile) Then\r
-                       MyFile.WriteLine("This file marks a pending download for 7za.exe so we don't download it twice at the same time")\r
+                       MyFile.WriteLine("This file marks a pending download for 7za1701.exe so we don't download it twice at the same time")\r
                        MyFile.Close\r
-                       Wget ToolsBase & "7za.exe", DestFolder\r
+                       Wget ToolsBase & "7za1701.exe", DestFolder\r
                        FSO.DeleteFile DestFolder & "7za.tag", true\r
-                       Wscript.echo("Downloaded 7za.exe")\r
+                       Wscript.echo("Downloaded 7za1701.exe")\r
                End If\r
                Set MyFile = Nothing\r
                WScript.Sleep(500)\r
        End If\r
        Do While FSO.FileExists(DestFolder & "7za.tag") And tries < max_tries\r
-               Wscript.echo("Waiting for 7za.exe to be downloaded")\r
+               Wscript.echo("Waiting for 7za1701.exe to be downloaded")\r
                WScript.Sleep(1000)\r
                tries = tries + 1\r
        Loop\r
        If tries = max_tries Then\r
-               Wscript.echo("ERROR: Download of 7za.exe takes too much time")\r
+               Wscript.echo("ERROR: Download of 7za1701.exe takes too much time")\r
                Wscript.quit 99\r
        End If\r
 End Sub\r
@@ -189,15 +189,15 @@ Sub UnCompress(Archive, DestFolder)
        batname = "tmp" & Strip(Archive) & CStr(Int(10000*Rnd)) & ".bat"\r
        wscript.echo("Extracting: " & Archive & " - using: " & batname)\r
        Set MyFile = FSO.CreateTextFile(UtilsDir & batname, True)\r
-       MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote )\r
+       MyFile.WriteLine("@" & quote & UtilsDir & "7za1701.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote )\r
        MyFile.Close\r
        Set MyFile = Nothing\r
        ExecPrintOutput(UtilsDir & batname)\r
        wscript.echo("Ready extracting: " & Archive)\r
-       Fn = Left(Archive, Len(Archive)-3)\r
+       Fn = fso.GetParentFolderName(Archive) & "\" & FSO.getbasename(Archive)\r
        If FSO.FileExists(Fn) Then\r
                Set MyFile = FSO.CreateTextFile(UtilsDir & batname, True)\r
-               MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
+               MyFile.WriteLine("@" & quote & UtilsDir & "7za1701.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
                MyFile.Close\r
                Set MyFile = Nothing\r
                ExecPrintOutput(UtilsDir & batname)\r
@@ -205,10 +205,9 @@ Sub UnCompress(Archive, DestFolder)
                wscript.echo("Deleting: " & Fn)\r
                FSO.DeleteFile Fn,true\r
        End If\r
-       Fn = Fn & tar\r
        If FSO.FileExists(Fn) Then\r
                Set MyFile = FSO.CreateTextFile(UtilsDir & batname, True)\r
-               MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
+               MyFile.WriteLine("@" & quote & UtilsDir & "7za1701.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
                MyFile.Close\r
                Set MyFile = Nothing\r
                ExecPrintOutput(UtilsDir & batname)\r