Copy LICENSE.md to process.resourcesPath

The LICENSE file is needed by mkdeb task, we should move it out of asar
archive.
This commit is contained in:
Cheng Zhao
2015-03-25 10:27:25 +08:00
parent 505754783f
commit 01130230e4
3 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ module.exports = (grunt) ->
licenseText = getLicenseText(dependencyLicenses)
if mode is 'save'
targetPath = path.join(grunt.config.get('atom.appDir'), 'LICENSE.md')
targetPath = path.resolve(grunt.config.get('atom.appDir'), '..', 'LICENSE.md')
fs.writeFileSync(targetPath, licenseText)
else
console.log licenseText

View File

@@ -33,7 +33,7 @@ cp "$ICON_FILE" "$TARGET/usr/share/pixmaps"
# Copy generated LICENSE.md to /usr/share/doc/atom/copyright
mkdir -m $FILE_MODE -p "$TARGET/usr/share/doc/atom"
cp "$TARGET/usr/share/atom/resources/app/LICENSE.md" "$TARGET/usr/share/doc/atom/copyright"
cp "$TARGET/usr/share/atom/resources/LICENSE.md" "$TARGET/usr/share/doc/atom/copyright"
# Add lintian overrides
mkdir -m $FILE_MODE -p "$TARGET/usr/share/lintian/overrides"

View File

@@ -190,7 +190,7 @@ class AtomApplication
@openPathOnEvent('application:open-your-keymap', 'atom://.atom/keymap')
@openPathOnEvent('application:open-your-snippets', 'atom://.atom/snippets')
@openPathOnEvent('application:open-your-stylesheet', 'atom://.atom/stylesheet')
@openPathOnEvent('application:open-license', path.join(@resourcePath, 'LICENSE.md'))
@openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md'))
app.on 'window-all-closed', ->
app.quit() if process.platform in ['win32', 'linux']