refactor(cli&bundler): avoid renaming main executable and preserve cargo name
closes #8109 closes #8349
cc @FabianLars this will affect tauri-action, can you please give this a test
cc @FabianLars this will affect tauri-action, can you please give this a test
We already have logic in place to read the cargo.toml file so this should be an easy change. I will open a pr once this one here is merged (or earlier if i'm bored lol)
Hi,
I'm close to releasing a stable version of my app, and I would like to have my app's proper name in releases :P (#8349)
Could this be merged ASAP?
Thanks
We can (almost) never promise when something gets merged, but you can always use tauri from git if you can't wait for us :) https://tauri.app/v1/guides/faq#how-can-i-use-unpublished-tauri-changes (just replace dev/1.x with this PR's branch)
Pushed a small change to use the product name for the installers. I'm not sure about the Linux ones though - maybe we keep using the binary name? @FabianLars @amrbashir
It is fine for the installers, not sure about how it will affect linux bundle as well but should be fine to change as well, even macOS if possible. It is just a filename
@olivierlemasle Sorry for the random ping but since you added rpm support, do you think applying this change to the rpm bundle is fine too? For reference, this is the output we have after this PR (deb changed, rpm not):
I think we can rename it manually if the underlying library doesn't support using a custom file name
I didn't look at any code, i assumed we are currently setting the output name ourselves tbh, just wasn't sure about conventions and maybe even issues with dnf. Conventions probably don't matter because afaik the new .deb naming scheme also breaks with conventions(?). I think i'd prefer the consistency this time idk
Looks like we do, I will open a PR to change that
Trying to find out what's the new way to change application binary name correctly:
- so all bundlers etc. work fine
- without using package.name as I want to publish it under different name as a crate
We can use:
[package]
name="my-crate-name"
default-run= "my-application-name"
[[bin]]
name = "my-application-name"
path = "src/main.rs"
Is this the way?