tauri icon indicating copy to clipboard operation
tauri copied to clipboard

refactor(cli&bundler): avoid renaming main executable and preserve cargo name

Open amrbashir opened this issue 1 year ago • 6 comments

closes #8109 closes #8349

amrbashir avatar Apr 04 '24 00:04 amrbashir

cc @FabianLars this will affect tauri-action, can you please give this a test

amrbashir avatar Apr 04 '24 00:04 amrbashir

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)

FabianLars avatar Apr 04 '24 15:04 FabianLars

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

nekename avatar Apr 26 '24 05:04 nekename

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)

FabianLars avatar Apr 26 '24 10:04 FabianLars

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

lucasfernog avatar May 25 '24 10:05 lucasfernog

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

amrbashir avatar May 25 '24 17:05 amrbashir

@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): grafik

FabianLars avatar Jun 03 '24 11:06 FabianLars

I think we can rename it manually if the underlying library doesn't support using a custom file name

amrbashir avatar Jun 03 '24 18:06 amrbashir

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

FabianLars avatar Jun 03 '24 18:06 FabianLars

Looks like we do, I will open a PR to change that

amrbashir avatar Jun 04 '24 22:06 amrbashir

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?

bukowa avatar Jun 28 '24 01:06 bukowa