Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ba69c69a
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,发现更多精彩内容 >>
未验证
提交
ba69c69a
编写于
6月 24, 2018
作者:
J
João Moreno
提交者:
GitHub
6月 24, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #52765 from Microsoft/joao/win32-user-install
Win32 User Install
上级
38469255
fc38f66e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
962 addition
and
874 deletion
+962
-874
build/gulpfile.vscode.win32.js
build/gulpfile.vscode.win32.js
+39
-11
build/tfs/product-build.yml
build/tfs/product-build.yml
+5
-3
build/win32/.gitignore
build/win32/.gitignore
+1
-0
build/win32/code.iss
build/win32/code.iss
+882
-852
package.json
package.json
+2
-2
product.json
product.json
+2
-0
src/vs/platform/node/product.ts
src/vs/platform/node/product.ts
+1
-0
src/vs/platform/update/electron-main/updateService.win32.ts
src/vs/platform/update/electron-main/updateService.win32.ts
+22
-4
src/vs/workbench/parts/update/electron-browser/update.ts
src/vs/workbench/parts/update/electron-browser/update.ts
+8
-2
未找到文件。
build/gulpfile.vscode.win32.js
浏览文件 @
ba69c69a
...
...
@@ -7,6 +7,7 @@
const
gulp
=
require
(
'
gulp
'
);
const
path
=
require
(
'
path
'
);
const
fs
=
require
(
'
fs
'
);
const
assert
=
require
(
'
assert
'
);
const
cp
=
require
(
'
child_process
'
);
const
_7z
=
require
(
'
7zip
'
)[
'
7z
'
];
...
...
@@ -16,12 +17,13 @@ const pkg = require('../package.json');
// @ts-ignore Microsoft/TypeScript#21262 complains about a require of a JSON file
const
product
=
require
(
'
../product.json
'
);
const
vfs
=
require
(
'
vinyl-fs
'
);
const
mkdirp
=
require
(
'
mkdirp
'
);
const
repoPath
=
path
.
dirname
(
__dirname
);
const
buildPath
=
arch
=>
path
.
join
(
path
.
dirname
(
repoPath
),
`VSCode-win32-
${
arch
}
`
);
const
zipDir
=
arch
=>
path
.
join
(
repoPath
,
'
.build
'
,
`win32-
${
arch
}
`
,
'
archive
'
);
const
zipPath
=
arch
=>
path
.
join
(
zipDir
(
arch
),
`VSCode-win32-
${
arch
}
.zip`
);
const
setupDir
=
arch
=>
path
.
join
(
repoPath
,
'
.build
'
,
`win32-
${
arch
}
`
,
'
setup
'
);
const
setupDir
=
(
arch
,
target
)
=>
path
.
join
(
repoPath
,
'
.build
'
,
`win32-
${
arch
}
`
,
`
${
target
}
-setup`
);
const
issPath
=
path
.
join
(
__dirname
,
'
win32
'
,
'
code.iss
'
);
const
innoSetupPath
=
path
.
join
(
path
.
dirname
(
path
.
dirname
(
require
.
resolve
(
'
innosetup-compiler
'
))),
'
bin
'
,
'
ISCC.exe
'
);
...
...
@@ -29,6 +31,12 @@ function packageInnoSetup(iss, options, cb) {
options
=
options
||
{};
const
definitions
=
options
.
definitions
||
{};
const
debug
=
process
.
argv
.
some
(
arg
=>
arg
===
'
--debug-inno
'
);
if
(
debug
)
{
definitions
[
'
Debug
'
]
=
'
true
'
;
}
const
keys
=
Object
.
keys
(
definitions
);
keys
.
forEach
(
key
=>
assert
(
typeof
definitions
[
key
]
===
'
string
'
,
`Missing value for '
${
key
}
' in Inno Setup package step`
));
...
...
@@ -36,15 +44,29 @@ function packageInnoSetup(iss, options, cb) {
const
defs
=
keys
.
map
(
key
=>
`/d
${
key
}
=
${
definitions
[
key
]}
`
);
const
args
=
[
iss
].
concat
(
defs
);
cp
.
spawn
(
innoSetupPath
,
args
,
{
stdio
:
'
inherit
'
})
cp
.
spawn
(
innoSetupPath
,
args
,
{
stdio
:
[
'
ignore
'
,
'
inherit
'
,
'
inherit
'
]
})
.
on
(
'
error
'
,
cb
)
.
on
(
'
exit
'
,
()
=>
cb
(
null
));
}
function
buildWin32Setup
(
arch
)
{
function
buildWin32Setup
(
arch
,
target
)
{
if
(
target
!==
'
system
'
&&
target
!==
'
user
'
)
{
throw
new
Error
(
'
Invalid setup target
'
);
}
return
cb
=>
{
const
ia32AppId
=
product
.
win32AppId
;
const
x64AppId
=
product
.
win32x64AppId
;
const
ia32AppId
=
target
===
'
system
'
?
product
.
win32AppId
:
product
.
win32UserAppId
;
const
x64AppId
=
target
===
'
system
'
?
product
.
win32x64AppId
:
product
.
win32x64UserAppId
;
const
sourcePath
=
buildPath
(
arch
);
const
outputPath
=
setupDir
(
arch
,
target
);
mkdirp
.
sync
(
outputPath
);
const
originalProductJsonPath
=
path
.
join
(
sourcePath
,
'
resources/app/product.json
'
);
const
productJsonPath
=
path
.
join
(
outputPath
,
'
product.json
'
);
const
productJson
=
JSON
.
parse
(
fs
.
readFileSync
(
originalProductJsonPath
,
'
utf8
'
));
productJson
[
'
target
'
]
=
target
;
fs
.
writeFileSync
(
productJsonPath
,
JSON
.
stringify
(
productJson
,
undefined
,
'
\t
'
));
const
definitions
=
{
NameLong
:
product
.
nameLong
,
...
...
@@ -63,20 +85,26 @@ function buildWin32Setup(arch) {
AppUserId
:
product
.
win32AppUserModelId
,
ArchitecturesAllowed
:
arch
===
'
ia32
'
?
''
:
'
x64
'
,
ArchitecturesInstallIn64BitMode
:
arch
===
'
ia32
'
?
''
:
'
x64
'
,
SourceDir
:
buildPath
(
arch
)
,
SourceDir
:
sourcePath
,
RepoDir
:
repoPath
,
OutputDir
:
setupDir
(
arch
)
OutputDir
:
outputPath
,
InstallTarget
:
target
,
ProductJsonPath
:
productJsonPath
};
packageInnoSetup
(
issPath
,
{
definitions
},
cb
);
};
}
gulp
.
task
(
'
clean-vscode-win32-ia32-setup
'
,
util
.
rimraf
(
setupDir
(
'
ia32
'
)));
gulp
.
task
(
'
vscode-win32-ia32-setup
'
,
[
'
clean-vscode-win32-ia32-setup
'
],
buildWin32Setup
(
'
ia32
'
));
function
defineWin32SetupTasks
(
arch
,
target
)
{
gulp
.
task
(
`clean-vscode-win32-
${
arch
}
-
${
target
}
-setup`
,
util
.
rimraf
(
setupDir
(
arch
,
target
)));
gulp
.
task
(
`vscode-win32-
${
arch
}
-
${
target
}
-setup`
,
[
`clean-vscode-win32-
${
arch
}
-
${
target
}
-setup`
],
buildWin32Setup
(
arch
,
target
));
}
gulp
.
task
(
'
clean-vscode-win32-x64-setup
'
,
util
.
rimraf
(
setupDir
(
'
x64
'
)));
gulp
.
task
(
'
vscode-win32-x64-setup
'
,
[
'
clean-vscode-win32-x64-setup
'
],
buildWin32Setup
(
'
x64
'
));
defineWin32SetupTasks
(
'
ia32
'
,
'
system
'
);
defineWin32SetupTasks
(
'
x64
'
,
'
system
'
);
defineWin32SetupTasks
(
'
ia32
'
,
'
user
'
);
defineWin32SetupTasks
(
'
x64
'
,
'
user
'
);
function
archiveWin32Setup
(
arch
)
{
return
cb
=>
{
...
...
build/tfs/product-build.yml
浏览文件 @
ba69c69a
...
...
@@ -127,7 +127,7 @@ phases:
-
powershell
:
|
$ErrorActionPreference = "Stop"
npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-setup"
npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-s
ystem-setup" "vscode-win32-$(VSCODE_ARCH)-user-s
etup"
-
task
:
SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
inputs
:
...
...
@@ -212,7 +212,8 @@ phases:
$ErrorActionPreference = "Stop"
$Repo = "$(pwd)"
$Root = "$Repo\.."
$Exe = "$Repo\.build\win32-$(VSCODE_ARCH)\setup\VSCodeSetup.exe"
$SystemExe = "$Repo\.build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe"
$UserExe = "$Repo\.build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe"
$Zip = "$Repo\.build\win32-$(VSCODE_ARCH)\archive\VSCode-win32-$(VSCODE_ARCH).zip"
$Build = "$Root\VSCode-win32-$(VSCODE_ARCH)"
...
...
@@ -227,7 +228,8 @@ phases:
$assetPlatform = if ("$(VSCODE_ARCH)" -eq "ia32") { "win32" } else { "win32-x64" }
node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$(VSCODE_ARCH)-$Version.zip" $Version true $Zip
node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $Exe
node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $SystemExe
node build/tfs/common/publish.js $Quality "$global:assetPlatform-user" setup "VSCodeUserSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $UserExe
# publish hockeyapp symbols
$hockeyAppId = if ("$(VSCODE_ARCH)" -eq "ia32") { "$(VSCODE_HOCKEYAPP_ID_WIN32)" } else { "$(VSCODE_HOCKEYAPP_ID_WIN64)" }
...
...
build/win32/.gitignore
0 → 100644
浏览文件 @
ba69c69a
code-processed.iss
\ No newline at end of file
build/win32/code.iss
浏览文件 @
ba69c69a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
package.json
浏览文件 @
ba69c69a
{
"name"
:
"code-oss-dev"
,
"version"
:
"1.25.0"
,
"distro"
:
"
e781cd4cf9c4c77fa3c0fcb04017a3ba57cde7a2
"
,
"distro"
:
"
974512091c88e4e435fc2a427cf44b08e61a57dd
"
,
"author"
:
{
"name"
:
"Microsoft Corporation"
},
...
...
@@ -137,4 +137,4 @@
"windows-mutex"
:
"^0.2.0"
,
"windows-process-tree"
:
"0.2.2"
}
}
}
\ No newline at end of file
product.json
浏览文件 @
ba69c69a
...
...
@@ -11,6 +11,8 @@
"win32RegValueName"
:
"CodeOSS"
,
"win32AppId"
:
"{{E34003BB-9E10-4501-8C11-BE3FAA83F23F}"
,
"win32x64AppId"
:
"{{D77B7E06-80BA-4137-BCF4-654B95CCEBC5}"
,
"win32UserAppId"
:
"{{C6065F05-9603-4FC4-8101-B9781A25D88E}"
,
"win32x64UserAppId"
:
"{{C6065F05-9603-4FC4-8101-B9781A25D88E}"
,
"win32AppUserModelId"
:
"Microsoft.CodeOSS"
,
"win32ShellNameShort"
:
"C&ode - OSS"
,
"darwinBundleIdentifier"
:
"com.visualstudio.code.oss"
,
...
...
src/vs/platform/node/product.ts
浏览文件 @
ba69c69a
...
...
@@ -18,6 +18,7 @@ export interface IProductConfiguration {
downloadUrl
:
string
;
updateUrl
?:
string
;
quality
?:
string
;
target
?:
string
;
commit
?:
string
;
settingsSearchBuildId
?:
number
;
settingsSearchUrl
?:
string
;
...
...
src/vs/platform/update/electron-main/updateService.win32.ts
浏览文件 @
ba69c69a
...
...
@@ -52,7 +52,7 @@ export class Win32UpdateService extends AbstractUpdateService {
@
memoize
get
cachePath
():
TPromise
<
string
>
{
const
result
=
path
.
join
(
tmpdir
(),
`vscode-update-
${
process
.
arch
}
`
);
const
result
=
path
.
join
(
tmpdir
(),
`vscode-update-
${
pro
duct
.
target
}
-
${
pro
cess
.
arch
}
`
);
return
pfs
.
mkdirp
(
result
,
null
).
then
(()
=>
result
);
}
...
...
@@ -72,7 +72,17 @@ export class Win32UpdateService extends AbstractUpdateService {
return
false
;
}
this
.
url
=
createUpdateURL
(
process
.
arch
===
'
x64
'
?
'
win32-x64
'
:
'
win32
'
,
quality
);
let
platform
=
'
win32
'
;
if
(
process
.
arch
===
'
x64
'
)
{
platform
+=
'
-x64
'
;
}
if
(
product
.
target
===
'
user
'
)
{
platform
+=
'
-user
'
;
}
this
.
url
=
createUpdateURL
(
platform
,
quality
);
return
true
;
}
...
...
@@ -123,7 +133,11 @@ export class Win32UpdateService extends AbstractUpdateService {
this
.
availableUpdate
=
{
packagePath
};
if
(
fastUpdatesEnabled
&&
update
.
supportsFastUpdate
)
{
this
.
setState
(
State
.
Downloaded
(
update
));
if
(
product
.
target
===
'
user
'
)
{
this
.
doApplyUpdate
();
}
else
{
this
.
setState
(
State
.
Downloaded
(
update
));
}
}
else
{
this
.
setState
(
State
.
Ready
(
update
));
}
...
...
@@ -159,7 +173,11 @@ export class Win32UpdateService extends AbstractUpdateService {
}
protected
doApplyUpdate
():
TPromise
<
void
>
{
if
(
this
.
state
.
type
!==
StateType
.
Downloaded
||
!
this
.
availableUpdate
)
{
if
(
this
.
state
.
type
!==
StateType
.
Downloaded
&&
this
.
state
.
type
!==
StateType
.
Downloading
)
{
return
TPromise
.
as
(
null
);
}
if
(
!
this
.
availableUpdate
)
{
return
TPromise
.
as
(
null
);
}
...
...
src/vs/workbench/parts/update/electron-browser/update.ts
浏览文件 @
ba69c69a
...
...
@@ -349,7 +349,7 @@ export class UpdateContribution implements IGlobalActivity {
);
}
// windows fast updates
// windows fast updates
(target === system)
private
onUpdateDownloaded
(
update
:
IUpdate
):
void
{
if
(
!
this
.
shouldShowNotification
())
{
return
;
...
...
@@ -377,6 +377,11 @@ export class UpdateContribution implements IGlobalActivity {
// windows fast updates
private
onUpdateUpdating
(
update
:
IUpdate
):
void
{
if
(
isWindows
&&
product
.
target
===
'
user
'
)
{
return
;
}
// windows fast updates (target === system)
const
neverShowAgain
=
new
NeverShowAgain
(
'
update/win32-fast-updates
'
,
this
.
storageService
);
if
(
!
neverShowAgain
.
shouldShow
())
{
...
...
@@ -399,10 +404,11 @@ export class UpdateContribution implements IGlobalActivity {
// windows and mac
private
onUpdateReady
(
update
:
IUpdate
):
void
{
if
(
!
isWindows
&&
!
this
.
shouldShowNotification
())
{
if
(
!
(
isWindows
&&
product
.
target
!==
'
user
'
)
&&
!
this
.
shouldShowNotification
())
{
return
;
}
// windows user fast updates and mac
this
.
notificationService
.
prompt
(
severity
.
Info
,
nls
.
localize
(
'
updateAvailableAfterRestart
'
,
"
Restart {0} to apply the latest update.
"
,
product
.
nameLong
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录