diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index 9e977e71..b84733ba 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -20,8 +20,6 @@ const path = require('path'); const root = path.dirname(__dirname); const commit = util.getVersion(root); -const IdeName = 'Kylin Code'; - const linuxPackageRevision = Math.floor(new Date().getTime() / 1000); function getDebPackageArch(arch) { @@ -41,21 +39,21 @@ function prepareDebPackage(arch) { .pipe(rename('usr/share/applications/' + product.applicationName + '-url-handler.desktop')); const desktops = es.merge(desktop, desktopUrlHandler) - .pipe(replace('@@NAME_LONG@@', IdeName)) - .pipe(replace('@@NAME_SHORT@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) + .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@EXEC@@', `/usr/share/${product.applicationName}/${product.applicationName}`)) .pipe(replace('@@ICON@@', product.linuxIconName)) .pipe(replace('@@URLPROTOCOL@@', product.urlProtocol)); const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' }) - .pipe(replace('@@NAME_LONG@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@LICENSE@@', product.licenseName)) .pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml')); const workspaceMime = gulp.src('resources/linux/code-workspace.xml', { base: '.' }) - .pipe(replace('@@NAME_LONG@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('usr/share/mime/packages/' + product.applicationName + '-workspace.xml')); @@ -146,21 +144,21 @@ function prepareRpmPackage(arch) { .pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '-url-handler.desktop')); const desktops = es.merge(desktop, desktopUrlHandler) - .pipe(replace('@@NAME_LONG@@', IdeName)) - .pipe(replace('@@NAME_SHORT@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) + .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@EXEC@@', `/usr/share/${product.applicationName}/${product.applicationName}`)) .pipe(replace('@@ICON@@', product.linuxIconName)) .pipe(replace('@@URLPROTOCOL@@', product.urlProtocol)); const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' }) - .pipe(replace('@@NAME_LONG@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@LICENSE@@', product.licenseName)) .pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml')); const workspaceMime = gulp.src('resources/linux/code-workspace.xml', { base: '.' }) - .pipe(replace('@@NAME_LONG@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('BUILD/usr/share/mime/packages/' + product.applicationName + '-workspace.xml')); @@ -181,7 +179,7 @@ function prepareRpmPackage(arch) { const dependencies = rpmDependenciesGenerator.getDependencies(binaryDir, product.applicationName, rpmArch); const spec = gulp.src('resources/linux/rpm/code.spec.template', { base: '.' }) .pipe(replace('@@NAME@@', product.applicationName)) - .pipe(replace('@@NAME_LONG@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) .pipe(replace('@@ICON@@', product.linuxIconName)) .pipe(replace('@@VERSION@@', packageJson.IDEVersion)) .pipe(replace('@@RELEASE@@', linuxPackageRevision)) @@ -241,8 +239,8 @@ function prepareSnapPackage(arch) { .pipe(rename(`snap/gui/${product.applicationName}-url-handler.desktop`)); const desktops = es.merge(desktop, desktopUrlHandler) - .pipe(replace('@@NAME_LONG@@', IdeName)) - .pipe(replace('@@NAME_SHORT@@', IdeName)) + .pipe(replace('@@NAME_LONG@@', product.nameLong)) + .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(replace('@@EXEC@@', `${product.applicationName} --force-user-env`)) .pipe(replace('@@ICON@@', `\${SNAP}/meta/gui/${product.linuxIconName}.png`))