fix(windows): add DefaultIcon to Applications entry so "Open with" icon shows

Both the MSI and the portable build were missing Applications\OpenCADStudio.exe\
DefaultIcon, causing a blank generic icon in the "Open with" context-menu list
and the "Choose another app" picker.

- packaging/windows/main.wxs: add Applications\OpenCADStudio.exe\DefaultIcon
  (+ FriendlyAppName, shell\open\command, SupportedTypes) to the
  DefaultPrograms component for MSI installs (HKLM).

- src/io/file_association.rs: add DefaultIcon to the Applications\
  OpenCADStudio.exe block written at runtime for portable builds (HKCU).

https://claude.ai/code/session_01DFVSKgViFaxEjZD2KsTdtt
This commit is contained in:
Claude committed 2026-06-12 11:42:41 +00:00
1 parent 73cb0b7e21
commit 13eef50a00
2 files changed
+40 -2

No files matched your search

+3
View File
@@ -264,6 +264,9 @@ mod windows_impl {
&format!("\"{exe}\" \"%1\""),
)?;
set_string(APP_BASE, Some("FriendlyAppName"), "Open CAD Studio")?;
// DefaultIcon is what Windows uses to show the app icon in the
// "Open with" context-menu list and the "Choose another app" picker.
set_string(&format!(r"{APP_BASE}\DefaultIcon"), None, &format!("\"{exe}\",0"))?;
// Listing the extensions under SupportedTypes is what makes the app
// appear in the "Open with → Choose another app" picker for them.
set_string(&format!(r"{APP_BASE}\SupportedTypes"), Some(".dwg"), "")?;