Files
d330viewer/installer/UpperControl.wxs
2026-01-14 18:07:26 +08:00

80 lines
3.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="D330Viewer"
Language="1033"
Version="0.1.0.0"
Manufacturer="Your Company"
UpgradeCode="12345678-1234-1234-1234-123456789012">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Description="D330M Depth Camera Control System"
Comments="Qt6-based depth camera control and visualization system" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!-- 安装目录 -->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="D330Viewer" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="D330Viewer"/>
</Directory>
</Directory>
<!-- 开始菜单快捷方式 -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="12345678-1234-1234-1234-123456789013">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="D330Viewer"
Description="D330M Depth Camera Control System"
Target="[INSTALLFOLDER]D330Viewer.exe"
WorkingDirectory="INSTALLFOLDER"/>
<Shortcut Id="UninstallProduct"
Name="卸载 D330Viewer"
Description="卸载 D330M 深度相机控制系统"
Target="[SystemFolder]msiexec.exe"
Arguments="/x [ProductCode]"/>
<RemoveFolder Id="CleanUpShortCut" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU"
Key="Software\D330Viewer"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
<!-- 用户配置注册表项(卸载时删除) -->
<DirectoryRef Id="TARGETDIR">
<Component Id="UserSettings" Guid="12345678-1234-1234-1234-123456789015">
<RegistryKey Root="HKCU" Key="Software\D330Viewer\D330Viewer" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Name="placeholder" Value="1" KeyPath="yes"/>
</RegistryKey>
</Component>
</DirectoryRef>
<Feature Id="ProductFeature" Title="D330Viewer" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentGroupRef Id="BinFiles" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="UserSettings" />
</Feature>
</Product>
<!-- 主程序文件 -->
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainExecutable" Guid="12345678-1234-1234-1234-123456789014">
<File Id="D330Viewer.exe"
Source="$(var.BinDir)\D330Viewer.exe"
KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>