diff --git a/package.json b/package.json index a482442..bc09164 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "FontLet", "description": "A package manager for fonts bringing latest and greatest libre fonts to your desktop ", - "version": "0.0.20", + "version": "0.0.23", "author": "Friends of Akuru ", "license": "MIT", "homepage": "./", @@ -74,6 +74,12 @@ "publish": { "provider": "github" }, + "mac": { + "target": [ + "zip", + "dmg" + ] + }, "win": { "target": [ "nsis", diff --git a/public/electron.js b/public/electron.js index f89fcf8..f357397 100644 --- a/public/electron.js +++ b/public/electron.js @@ -2,7 +2,6 @@ const electron = require('electron'); const openAboutWindow = require('about-window').default; const path = require('path'); const isDev = require('electron-is-dev'); -const notifier = require('node-notifier'); const { autoUpdater } = require('electron-updater'); require('update-electron-app')(); @@ -15,25 +14,6 @@ autoUpdater.logger = require('electron-log'); autoUpdater.logger.transports.file.level = 'info'; -autoUpdater.on('checking-for-update', () => { - console.log('Checking for update...'); -}); -autoUpdater.on('update-available', info => { - console.log('Update available.', info); -}); -autoUpdater.on('update-not-available', info => { - console.log('Update not available.', info); -}); -autoUpdater.on('error', err => { - console.log(`Error in auto-updater. ${err}`); -}); -autoUpdater.on('download-progress', progressObj => { - console.log('downloading....................'); -}); -autoUpdater.on('update-downloaded', info => { - console.log('Update downloaded', info); -}); - function createWindow() { mainWindow = new BrowserWindow({ width: 900, @@ -49,47 +29,7 @@ function createWindow() { }); // initAutoUpdate(); autoUpdater.checkForUpdatesAndNotify(); - autoUpdater.checkForUpdates(); // Open the DevTools. - mainWindow.webContents.openDevTools(); -} - -function initAutoUpdate() { - if (isDev) { - return; - } - - if (process.platform === 'linux') { - return; - } - - autoUpdater.checkForUpdates(); - autoUpdater.signals.updateDownloaded(showUpdateNotification); -} - -function showUpdateNotification(update) { - const updateInfo = update || {}; - const restartNowAction = 'Restart now'; - - const versionLabel = updateInfo.label ? `Version ${updateInfo.version}` : 'The latest version'; - - notifier.notify( - { - title: 'A new update is ready to install.', - message: - `${versionLabel}` + - 'has been downloaded and will be automatically installed after restart.', - closeLabel: 'Okay', - actions: restartNowAction - }, - (err, response, metadata) => { - if (err) throw err; - if (metadata.activationValue !== restartNowAction) { - return; - } - autoUpdater.quitAndInstall(); - } - ); } app.on('ready', createWindow); diff --git a/src/containers/Welcome.js b/src/containers/Welcome.js index 9bf6a49..3144115 100644 --- a/src/containers/Welcome.js +++ b/src/containers/Welcome.js @@ -122,7 +122,7 @@ class Welcome extends Component { )} - Welcome to FontLet App + Welcome to FontLet