feat(installer): register Open CAD Studio as a default-app candidate for .dwg/.dxf
Adds a DefaultPrograms component publishing Capabilities and a RegisteredApplications entry under HKLM. This makes Open CAD Studio appear in Settings > Default Apps and the shell "Open with" list, so users can set it as the default handler for .dwg and .dxf files. Modern Windows guards the actual default behind a per-user UserChoice hash that an installer cannot forge, so this is the supported path to becoming the default rather than silently overwriting the association. https://claude.ai/code/session_01DFVSKgViFaxEjZD2KsTdtt
This commit is contained in:
parent
fd949b74c7
commit
e24447a70d
1 changed files with 48 additions and 0 deletions
|
|
@ -14,6 +14,9 @@
|
||||||
* File associations for .dwg and .dxf via a single ProgID; both
|
* File associations for .dwg and .dxf via a single ProgID; both
|
||||||
route through `OpenCADStudio.exe "%1"` so the OS hands the file
|
route through `OpenCADStudio.exe "%1"` so the OS hands the file
|
||||||
path to the app as argv[1] (consumed in OpenCADStudio::boot).
|
path to the app as argv[1] (consumed in OpenCADStudio::boot).
|
||||||
|
* Default Programs registration (Capabilities + RegisteredApplications)
|
||||||
|
so the app shows up in Settings > Default Apps and can be set as the
|
||||||
|
default handler for .dwg / .dxf.
|
||||||
* Standard Add/Remove Programs entry with icon.
|
* Standard Add/Remove Programs entry with icon.
|
||||||
* MajorUpgrade — installing a newer MSI replaces the old version.
|
* MajorUpgrade — installing a newer MSI replaces the old version.
|
||||||
-->
|
-->
|
||||||
|
|
@ -98,6 +101,50 @@
|
||||||
</ProgId>
|
</ProgId>
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Default Programs registration. The ProgId/Extension rows above
|
||||||
|
register the handlers, but modern Windows (8+) guards the actual
|
||||||
|
default via a per-user UserChoice hash an installer can't forge.
|
||||||
|
Publishing Capabilities + a RegisteredApplications entry is the
|
||||||
|
supported way in: it makes Open CAD Studio appear in Settings >
|
||||||
|
Default Apps and the "Open with" list, so .dwg / .dxf can be set
|
||||||
|
to it. The keys are HKLM-wide, so the shell picks them up on its
|
||||||
|
next association query without a forced refresh.
|
||||||
|
-->
|
||||||
|
<Component Id='DefaultPrograms' Guid='6f3e9b2a-1c4d-4f8a-9b7e-2d5a8c1f0e63' Win64='yes'>
|
||||||
|
<RegistryValue
|
||||||
|
Root='HKLM'
|
||||||
|
Key='Software\Open CAD Studio\Capabilities'
|
||||||
|
Name='ApplicationName'
|
||||||
|
Type='string'
|
||||||
|
Value='Open CAD Studio'
|
||||||
|
KeyPath='yes' />
|
||||||
|
<RegistryValue
|
||||||
|
Root='HKLM'
|
||||||
|
Key='Software\Open CAD Studio\Capabilities'
|
||||||
|
Name='ApplicationDescription'
|
||||||
|
Type='string'
|
||||||
|
Value='2D/3D CAD application for DWG and DXF drawings.' />
|
||||||
|
<RegistryValue
|
||||||
|
Root='HKLM'
|
||||||
|
Key='Software\Open CAD Studio\Capabilities\FileAssociations'
|
||||||
|
Name='.dwg'
|
||||||
|
Type='string'
|
||||||
|
Value='OpenCADStudio.DWG' />
|
||||||
|
<RegistryValue
|
||||||
|
Root='HKLM'
|
||||||
|
Key='Software\Open CAD Studio\Capabilities\FileAssociations'
|
||||||
|
Name='.dxf'
|
||||||
|
Type='string'
|
||||||
|
Value='OpenCADStudio.DXF' />
|
||||||
|
<RegistryValue
|
||||||
|
Root='HKLM'
|
||||||
|
Key='Software\RegisteredApplications'
|
||||||
|
Name='Open CAD Studio'
|
||||||
|
Type='string'
|
||||||
|
Value='Software\Open CAD Studio\Capabilities' />
|
||||||
|
</Component>
|
||||||
|
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
|
@ -119,6 +166,7 @@
|
||||||
|
|
||||||
<Feature Id='Complete' Title='Open CAD Studio' Level='1'>
|
<Feature Id='Complete' Title='Open CAD Studio' Level='1'>
|
||||||
<ComponentRef Id='MainExecutable' />
|
<ComponentRef Id='MainExecutable' />
|
||||||
|
<ComponentRef Id='DefaultPrograms' />
|
||||||
<ComponentRef Id='ProgramMenuDirComp' />
|
<ComponentRef Id='ProgramMenuDirComp' />
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue