diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 5fac7ba2e5d953e9e7a804928c7e16fb8acaa1ce..243e61fdcbc01ea6ba22ee021bc3d1a0eef8c869 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -117,6 +117,7 @@ var config = { iconFile: 'resources/darwin/code_file.icns' }], darwinCredits: darwinCreditsTemplate ? new Buffer(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : void 0, + linuxExecutableName: product.applicationName, winIcon: 'resources/win32/code.ico', token: process.env['GITHUB_TOKEN'] || void 0 }; @@ -270,6 +271,7 @@ function prepareDebPackage(arch) { return function () { var shortcut = gulp.src('resources/linux/bin/code.sh', { base: '.' }) + .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename(function (p) { p.extname = ''; p.dirname = 'usr/bin'; })); var desktop = gulp.src('resources/linux/debian/code.desktop', { base: '.' }) @@ -279,7 +281,7 @@ function prepareDebPackage(arch) { .pipe(rename(function (p) { p.dirname = 'usr/share/pixmaps'; })); var code = gulp.src(binaryDir + '/**/*', { base: binaryDir }) - .pipe(rename(function (p) { p.dirname = 'usr/share/code/' + p.dirname; })); + .pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; })); var size = 0; var control = code.pipe(es.through( diff --git a/package.json b/package.json index 872bd5ad51d4365d27f9cdffb9ce5a5faacaad23..d585baf84ca74c8825c0667b4f8a9181aefdc0a1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "ghooks": "^1.0.1", "glob": "^5.0.13", "gulp": "^3.8.9", - "gulp-atom-electron": "^1.2.0", + "gulp-atom-electron": "^1.4.0", "gulp-azure-storage": "^0.3.0", "gulp-bom": "^1.0.0", "gulp-buffer": "0.0.2", diff --git a/resources/linux/bin/code.sh b/resources/linux/bin/code.sh index 13405efe6fec2f64a7cdd8160023a04a4a35f1b8..8d9506f910b68947a0c7b53a2d258b2083bfe8d0 100755 --- a/resources/linux/bin/code.sh +++ b/resources/linux/bin/code.sh @@ -3,16 +3,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. -VSCODE_DIR="/usr/share/code" -if [ -x "$VSCODE_DIR/Code" ]; then - ELECTRON="$VSCODE_DIR/Code" -elif [ -x "$VSCODE_DIR/Code - OSS" ]; then - ELECTRON="$VSCODE_DIR/Code - OSS" -else - echo "Could not locate Visual Studio Code executable." - exit 1 -fi - -CLI="$VSCODE_DIR/resources/app/out/cli.js" +NAME="@@NAME@@" +VSCODE_PATH="/usr/share/$NAME" +ELECTRON="$VSCODE_PATH/$NAME" +CLI="$VSCODE_PATH/resources/app/out/cli.js" ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" exit $?