tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Tauri unwantedly converts PascalCase package product name to kebab-case

Open ninjadev64 opened this issue 1 year ago • 3 comments

Describe the bug

The string configured as package.productName in tauri.conf.json in my project is "OpenDeck". This is the string I would like to be shown in start menus, docks, app launchers, software stores (e.g. GNOME Software), etc.

However, Tauri unwantedly converts this string to "open-deck" for the output artifact names (resulting in open-deck_2.0.0_amd64.deb and so forth) and for the executable name (meaning that it's open-deck to run it from a shell). I would like these both to be opendeck. However, the docs don't appear to mention any property that can be changed to override this behaviour.

Expected behavior

I should be able to specify an alternative string to use for these properties in my tauri.conf.json instead of having to deal with an inaccurate case conversion.

Platform and versions

[✔] Environment
    - OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.0: 2.42.2
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.73.0 (cc66ad468 2023-10-03)
    ✔ cargo: 1.73.0 (9c4383fb5 2023-08-26)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.18.0
    - yarn: 1.22.21
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 1.5.2
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.5
    - tauri-cli [RUST]: 1.5.6
    - @tauri-apps/api [NPM]: 1.5.1
    - @tauri-apps/cli [NPM]: 1.5.6 (outdated, latest: 1.5.7)

[-] App
    - build-type: bundle
    - CSP: default-src 'self';
    - distDir: ../build
    - devPath: http://localhost:5173/
    - framework: Svelte
    - bundler: Vite

ninjadev64 avatar Dec 06 '23 19:12 ninjadev64

I think https://github.com/tauri-apps/tauri/issues/8109 covers this right? You could set opendeck as the packageName and OpenDeck as displayName then.

FabianLars avatar Dec 07 '23 09:12 FabianLars

Yep, but it's a shame it doesn't exist ;)

ninjadev64 avatar Dec 08 '23 17:12 ninjadev64

@FabianLars Any update?

ninjadev64 avatar Feb 18 '24 13:02 ninjadev64

@FabianLars I'm planning to start distributing stable builds of my application soon. I would like the package name to be in order beforehand, so that users don't end up with two versions installed later down the line when the package name gets changed. Do you know of any way to resolve this?

ninjadev64 avatar Mar 03 '24 10:03 ninjadev64

@ninjadev64 I have created a PR to support this kind of use case. Would you mind try and let me if it works for you?

mariotaku avatar Mar 13 '24 13:03 mariotaku

@ninjadev64 I have created a PR to support this kind of use case. Would you mind try and let me if it works for you?

While I'd love to try your changes, I'm currently using Tauri v1. I'll be moving to v2 as soon as it's stable, though, so thanks for the PR!

ninjadev64 avatar Mar 14 '24 16:03 ninjadev64