mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-15 07:28:05 +00:00
fix: rename product executable on macOS (#291948)
* fix: rename product executable name on macOS * chore: update test/automation/src/electron.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: update test/automation/src/electron.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: rename in additional places * chore: rename in code-perf.js * chore: create symlink for backwards compatibility --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -12,7 +12,8 @@ function code() {
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
NAME=`node -p "require('./product.json').nameLong"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||
EXE_NAME=`node -p "require('./product.json').nameShort"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/$EXE_NAME"
|
||||
else
|
||||
NAME=`node -p "require('./product.json').applicationName"`
|
||||
CODE=".build/electron/$NAME"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// @ts-check
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const perf = require('@vscode/vscode-perf');
|
||||
|
||||
const VSCODE_FOLDER = path.join(__dirname, '..');
|
||||
@@ -62,9 +63,14 @@ function getExePath(buildPath) {
|
||||
}
|
||||
let relativeExePath;
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
relativeExePath = path.join('Contents', 'MacOS', 'Electron');
|
||||
case 'darwin': {
|
||||
const product = require(path.join(buildPath, 'Contents', 'Resources', 'app', 'product.json'));
|
||||
relativeExePath = path.join('Contents', 'MacOS', product.nameShort);
|
||||
if (!fs.existsSync(path.join(buildPath, relativeExePath))) {
|
||||
relativeExePath = path.join('Contents', 'MacOS', 'Electron');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'linux': {
|
||||
const product = require(path.join(buildPath, 'resources', 'app', 'product.json'));
|
||||
relativeExePath = product.applicationName;
|
||||
|
||||
@@ -18,7 +18,8 @@ function code() {
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
NAME=`node -p "require('./product.json').nameLong"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||
EXE_NAME=`node -p "require('./product.json').nameShort"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/$EXE_NAME"
|
||||
else
|
||||
NAME=`node -p "require('./product.json').applicationName"`
|
||||
CODE=".build/electron/$NAME"
|
||||
|
||||
@@ -11,7 +11,8 @@ pushd $ROOT
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
NAME=`node -p "require('./product.json').nameLong"`
|
||||
CODE="$ROOT/.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||
EXE_NAME=`node -p "require('./product.json').nameShort"`
|
||||
CODE="$ROOT/.build/electron/$NAME.app/Contents/MacOS/$EXE_NAME"
|
||||
else
|
||||
NAME=`node -p "require('./product.json').applicationName"`
|
||||
CODE="$ROOT/.build/electron/$NAME"
|
||||
|
||||
@@ -12,7 +12,8 @@ cd $ROOT
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
NAME=`node -p "require('./product.json').nameLong"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||
EXE_NAME=`node -p "require('./product.json').nameShort"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/$EXE_NAME"
|
||||
else
|
||||
NAME=`node -p "require('./product.json').applicationName"`
|
||||
CODE=".build/electron/$NAME"
|
||||
|
||||
Reference in New Issue
Block a user