Skip to content

Commit

Permalink
Merge pull request #17 from jasonlong/packager
Browse files Browse the repository at this point in the history
Add electron-packager for Mac, Windows, Linux builds
  • Loading branch information
jasonlong authored Mar 6, 2018
2 parents de55dee + 132a04f commit 47f1c97
Show file tree
Hide file tree
Showing 7 changed files with 5,293 additions and 1,692 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
Mater-darwin-x64
Mater-linux-x64
Mater-win32-x64
14 changes: 8 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
const electron = require('electron')
const {electron, Menu} = require('electron')
const menubar = require('menubar')
const mb = menubar({
width: 220,
height: 206,
preloadWindow: true,
// alwaysOnTop: true,
icon: `${__dirname}/img/icon-0-Template.png`
})

require('electron-reload')(__dirname);

// Make menubar accessible to the renderer
global.sharedObject = {
mb: mb
Expand All @@ -21,6 +18,11 @@ mb.on('ready', () => {

mb.on('after-create-window', () => {
mb.window.loadURL(`file://${__dirname}/index.html`)
// mb.window.openDevTools()
})

const contextMenu = Menu.buildFromTemplate ([
{label: 'Quit', click: () => {mb.app.quit ();}}
])
mb.tray.on ('right-click', () => {
mb.tray.popUpContextMenu (contextMenu);
})
})
Binary file added mater.icns
Binary file not shown.
Binary file added mater.ico
Binary file not shown.
Binary file added mater.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 47f1c97

Please sign in to comment.