#installer #cli-applications #standalone #distribution #binaries #user #path

takecrate

Adds installer functionality to standalone binaries for distribution of CLI applications

5 releases (2 stable)

1.1.0 Nov 6, 2024
1.0.0 Oct 19, 2024
0.2.1 Oct 6, 2024
0.2.0 Oct 6, 2024
0.1.0 Oct 4, 2024

#223 in Command-line interface

41 downloads per month
Used in warcat

MPL-2.0 license

130KB
3K SLoC

Takecrate

Rust library for adding installer functionality to standalone binaries.

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

Crates.io Version docs.rs

Quick start

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

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

Features

This crate aims to be a safe and easy way for users to use binaries by automating the file copying and search path modification.

Supported OS families: unix (macOS and Linux), windows.

In addition, notable quality of life features include:

  • Including files bundled beside the binary.
  • Option for installing for the current user or for all users.

Contributing & support

License

Copyright 2024 Christopher Foo. Licensed under Mozilla Public License 2.0

Dependencies

~3–14MB
~191K SLoC