Skip to content

Commit

Permalink
updating to 0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-portmen committed Jan 28, 2017
1 parent 48947ae commit e870587
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 5 deletions.
1 change: 0 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ exports.ids = {
'bifmfjgpgndemajpeeoiopbeilbaifdo', // External Application Button (Chrome)
'enemdfoackoekaedijjmjlckkleokhih', // External Application Button (Opera)
'ihpiinojhnfhpdmmacgmpoonphhimkaj', // Open in VLC (Chrome)
'gmkfhhacdjeabnmomjdnachnmmaaacli', // Test
],
firefox: [
'{5610edea-88c1-4370-b93d-86aa131971d1}', // Open in IE
Expand Down
7 changes: 5 additions & 2 deletions host.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var https = lazyRequire('./follow-redirects').https;
var server, files = [];

var config = {
version: '0.2.2'
version: '0.2.3'
};
// closing node when parent process is killed
process.stdin.resume();
Expand Down Expand Up @@ -139,7 +139,10 @@ function observe (msg, push, done) {
if (msg.env) {
msg.env.forEach(n => process.env.PATH += path.delimiter + n);
}
let sp = spawn(msg.command, msg.arguments || [], Object.assign({env: process.env}, msg.properties));
let sp = spawn(msg.command, msg.arguments || [], Object.assign({
env: process.env,
detached: true
}, msg.properties));
let stderr = '', stdout = '';
sp.stdout.on('data', data => stdout += data);
sp.stderr.on('data', data => stderr += data);
Expand Down
2 changes: 1 addition & 1 deletion mac/app/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function application (callback) {

let isNode = process.argv.filter(a => a === '--add_node').length === 0;
let run = isNode ? `#!/bin/bash\n${process.argv[2]} host.js` : '#!/bin/bash\n./node host.js';
console.error(run)

fs.writeFile(path.join(dir, 'run.sh'), run, (e) => {
if (e) {
throw e;
Expand Down
4 changes: 4 additions & 0 deletions windows/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ To install the native application
1. Right-click on "install.bat" and use "Run as Administrator"
2. Wait for the script to display the successful message.

To uninstall the native application
1. Right-click on "uninstall.bat" and use "Run as Administrator"
2. Wait for the script to display the successful message.

Note: The script needs administrator permission to copy files successfully.
2 changes: 1 addition & 1 deletion windows/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo .. Writting to Chrome Registry
echo .. Key: HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%ProgramFiles%\com.add0n.node\manifest-chrome.json" /f

echo .. Writting to Firefox Registry
echo .. Writting to Firefox Registry
echo .. Key: HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node
for %%f in ("%PROGRAMFILES%") do SET SHORT_PATH=%%~sf
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f
Expand Down
40 changes: 40 additions & 0 deletions windows/uninstall.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@echo off

call :isAdmin

if %errorlevel% == 0 (
goto :run
) else (
echo .
echo .
echo ************ERROR*****************
echo *******Run as administrator*******
echo **********************************
echo .
echo .
pause
)

exit /b

:isAdmin
fsutil dirty query %systemdrive% >nul
exit /b

:run

echo .. Deleting Chrome Registry
REG DELETE "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /f

echo .. Deleting Firefox Registry
for %%f in ("%PROGRAMFILES%") do SET SHORT_PATH=%%~sf
REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /f

echo .. Deleting com.add0n.node
RMDIR /Q /S "%ProgramFiles%\com.add0n.node"

echo.
echo ^>^>^> Done! ^<^<^<
echo.
pause

0 comments on commit e870587

Please sign in to comment.