Crate takecrate

source
Expand description

Add installer functionality to standalone binaries.

This crate enables CLI applications to be distributed as standalone binaries that can install and uninstall themselves.

§Overview

To get started:

  1. Create a unique ID for your application using AppId.
  2. Create the listing of input files using PackageManifest.
  3. Based on context, run install_interactive() or uninstall_interactive, or continue normally in your binary.
  4. If you need a included data file in a installation, use manifest() to get a DiskManifest.

§Example

let app_id = AppId::new("com.example.my-app")?;
let manifest = PackageManifest::new(&app_id).with_self_exe()?;

if exe_name.ends_with("_installer") {
    takecrate::install_interactive(&manifest)?;
}

§Further reading

More information

Modules§

  • Common error types.
  • Installer functionality.
  • Documentation further reading.
  • Describing the contents an installed package.
  • OS specific functionalities.
  • Describing where files are located.
  • Uninstaller functionality.

Functions§

  • Installs the binary to the device with the given configuration.
  • Starts the installer with a interactive interface.
  • Returns the disk manifest when the binary is installed.
  • Uninstalls the binary from the device with the given application ID.
  • Starts the uninstaller with a interactive interface.