From 08edcf23c930f8b9881b0c308b1f6acc8f0af70d Mon Sep 17 00:00:00 2001 From: Ethan Estrada Date: Wed, 4 Feb 2015 11:06:20 -0700 Subject: [PATCH 1/2] Let Linux packages fully determine executable path It is no longer hard coded into the atom.desktop.in file; the individual grunt tasks now determine how the executable is accessed. --- build/tasks/mkdeb-task.coffee | 3 ++- build/tasks/mkrpm-task.coffee | 3 ++- resources/linux/atom.desktop.in | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build/tasks/mkdeb-task.coffee b/build/tasks/mkdeb-task.coffee index cfe04f429..9fb8c7e4b 100644 --- a/build/tasks/mkdeb-task.coffee +++ b/build/tasks/mkdeb-task.coffee @@ -36,8 +36,9 @@ module.exports = (grunt) -> maintainer = 'GitHub ' installDir = '/usr' iconName = 'atom' + executable = path.join(installDir, 'share', 'atom', 'atom') getInstalledSize buildDir, (error, installedSize) -> - data = {name, version, description, section, arch, maintainer, installDir, iconName, installedSize} + data = {name, version, description, section, arch, maintainer, installDir, iconName, installedSize, executable} controlFilePath = fillTemplate(path.join('resources', 'linux', 'debian', 'control'), data) desktopFilePath = fillTemplate(path.join('resources', 'linux', 'atom.desktop'), data) icon = path.join('resources', 'atom.png') diff --git a/build/tasks/mkrpm-task.coffee b/build/tasks/mkrpm-task.coffee index 8590049b5..cd4e297f1 100644 --- a/build/tasks/mkrpm-task.coffee +++ b/build/tasks/mkrpm-task.coffee @@ -33,8 +33,9 @@ module.exports = (grunt) -> installDir = grunt.config.get('atom.installDir') shareDir = path.join(installDir, 'share', 'atom') iconName = path.join(shareDir, 'resources', 'app', 'resources', 'atom.png') + executable = path.join(shareDir, 'atom') - data = {name, version, description, installDir, iconName} + data = {name, version, description, installDir, iconName, executable} specFilePath = fillTemplate(path.join('resources', 'linux', 'redhat', 'atom.spec'), data) desktopFilePath = fillTemplate(path.join('resources', 'linux', 'atom.desktop'), data) diff --git a/resources/linux/atom.desktop.in b/resources/linux/atom.desktop.in index db28e7395..1969e3f26 100644 --- a/resources/linux/atom.desktop.in +++ b/resources/linux/atom.desktop.in @@ -2,7 +2,7 @@ Name=Atom Comment=<%= description %> GenericName=Text Editor -Exec=<%= installDir %>/share/atom/atom %U +Exec=<%= executable %> %U Icon=<%= iconName %> Type=Application StartupNotify=true From d05a3f370eb7a916ea782b4252e074f6590ffca4 Mon Sep 17 00:00:00 2001 From: Ethan Estrada Date: Wed, 4 Feb 2015 11:20:52 -0700 Subject: [PATCH 2/2] Have atom.desktop use PATH to find executable Currently for RPM build only. --- build/tasks/mkrpm-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/mkrpm-task.coffee b/build/tasks/mkrpm-task.coffee index cd4e297f1..8cec64196 100644 --- a/build/tasks/mkrpm-task.coffee +++ b/build/tasks/mkrpm-task.coffee @@ -33,7 +33,7 @@ module.exports = (grunt) -> installDir = grunt.config.get('atom.installDir') shareDir = path.join(installDir, 'share', 'atom') iconName = path.join(shareDir, 'resources', 'app', 'resources', 'atom.png') - executable = path.join(shareDir, 'atom') + executable = 'atom' data = {name, version, description, installDir, iconName, executable} specFilePath = fillTemplate(path.join('resources', 'linux', 'redhat', 'atom.spec'), data)