mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
* Merge from vscode 504f934659740e9d41501cad9f162b54d7745ad9 * delete unused folders * distro * Bump build node version * update chokidar * FIx hygiene errors * distro * Fix extension lint issues * Remove strict-vscode * Add copyright header exemptions * Bump vscode-extension-telemetry to fix webpacking issue with zone.js * distro * Fix failing tests (revert marked.js back to current one until we decide to update) * Skip searchmodel test * Fix mac build * temp debug script loading * Try disabling coverage * log error too * Revert "log error too" This reverts commit af0183e5d4ab458fdf44b88fbfab9908d090526f. * Revert "temp debug script loading" This reverts commit 3d687d541c76db2c5b55626c78ae448d3c25089c. * Add comments explaining coverage disabling * Fix ansi_up loading issue * Merge latest from ads * Use newer option * Fix compile * add debug logging warn * Always log stack * log more * undo debug * Update to use correct base path (+cleanup) * distro * fix compile errors * Remove strict-vscode * Fix sql editors not showing * Show db dropdown input & fix styling * Fix more info in gallery * Fix gallery asset requests * Delete unused workflow * Fix tapable resolutions for smoke test compile error * Fix smoke compile * Disable crash reporting * Disable interactive Co-authored-by: ADS Merger <karlb@microsoft.com>
105 lines
3.3 KiB
JavaScript
105 lines
3.3 KiB
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
'use strict';
|
|
|
|
const gulp = require('gulp');
|
|
const path = require('path');
|
|
const task = require('./lib/task');
|
|
const util = require('./lib/util');
|
|
const _ = require('underscore');
|
|
const electron = require('gulp-atom-electron');
|
|
const { config } = require('./lib/electron');
|
|
const filter = require('gulp-filter');
|
|
const deps = require('./lib/dependencies');
|
|
|
|
const root = path.dirname(__dirname);
|
|
|
|
const BUILD_TARGETS = [
|
|
{ platform: 'win32', arch: 'ia32' },
|
|
{ platform: 'win32', arch: 'x64' },
|
|
{ platform: 'win32', arch: 'arm64' },
|
|
{ platform: 'darwin', arch: null, opts: { stats: true } },
|
|
{ platform: 'linux', arch: 'ia32' },
|
|
{ platform: 'linux', arch: 'x64' },
|
|
{ platform: 'linux', arch: 'armhf' },
|
|
{ platform: 'linux', arch: 'arm64' },
|
|
];
|
|
|
|
BUILD_TARGETS.forEach(buildTarget => {
|
|
const dashed = (str) => (str ? `-${str}` : ``);
|
|
const platform = buildTarget.platform;
|
|
const arch = buildTarget.arch;
|
|
|
|
const destinationExe = path.join(path.dirname(root), 'scanbin', `VSCode${dashed(platform)}${dashed(arch)}`, 'bin');
|
|
const destinationPdb = path.join(path.dirname(root), 'scanbin', `VSCode${dashed(platform)}${dashed(arch)}`, 'pdb');
|
|
|
|
const tasks = [];
|
|
|
|
// removal tasks
|
|
tasks.push(util.rimraf(destinationExe), util.rimraf(destinationPdb));
|
|
|
|
// electron
|
|
tasks.push(() => electron.dest(destinationExe, _.extend({}, config, { platform, arch: arch === 'armhf' ? 'arm' : arch })));
|
|
|
|
// pdbs for windows
|
|
if (platform === 'win32') {
|
|
tasks.push(
|
|
() => electron.dest(destinationPdb, _.extend({}, config, { platform, arch: arch === 'armhf' ? 'arm' : arch, pdbs: true })),
|
|
util.rimraf(path.join(destinationExe, 'swiftshader')),
|
|
util.rimraf(path.join(destinationExe, 'd3dcompiler_47.dll')));
|
|
}
|
|
|
|
if (platform === 'linux') {
|
|
tasks.push(
|
|
() => electron.dest(destinationPdb, _.extend({}, config, { platform, arch: arch === 'armhf' ? 'arm' : arch, symbols: true }))
|
|
);
|
|
}
|
|
|
|
// node modules
|
|
tasks.push(
|
|
nodeModules(destinationExe, destinationPdb, platform)
|
|
);
|
|
|
|
const setupSymbolsTask = task.define(`vscode-symbols${dashed(platform)}${dashed(arch)}`,
|
|
task.series(...tasks)
|
|
);
|
|
|
|
gulp.task(setupSymbolsTask);
|
|
});
|
|
|
|
function nodeModules(destinationExe, destinationPdb, platform) {
|
|
const productionDependencies = deps.getProductionDependencies(root);
|
|
const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`]));
|
|
|
|
const exe = () => {
|
|
return gulp.src(dependenciesSrc, { base: '.', dot: true })
|
|
.pipe(filter(['**/*.node']))
|
|
.pipe(gulp.dest(destinationExe));
|
|
};
|
|
|
|
if (platform === 'win32') {
|
|
const pdb = () => {
|
|
return gulp.src(dependenciesSrc, { base: '.', dot: true })
|
|
.pipe(filter(['**/*.pdb']))
|
|
.pipe(gulp.dest(destinationPdb));
|
|
};
|
|
|
|
return gulp.parallel(exe, pdb);
|
|
}
|
|
|
|
if (platform === 'linux') {
|
|
const pdb = () => {
|
|
return gulp.src(dependenciesSrc, { base: '.', dot: true })
|
|
.pipe(filter(['**/*.sym']))
|
|
.pipe(gulp.dest(destinationPdb));
|
|
};
|
|
|
|
return gulp.parallel(exe, pdb);
|
|
}
|
|
|
|
return exe;
|
|
}
|