Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
def7afde
提交
def7afde
authored
9月 27, 2017
作者:
Andrey Volk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10696: [Build-System] Update 7za to 1701 on windows.
上级
86911858
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
11 行删除
+10
-11
util.vbs
libs/win32/util.vbs
+10
-11
没有找到文件。
libs/win32/util.vbs
浏览文件 @
def7afde
...
...
@@ -107,28 +107,28 @@ Sub GetCompressionTools(DestFolder)
tries
=
0
max_tries
=
10
If
Right
(
DestFolder
,
1
)
<>
"\"
Then
DestFolder
=
DestFolder
&
"\"
End
If
If
Not
FSO
.
FileExists
(
DestFolder
&
"7za.exe"
)
Then
If
Not
FSO
.
FileExists
(
DestFolder
&
"7za
1701
.exe"
)
Then
On
Error
Resume
Next
Set
MyFile
=
FSO
.
CreateTextFile
(
DestFolder
&
"7za.tag"
,
False
)
If
Err
<>
0
Then
Wscript
.
echo
(
"Downloading 7za: "
&
DestFolder
&
"7za.tag - "
&
Err
.
Description
)
End
If
On
Error
Goto
0
If
Not
IsEmpty
(
MyFile
)
Then
MyFile
.
WriteLine
(
"This file marks a pending download for 7za.exe so we don't download it twice at the same time"
)
MyFile
.
WriteLine
(
"This file marks a pending download for 7za
1701
.exe so we don't download it twice at the same time"
)
MyFile
.
Close
Wget
ToolsBase
&
"7za.exe"
,
DestFolder
Wget
ToolsBase
&
"7za
1701
.exe"
,
DestFolder
FSO
.
DeleteFile
DestFolder
&
"7za.tag"
,
true
Wscript
.
echo
(
"Downloaded 7za.exe"
)
Wscript
.
echo
(
"Downloaded 7za
1701
.exe"
)
End
If
Set
MyFile
=
Nothing
WScript
.
Sleep
(
500
)
End
If
Do
While
FSO
.
FileExists
(
DestFolder
&
"7za.tag"
)
And
tries
<
max_tries
Wscript
.
echo
(
"Waiting for 7za.exe to be downloaded"
)
Wscript
.
echo
(
"Waiting for 7za
1701
.exe to be downloaded"
)
WScript
.
Sleep
(
1000
)
tries
=
tries
+
1
Loop
If
tries
=
max_tries
Then
Wscript
.
echo
(
"ERROR: Download of 7za.exe takes too much time"
)
Wscript
.
echo
(
"ERROR: Download of 7za
1701
.exe takes too much time"
)
Wscript
.
quit
99
End
If
End
Sub
...
...
@@ -189,15 +189,15 @@ Sub UnCompress(Archive, DestFolder)
batname
=
"tmp"
&
Strip
(
Archive
)
&
CStr
(
Int
(
10000
*
Rnd
))
&
".bat"
wscript
.
echo
(
"Extracting: "
&
Archive
&
" - using: "
&
batname
)
Set
MyFile
=
FSO
.
CreateTextFile
(
UtilsDir
&
batname
,
True
)
MyFile
.
WriteLine
(
"@"
&
quote
&
UtilsDir
&
"7za.exe"
&
quote
&
" x "
&
quote
&
Archive
&
quote
&
" -y -o"
&
quote
&
DestFolder
&
quote
)
MyFile
.
WriteLine
(
"@"
&
quote
&
UtilsDir
&
"7za
1701
.exe"
&
quote
&
" x "
&
quote
&
Archive
&
quote
&
" -y -o"
&
quote
&
DestFolder
&
quote
)
MyFile
.
Close
Set
MyFile
=
Nothing
ExecPrintOutput
(
UtilsDir
&
batname
)
wscript
.
echo
(
"Ready extracting: "
&
Archive
)
Fn
=
Left
(
Archive
,
Len
(
Archive
)
-
3
)
Fn
=
fso
.
GetParentFolderName
(
Archive
)
&
"\"
&
FSO
.
getbasename
(
Archive
)
If
FSO
.
FileExists
(
Fn
)
Then
Set
MyFile
=
FSO
.
CreateTextFile
(
UtilsDir
&
batname
,
True
)
MyFile
.
WriteLine
(
"@"
&
quote
&
UtilsDir
&
"7za.exe"
&
quote
&
" x "
&
quote
&
Fn
&
quote
&
" -y -o"
&
quote
&
DestFolder
&
quote
)
MyFile
.
WriteLine
(
"@"
&
quote
&
UtilsDir
&
"7za
1701
.exe"
&
quote
&
" x "
&
quote
&
Fn
&
quote
&
" -y -o"
&
quote
&
DestFolder
&
quote
)
MyFile
.
Close
Set
MyFile
=
Nothing
ExecPrintOutput
(
UtilsDir
&
batname
)
...
...
@@ -205,10 +205,9 @@ Sub UnCompress(Archive, DestFolder)
wscript
.
echo
(
"Deleting: "
&
Fn
)
FSO
.
DeleteFile
Fn
,
true
End
If
Fn
=
Fn
&
tar
If
FSO
.
FileExists
(
Fn
)
Then
Set
MyFile
=
FSO
.
CreateTextFile
(
UtilsDir
&
batname
,
True
)
MyFile
.
WriteLine
(
"@"
&
quote
&
UtilsDir
&
"7za.exe"
&
quote
&
" x "
&
quote
&
Fn
&
quote
&
" -y -o"
&
quote
&
DestFolder
&
quote
)
MyFile
.
WriteLine
(
"@"
&
quote
&
UtilsDir
&
"7za
1701
.exe"
&
quote
&
" x "
&
quote
&
Fn
&
quote
&
" -y -o"
&
quote
&
DestFolder
&
quote
)
MyFile
.
Close
Set
MyFile
=
Nothing
ExecPrintOutput
(
UtilsDir
&
batname
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论