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:
- Create a unique ID for your application using
AppId
. - Create the listing of input files using
PackageManifest
. - Based on context, run
install_interactive()
oruninstall_interactive()
, or continue normally in your binary. - If you need a included data file in a installation, use
manifest()
to get aDiskManifest
.
§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
Modules§
- error
- Common error types.
- i18n
i18n
- Internationalization and localization (globalization) support.
- inst
- Installer functionality.
- lib_doc
- Documentation further reading.
- manifest
- Describing the contents an installed package.
- os
- OS specific functionalities.
- path
- Describing where files are located.
- tui
ui
- Terminal user interface.
- uninst
- Uninstaller functionality.
Functions§
- install
- Installs the binary to the device with the given configuration.
- install_
interactive ui
- Starts the installer with a interactive interface.
- manifest
- Returns the disk manifest when the binary is installed.
- uninstall
- Uninstalls the binary from the device with the given application ID.
- uninstall_
interactive ui
- Starts the uninstaller with a interactive interface.