StratusFearMe21/cargo-appimage

Doesn't work for crates with multiple binaries, or crates where the binary has a different name from the crate.

Closed this issue · 4 comments

First of all: thank you for this amazing project! This really takes the pain out of building appimages from Rust projects. Now to the issue...

I'm currently working on a project that builds multiple executable binaries (they share dependencies and a lot of backend code, and are intended to be a suite of tools). Ideally I would like all of them to be built into separate appimages.

However, right now cargo-appimage appears to only look for a single executable with the same name as crate:

cargo-appimage/src/main.rs

Lines 158 to 162 in 61fdd8e

std::fs::copy(
format!("target/release/{}", meta.name),
appdirpath.join("usr/bin/bin"),
)
.context("Cannot find binary file")?;

This means that in my project it simply fails with "Cannot find binary file".

I got you, this was an oversight on my part. Gimme a minute to implement this.

Okay, I've implemented this feature in the latest version (1.3.0). Apps with multiple binaries defined will be built as multiple AppImages

Oh wow! That was fast! Thanks so much! I'll test it out the next chance I get and report back.

Just tested, and as far as I can tell it works like a charm. Thanks!