From 2e200d6e28d47bba521cf17085b05f9194405c05 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 3 Mar 2018 10:05:01 -0800 Subject: [PATCH] Remove flatpak task Fixes #44578 --- build/gulpfile.vscode.linux.js | 103 --------------------------------- package.json | 3 +- yarn.lock | 32 +--------- 3 files changed, 2 insertions(+), 136 deletions(-) diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index a658758de98..ecbc45df320 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -21,29 +21,6 @@ const rpmDependencies = require('../resources/linux/rpm/dependencies.json'); const linuxPackageRevision = Math.floor(new Date().getTime() / 1000); -const flatpakManifest = { - appId: product.darwinBundleIdentifier, // We need a reverse-url style identifier. - sdk: 'org.freedesktop.Sdk', - runtime: 'org.freedesktop.Sdk', - runtimeVersion: '1.4', - base: 'io.atom.electron.BaseApp', - baseFlatpakref: 'https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/electron-base-app-master.flatpakref', - command: product.applicationName, - symlinks: [ - ['/share/' + product.applicationName + '/bin/' + product.applicationName, '/bin/' + product.applicationName], - ], - finishArgs: [ - '--share=ipc', '--socket=x11', // Allow showing X11 windows. - '--share=network', // Network access (e.g. for installing extension). - '--filesystem=host', // Allow access to the whole file system. - '--device=dri', // Allow OpenGL rendering. - '--filesystem=/tmp', // Needed for Chromium's single instance check. - '--socket=pulseaudio', // Some extensions may want to play sounds... - '--talk-name=org.freedesktop.Notifications', // ...or pop up notifications. - ], -}; - - function getDebPackageArch(arch) { return { x64: 'amd64', ia32: 'i386', arm: 'armhf' }[arch]; } @@ -227,79 +204,6 @@ function buildSnapPackage(arch) { ]); } -function getFlatpakArch(arch) { - return { x64: 'x86_64', ia32: 'i386', arm: 'arm' }[arch]; -} - -function prepareFlatpak(arch) { - const binaryDir = '../VSCode-linux-' + arch; - const flatpakArch = getFlatpakArch(arch); - const destination = '.build/linux/flatpak/' + flatpakArch; - - return function () { - // This is not imported in the global scope to avoid requiring ImageMagick - // (or GraphicsMagick) when not building building Flatpak bundles. - const imgResize = require('gulp-image-resize'); - - const all = [16, 24, 32, 48, 64, 128, 192, 256, 512].map(function (size) { - return gulp.src('resources/linux/code.png', { base: '.' }) - .pipe(imgResize({ width: size, height: size, format: "png", noProfile: true })) - .pipe(rename('share/icons/hicolor/' + size + 'x' + size + '/apps/' + flatpakManifest.appId + '.png')); - }); - - all.push(gulp.src('resources/linux/code.desktop', { base: '.' }) - .pipe(replace('Exec=/usr/share/@@NAME@@/@@NAME@@', 'Exec=' + product.applicationName)) - .pipe(replace('@@NAME_LONG@@', product.nameLong)) - .pipe(replace('@@NAME_SHORT@@', product.nameShort)) - .pipe(replace('@@NAME@@', product.applicationName)) - .pipe(rename('share/applications/' + flatpakManifest.appId + '.desktop'))); - - all.push(gulp.src('resources/linux/code.appdata.xml', { base: '.' }) - .pipe(replace('@@NAME_LONG@@', product.nameLong)) - .pipe(replace('@@NAME@@', flatpakManifest.appId)) - .pipe(replace('@@LICENSE@@', product.licenseName)) - .pipe(rename('share/appdata/' + flatpakManifest.appId + '.appdata.xml'))); - - all.push(gulp.src(binaryDir + '/**/*', { base: binaryDir }) - .pipe(rename(function (p) { - p.dirname = 'share/' + product.applicationName + '/' + p.dirname; - }))); - - return es.merge(all).pipe(vfs.dest(destination)); - }; -} - -function buildFlatpak(arch) { - const flatpakArch = getFlatpakArch(arch); - const manifest = {}; - for (var k in flatpakManifest) { - manifest[k] = flatpakManifest[k]; - } - manifest.files = [ - ['.build/linux/flatpak/' + flatpakArch, '/'], - ]; - const buildOptions = { - arch: flatpakArch, - subject: product.nameLong + ' ' + packageJson.version + '.' + linuxPackageRevision, - }; - // If requested, use the configured path for the OSTree repository. - if (process.env.FLATPAK_REPO) { - buildOptions.repoDir = process.env.FLATPAK_REPO; - } else { - buildOptions.bundlePath = manifest.appId + '-' + flatpakArch + '.flatpak'; - } - // Setup PGP signing if requested. - if (process.env.GPG_KEY_ID !== undefined) { - buildOptions.gpgSign = process.env.GPG_KEY_ID; - if (process.env.GPG_HOMEDIR) { - buildOptions.gpgHomedir = process.env.GPG_HOME_DIR; - } - } - return function (cb) { - require('flatpak-bundler').bundle(manifest, buildOptions, cb); - }; -} - gulp.task('clean-vscode-linux-ia32-deb', util.rimraf('.build/linux/deb/i386')); gulp.task('clean-vscode-linux-x64-deb', util.rimraf('.build/linux/deb/amd64')); gulp.task('clean-vscode-linux-arm-deb', util.rimraf('.build/linux/deb/armhf')); @@ -333,10 +237,3 @@ gulp.task('vscode-linux-arm-prepare-snap', ['clean-vscode-linux-arm-snap'], prep gulp.task('vscode-linux-ia32-build-snap', ['vscode-linux-ia32-prepare-snap'], buildSnapPackage('ia32')); gulp.task('vscode-linux-x64-build-snap', ['vscode-linux-x64-prepare-snap'], buildSnapPackage('x64')); gulp.task('vscode-linux-arm-build-snap', ['vscode-linux-arm-prepare-snap'], buildSnapPackage('arm')); - -gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'], prepareFlatpak('ia32')); -gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'], prepareFlatpak('x64')); -gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'], prepareFlatpak('arm')); -gulp.task('vscode-linux-ia32-flatpak', ['vscode-linux-ia32-prepare-flatpak'], buildFlatpak('ia32')); -gulp.task('vscode-linux-x64-flatpak', ['vscode-linux-x64-prepare-flatpak'], buildFlatpak('x64')); -gulp.task('vscode-linux-arm-flatpak', ['vscode-linux-arm-prepare-flatpak'], buildFlatpak('arm')); diff --git a/package.json b/package.json index 1a328c1f464..d757452d768 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "eslint": "^3.4.0", "event-stream": "^3.1.7", "express": "^4.13.1", - "flatpak-bundler": "^0.1.1", "glob": "^5.0.13", "gulp": "^3.8.9", "gulp-atom-electron": "1.15.1", @@ -133,4 +132,4 @@ "windows-mutex": "^0.2.0", "windows-process-tree": "0.1.6" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 75a6926fe1f..f1a077903d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1336,16 +1336,6 @@ es6-map@^0.1.3: es6-symbol "~3.1.1" event-emitter "~0.3.5" -es6-promise@^4.0.3: - version "4.1.1" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a" - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - dependencies: - es6-promise "^4.0.3" - es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -1800,16 +1790,6 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flatpak-bundler@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/flatpak-bundler/-/flatpak-bundler-0.1.3.tgz#e45dfa0c4a7485c370e0915e4728929798503946" - dependencies: - debug "^2.2.0" - es6-promisify "^5.0.0" - fs-extra "^0.30.0" - lodash "^4.16.2" - tmp "0.0.29" - flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" @@ -1906,16 +1886,6 @@ fs-extra@0.26.7, fs-extra@^0.26.5: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - fs-extra@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" @@ -3537,7 +3507,7 @@ lodash@^3.5.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.2, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"