Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electrify menubar #52

Open
ebradbury opened this issue May 9, 2016 · 1 comment
Open

Electrify menubar #52

ebradbury opened this issue May 9, 2016 · 1 comment

Comments

@ebradbury
Copy link

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:

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!

@ebradbury
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@ebradbury and others