Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
f73c011a
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f73c011a
编写于
1月 27, 2021
作者:
R
Robo
提交者:
GitHub
1月 27, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: disable rosetta option for universal build (#115280)
上级
ee7e0ad0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
36 addition
and
2 deletion
+36
-2
build/darwin/create-universal-app.js
build/darwin/create-universal-app.js
+8
-0
build/darwin/create-universal-app.ts
build/darwin/create-universal-app.ts
+9
-0
build/lib/node.js
build/lib/node.js
+4
-2
build/package.json
build/package.json
+2
-0
build/yarn.lock
build/yarn.lock
+13
-0
未找到文件。
build/darwin/create-universal-app.js
浏览文件 @
f73c011a
...
...
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const
vscode_universal_1
=
require
(
"
vscode-universal
"
);
const
fs
=
require
(
"
fs-extra
"
);
const
path
=
require
(
"
path
"
);
const
plist
=
require
(
"
plist
"
);
const
product
=
require
(
"
../../product.json
"
);
async
function
main
()
{
const
buildDir
=
process
.
env
[
'
AGENT_BUILDDIRECTORY
'
];
...
...
@@ -21,6 +22,7 @@ async function main() {
const
arm64AsarPath
=
path
.
join
(
arm64AppPath
,
'
Contents
'
,
'
Resources
'
,
'
app
'
,
'
node_modules.asar
'
);
const
outAppPath
=
path
.
join
(
buildDir
,
`VSCode-darwin-
${
arch
}
`
,
appName
);
const
productJsonPath
=
path
.
resolve
(
outAppPath
,
'
Contents
'
,
'
Resources
'
,
'
app
'
,
'
product.json
'
);
const
infoPlistPath
=
path
.
resolve
(
outAppPath
,
'
Contents
'
,
'
Info.plist
'
);
await
vscode_universal_1
.
makeUniversalApp
({
x64AppPath
,
arm64AppPath
,
...
...
@@ -41,6 +43,12 @@ async function main() {
darwinUniversalAssetId
:
'
darwin-universal
'
});
await
fs
.
writeJson
(
productJsonPath
,
productJson
);
let
infoPlistString
=
await
fs
.
readFile
(
infoPlistPath
,
'
utf8
'
);
let
infoPlistJson
=
plist
.
parse
(
infoPlistString
);
Object
.
assign
(
infoPlistJson
,
{
LSRequiresNativeExecution
:
true
});
await
fs
.
writeFile
(
infoPlistPath
,
plist
.
build
(
infoPlistJson
),
'
utf8
'
);
}
if
(
require
.
main
===
module
)
{
main
().
catch
(
err
=>
{
...
...
build/darwin/create-universal-app.ts
浏览文件 @
f73c011a
...
...
@@ -8,6 +8,7 @@
import
{
makeUniversalApp
}
from
'
vscode-universal
'
;
import
*
as
fs
from
'
fs-extra
'
;
import
*
as
path
from
'
path
'
;
import
*
as
plist
from
'
plist
'
;
import
*
as
product
from
'
../../product.json
'
;
async
function
main
()
{
...
...
@@ -25,6 +26,7 @@ async function main() {
const
arm64AsarPath
=
path
.
join
(
arm64AppPath
,
'
Contents
'
,
'
Resources
'
,
'
app
'
,
'
node_modules.asar
'
);
const
outAppPath
=
path
.
join
(
buildDir
,
`VSCode-darwin-
${
arch
}
`
,
appName
);
const
productJsonPath
=
path
.
resolve
(
outAppPath
,
'
Contents
'
,
'
Resources
'
,
'
app
'
,
'
product.json
'
);
const
infoPlistPath
=
path
.
resolve
(
outAppPath
,
'
Contents
'
,
'
Info.plist
'
);
await
makeUniversalApp
({
x64AppPath
,
...
...
@@ -47,6 +49,13 @@ async function main() {
darwinUniversalAssetId
:
'
darwin-universal
'
});
await
fs
.
writeJson
(
productJsonPath
,
productJson
);
let
infoPlistString
=
await
fs
.
readFile
(
infoPlistPath
,
'
utf8
'
);
let
infoPlistJson
=
plist
.
parse
(
infoPlistString
);
Object
.
assign
(
infoPlistJson
,
{
LSRequiresNativeExecution
:
true
});
await
fs
.
writeFile
(
infoPlistPath
,
plist
.
build
(
infoPlistJson
),
'
utf8
'
);
}
if
(
require
.
main
===
module
)
{
...
...
build/lib/node.js
浏览文件 @
f73c011a
...
...
@@ -10,6 +10,8 @@ const root = path.dirname(path.dirname(__dirname));
const
yarnrcPath
=
path
.
join
(
root
,
'
remote
'
,
'
.yarnrc
'
);
const
yarnrc
=
fs
.
readFileSync
(
yarnrcPath
,
'
utf8
'
);
const
version
=
/^target
\s
+"
([^
"
]
+
)
"$/m
.
exec
(
yarnrc
)[
1
];
const
node
=
process
.
platform
===
'
win32
'
?
'
node.exe
'
:
'
node
'
;
const
nodePath
=
path
.
join
(
root
,
'
.build
'
,
'
node
'
,
`v
${
version
}
`
,
`
${
process
.
platform
}
-
${
process
.
arch
}
`
,
node
);
const
platform
=
process
.
platform
;
const
arch
=
platform
===
'
darwin
'
?
'
x64
'
:
process
.
arch
;
const
node
=
platform
===
'
win32
'
?
'
node.exe
'
:
'
node
'
;
const
nodePath
=
path
.
join
(
root
,
'
.build
'
,
'
node
'
,
`v
${
version
}
`
,
`
${
platform
}
-
${
arch
}
`
,
node
);
console
.
log
(
nodePath
);
build/package.json
浏览文件 @
f73c011a
...
...
@@ -22,6 +22,7 @@
"@types/minimist"
:
"^1.2.1"
,
"@types/mocha"
:
"^8.2.0"
,
"@types/node"
:
"^12.19.9"
,
"@types/plist"
:
"^3.0.2"
,
"@types/pump"
:
"^1.0.1"
,
"@types/request"
:
"^2.47.0"
,
"@types/rimraf"
:
"^2.0.4"
,
...
...
@@ -41,6 +42,7 @@
"jsonc-parser"
:
"^2.3.0"
,
"mime"
:
"^1.4.1"
,
"mkdirp"
:
"^1.0.4"
,
"plist"
:
"^3.0.1"
,
"source-map"
:
"0.6.1"
,
"typescript"
:
"4.2.0-dev.20201207"
,
"vsce"
:
"1.48.0"
,
...
...
build/yarn.lock
浏览文件 @
f73c011a
...
...
@@ -219,6 +219,14 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==
"@types/plist@^3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@types/plist/-/plist-3.0.2.tgz#61b3727bba0f5c462fe333542534a0c3e19ccb01"
integrity sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw==
dependencies:
"@types/node" "*"
xmlbuilder ">=11.0.1"
"@types/pump@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@types/pump/-/pump-1.0.1.tgz#ae8157cefef04d1a4d24c1cc91d403c2f5da5cd0"
...
...
@@ -1632,6 +1640,11 @@ xml2js@0.2.8:
dependencies:
sax "0.5.x"
xmlbuilder@>=11.0.1:
version "15.1.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5"
integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==
xmlbuilder@^9.0.7:
version "9.0.7"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录