Separate icons for non-stable builds (#7857)
* Use separate icons for non-stable builds * Fix file name * Switch icon * Updated icons * Switch to copy of code.ico until issue is fixed * Fix icon * remove * add * Fix file renaming * Fix a couple naming issues * Move iss changes to build file
@@ -164,14 +164,13 @@ const config = {
|
||||
productAppName: product.nameLong,
|
||||
companyName: 'Microsoft Corporation',
|
||||
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
|
||||
darwinIcon: 'resources/darwin/code.icns',
|
||||
darwinIcon: product.quality === 'stable' ? 'resources/darwin/code.icns' : 'resources/darwin/code-insiders.icns', // {{SQL CARBON EDIT}} Use separate icons for non-stable
|
||||
darwinBundleIdentifier: product.darwinBundleIdentifier,
|
||||
darwinApplicationCategoryType: 'public.app-category.developer-tools',
|
||||
darwinHelpBookFolder: 'VS Code HelpBook',
|
||||
darwinHelpBookName: 'VS Code HelpBook',
|
||||
darwinBundleDocumentTypes: [
|
||||
// {{SQL CARBON EDIT}} - Remove most document types and replace with ours
|
||||
darwinBundleDocumentType(["csv", "json", "sqlplan", "sql", "xml"], 'resources/darwin/code_file.icns'),
|
||||
darwinBundleDocumentType(["csv", "json", "sqlplan", "sql", "xml"], product.quality === 'stable' ? 'resources/darwin/code_file.icns' : 'resources/darwin/code_file-insiders.icns'), // {{SQL CARBON EDIT}} - Remove most document types and replace with ours. Also use separate icon for non-stable
|
||||
],
|
||||
darwinBundleURLTypes: [{
|
||||
role: 'Viewer',
|
||||
@@ -181,7 +180,7 @@ const config = {
|
||||
darwinForceDarkModeSupport: true,
|
||||
darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined,
|
||||
linuxExecutableName: product.applicationName,
|
||||
winIcon: 'resources/win32/code.ico',
|
||||
winIcon: product.quality === 'stable' ? 'resources/win32/code.ico' : 'resources/win32/code-insiders.ico', // {{SQL CARBON EDIT}} Use separate icons for non-stable
|
||||
token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined,
|
||||
|
||||
// @ts-ignore JSON checking: electronRepository is optional
|
||||
@@ -333,12 +332,24 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||
);
|
||||
|
||||
if (platform === 'win32') {
|
||||
if (quality !== 'stable') {
|
||||
// {{SQL CARBON EDIT}} use separate icons for non-stable
|
||||
gulp.src([
|
||||
'resources/win32/code_70x70-insiders.png',
|
||||
'resources/win32/code_150x150-insiders.png'
|
||||
]).pipe(rename(function (f) { f.basename = f.basename.replace('-insiders', ''); }))
|
||||
.pipe(gulp.dest('resources/win32'));
|
||||
}
|
||||
all = es.merge(all, gulp.src([
|
||||
// {{SQL CARBON EDIT}} remove unused icons
|
||||
'resources/win32/code_70x70.png',
|
||||
'resources/win32/code_150x150.png'
|
||||
], { base: '.' }));
|
||||
} else if (platform === 'linux') {
|
||||
// {{SQL CARBON EDIT}} use separate icons for non-stable
|
||||
if (quality !== 'stable') {
|
||||
gulp.src('resources/linux/code-insiders.png').pipe(rename('resources/linux/code.png'));
|
||||
}
|
||||
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
|
||||
} else if (platform === 'darwin') {
|
||||
const shortcut = gulp.src('resources/darwin/bin/code.sh')
|
||||
@@ -510,7 +521,7 @@ gulp.task('vscode-translations-pull', function () {
|
||||
|
||||
gulp.task('vscode-translations-import', function () {
|
||||
// {{SQL CARBON EDIT}} - Replace function body with our own
|
||||
return new Promise(function(resolve) {
|
||||
return new Promise(function (resolve) {
|
||||
[...i18n.defaultLanguages, ...i18n.extraLanguages].forEach(language => {
|
||||
let languageId = language.translationId ? language.translationId : language.id;
|
||||
gulp.src(`resources/xlf/${languageId}/**/*.xlf`)
|
||||
|
||||
@@ -53,7 +53,7 @@ function prepareDebPackage(arch) {
|
||||
.pipe(replace('@@LICENSE@@', product.licenseName))
|
||||
.pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml'));
|
||||
|
||||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
const icon = gulp.src(product.quality === 'stable' ? 'resources/linux/code.png' : 'resources/linux/code-insiders.png', { base: '.' }) // {{SQL CARBON EDIT}} Use separate icons for non-stable
|
||||
.pipe(rename('usr/share/pixmaps/' + product.linuxIconName + '.png'));
|
||||
|
||||
const bash_completion = gulp.src('resources/completions/bash/code')
|
||||
@@ -147,7 +147,7 @@ function prepareRpmPackage(arch) {
|
||||
.pipe(replace('@@LICENSE@@', product.licenseName))
|
||||
.pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml'));
|
||||
|
||||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
const icon = gulp.src(product.quality === 'stable' ? 'resources/linux/code.png' : 'resources/linux/code-insiders.png', { base: '.' }) // {{SQL CARBON EDIT}} Use separate icons for non-stable
|
||||
.pipe(rename('BUILD/usr/share/pixmaps/' + product.linuxIconName + '.png'));
|
||||
|
||||
const bash_completion = gulp.src('resources/completions/bash/code')
|
||||
@@ -225,7 +225,7 @@ function prepareSnapPackage(arch) {
|
||||
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
||||
|
||||
// An icon that is placed in snap/gui will be placed into meta/gui verbatim.
|
||||
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
||||
const icon = gulp.src(product.quality === 'stable' ? 'resources/linux/code.png' : 'resources/linux/code-insiders.png', { base: '.' }) // {{SQL CARBON EDIT}} Use separate icons for non-stable
|
||||
.pipe(rename(`snap/gui/${product.linuxIconName}.png`));
|
||||
|
||||
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
const gulp = require('gulp');
|
||||
const rename = require('gulp-rename'); // {{SQL CARBON EDIT}}
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const assert = require('assert');
|
||||
@@ -42,6 +43,11 @@ function packageInnoSetup(iss, options, cb) {
|
||||
definitions['Sign'] = 'true';
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} Switch file icon for non-stable builds
|
||||
if (product.quality !== 'stable') {
|
||||
gulp.src('resources/win32/code_file-insiders.ico').pipe(rename('resources/win32/code_file.ico')).pipe(gulp.dest('resources/win32'));
|
||||
}
|
||||
|
||||
const keys = Object.keys(definitions);
|
||||
|
||||
keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${key}' in Inno Setup package step`));
|
||||
@@ -77,6 +83,15 @@ function buildWin32Setup(arch, target) {
|
||||
productJson['target'] = target;
|
||||
fs.writeFileSync(productJsonPath, JSON.stringify(productJson, undefined, '\t'));
|
||||
|
||||
// // {{SQL CARBON EDIT}} Modify installer file based on quality
|
||||
if(product.quality !== 'stable') {
|
||||
fs.writeFileSync(issPath,
|
||||
fs.readFileSync(issPath).toString()
|
||||
.replace(/inno-(small|big)-([\d]*)/g, 'inno-$1-$2-insiders')
|
||||
.replace(/code.ico/g, 'code-insiders.ico'));
|
||||
}
|
||||
|
||||
|
||||
const definitions = {
|
||||
NameLong: product.nameLong,
|
||||
NameShort: product.nameShort,
|
||||
@@ -138,7 +153,7 @@ function copyInnoUpdater(arch) {
|
||||
|
||||
function updateIcon(executablePath) {
|
||||
return cb => {
|
||||
const icon = path.join(repoPath, 'resources', 'win32', 'code.ico');
|
||||
const icon = product.quality === 'stable' ? path.join(repoPath, 'resources', 'win32', 'code-insiders.ico') : path.join(repoPath, 'resources', 'win32', 'code.ico'); // {{SQL CARBON EDIT}} Use separate icons for non-stable
|
||||
rcedit(executablePath, { icon }, cb);
|
||||
};
|
||||
}
|
||||
|
||||
BIN
resources/darwin/code-insiders.icns
Normal file
BIN
resources/darwin/code_file-insiders.icns
Normal file
BIN
resources/linux/code-insiders.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
resources/win32/code-insiders.ico
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
resources/win32/code_150x150-insiders.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
resources/win32/code_70x70-insiders.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
resources/win32/code_file-insiders.ico
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
resources/win32/inno-big-100-insiders.bmp
Normal file
|
After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
BIN
resources/win32/inno-big-125-insiders.bmp
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
resources/win32/inno-big-150-insiders.bmp
Normal file
|
After Width: | Height: | Size: 332 KiB |
|
Before Width: | Height: | Size: 332 KiB After Width: | Height: | Size: 332 KiB |
BIN
resources/win32/inno-big-175-insiders.bmp
Normal file
|
After Width: | Height: | Size: 445 KiB |
|
Before Width: | Height: | Size: 445 KiB After Width: | Height: | Size: 445 KiB |
BIN
resources/win32/inno-big-200-insiders.bmp
Normal file
|
After Width: | Height: | Size: 580 KiB |
|
Before Width: | Height: | Size: 580 KiB After Width: | Height: | Size: 580 KiB |
BIN
resources/win32/inno-big-225-insiders.bmp
Normal file
|
After Width: | Height: | Size: 730 KiB |
|
Before Width: | Height: | Size: 730 KiB After Width: | Height: | Size: 730 KiB |
BIN
resources/win32/inno-big-250-insiders.bmp
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
BIN
resources/win32/inno-small-100-insiders.bmp
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
resources/win32/inno-small-125-insiders.bmp
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
resources/win32/inno-small-150-insiders.bmp
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
BIN
resources/win32/inno-small-175-insiders.bmp
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
BIN
resources/win32/inno-small-200-insiders.bmp
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
BIN
resources/win32/inno-small-225-insiders.bmp
Normal file
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
BIN
resources/win32/inno-small-250-insiders.bmp
Normal file
|
After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |