Windows installer: pass the data directories to the .qet file association

The MSI registers both shortcuts with the arguments QET needs to find its
data ("Point directly to qelectrotech.exe with all required arguments"),
but the QElectroTech.Document\shell\open\command registry value was
written without them:

    "[INSTALLDIR]bin\qelectrotech.exe" "%1"

Launching from the Start Menu therefore works, while double-clicking a
.qet file does not: Explorer sets the working directory to the document's
folder, and the compiled-in data paths are relative, so nothing is found
there. The most visible symptom is the interface always coming up in
French, because no translation loads and the source strings are French.

Give the file association the same arguments as the shortcuts.

Reported by mr-rfh in #554, who diagnosed it and arrived at exactly this
registry value by hand.
This commit is contained in:
ispyisail
2026-07-26 22:41:44 +12:00
parent e9a53dbec2
commit 69c595fdb8
+6 -1
View File
@@ -97,8 +97,13 @@
<RegistryValue Root="HKCR" Key="QElectroTech.Document" Type="string" Value="QElectroTech Project" /> <RegistryValue Root="HKCR" Key="QElectroTech.Document" Type="string" Value="QElectroTech Project" />
<RegistryValue Root="HKCR" Key="QElectroTech.Document\DefaultIcon" Type="string" <RegistryValue Root="HKCR" Key="QElectroTech.Document\DefaultIcon" Type="string"
Value="[INSTALLDIR]ico\qelectrotech.ico" /> Value="[INSTALLDIR]ico\qelectrotech.ico" />
<!-- Pass the same arguments as the shortcuts above: opening a .qet from
Explorer sets the working directory to the document's folder, so a
bare command line leaves QET unable to locate its data. Without the
lang-dir argument the UI falls back to the source language, which
is French. See issue #554. -->
<RegistryValue Root="HKCR" Key="QElectroTech.Document\shell\open\command" Type="string" <RegistryValue Root="HKCR" Key="QElectroTech.Document\shell\open\command" Type="string"
Value="&quot;[INSTALLDIR]bin\qelectrotech.exe&quot; &quot;%1&quot;" /> Value="&quot;[INSTALLDIR]bin\qelectrotech.exe&quot; --common-elements-dir=&quot;[INSTALLDIR]elements/&quot; --common-tbt-dir=&quot;[INSTALLDIR]titleblocks/&quot; --lang-dir=&quot;[INSTALLDIR]lang/&quot; $(var.QtPlatformArgs) &quot;%1&quot;" />
</Component> </Component>
</ComponentGroup> </ComponentGroup>