diff --git a/README.md b/README.md index dcda2146c..20e940689 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,22 @@ Currently only a 64-bit version is available. The Linux version does not currently automatically update so you will need to repeat these steps to upgrade to future releases. +### Archive extraction + +An archive is available for people who don't want to install `atom` as root. + +This version enables you to install multiple Atom versions in parallel. It has been built on Ubuntu 64-bit, +but should be compatible with other Linux distributions. + +1. Install dependencies (on Ubuntu): `sudo apt install git gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 +libnotify4 libxtst6 libnss3 python gvfs-bin xdg-utils libcap2` +2. Download `atom-amd64.tar.gz` from the [Atom releases page](https://github.com/atom/atom/releases/latest). +3. Run `tar xf atom-amd64.tar.gz` in the directory where you want to extract the Atom folder. +4. Launch Atom using the installed `atom` command from the newly extracted directory. + +The Linux version does not currently automatically update so you will need to +repeat these steps to upgrade to future releases. + ## Building * [Linux](docs/build-instructions/linux.md) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index d9375d05c..f8ee607e5 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -285,6 +285,7 @@ module.exports = (grunt) -> ciTasks.push('dump-symbols') if process.platform is 'darwin' ciTasks.push('set-version', 'check-licenses', 'lint', 'generate-asar') ciTasks.push('mkdeb') if process.platform is 'linux' + ciTasks.push('mktar') if process.platform is 'linux' ciTasks.push('codesign:exe') if process.platform is 'win32' and not process.env.CI ciTasks.push('create-windows-installer:installer') if process.platform is 'win32' ciTasks.push('test') if process.platform is 'darwin' diff --git a/build/tasks/mktar-task.coffee b/build/tasks/mktar-task.coffee new file mode 100644 index 000000000..f5edbb4be --- /dev/null +++ b/build/tasks/mktar-task.coffee @@ -0,0 +1,30 @@ +path = require 'path' + +module.exports = (grunt) -> + {spawn, fillTemplate} = require('./task-helpers')(grunt) + + grunt.registerTask 'mktar', 'Create an archive', -> + done = @async() + + appFileName = grunt.config.get('atom.appFileName') + buildDir = grunt.config.get('atom.buildDir') + shellAppDir = grunt.config.get('atom.shellAppDir') + {version, description} = grunt.config.get('atom.metadata') + + if process.arch is 'ia32' + arch = 'i386' + else if process.arch is 'x64' + arch = 'amd64' + else + return done("Unsupported arch #{process.arch}") + + iconPath = path.join(shellAppDir, 'resources', 'app.asar.unpacked', 'resources', 'atom.png') + + cmd = path.join('script', 'mktar') + args = [appFileName, version, arch, iconPath, buildDir] + spawn {cmd, args}, (error) -> + if error? + done(error) + else + grunt.log.ok "Created " + path.join(buildDir, "#{appFileName}-#{version}-#{arch}.tar.gz") + done() diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index de46eb4fe..19061db02 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -85,13 +85,13 @@ getAssets = -> arch = 'amd64' # Check for a Debian build - sourcePath = "#{buildDir}/#{appFileName}-#{version}-#{arch}.deb" + sourcePath = path.join(buildDir, "#{appFileName}-#{version}-#{arch}.deb") assetName = "atom-#{arch}.deb" # Check for a Fedora build unless fs.isFileSync(sourcePath) rpmName = fs.readdirSync("#{buildDir}/rpm")[0] - sourcePath = "#{buildDir}/rpm/#{rpmName}" + sourcePath = path.join(buildDir, "rpm", rpmName) if process.arch is 'ia32' arch = 'i386' else @@ -99,10 +99,17 @@ getAssets = -> assetName = "atom.#{arch}.rpm" cp sourcePath, path.join(buildDir, assetName) + assets = [{assetName, sourcePath}] - [ - {assetName, sourcePath} - ] + # Check for an archive build on a debian build machine. + # We could provide a Fedora version if some libraries are not compatible + sourcePath = path.join(buildDir, "#{appFileName}-#{version}-#{arch}.tar.gz") + if fs.isFileSync(sourcePath) + assetName = "atom-#{arch}.tar.gz" + cp sourcePath, path.join(buildDir, assetName) + assets.push({assetName, sourcePath}) + + assets logError = (message, error, details) -> grunt.log.error(message) diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index c6a9e74eb..126604c49 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -74,18 +74,24 @@ If you have problems with permissions don't forget to prefix with `sudo` To use the newly installed Atom, quit and restart all running Atom instances. -5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported. To create a `.deb` package run: +5. *Optionally*, you may generate distributable packages of Atom at `out`. Currently, `.deb` and `.rpm` package types are supported, as well as a `.tar.gz` archive. To create a `.deb` package run: ```sh script/grunt mkdeb ``` - To create an `.rpm` package run + To create a `.rpm` package run ```sh script/grunt mkrpm ``` + To create a `.tar.gz` archive run + + ```sh + script/grunt mktar + ``` + ## Advanced Options ### Custom build directory diff --git a/package.json b/package.json index 6c796a711..a1f33742b 100644 --- a/package.json +++ b/package.json @@ -88,8 +88,8 @@ "deprecation-cop": "0.54.1", "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", - "exception-reporting": "0.37.0", - "find-and-replace": "0.197.4", + "exception-reporting": "0.38.0", + "find-and-replace": "0.197.5", "fuzzy-finder": "1.0.3", "git-diff": "1.0.1", "go-to-line": "0.30.0", @@ -106,13 +106,13 @@ "package-generator": "1.0.0", "settings-view": "0.235.1", "snippets": "1.0.2", - "spell-check": "0.67.0", + "spell-check": "0.67.1", "status-bar": "1.2.1", "styleguide": "0.45.2", "symbols-view": "0.112.0", - "tabs": "0.92.0", + "tabs": "0.92.1", "timecop": "0.33.1", - "tree-view": "0.203.3", + "tree-view": "0.203.4", "update-package-dependencies": "0.10.0", "welcome": "0.34.0", "whitespace": "0.32.2", @@ -134,7 +134,7 @@ "language-make": "0.21.0", "language-mustache": "0.13.0", "language-objective-c": "0.15.1", - "language-perl": "0.33.0", + "language-perl": "0.34.0", "language-php": "0.37.0", "language-property-list": "0.8.0", "language-python": "0.43.1", diff --git a/script/mktar b/script/mktar new file mode 100755 index 000000000..986063f9a --- /dev/null +++ b/script/mktar @@ -0,0 +1,39 @@ +#!/bin/bash +# mktar name version arch icon-path build-root-path + +set -e + +SCRIPT=`readlink -f "$0"` +ROOT=`readlink -f $(dirname $SCRIPT)/..` +cd $ROOT + +NAME="$1" +VERSION="$2" +ARCH="$3" +ICON_FILE="$4" +BUILD_ROOT_PATH="$5" +FILE_MODE=755 + +TAR_PATH=$BUILD_ROOT_PATH +ATOM_PATH="$BUILD_ROOT_PATH/Atom" + +TARGET_ROOT="`mktemp -d`" +chmod $FILE_MODE "$TARGET_ROOT" +NAME_IN_TAR="$NAME-$VERSION-$ARCH" +TARGET="$TARGET_ROOT/$NAME_IN_TAR" + +# Copy executable and resources +cp -a "$ATOM_PATH" "$TARGET" + +# Copy icon file +cp "$ICON_FILE" "$TARGET/$NAME.png" + +# Remove executable bit from .node files +find "$TARGET" -type f -name "*.node" -exec chmod a-x {} \; + +# Create the archive +pushd "$TARGET_ROOT" +tar caf "$TAR_PATH/$NAME_IN_TAR.tar.gz" "$NAME_IN_TAR" +popd + +rm -rf "$TARGET_ROOT"