Skip to content

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

Merged
lucasfernog merged 15 commits into
devfrom
refactor/cli/perserve-cargo-name
May 28, 2024
Merged

refactor(cli&bundler): avoid renaming main executable and preserve cargo name#9375
lucasfernog merged 15 commits into
devfrom
refactor/cli/perserve-cargo-name

Conversation

@amrbashir

Copy link
Copy Markdown
Member

closes #8109
closes #8349

@amrbashir amrbashir requested a review from a team as a code owner April 4, 2024 00:46
@amrbashir

Copy link
Copy Markdown
Member Author

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

@FabianLars

Copy link
Copy Markdown
Member

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)

@nekename

Copy link
Copy Markdown
Contributor

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

@FabianLars

FabianLars commented Apr 26, 2024

Copy link
Copy Markdown
Member

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)

@lucasfernog lucasfernog changed the title refactor(cli&bundler): avoid renaming main executable and reserve cargo name refactor(cli&bundler): avoid renaming main executable and preserve cargo name May 24, 2024
@lucasfernog

Copy link
Copy Markdown
Member

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

@amrbashir

amrbashir commented May 25, 2024

Copy link
Copy Markdown
Member Author

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

@lucasfernog lucasfernog merged commit 265c238 into dev May 28, 2024
@FabianLars

Copy link
Copy Markdown
Member

@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

@amrbashir

Copy link
Copy Markdown
Member Author

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

@FabianLars

Copy link
Copy Markdown
Member

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

@amrbashir

Copy link
Copy Markdown
Member Author

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

amrbashir added a commit that referenced this pull request Jun 4, 2024
amrbashir added a commit that referenced this pull request Jun 5, 2024
* fix(rpm): use product name for output package

ref: #9375
ref: #9375 (comment)

* use kebab-case product-name for rpm

* fmt
pewsheen pushed a commit to pewsheen/tauri that referenced this pull request Jun 13, 2024
* fix(rpm): use product name for output package

ref: tauri-apps#9375
ref: tauri-apps#9375 (comment)

* use kebab-case product-name for rpm

* fmt
@bukowa

bukowa commented Jun 28, 2024

Copy link
Copy Markdown
Contributor

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?

pierremtb added a commit to KittyCAD/modeling-app that referenced this pull request Jun 29, 2024
amrbashir added a commit that referenced this pull request Sep 11, 2024
The upgrade code generation was changed due to an accidental regression in #9375. Previously `UpgradeCode` was calculated using the main binary name which was `<product_name>.exe`, but #9375 changed the default main binary name to `<cargo-crate-name>.exe` and thus a different UpgradeCode was generetad.

This PR reverts this change to use product name for `UpgradeCode` generation.
amrbashir added a commit that referenced this pull request Sep 11, 2024
The upgrade code generation was changed due to an accidental regression in #9375. Previously `UpgradeCode` was calculated using the main binary name which was `<product_name>.exe`, but #9375 changed the default main binary name to `<cargo-crate-name>.exe` and thus a different UpgradeCode was generetad.

This PR reverts this change to use product name for `UpgradeCode` generation.
lucasfernog pushed a commit that referenced this pull request Sep 12, 2024
…10967)

The upgrade code generation was changed due to an accidental regression in #9375. Previously `UpgradeCode` was calculated using the main binary name which was `<product_name>.exe`, but #9375 changed the default main binary name to `<cargo-crate-name>.exe` and thus a different UpgradeCode was generetad.

This PR reverts this change to use product name for `UpgradeCode` generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants