diff --git a/WebTorrent.icns b/WebTorrent.icns new file mode 100644 index 00000000..cbad3c87 Binary files /dev/null and b/WebTorrent.icns differ diff --git a/WebTorrent.ico b/WebTorrent.ico new file mode 100644 index 00000000..912fffa1 Binary files /dev/null and b/WebTorrent.ico differ diff --git a/WebTorrent.png b/WebTorrent.png new file mode 100644 index 00000000..e7b0a2eb Binary files /dev/null and b/WebTorrent.png differ diff --git a/bin/build.js b/bin/build.js index e71024ba..5eed935a 100755 --- a/bin/build.js +++ b/bin/build.js @@ -56,6 +56,9 @@ var darwin = { // The bundle identifier to use in the application helper's plist (OS X only). 'helper-bundle-id': 'io.webtorrent.app.helper', + + // Application icon. + icon: path.join(__dirname, '..', 'WebTorrent.icns') } var win32 = { @@ -87,10 +90,15 @@ var win32 = { // the original filename, without extension. This string is required. InternalName: 'WebTorrent' }, + + // Application icon. + icon: path.join(__dirname, '..', 'WebTorrent.ico') } var linux = { platform: 'linux' + + // Note: Application icon for Linux is specified via the BrowserWindow `icon` option. } electronPackager(Object.assign({}, all, darwin), done) diff --git a/config.js b/config.js index b8759c51..5d3911a4 100644 --- a/config.js +++ b/config.js @@ -2,13 +2,14 @@ var path = require('path') module.exports = { APP_NAME: 'WebTorrent', - INDEX: 'file://' + path.resolve(__dirname, 'renderer', 'index.html'), - SOUND_ADD: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'add.wav'), - SOUND_DELETE: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'delete.wav'), - SOUND_DISABLE: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'disable.wav'), - SOUND_DONE: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'done.wav'), - SOUND_ENABLE: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'enable.wav'), - SOUND_ERROR: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'error.wav'), - SOUND_PLAY: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'play.wav'), - SOUND_STARTUP: 'file://' + path.resolve(__dirname, 'resources', 'sound', 'startup.wav') + APP_ICON: path.join(__dirname, 'WebTorrent.png'), + INDEX: 'file://' + path.join(__dirname, 'renderer', 'index.html'), + SOUND_ADD: 'file://' + path.join(__dirname, 'resources', 'sound', 'add.wav'), + SOUND_DELETE: 'file://' + path.join(__dirname, 'resources', 'sound', 'delete.wav'), + SOUND_DISABLE: 'file://' + path.join(__dirname, 'resources', 'sound', 'disable.wav'), + SOUND_DONE: 'file://' + path.join(__dirname, 'resources', 'sound', 'done.wav'), + SOUND_ENABLE: 'file://' + path.join(__dirname, 'resources', 'sound', 'enable.wav'), + SOUND_ERROR: 'file://' + path.join(__dirname, 'resources', 'sound', 'error.wav'), + SOUND_PLAY: 'file://' + path.join(__dirname, 'resources', 'sound', 'play.wav'), + SOUND_STARTUP: 'file://' + path.join(__dirname, 'resources', 'sound', 'startup.wav') } diff --git a/main/windows.js b/main/windows.js index 6196e691..1d927323 100644 --- a/main/windows.js +++ b/main/windows.js @@ -20,6 +20,7 @@ function createMainWindow (menu) { autoHideMenuBar: true, // Hide top menu bar unless Alt key is pressed (Windows, Linux) backgroundColor: '#282828', darkTheme: true, // Forces dark theme (GTK+3 only) + icon: config.APP_ICON, minWidth: 375, minHeight: 38 + (120 * 2), // header height + 2 torrents show: false, // Hide window until DOM finishes loading