從官方網站下載最新版本的WebTorrent Desktop:
從 GitHub 發布頁面下載特定的安裝程式檔案。
使用 Homebrew-Cask 從命令列安裝:
$ brew install --cask webtorrent
透過複製 Git 儲存庫來嘗試(不穩定)開發版本。請參閱「如何貢獻」說明。
$ git clone https://github.com/webtorrent/webtorrent-desktop.git
$ cd webtorrent-desktop
$ npm install
$ npm start
每次程式碼變更時都會自動重新啟動應用程式。在開發過程中很有用。
$ npm run watch
$ npm test
$ npm run test-integration
整合測試使用 Spectron 和 Tape。他們點擊應用程序,截取螢幕截圖並將每個螢幕截圖與參考進行比較。為什麼要截圖?
對於 MacOS,您需要 Retina 螢幕才能通過整合測試。您的螢幕解析度應與 2018 年 MacBook Pro 13 吋相同。
對於 Windows,您需要具有 1366x768 螢幕的 Windows 10。
執行整合測試時,請將滑鼠保持在螢幕邊緣,並且在測試運行時不要觸摸滑鼠或鍵盤。
建置適用於 Mac、Linux 和 Windows 的應用程式二進位。
$ npm run package
為一個平台建構:
$ npm run package -- [platform] [options]
其中[platform]
是darwin
、 linux
、 win32
或all
(預設)。
以下可選參數可用:
--sign
- 簽署應用程式(Mac、Windows)--package=[type]
- 套件單一輸出類型。deb
- Debian 軟體包rpm
- RedHat 軟體包zip
- Linux zip 文件dmg
- Mac 磁碟映像exe
- Windows 安裝程式portable
- Windows 可攜式應用程式all
- 所有平台(預設)注意:即使使用--package
選項,也總是會產生自動更新檔案(對於 Windows 為 .nupkg,對於 Mac 為 -darwin.zip)。
Windows 應用程式可以從任何平台打包。
注意:Windows 程式碼簽章目前僅適用於Windows 。
注意:要從非 Windows 平台打包 Windows 應用程序,需要安裝 Wine 和 Mono。例如,在 Mac 上,首先安裝 XQuartz,然後執行:
$ brew install wine mono
(需要 Homebrew 套件管理器。)
Mac 應用程式只能從macOS打包。
Linux 應用程式可以從任何平台打包。
如果從 Mac 打包,請透過執行以下命令使用 Homebrew 安裝系統相依性:
npm run install-system-deps
Electron(用 Javascript 為 Windows、OSX 和 Linux 製作本機應用程式的框架):https://electronjs.org/docs/tutorial/quick-start
React.js(與前端 UI 搭配使用的框架):https://reactjs.org/docs/getting-started.html
Material UI(實作 Google Material Design 的 React 元件。):https://material-ui.com/getting-started/installation
WebTorrent Desktop 收集一些基本的使用統計數據來幫助我們改進應用程式。例如,我們追蹤播放按鈕的工作情況。成功的頻率是多少?暫停?顯示缺少編解碼器錯誤?
該應用程式絕不會發送任何個人識別訊息,也不會追蹤您添加的種子。
麻省理工學院。版權所有 (c) WebTorrent, LLC。