diff --git a/client/index.js b/client/index.js index c34d1575..90052362 100644 --- a/client/index.js +++ b/client/index.js @@ -1,4 +1,3 @@ // View-specific code const pathname = window.location.pathname if (pathname === '/') require('./views/home')() -if (/\/desktop\/?/.test(pathname)) require('./views/desktop')() diff --git a/client/views/desktop.js b/client/views/desktop.js deleted file mode 100644 index 1bce971a..00000000 --- a/client/views/desktop.js +++ /dev/null @@ -1,32 +0,0 @@ -const arch = window.arch = require('arch') - -module.exports = function () { - /** - * If the OS is 64-bit, replace the download links with their 64-bit versions. - * - * This checks the operating system CPU architecture itself, as opposed to - * merely the architecture of the browser, unlike os.arch() in Node.js. - * - * If there is no affirmative indication that the architecture is 64-bit, - * then arch() assumes 32-bit. This is perfect for determining what installer - * executable to offer to desktop app users. If there is ambiguity, then the - * user will get the 32-bit installer, which will work fine even on a 64-bit OS. - * - * We do the detection client-side because JavaScript provides additional - * information above and beyong the user agent that is helpful for making an - * accurate determination. - */ - if (arch() === 'x64') { - // Offer 64-bit Linux installer - const $linuxLinks = Array.from(document.querySelectorAll('.download-linux')) - $linuxLinks.forEach(function ($link) { - $link.href = $link.href.replace(/i386\.deb$/, 'amd64.deb') - }) - - // Offer 64-bit Windows installer - const $windowsLinks = Array.from(document.querySelectorAll('.download-windows')) - $windowsLinks.forEach(function ($link) { - $link.href = $link.href.replace(/-ia32.exe$/, '.exe') - }) - } -} diff --git a/config.js b/config.js index a93b1716..f23a0651 100644 --- a/config.js +++ b/config.js @@ -8,7 +8,7 @@ exports.isProd = process.env.NODE_ENV === 'production' /** * WebTorrent Desktop version (used by auto-updater, landing page, etc.) */ -exports.desktopVersion = '0.20.0' +exports.desktopVersion = '0.21.0' /** * Path to store log files diff --git a/package.json b/package.json index e1eba34d..61886018 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "url": "https://github.com/webtorrent/webtorrent.io/issues" }, "dependencies": { - "arch": "^2.0.0", "basic-auth": "^2.0.0", "body-parser": "^1.15.2", "compression": "^1.0.11", diff --git a/server/views/includes/desktop-download-links.pug b/server/views/includes/desktop-download-links.pug index e2e7c18f..3bade37f 100644 --- a/server/views/includes/desktop-download-links.pug +++ b/server/views/includes/desktop-download-links.pug @@ -4,12 +4,12 @@ p.downloads br strong Download | for Mac - a.download.download-windows(href=`https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/WebTorrentSetup-v${version}-ia32.exe`) + a.download.download-windows(href=`https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/WebTorrentSetup-v${version}.exe`) img(src='data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjMycHgiIGhlaWdodD0iMzJweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiA1MTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8cGF0aCBkPSJNMjA2LjExNSwyNTUuOTU4Yy0yMy44NTQtMTIuMjU5LTQ3LjA0My0xOC40NzktNjguOTQtMTguNDc5Yy0yLjk3OCwwLTUuOTc2LDAuMDktOC45NzQsMC4zNTQgICBj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yICAgYy0yOS40MDYsMTEuNDE2LTU4LjEwNCwxNy4yMzMtODUuNTE0LDE3LjIzM2MtNDUuODQ0LDAtNzkuNjQ2LTE1LjkwMS0xMDEuNTQ3LTMxLjE4M0wyNzguOTY0LDI0NC4yMyAgIGMzMC44NzQsMTkuODU0LDY0LjE0NiwyOS45MzksOTkuMDYyLDI5LjkzOWMyOC40NzUsMCw1Ny45NzEtNi44NCw4Ny43My0yMC4zNDRsLTAuMDkyLTEuMTExbDEuODY3LTAuNDQzTDUxMiw5OS4wNjJ6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==', title='WebTorrent for Windows') br strong Download | for Windows - a.download.download-linux(href=`https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/webtorrent-desktop_${version}-1_i386.deb`) + a.download.download-linux(href=`https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/webtorrent-desktop_${version}-1_amd64.deb`) img(src='data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub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