給 macOS 使用者轉換到 AppImage

../_images/dmg-AppImage.png

本頁將 AppImage 的術語與 macOS 的對應概念做比較,可協助從 macOS 轉到 Linux 的使用者快速理解 AppImage 概念。

AppImage 概念

大致的 macOS 對應物

.AppImage 檔案

位於 .dmg 檔案中的 .app,執行時會自動掛載

.AppDir 目錄

.app 目錄

.desktop 檔案

Info.plist 檔案

*.metainfo.xml 檔案與 package.json 檔案(適用於 Electron 應用程式)

Info.plist 檔案(更完整的版本)

AppDir 內的 usr/

.app 內的 Resources/

AppImageUpdate

Sparkle Framework

沒有直接對應物,但可使用 ELF 區段 .upd_info 中的 更新資訊

Sparkle appcast

可選的 appimaged 常駐服務

Launch Services 用於在系統中註冊應用程式(例如 MIME 類型、圖示等)

沒有直接對應物,但 AppImageHub 是可用 AppImage 的中央目錄

Mac App Store

ELF 區段中的可選簽章

/Contents/_MASReceipt/ 內的簽章

尚無直接對應物,但在建置流程中可使用 linuxdeployqt`_(適用於 Qt、C++、C)或在 Electron 應用程式中使用 `electron-builder

Xcode IDE 在您點擊「compile」時會產生 .app

appimagetool my.AppDir my.AppImage

hdiutil create -volname myApp -srcfolder my.app/../ -ov -format UDZO myApp.dmg