Open ebradbury opened 8 years ago
How can I use Electrify with menubar?
I took a working electron+menubar app and tried to integrate meteor with Electrify. But can't get it working...
Is it something with how menubar hooks into the electron app? Maybe here?
app
Tried this:
var app = require('app'); var menubar = require('menubar'); var electrify = require('electrify')(__dirname); var mb = null; app.on('ready', function() { // gets here console.log('app ready'); electrify.start(function(meteor_root_url) { // gets here console.log('electrify started'); mb = menubar({ index: meteor_root_url, }); mb.on('ready', function() { // never gets here console.log('menubar ready'); }); }); });
Also tried:
electrify.start(function(meteor_root_url) { // gets here console.log('electrify started'); mb = menubar({ index: meteor_root_url, }); mb.on('ready', function() { // never gets here console.log('menubar ready'); }); });
There are no errors in the console and an electron app starts but there is no window or tray icon.
Any help would be much appreciated!
Update...
This works:
mb = menubar({ index: 'http://127.0.0.1:3000', }); mb.on('ready', function() { // gets here electrify.start(function(meteor_root_url) { // and here }); });
Why?
How can I use Electrify with menubar?
I took a working electron+menubar app and tried to integrate meteor with Electrify. But can't get it working...
Is it something with how menubar hooks into the electron
app
? Maybe here?Tried this:
Also tried:
There are no errors in the console and an electron app starts but there is no window or tray icon.
Any help would be much appreciated!