Skip to content

Commit

Permalink
using absolute path to NodeJS when system node is used
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-portmen committed Dec 6, 2016
1 parent 1a77068 commit 74bcd1a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
6 changes: 3 additions & 3 deletions linux/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function exists (directory, callback) {
var dir = path.join('/usr/share', 'com.add0n.node');
var name = 'com.add0n.node';
var ids = {
chrome: ['mbpegmnngblolkfjoegdinohffomfljn'],
firefox: ['[email protected]']
chrome: ['lmeddoobegbaiopohmpmmobpnpjifpii'],
firefox: []
};

function manifest (root, type, callback) {
Expand Down Expand Up @@ -73,7 +73,7 @@ function application (callback) {
throw e;
}
let isNode = process.argv[2] !== '--add_node';
let run = isNode ? '#!/bin/bash\nnode host.js' : '#!/bin/bash\n./node host.js';
let run = isNode ? `#!/bin/bash\n${process.argv[2]} host.js` : '#!/bin/bash\n./node host.js';
fs.writeFile(path.join(dir, 'run.sh'), run, (e) => {
if (e) {
throw e;
Expand Down
2 changes: 1 addition & 1 deletion linux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cd ./app

if type node 2>/dev/null; then
echo Installer is using your system node.js
sudo node install.js
sudo node install.js `which node`
else
echo Installer is using the attached node.js
sudo ../node install.js --add_node
Expand Down
11 changes: 8 additions & 3 deletions mac/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ function exists (directory, callback) {
var dir = path.join('/usr/share', 'com.add0n.node');
var name = 'com.add0n.node';
var ids = {
chrome: ['pghoffeollloldpepedofbmlokimpblo'],
firefox: ['[email protected]']
chrome: [
'lmeddoobegbaiopohmpmmobpnpjifpii' // open in Firefox (Chrome)
],
firefox: []
};

function manifest (root, type, callback) {
Expand Down Expand Up @@ -68,14 +70,17 @@ function manifest (root, type, callback) {

});
}

console.error(process.argv)

function application (callback) {
exists(dir, (e) => {
if (e) {
throw e;
}

let isNode = process.argv[2] !== '--add_node';
let run = isNode ? '#!/bin/bash\nnode host.js' : '#!/bin/bash\n./node host.js';
let run = isNode ? `#!/bin/bash\n${process.argv[2]} host.js` : '#!/bin/bash\n./node host.js';
fs.writeFile(path.join(dir, 'run.sh'), run, (e) => {
if (e) {
throw e;
Expand Down
2 changes: 1 addition & 1 deletion mac/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cd ./app

if type node 2>/dev/null; then
echo Installer is using your system node.js
sudo node install.js
sudo node install.js `which node`
else
echo Installer is using the attached node.js
sudo ../node install.js --add_node
Expand Down
6 changes: 4 additions & 2 deletions windows/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ function exists (directory, callback) {
var dir = path.join(process.argv[2], 'com.add0n.node');
var name = 'com.add0n.node';
var ids = {
chrome: ['gfhloibcnnngmfkpnpbbgblbgcghaapb'],
firefox: ['[email protected]']
chrome: [
'lmeddoobegbaiopohmpmmobpnpjifpii' // open in Firefox (Chrome)
],
firefox: []
};

function manifest (type, callback) {
Expand Down

0 comments on commit 74bcd1a

Please sign in to comment.