從這裡開始
安裝
Ferret 是適用於 macOS、Windows 與 Linux 的桌面 App。macOS 版以 Developer ID 簽署並經過 Apple 公證。Windows 版與 Linux 版尚未進行程式碼簽署,因此這些作業系統會在第一次啟動時要求你確認。
#下載
請從下載頁面取得適合你的作業系統與 CPU 的檔案。檔案由 Cloudflare R2 提供,而非 GitHub Releases,且只保留最近 10 個版本。
| 作業系統 | 檔案 |
|---|---|
| macOS(Apple silicon / Intel) | Ferret-<version>-mac-arm64.dmg、Ferret-<version>-mac-x64.dmg |
| Windows(x64 / arm64) | Ferret-<version>-win-x64.exe、Ferret-<version>-win-arm64.exe(NSIS 安裝程式) |
| Linux(x64) | Ferret-<version>-linux-x86_64.AppImage、Ferret-<version>-linux-amd64.deb |
0.1.x 以前的版本以舊名稱發佈,檔名為 MOVIE-ADE-<version>-…。Ferret-… 的檔名從 0.2.0 開始使用。
Ferret 支援 macOS、Windows 與 Linux。Windows 版與 Linux 版尚未進行程式碼簽署,因此第一次啟動時會要求你確認(請參閱下方步驟)。
#驗證下載的檔案(已簽署的 SHA256SUMS)
每個版本都附有 SHA256SUMS 檔案及其簽章 SHA256SUMS.sig。簽章使用 Ferret 的發行金鑰製作,而該金鑰與下載伺服器分開保管,因此即使下載伺服器上的安裝程式遭到竄改,也不可能附上有效的簽章。公開金鑰不從下載伺服器取得:請從儲存庫(build/release-signing/allowed_signers (在新分頁中開啟))取得,或從這裡複製:
[email protected] ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEpXERU8ST0MEOIMbzoL4zShkjIrMB4++NL3xBohKAS9
它的指紋是 SHA256:c7dvwwJQyY9qSstkmrO8JoVZ90DCaFZBAzjqV04N8zQ。GitHub 上的每個版本也附有相同的檔案。請用 ssh-keygen(macOS、Windows 10 以上版本與 Linux 皆內建)檢查簽章,再將下載檔案的雜湊值與已簽署的清單比對:
# the download server (currently the R2 public URL; it may move to a custom domain)
BASE=https://pub-588d93b3e875464f98d6cf98dc711a0c.r2.dev
VERSION=$(curl -s $BASE/latest.json | jq -r .version)
curl -sO $BASE/releases/$VERSION/SHA256SUMS
curl -sO $BASE/releases/$VERSION/SHA256SUMS.sig
# save the public key above as allowed_signers, then:
ssh-keygen -Y verify -f allowed_signers -I [email protected] -n ferret-release -s SHA256SUMS.sig < SHA256SUMS
# → Good "ferret-release" signature for [email protected] …
# macOS
shasum -a 256 -c SHA256SUMS --ignore-missing
# Linux
sha256sum -c SHA256SUMS --ignore-missing
# Windows (PowerShell): compare with the line for your file in SHA256SUMS
Get-FileHash .\Ferret-<version>-win-x64.exe -Algorithm SHA256
如果 ssh-keygen 沒有顯示 Good "ferret-release" signature
,或雜湊值不在清單中,請停止使用該檔案。Ferret 的 檢查更新 會用 App 內建的金鑰進行相同的檢查,不會提供簽章不符的版本。在 macOS 上,也可以用 spctl -a -vv /Applications/Ferret.app 檢查 Developer ID 簽章與公證。Windows 與 Linux 的安裝程式目前尚未由 Microsoft 或 Linux 發行版進行程式碼簽署。0.3.0 以前的版本在開始簽署之前發佈,只有 releases/<version>/manifest.json 中未簽署的雜湊值。
#macOS
- 開啟
.dmg,將Ferret.app拖到/Applications。 - 啟動 App。App 以 Developer ID 簽署並經過 Apple 公證(已附上公證票證),因此開啟時不會出現警告。
若要自行檢查簽章:
spctl -a -vv /Applications/Ferret.app
# accepted
# source=Notarized Developer ID
僅限舊版本(0.2.0 build 2 以前)未經簽署。開啟這些版本時,macOS 會顯示無法驗證開發者:請關閉對話框,開啟 系統設定 → 隱私權與安全性,按一下 Ferret 訊息旁的 強制打開,再按 打開 確認。如果顯示 App「已損毀」,請移除隔離屬性:
xattr -dr com.apple.quarantine /Applications/Ferret.app
#Windows
- 執行
Ferret-<version>-win-<arch>.exe。 - 當 SmartScreen 顯示「Windows 已保護您的電腦」時,按一下 其他資訊,再按 仍要執行。
- 選擇安裝資料夾。安裝程式會建立桌面捷徑。
#Linux
AppImage:
chmod +x Ferret-<version>-linux-x86_64.AppImage
./Ferret-<version>-linux-x86_64.AppImage
Debian / Ubuntu:
sudo apt install ./Ferret-<version>-linux-amd64.deb
deb 會安裝 ferret 套件與指令。
在 Ubuntu 23.10 以上版本,AppImage 可能會在啟動時因沙箱錯誤而停止,這是因為 AppArmor 限制了 Electron 沙箱所使用的使用者命名空間。請改為安裝 .deb,它會設定好沙箱輔助程式。
#從原始碼建置
需要 Node.js 20 以上版本(CI 與本機開發使用 22)、pnpm 與 git。
git clone https://github.com/JapanMarketing-Dev/ferret.git
cd ferret
pnpm install # postinstall prepares node-pty for Electron
pnpm dev # run in development mode
封裝安裝程式(輸出到 dist/release/,設定在 electron-builder.config.cjs)。Linux 版只能在 Linux 上建置。
pnpm dist:mac # dmg (arm64, x64)
pnpm dist:win # NSIS installers (x64, arm64)
pnpm dist:linux # AppImage + deb (x64)
build:<os>:dev 指令碼只會產生未封裝的 App(--dir),在本機測試時較快。
在 Windows 上,pnpm install 會使用 node-pty 隨附的預先建置二進位檔,而不重新建置(重新建置需要 Visual Studio C++ 建置工具)。設定 ADE_FORCE_NATIVE_REBUILD=1 可強制重新建置。
如果終端機回報無法載入 node-pty,請執行 pnpm rebuild:native。
#更新
Ferret 不會自動更新。請在頁尾開啟 更新,然後按一下 檢查更新。它會從下載伺服器(R2)取得 latest.json、比較版本,並提供下載頁面的連結。從 0.4.0 起,它還會用 App 內建的發行金鑰檢查該版本 SHA256SUMS 的簽章,不會提供無法驗證簽章的版本。在你按下按鈕之前不會進行任何檢查,也不會自動安裝任何東西。