Skip to content

Commit

Permalink
Merge pull request #40 from sameoldmadness/master
Browse files Browse the repository at this point in the history
Added installer option for Chromium
  • Loading branch information
petethepig committed Mar 23, 2014
2 parents 89efdb6 + 85a8e69 commit d50b592
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/bin/devtools-terminal
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var options = optimist
.alias('p', 'port')
.alias('c', 'config')
.describe('install', 'Install Chrome Native Messaging host')
.describe('chromium', 'Set paths for Chromium')
.describe('h', 'Show this message')
.describe('host', 'Host to bind to')
.describe('p', 'Port')
Expand Down Expand Up @@ -109,10 +110,14 @@ if(options['install']){
var manifestDirectory;
switch(platform){
case 'linux':
manifestDirectory = "/etc/opt/chrome/native-messaging-hosts/";
manifestDirectory = options['chromium']
? "/etc/chromium/native-messaging-hosts/"
: "/etc/opt/chrome/native-messaging-hosts/";
break;
case 'darwin':
manifestDirectory = "/Library/Google/Chrome/NativeMessagingHosts/";
manifestDirectory = options['chromium']
? "/Library/Application Support/Chromium/NativeMessagingHosts"
: "/Library/Google/Chrome/NativeMessagingHosts/";
break;
case 'win32':
manifestDirectory = process.env['USERPROFILE']; // I have no idea where should I put this file on Windows. Please, help
Expand Down

0 comments on commit d50b592

Please sign in to comment.