diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..ece41e7 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +bundle-macos = "packager --release --packages ironstorage-desktop --formats app" diff --git a/README.md b/README.md index 5f6cb28..2e541fb 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,18 @@ cargo build --package ironstorage-desktop cargo build --package ironstorage-desktop --release ``` +On macOS, install `cargo-packager` once, then build an application bundle or +install the release bundle directly into `~/Applications`: + +```sh +cargo install cargo-packager --locked +cargo bundle-macos +cargo bundle-macos --out-dir "$HOME/Applications" +``` + +The first bundle command writes `target/release/IronStorage.app`. The install +form replaces `~/Applications/IronStorage.app` with the freshly built bundle. + Build only the shared storage library or the Rust Apple bridge: ```sh diff --git a/apps/desktop/Cargo.toml b/apps/desktop/Cargo.toml index 51cc24e..e9b3007 100644 --- a/apps/desktop/Cargo.toml +++ b/apps/desktop/Cargo.toml @@ -6,6 +6,16 @@ edition.workspace = true rust-version.workspace = true publish = false +[package.metadata.packager] +product-name = "IronStorage" +identifier = "de.rfc1437.ironstorage" +category = "utility" +icons = ["../../assets/icon-candidates/vault-classic@2x.png"] +before-packaging-command = { script = "cargo build --release --package ironstorage-desktop", dir = "../.." } + +[package.metadata.packager.macos] +signing-identity = "-" + [[bin]] name = "ironstorage-desktop" path = "src/main.rs" diff --git a/assets/icon-candidates/vault-classic@2x.png b/assets/icon-candidates/vault-classic@2x.png new file mode 100644 index 0000000..5339c61 Binary files /dev/null and b/assets/icon-candidates/vault-classic@2x.png differ diff --git a/assets/icon-candidates/vault-octagonal.png b/assets/icon-candidates/vault-octagonal.png new file mode 100644 index 0000000..3c0473e Binary files /dev/null and b/assets/icon-candidates/vault-octagonal.png differ diff --git a/assets/icon-candidates/vault-satin.png b/assets/icon-candidates/vault-satin.png new file mode 100644 index 0000000..b6abefb Binary files /dev/null and b/assets/icon-candidates/vault-satin.png differ