Compare commits

..

9 Commits

Author SHA1 Message Date
akashnimare
e5a60cc077 📦 v0.5.2-Beta 2016-12-14 01:53:00 +05:30
akashnimare
4d5c57fa0b disable auto-updates on dev mode 2016-12-14 01:11:08 +05:30
akashnimare
98bd4fd9b9 🔥 2016-12-14 00:55:29 +05:30
akashnimare
8b808ff9b2 Added auto-updates for OSX 2016-12-14 00:49:30 +05:30
akashnimare
4a2a495738 new tray icons 2016-12-10 14:39:54 +05:30
akashnimare
309816e40a tray icon fixed 2016-12-12 19:15:36 +05:30
Akash Nimare
79a31000df 📝 Updated installation instructions 2016-12-12 18:49:40 +05:30
akashnimare
8410769fdd linux icon fixed 2016-12-10 10:42:48 +05:30
Akash Nimare
fd25ac0cc4 Added Linux app category 2016-11-25 15:08:02 +05:30
10 changed files with 78 additions and 14 deletions

View File

@@ -11,6 +11,15 @@ The goal is to achieve feature-compatibility with the old desktop app
and then start adding cool features like easy support for
multi-account, auto-updates etc.
## Prerequisites
* node >= v6.3.1
* npm >= 3.10.3
* If you're on Debian or Ubuntu, you'll also need to install
`nodejs-legacy`:
```sh
$ sudo apt-get install nodejs-legacy
```
## Installation
Clone the source locally:
@@ -19,14 +28,6 @@ Clone the source locally:
$ git clone https://github.com/zulip/zulip-electron
$ cd zulip-electron
```
If you're on Debian or Ubuntu, you'll also need to install
`nodejs-legacy`:
Use your package manager to install `npm`.
```sh
$ sudo apt-get install npm nodejs-legacy
```
Install project dependencies:

49
app/main/autoupdater.js Normal file
View File

@@ -0,0 +1,49 @@
'use strict';
const {app, autoUpdater, dialog} = require('electron');
const version = app.getVersion();
const os = require('os');
const platform = os.platform() + '_' + os.arch(); // usually returns darwin_64
const updaterFeedURL = 'http://zulipdesktop.herokuapp.com/update/'+ platform + '/' + version;
function appUpdater() {
autoUpdater.setFeedURL(updaterFeedURL);
// Log whats happening
autoUpdater.on('error', err => console.log(err))
autoUpdater.on('checking-for-update', () => console.log('checking-for-update'))
autoUpdater.on('update-available', () => console.log('update-available'))
autoUpdater.on('update-not-available', () => console.log('update-not-available'))
// Ask the user if update is available
autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName, releaseDate) => {
let message = app.getName() + ' ' + releaseName + ' is now available. It will be installed the next time you restart the application.';
if (releaseNotes) {
let splitNotes = releaseNotes.split(/[^\r]\n/);
message += '\n\nRelease notes:\n';
splitNotes.forEach(function (notes) {
message += notes + '\n\n';
})
};
// Ask user to update the app
dialog.showMessageBox({
type: 'question',
buttons: ['Install and Relaunch' ,'Cancel'],
defaultId: 0,
message: 'A new version of ' + app.getName() + ' has been downloaded',
detail: message
}, response => {
if (response === 0) {
setTimeout(() => autoUpdater.quitAndInstall(), 1);
}
})
})
// init for updates
autoUpdater.checkForUpdates()
}
exports = module.exports = {
appUpdater
}

View File

@@ -7,9 +7,11 @@ const electronLocalshortcut = require('electron-localshortcut');
const ipc = require('electron').ipcMain;
const Configstore = require('configstore');
const JsonDB = require('node-json-db');
const isDev = require('electron-is-dev');
const tray = require('./tray');
const appMenu = require('./menu');
const {linkIsInternal, skipImages} = require('./link-helper');
const { appUpdater } = require('./autoupdater')
const db = new JsonDB(app.getPath('userData') + '/domain.json', true, true);
const data = db.getData('/');
@@ -19,7 +21,6 @@ require('electron-debug')();
const conf = new Configstore('Zulip-Desktop');
// prevent window being garbage collected
let mainWindow;
let targetLink;
@@ -198,6 +199,15 @@ app.on('ready', () => {
event.preventDefault();
electron.shell.openExternal(url);
});
page.once("did-frame-finish-load", () => {
if (process.platform === 'darwin' && !isDev) {
// Initate auto-updates
appUpdater()
}
})
});
ipc.on('new-domain', (e, domain) => {

View File

@@ -6,10 +6,13 @@ const {addDomain, about} = require('./windowmanager');
let tray = null;
const APP_ICON = path.join(__dirname, '../resources', 'Icon');
const APP_ICON = path.join(__dirname, '../resources/tray', 'tray');
const iconPath = () => {
return APP_ICON + (process.platform === 'win32' ? '.ico' : '.png');
if (process.platform === 'linux') {
return APP_ICON + 'linux.png'
}
return APP_ICON + (process.platform === 'win32' ? 'win.ico' : 'osx.png');
};
exports.create = () => {

View File

@@ -1,7 +1,7 @@
{
"name": "zulip",
"productName": "Zulip",
"version": "0.5.1",
"version": "0.5.2",
"description": "Zulip Desktop App",
"license": "Apache-2.0",
"email":"<svnitakash@gmail.com>",
@@ -27,6 +27,7 @@
"InstantMessaging"
],
"dependencies": {
"electron-is-dev": "*",
"configstore": "^2.0.0",
"dialogs": "1.1.14",
"electron-context-menu": "0.4.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -1,7 +1,7 @@
{
"name": "zulip",
"productName": "Zulip",
"version": "0.5.1",
"version": "0.5.2",
"description": "Zulip Desktop App",
"license": "Apache-2.0",
"email":"<svnitakash@gmail.com>",
@@ -40,7 +40,7 @@
"linux" : {
"synopsis": "Zulip Desktop App",
"category": "",
"packageCategory": "",
"packageCategory": "GNOME;GTK;Network;InstantMessaging",
"description": "Zulip Desktop Client for Linux",
"target" : ["deb", "AppImage"],
"version" : "0.5.1",