Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9971522c
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9971522c
编写于
4月 06, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix linux update
上级
1bd165ab
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
34 deletion
+5
-34
src/vs/workbench/electron-browser/update.ts
src/vs/workbench/electron-browser/update.ts
+2
-28
src/vs/workbench/electron-main/auto-updater.linux.ts
src/vs/workbench/electron-main/auto-updater.linux.ts
+2
-1
src/vs/workbench/electron-main/menus.ts
src/vs/workbench/electron-main/menus.ts
+1
-1
src/vs/workbench/electron-main/update-manager.ts
src/vs/workbench/electron-main/update-manager.ts
+0
-4
未找到文件。
src/vs/workbench/electron-browser/update.ts
浏览文件 @
9971522c
...
...
@@ -10,7 +10,6 @@ import severity from 'vs/base/common/severity';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
{
ipcRenderer
as
ipc
,
shell
}
from
'
electron
'
;
import
{
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IWorkspaceContextService
}
from
'
vs/workbench/services/workspace/common/contextService
'
;
import
{
IRequestService
}
from
'
vs/platform/request/common/request
'
;
...
...
@@ -47,7 +46,7 @@ export const ShowReleaseNotesAction = (releaseNotesUrl: string, returnValue = fa
export
const
DownloadAction
=
(
url
:
string
)
=>
new
Action
(
'
update.download
'
,
nls
.
localize
(
'
download
'
,
"
Download
"
),
nls
.
localize
(
'
download
Now
'
,
"
Download Now
"
),
null
,
true
,
()
=>
{
shell
.
openExternal
(
url
);
return
TPromise
.
as
(
true
);
}
...
...
@@ -69,7 +68,7 @@ export class Update {
});
});
ipc
.
on
(
'
vscode:update-available
'
,
url
=>
{
ipc
.
on
(
'
vscode:update-available
'
,
(
event
,
url
:
string
)
=>
{
this
.
messageService
.
show
(
severity
.
Info
,
{
message
:
nls
.
localize
(
'
thereIsUpdateAvailable
'
,
`There is an available update.`
),
actions
:
[
ShowReleaseNotesAction
(
env
.
releaseNotesUrl
),
NotNowAction
,
DownloadAction
(
url
)]
...
...
@@ -79,30 +78,5 @@ export class Update {
ipc
.
on
(
'
vscode:update-not-available
'
,
()
=>
{
this
.
messageService
.
show
(
severity
.
Info
,
nls
.
localize
(
'
noUpdatesAvailable
'
,
"
There are no updates currently available.
"
));
});
const
updateFeedUrl
=
env
.
updateFeedUrl
;
// manually check for update on linux
if
(
isLinux
&&
updateFeedUrl
)
{
this
.
requestService
.
makeRequest
({
url
:
updateFeedUrl
}).
done
(
res
=>
{
if
(
res
.
status
!==
200
)
{
return
;
// no update available
}
this
.
messageService
.
show
(
severity
.
Info
,
{
message
:
nls
.
localize
(
'
noUpdateLinux
'
,
"
This version of {0} is outdated and can
\
't be updated automatically. Please download and install the latest version manually.
"
,
env
.
appName
),
actions
:
[
new
Action
(
'
pleaseUpdate
'
,
nls
.
localize
(
'
downloadLatestAction
'
,
"
Download Latest
"
),
''
,
true
,
()
=>
{
shell
.
openExternal
(
env
.
productDownloadUrl
);
return
TPromise
.
as
(
true
);
}),
new
Action
(
'
releaseNotes
'
,
nls
.
localize
(
'
releaseNotesAction
'
,
"
Release Notes
"
),
''
,
true
,
()
=>
{
shell
.
openExternal
(
env
.
releaseNotesUrl
);
return
TPromise
.
as
(
false
);
})
]
});
});
}
}
}
\ No newline at end of file
src/vs/workbench/electron-main/auto-updater.linux.ts
浏览文件 @
9971522c
...
...
@@ -11,6 +11,7 @@ import {Promise} from 'vs/base/common/winjs.base';
import
{
json
}
from
'
vs/base/node/request
'
;
import
{
getProxyAgent
}
from
'
vs/base/node/proxy
'
;
import
{
manager
as
Settings
}
from
'
vs/workbench/electron-main/settings
'
;
import
env
=
require
(
'
vs/workbench/electron-main/env
'
);
export
interface
IUpdate
{
url
:
string
;
...
...
@@ -55,7 +56,7 @@ export class LinuxAutoUpdaterImpl extends events.EventEmitter {
if
(
!
update
||
!
update
.
url
||
!
update
.
version
)
{
this
.
emit
(
'
update-not-available
'
);
}
else
{
this
.
emit
(
'
update-available
'
,
update
.
u
rl
);
this
.
emit
(
'
update-available
'
,
env
.
product
.
downloadU
rl
);
}
})
.
then
(
null
,
e
=>
{
...
...
src/vs/workbench/electron-main/menus.ts
浏览文件 @
9971522c
...
...
@@ -645,7 +645,7 @@ export class VSCodeMenu {
if
(
platform
.
isLinux
)
{
const
update
=
UpdateManager
.
availableUpdate
;
return
[
new
MenuItem
({
label
:
nls
.
localize
(
'
miDownloadUpdate
'
,
"
Download
Update...
"
),
click
:
()
=>
{
label
:
nls
.
localize
(
'
miDownloadUpdate
'
,
"
Download
Available Update
"
),
click
:
()
=>
{
update
.
quitAndUpdate
();
}
})];
...
...
src/vs/workbench/electron-main/update-manager.ts
浏览文件 @
9971522c
...
...
@@ -208,10 +208,6 @@ export class UpdateManager extends events.EventEmitter {
return
null
;
}
if
(
platform
.
isLinux
)
{
return
null
;
}
if
(
platform
.
isWindows
&&
!
fs
.
existsSync
(
path
.
join
(
path
.
dirname
(
process
.
execPath
),
'
unins000.exe
'
)))
{
return
null
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录