cargo-dist
cargo-dist copied to clipboard
installer: macOS pkg
I think it would be nice to support creating pkg installers for macOS. Compared to dmg/app this could be more suitable for CLI applications (#24). For example, starship publishes pkg installers.
FYI I have a pure Rust pkg file format implementation at https://crates.io/crates/apple-flat-package. Unfortunately, it doesn't currently support writing because my Bom file implementation (https://github.com/indygreg/apple-platform-rs/tree/main/apple-bom) doesn't yet support writing. It's an unknown amount of work to finish implementing writing support.
I just wanted to let you know that generating pkg files without using Apple tooling is just outside the realm of possibility.
(The linked repository also has a pure Rust implementation of Apple code signing and notarization so you can sign + notarize from Linux in case that's interesting to you.)
I'm looking into this again at the moment. I'm currently looking to leverage the native Apple tools for this. My plan is to use both pkgbuild and productbuild so that we can produce a package with similar rich presentation data as in the Windows package building support.