mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
fix: disable rosetta option for universal build (#115280)
This commit is contained in:
parent
ee7e0ad093
commit
f73c011ae3
|
@ -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 => {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue