Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug][File Association] "Open with" displays the app description instead of the app name on Windows #10968

Closed
martpie opened this issue Sep 11, 2024 · 3 comments · Fixed by #10975
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@martpie
Copy link

martpie commented Sep 11, 2024

Describe the bug

On Windows, when setting up File Association (NSIS + .msi), the description is used in the "Open With" dialog instead of the product/app name. (should be "Museeks", not "A clean, simple and cross-platform music player" ).

unnamed

(sorry, not possible to take screenshot of context menus in Windows 11, weirdly)

On macOS, works as expected:

unnamed

Reproduction

Not a minimal reproduction, sorry:

git clone https://github.com/martpie/museeks.git
cd museeks
git checkout file-associations-tauri
bun install
bun tauri install
# then install the app from `src-tauri\target\release\bundle`

Expected behavior

It should be using the app name, and not the app description.

Full tauri info output

$ tauri info

[✔] Environment
    - OS: Windows 10.0.22631 x86_64 (X64)
    ✔ WebView2: 128.0.2739.67
    ✔ MSVC:
        - Visual Studio Build Tools 2019
        - Visual Studio Build Tools 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.8.0
    - pnpm: 9.8.0
    - yarn: 1.22.22
    - npm: 10.8.1
    - bun: 1.1.26

[-] Packages
    - tauri 🦀: 2.0.0-rc.10
    - tauri-build 🦀: 2.0.0-rc.9
    - wry 🦀: 0.43.1
    - tao 🦀: 0.30.0
    - @tauri-apps/api : 2.0.0-rc.4
    - @tauri-apps/cli : 2.0.0-rc.12

[-] Plugins
    - tauri-plugin-single-instance 🦀: 2.0.0-rc.1
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-window-state 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-window-state : not installed!
    - tauri-plugin-fs 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-os 🦀: 2.0.0-rc.1
    - @tauri-apps/plugin-os : 2.0.0-rc.1
    - tauri-plugin-notification 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-notification : 2.0.0-rc.1
    - tauri-plugin-shell 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-shell : 2.0.0-rc.1
    - tauri-plugin-dialog 🦀: 2.0.0-rc.5
    - @tauri-apps/plugin-dialog : 2.0.0-rc.1
    - tauri-plugin-log 🦀: 2.0.0-rc.2
    - @tauri-apps/plugin-log : 2.0.0-rc.1

[-] App
    - build-type: bundle
    - CSP: default-src 'none'; img-src 'self' data:; media-src 'self' asset: https://asset.localhost http://asset.localhost; child-src 'self'; object-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src ipc: http://ipc.localhost 'self' https://api.github.com; font-src 'self' data:
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite


### Stack trace

_No response_

### Additional context

_No response_
@martpie martpie added status: needs triage This issue needs to triage, applied to new issues type: bug labels Sep 11, 2024
@FabianLars
Copy link
Member

Looks like Windows uses the FileDescription exe property for this which we set to shortDescription. Setting it to shortDescription sounds right to me the first thing may be a bit weird but explains why all apps use their app name as a description.

There's also a way to set a FriendlyAppName which i think makes sense to use here (though at least on my system only very few apps use this). I guess this should be the ProductName? Or considering that this is only relevant for this feature (at least we only set the reg entries if file assocs are set) we should probably expose a config for this (like the assoc description) and let it fall back to ProductName.

Do you think this is reasonable (if you understood wtf i was talking about lol)?
cc @amrbashir - same question to you (just want your opinion, not asking you to work on this :P )

@amrbashir
Copy link
Member

I think we should change FileDescription to use productName see related bug #10890.

As for FriendlyAppName, I am fine with a config option for it, and falling back to productName

@FabianLars
Copy link
Member

FabianLars commented Sep 12, 2024

Ah right, forgot about that one. Good call! I'll open PRs for both of that later today.

Edit: I'd rather wait for the friendly app name until requested. Don't think friendly name != product name is a common use case.

FabianLars added a commit that referenced this issue Sep 12, 2024
amrbashir pushed a commit that referenced this issue Sep 12, 2024
* fix(core): Use productName for FileDescription

fixes #10968
fixes #10890

* just unwrap since winres will panic anyway or use the cargo.toml description which we don't want

* regen

* nsis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants