Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,3 +508,20 @@ function sanitizeNotifuTypeArgument(type) {

return 'info';
}

module.exports.getVendorDir = function() {
var dirName = __dirname;
// Check to see if it is on electron application
// Should copy vendor folder to app.asar.unpacked.
if (
dirName.endsWith(
'Contents/Resources/app.asar/node_modules/node-notifier/lib' ||
dirName.endsWith(
'resources\\app.asar\\node_modules\\node-notifier\\lib'
)
)
) {
dirName = dirName.replace('app.asar', 'app.asar.unpacked');
}
return path.resolve(dirName, '../vendor');
};
5 changes: 3 additions & 2 deletions notifiers/balloon.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ Usage

*/
var path = require('path');
var notifier = path.resolve(__dirname, '../vendor/notifu/notifu');
var checkGrowl = require('../lib/checkGrowl');
var utils = require('../lib/utils');
var notifier = path.resolve(utils.getVendorDir(), 'notifu/notifu');
var checkGrowl = require('../lib/checkGrowl');

var Toaster = require('./toaster');
var Growl = require('./growl');
var os = require('os');
Expand Down
4 changes: 2 additions & 2 deletions notifiers/notificationcenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ var utils = require('../lib/utils');
var Growl = require('./growl');
var path = require('path');
var notifier = path.join(
__dirname,
'../vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier'
utils.getVendorDir(),
'terminal-notifier.app/Contents/MacOS/terminal-notifier'
);

var EventEmitter = require('events').EventEmitter;
Expand Down
3 changes: 2 additions & 1 deletion notifiers/toaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
* Wrapper for the toaster (https://github.com/nels-o/toaster)
*/
var path = require('path');
var notifier = path.resolve(__dirname, '../vendor/snoreToast/SnoreToast.exe');
var utils = require('../lib/utils');
var notifier = path.resolve(utils.getVendorDir(), 'snoreToast/SnoreToast.exe');

var Balloon = require('./balloon');

var EventEmitter = require('events').EventEmitter;
Expand Down
31 changes: 12 additions & 19 deletions vendor/terminal-notifier.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,54 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>16E195</string>
<string>17D102</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>terminal-notifier</string>
<key>CFBundleIconFile</key>
<string>Terminal</string>
<string>Geniocare</string>
<key>CFBundleIdentifier</key>
<string>nl.superalloy.oss.terminal-notifier</string>
<string>nl.superalloy.oss.</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<string>6.1</string>
<key>CFBundleName</key>
<string>terminal-notifier</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.7.2</string>
<string>1.6.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>17</string>
<string>13</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>8B62</string>
<string>9C40b</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>16B2649</string>
<string>17C76</string>
<key>DTSDKName</key>
<string>macosx10.12</string>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0810</string>
<string>0920</string>
<key>DTXcodeBuild</key>
<string>8B62</string>
<string>9C40b</string>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>LSUIElement</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2016 Eloy Durán, Julien Blanchard. All rights reserved.</string>
<string>Copyright © 2012 Eloy Durán. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSUserNotificationAlertStyle</key>
<string>alert</string>
</dict>
</plist>
Binary file modified vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier
Binary file not shown.
Binary file not shown.