Compare commits

..

15 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
5c39665b6a 0.3.3 2016-04-07 03:07:56 -07:00
Feross Aboukhadijeh
d1c4579398 Depend on master electron-packager to fix OS X icon 2016-04-07 03:06:25 -07:00
Feross Aboukhadijeh
d80d8ef1f5 0.3.2 2016-04-07 01:02:07 -07:00
Feross Aboukhadijeh
d49a8e772f Faster startup time (50ms) 2016-04-07 00:58:37 -07:00
Feross Aboukhadijeh
1947a03e94 Changelog 2016-04-07 00:25:19 -07:00
Feross Aboukhadijeh
bc6ae4523f Revert "TEMPORARY: Comment out code that requires Electron 0.37.4"
This reverts commit 9c550997c9.
2016-04-06 21:57:11 -07:00
Greenkeeper
442ac9184f chore(package): update electron-prebuilt to version 0.37.5
http://greenkeeper.io/
2016-04-06 21:52:25 -07:00
Feross Aboukhadijeh
824f4ce3cf CHANGELOG 2016-04-06 21:29:34 -07:00
Feross Aboukhadijeh
cc324024ba Add ISSUE_TEMPLATE 2016-04-06 21:29:25 -07:00
grunjol
0921f89eb7 Linux .deb file: update symlink on package update
* overwrite symlink on update

* fix size and list definition
2016-04-07 00:48:00 -03:00
DC
628c93bc1e Pause audio reliably when closing the window
Before it only paused video...
2016-04-06 05:47:39 -07:00
Feross Aboukhadijeh
25109a7ebb 0.3.1 2016-04-06 05:10:37 -07:00
Feross Aboukhadijeh
e6963d0307 CHANGELOG 2016-04-06 05:09:14 -07:00
DC
9a2f16b29a Add crash reporting 2016-04-06 05:05:26 -07:00
DC
6a17aa7c76 Cast screen background: cover, don't tile 2016-04-06 04:48:56 -07:00
14 changed files with 89 additions and 47 deletions

9
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,9 @@
**What version of WebTorrent Desktop?**
**What operating system and version?**
**What did you do?**
**What did you expect to happen?**
**What actually happened?**

View File

@@ -1,6 +1,34 @@
# WebTorrent Desktop Version History # WebTorrent Desktop Version History
## UNRELEASED v0.3.0 - 2016-04-06 ## v0.3.2 - 2016-04-07
### Added
- Register WebTorrent as default handler for magnet links (OS X)
### Changed
- Faster startup time (50ms)
- Update Electron to 0.37.5
- Remove the white flash when loading pages and resizing the window
- Fix crash when sending IPC messages
### Fixed
- Fix installation bugs with .deb file (Linux)
- Pause audio reliably when closing the window
## v0.3.1 - 2016-04-06
### Added
- Add crash reporter to torrent engine process
### Fixed
- Fix cast screen background: cover, don't tile
## v0.3.0 - 2016-04-06
### Added ### Added

View File

@@ -64,7 +64,7 @@ var all = {
// Pattern which specifies which files to ignore when copying files to create the // Pattern which specifies which files to ignore when copying files to create the
// package(s). // package(s).
ignore: /^\/dist|\/(appveyor.yml|.appveyor.yml|appdmg|AUTHORS|CONTRIBUTORS|bench|benchmark|benchmark\.js|bin|bower\.json|component\.json|coverage|doc|docs|docs\.mli|dragdrop\.min\.js|example|examples|example\.html|example\.js|externs|ipaddr\.min\.js|Makefile|min|minimist|perf|rusha|simplepeer\.min\.js|simplewebsocket\.min\.js|static\/screenshot\.png|test|tests|test\.js|tests\.js|webtorrent\.min\.js|\.[^\/]*|.*\.md|.*\.markdown)$/, ignore: /^\/dist|\/(appveyor.yml|\.appveyor.yml|\.github|appdmg|AUTHORS|CONTRIBUTORS|bench|benchmark|benchmark\.js|bin|bower\.json|component\.json|coverage|doc|docs|docs\.mli|dragdrop\.min\.js|example|examples|example\.html|example\.js|externs|ipaddr\.min\.js|Makefile|min|minimist|perf|rusha|simplepeer\.min\.js|simplewebsocket\.min\.js|static\/screenshot\.png|test|tests|test\.js|tests\.js|webtorrent\.min\.js|\.[^\/]*|.*\.md|.*\.markdown)$/,
// The application name. // The application name.
name: config.APP_NAME, name: config.APP_NAME,
@@ -303,9 +303,10 @@ function buildLinux (packageType, cb) {
info: { info: {
arch: 'amd64', arch: 'amd64',
targetDir: distPath, targetDir: distPath,
depends: 'libc6 (>= 2.4)',
scripts: { scripts: {
postinst: path.join(config.STATIC_PATH, 'linux', 'postinst'), postinst: path.join(config.STATIC_PATH, 'linux', 'postinst'),
postrm: path.join(config.STATIC_PATH, 'linux', 'postrm') prerm: path.join(config.STATIC_PATH, 'linux', 'prerm')
} }
} }
}, [{ }, [{

15
crash-reporter.js Normal file
View File

@@ -0,0 +1,15 @@
module.exports = {
init
}
var config = require('./config')
var electron = require('electron')
function init () {
electron.crashReporter.start({
companyName: config.APP_NAME,
productName: config.APP_NAME,
submitURL: config.CRASH_REPORT_URL
})
console.log('crash reporter started')
}

View File

@@ -30,16 +30,14 @@ function uninstall () {
} }
function installDarwin () { function installDarwin () {
// TODO: Uncomment this once we upgrade past Electron 0.37.4. var electron = require('electron')
var app = electron.app
// var electron = require('electron') // On OS X, only protocols that are listed in Info.plist can be set as the default
// var app = electron.app // handler at runtime.
app.setAsDefaultProtocolClient('magnet')
// // On OS X, only protocols that are listed in Info.plist can be set as the default // File handlers are registered in the Info.plist.
// // handler at runtime.
// app.setAsDefaultProtocolClient('magnet')
// // File handlers are registered in the Info.plist.
} }
function uninstallDarwin () {} function uninstallDarwin () {}

View File

@@ -1,11 +1,11 @@
var electron = require('electron') var electron = require('electron')
var app = electron.app var app = electron.app
var crashReporter = electron.crashReporter
var ipcMain = electron.ipcMain var ipcMain = electron.ipcMain
var autoUpdater = require('./auto-updater') var autoUpdater = require('./auto-updater')
var config = require('../config') var config = require('../config')
var crashReporter = require('../crash-reporter')
var handlers = require('./handlers') var handlers = require('./handlers')
var ipc = require('./ipc') var ipc = require('./ipc')
var log = require('./log') var log = require('./log')
@@ -47,8 +47,8 @@ function init () {
ipc.init() ipc.init()
app.on('will-finish-launching', function () { app.on('will-finish-launching', function () {
crashReporter.init()
autoUpdater.init() autoUpdater.init()
setupCrashReporter()
}) })
app.on('ready', function () { app.on('ready', function () {
@@ -129,11 +129,3 @@ function processArgv (argv) {
} }
}) })
} }
function setupCrashReporter () {
crashReporter.start({
companyName: config.APP_NAME,
productName: config.APP_NAME,
submitURL: config.CRASH_REPORT_URL
})
}

View File

@@ -20,10 +20,8 @@ function init () {
ipcMain.on('ipcReady', function (e) { ipcMain.on('ipcReady', function (e) {
app.ipcReady = true app.ipcReady = true
app.emit('ipcReady') app.emit('ipcReady')
setTimeout(function () { windows.main.show()
windows.main.show() console.timeEnd('init')
try { console.timeEnd('init') } catch (err) {}
}, 50)
}) })
var messageQueueMainToWebTorrent = [] var messageQueueMainToWebTorrent = []

View File

@@ -49,7 +49,7 @@ function createAboutWindow () {
function createWebTorrentHiddenWindow () { function createWebTorrentHiddenWindow () {
var win = windows.webtorrent = new electron.BrowserWindow({ var win = windows.webtorrent = new electron.BrowserWindow({
backgroundColor: '#282828', backgroundColor: '#1E1E1E',
show: false, show: false,
center: true, center: true,
title: 'webtorrent-hidden-window', title: 'webtorrent-hidden-window',
@@ -79,7 +79,7 @@ function createMainWindow () {
return focusWindow(windows.main) return focusWindow(windows.main)
} }
var win = windows.main = new electron.BrowserWindow({ var win = windows.main = new electron.BrowserWindow({
backgroundColor: '#282828', backgroundColor: '#1E1E1E',
darkTheme: true, // Forces dark theme (GTK+3) darkTheme: true, // Forces dark theme (GTK+3)
icon: config.APP_ICON + '.png', icon: config.APP_ICON + '.png',
minWidth: 425, minWidth: 425,

View File

@@ -1,7 +1,7 @@
{ {
"name": "webtorrent-desktop", "name": "webtorrent-desktop",
"description": "WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.", "description": "WebTorrent, the streaming torrent client. For OS X, Windows, and Linux.",
"version": "0.3.0", "version": "0.3.3",
"author": { "author": {
"name": "Feross Aboukhadijeh", "name": "Feross Aboukhadijeh",
"email": "feross@feross.org", "email": "feross@feross.org",
@@ -24,7 +24,7 @@
"dlnacasts": "^0.0.3", "dlnacasts": "^0.0.3",
"drag-drop": "^2.11.0", "drag-drop": "^2.11.0",
"electron-localshortcut": "^0.6.0", "electron-localshortcut": "^0.6.0",
"electron-prebuilt": "0.37.3", "electron-prebuilt": "0.37.5",
"hyperx": "^2.0.2", "hyperx": "^2.0.2",
"main-loop": "^3.2.0", "main-loop": "^3.2.0",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
@@ -41,10 +41,10 @@
}, },
"devDependencies": { "devDependencies": {
"electron-osx-sign": "^0.3.0", "electron-osx-sign": "^0.3.0",
"electron-packager": "^6.0.0", "electron-packager": "electron-userland/electron-packager",
"electron-winstaller": "feross/windows-installer#build", "electron-winstaller": "feross/windows-installer#build",
"gh-release": "^2.0.3", "gh-release": "^2.0.3",
"nobin-debian-installer": "^0.0.6", "nobin-debian-installer": "^0.0.8",
"plist": "^1.2.0", "plist": "^1.2.0",
"standard": "^6.0.5" "standard": "^6.0.5"
}, },

View File

@@ -347,7 +347,7 @@ input {
background: linear-gradient(to bottom right, #4B79A1, #283E51); background: linear-gradient(to bottom right, #4B79A1, #283E51);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: 0 50%; background-position: center;
transition: -webkit-filter 0.1s ease-out; transition: -webkit-filter 0.1s ease-out;
position: relative; position: relative;
animation: fadein .4s; animation: fadein .4s;
@@ -591,6 +591,8 @@ body.drag .app::after {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
background-size: cover;
background-position: center;
} }
.player video { .player video {

View File

@@ -16,6 +16,7 @@ var patch = require('virtual-dom/patch')
var App = require('./views/app') var App = require('./views/app')
var errors = require('./lib/errors') var errors = require('./lib/errors')
var config = require('../config') var config = require('../config')
var crashReporter = require('../crash-reporter')
var TorrentPlayer = require('./lib/torrent-player') var TorrentPlayer = require('./lib/torrent-player')
var util = require('./util') var util = require('./util')
var {setDispatch} = require('./lib/dispatcher') var {setDispatch} = require('./lib/dispatcher')
@@ -31,7 +32,6 @@ var Cast = null
var ipcRenderer = electron.ipcRenderer var ipcRenderer = electron.ipcRenderer
var clipboard = electron.clipboard var clipboard = electron.clipboard
var crashReporter = electron.crashReporter
var dialog = remote.require('dialog') var dialog = remote.require('dialog')
// For easy debugging in Developer Tools // For easy debugging in Developer Tools
@@ -39,6 +39,10 @@ var state = global.state = State.getInitialState()
var vdomLoop var vdomLoop
// Report crashes back to our server.
// Not global JS exceptions, not like Rollbar, handles segfaults/core dumps only
crashReporter.init()
// All state lives in state.js. `state.saved` is read from and written to a file. // All state lives in state.js. `state.saved` is read from and written to a file.
// All other state is ephemeral. First we load state.saved then initialize the app. // All other state is ephemeral. First we load state.saved then initialize the app.
loadState(init) loadState(init)
@@ -49,8 +53,6 @@ loadState(init)
* the dock icon and drag+drop. * the dock icon and drag+drop.
*/ */
function init () { function init () {
setupCrashReporter()
// Push the first page into the location history // Push the first page into the location history
state.location.go({ url: 'home' }) state.location.go({ url: 'home' })
@@ -241,8 +243,8 @@ function dispatch (action, ...args) {
// and only redraws on requestAnimationFrame(). That means when the user // and only redraws on requestAnimationFrame(). That means when the user
// closes the window (hide window / minimize to tray) and we want to pause // closes the window (hide window / minimize to tray) and we want to pause
// the video, we update the vdom but it keeps playing until you reopen! // the video, we update the vdom but it keeps playing until you reopen!
var videoTag = document.querySelector('video') var mediaTag = document.querySelector('video,audio')
if (videoTag) videoTag.pause() if (mediaTag) mediaTag.pause()
} }
if (action === 'playbackJump') { if (action === 'playbackJump') {
jumpToTime(args[0] /* seconds */) jumpToTime(args[0] /* seconds */)
@@ -1004,14 +1006,6 @@ function playInterfaceSound (name) {
audio.play() audio.play()
} }
function setupCrashReporter () {
crashReporter.start({
companyName: config.APP_NAME,
productName: config.APP_NAME,
submitURL: config.CRASH_REPORT_URL
})
}
// Finds the longest common prefix // Finds the longest common prefix
function findCommonPrefix (a, b) { function findCommonPrefix (a, b) {
for (var i = 0; i < a.length && i < b.length; i++) { for (var i = 0; i < a.length && i < b.length; i++) {

View File

@@ -10,9 +10,14 @@ var fs = require('fs')
var mkdirp = require('mkdirp') var mkdirp = require('mkdirp')
var musicmetadata = require('musicmetadata') var musicmetadata = require('musicmetadata')
var networkAddress = require('network-address') var networkAddress = require('network-address')
var path = require('path')
var crashReporter = require('../crash-reporter')
var config = require('../config') var config = require('../config')
var torrentPoster = require('./lib/torrent-poster') var torrentPoster = require('./lib/torrent-poster')
var path = require('path')
// Report when the process crashes
crashReporter.init()
// Send & receive messages from the main window // Send & receive messages from the main window
var ipc = electron.ipcRenderer var ipc = electron.ipcRenderer

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
set -e set -e
chmod +x /opt/webtorrent-desktop/WebTorrent chmod +x /opt/webtorrent-desktop/WebTorrent
ln -s /opt/webtorrent-desktop/WebTorrent /usr/bin/webtorrent-desktop ln -s -f /opt/webtorrent-desktop/WebTorrent /usr/bin/webtorrent-desktop