mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-24 11:50:14 +10:00
patch static binary name
This commit is contained in:
48
patches/binary-name.patch
Normal file
48
patches/binary-name.patch
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||||
|
index 6d3a369..57009d4 100644
|
||||||
|
--- a/build/gulpfile.vscode.js
|
||||||
|
+++ b/build/gulpfile.vscode.js
|
||||||
|
@@ -276,7 +276,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||||
|
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
||||||
|
} else if (platform === 'darwin') {
|
||||||
|
const shortcut = gulp.src('resources/darwin/bin/code.sh')
|
||||||
|
- .pipe(rename('bin/code'));
|
||||||
|
+ .pipe(rename('bin/' + product.applicationName));
|
||||||
|
|
||||||
|
all = es.merge(all, shortcut);
|
||||||
|
}
|
||||||
|
@@ -483,7 +483,7 @@ const generateVSCodeConfigurationTask = task.define('generate-vscode-configurati
|
||||||
|
const arch = process.env['VSCODE_ARCH'];
|
||||||
|
const appRoot = path.join(buildDir, `VSCode-darwin-${arch}`);
|
||||||
|
const appName = process.env.VSCODE_QUALITY === 'insider' ? 'Visual\\ Studio\\ Code\\ -\\ Insiders.app' : 'Visual\\ Studio\\ Code.app';
|
||||||
|
- const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', 'code');
|
||||||
|
+ const appPath = path.join(appRoot, appName, 'Contents', 'Resources', 'app', 'bin', product.applicationName);
|
||||||
|
const codeProc = cp.exec(
|
||||||
|
`${appPath} --export-default-configuration='${allConfigDetailsPath}' --wait --user-data-dir='${userDataDir}' --extensions-dir='${extensionsDir}'`,
|
||||||
|
(err, stdout, stderr) => {
|
||||||
|
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
|
index 50c4460..bf73260 100644
|
||||||
|
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
|
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
|
||||||
|
@@ -430,7 +430,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
||||||
|
|
||||||
|
// macOS
|
||||||
|
if (this.environmentService.isBuilt) {
|
||||||
|
- return join(this.environmentService.appRoot, 'bin', 'code');
|
||||||
|
+ return join(this.environmentService.appRoot, 'bin', `${product.applicationName}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return join(this.environmentService.appRoot, 'scripts', 'code-cli.sh');
|
||||||
|
diff --git a/src/vs/workbench/contrib/cli/node/cli.contribution.ts b/src/vs/workbench/contrib/cli/node/cli.contribution.ts
|
||||||
|
index 30972a4..0a9435c 100644
|
||||||
|
--- a/src/vs/workbench/contrib/cli/node/cli.contribution.ts
|
||||||
|
+++ b/src/vs/workbench/contrib/cli/node/cli.contribution.ts
|
||||||
|
@@ -29,7 +29,7 @@ let _source: string | null = null;
|
||||||
|
function getSource(): string {
|
||||||
|
if (!_source) {
|
||||||
|
const root = FileAccess.asFileUri('', require).fsPath;
|
||||||
|
- _source = path.resolve(root, '..', 'bin', 'code');
|
||||||
|
+ _source = path.resolve(root, '..', 'bin', product.applicationName);
|
||||||
|
}
|
||||||
|
return _source;
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ cd vscode || exit
|
|||||||
# apply patches
|
# apply patches
|
||||||
patch -u src/vs/platform/update/electron-main/updateService.win32.ts -i ../patches/update-cache-path.patch
|
patch -u src/vs/platform/update/electron-main/updateService.win32.ts -i ../patches/update-cache-path.patch
|
||||||
patch -u resources/linux/rpm/code.spec.template -i ../patches/no-replace-product-json.patch
|
patch -u resources/linux/rpm/code.spec.template -i ../patches/no-replace-product-json.patch
|
||||||
|
git apply ../patches/binary-name.patch
|
||||||
|
|
||||||
if [[ "$OS_NAME" == "osx" ]]; then
|
if [[ "$OS_NAME" == "osx" ]]; then
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --ignore-optional
|
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --ignore-optional
|
||||||
|
|||||||
Reference in New Issue
Block a user