參考資料
進階安裝
檢查下載檔案的簽章、從原始碼建置 Ferret、取得舊版本,以及了解更新的運作方式。安裝 Ferret 並不需要這些步驟。
#所有下載檔案
檔案由 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(安裝程式) |
| Linux(x64) | Ferret-<version>-linux-x86_64.AppImage、Ferret-<version>-linux-amd64.deb |
0.1.x 以前的版本以舊名稱發佈,檔名為 MOVIE-ADE-<version>-…。Ferret-… 的檔名從 0.2.0 開始使用。
#驗證下載的檔案(已簽署的 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 簽章與公證。0.3.0 以前的版本,請與 releases/<version>/manifest.json 中的雜湊值比對。
#較舊的 macOS 版本
適用於 0.2.0 build 2 以前的版本:如果 macOS 顯示無法驗證開發者,請關閉對話框,開啟 系統設定 → 隱私權與安全性,按一下 Ferret 訊息旁的 強制打開,再按 打開 確認。如果顯示 App「已損毀」,請移除隔離屬性:
xattr -dr com.apple.quarantine /Applications/Ferret.app
#從原始碼建置
需要 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、比較版本,並用 App 內建的發行金鑰檢查該版本 SHA256SUMS 的簽章。有較新的版本時,按一下 下載:Ferret 會下載適用於你電腦的安裝程式,確認其 SHA-256 與已簽署的 SHA256SUMS 相符,將它儲存到「下載」資料夾並在那裡顯示。下載頁面也會在瀏覽器中進行相同的檢查後才儲存檔案。在你按下按鈕之前不會進行任何檢查,也不會自動安裝任何東西。