std/bundle

What macOS, Windows, and Linux want around an application, and the packages they install from. cuarzo bundle does all of it from cuarzo.toml (see Projects); the parts are here for programs that make their own.

import "std/bundle"

BundleInfo app = BundleInfo("Notes", "com.example.notes", "1.2.0", "notes")
app.publisher = "Example Ltd"
write_text("Info.plist", info_plist(app))
write_bytes("notes.deb", deb_package(app, files, "x86_64")?)

A BundleInfo has the name people see, the identifier in reverse DNS, the version, the program's executable name, and its publisher, description, copyright, category (of BUNDLE_CATEGORIES), homepage, license, maintainer, the file_types it opens (each a BundleFileType of extensions, name, mime, and role), its url_schemes, minimum_macos, and what a Linux package depends on and requires.

Function Result
info_plist(b) macOS's Info.plist, with the kinds of files declared as types of the application's own
windows_manifest(b), windows_rc(b, icon, manifest) Windows' manifest, and the resource script of the icon, manifest, and version information, for --resources
wix_source(b, folder, files, icon), nsis_script(b, folder, files, icon, output), appx_manifest(b, publisher, arch) the sources of an MSI (WiX 4), an NSIS installer, and an MSIX package
desktop_entry(b, exec), mime_package(b), appstream_metainfo(b) the .desktop entry, the shared-mime-info file, and the AppStream metainfo
deb_control(b, arch, kib), deb_package(b, files, arch) a Debian control file, and a whole package of ArchiveEntry files named from the root, as usr/bin/notes
rpm_spec(b, staging, paths, arch), flatpak_manifest(b), appimage_run(b) what rpmbuild, flatpak-builder, and an AppImage start from
version_numbers(v), version_quad(v), deb_version(v), rpm_version(v) a version as each system writes it: 1.2.0-beta.1 is 1.2.0.0 on Windows and 1.2.0~beta.1 for Debian and RPM
package_name(name), stable_guid(text) a name Debian and RPM allow, and a GUID that is the same each time for the same text, as an MSI's upgrade code must be
make_bundles(request) what cuarzo bundle runs: a BundleRequest built, made into each of its formats, and signed when it asks
signing_from_env() a BundleSigning of what the environment gives for signing; see Signing