Added support for creating shortcuts to start menu and desktop. However, the desktop shortcut is not functioning as expected

This commit is contained in:
David Sparer
2016-05-14 11:53:53 -06:00
parent 86585feb56
commit 8c43494c03
7 changed files with 938 additions and 907 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment Id="UninstallDetails">
<Icon Id="mRemoteNG.ico" SourceFile=".\Resources\mRemoteNG.ico" />
<Property Id="ARPPRODUCTICON" Value="mRemoteNG.ico" />
<Property Id="ARPHELPLINK" Value="http://www.mremoteng.org" />
</Fragment>
</Wix>

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment Id="RegistryEntries">
<Property Id="INSTALLLOCATION">
<RegistrySearch Id="RegistrySearch" Type="raw" Root="HKLM" Win64="$(var.Win64)" Key="$(var.ProductName)" Name="InstallLocation" />
</Property>
</Fragment>
</Wix>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment Id="F.Shortcuts">
<DirectoryRef Id="DesktopFolder">
<Component Id="C.DesktopShortcut" Guid="F78E5A16-A2F7-4BD9-9250-CBF3016CCCDA">
<Shortcut Id="DesktopShortcut" Name="$(var.ProductName)" Target="[APPLICATIONROOTDIRECTORY][MAINEXE]" WorkingDirectory="APPLICATIONROOTDIRECTORY" Icon="mRemoteNG.ico" />
<RemoveFile Id="DesktopShortcut" Name="$(var.ProductName)" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\$(var.ProductName)" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="C.ApplicationStartMenuShortcut" Guid="193B9E14-F40E-44F1-8514-BED253BCBF75">
<Shortcut Id="ApplicationStartMenuShortcut" Name="$(var.ProductName)" Target="[APPLICATIONROOTDIRECTORY][MAINEXE]" WorkingDirectory="APPLICATIONROOTDIRECTORY" Icon="mRemoteNG.ico" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\$(var.ProductName)" Name="ApplicationStartMenuShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
</Fragment>
</Wix>

View File

@@ -27,8 +27,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Fragments\FilesFragment.wxs" />
<Compile Include="Fragments\ProgramFilesInfoFragment.wxs" />
<Compile Include="Fragments\RegistryFragment.wxs" />
<Compile Include="Fragments\ShortcutFragment.wxs" />
<Compile Include="mRemoteNGV1.wxs" />
</ItemGroup>
<ItemGroup>
@@ -37,7 +36,7 @@
<Project>{4934a491-40bc-4e5b-9166-ea1169a220f6}</Project>
<Private>True</Private>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLLOCATION</RefTargetDir>
<RefTargetDir>APPLICATIONROOTDIRECTORY</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@@ -70,6 +69,6 @@
<Copy SourceFiles="$(OutputPath)$(OutputName).msi" DestinationFiles="..\Deploy\Setup\$(OutputName) $(AssemblyFileVersion)_$(Platform).msi" />
</Target>
<PropertyGroup>
<PreBuildEvent>call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -dr INSTALLLOCATION -var var.HarvestPath -srd -cg ProductComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" -v</PreBuildEvent>
<PreBuildEvent>call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -dr APPLICATIONROOTDIRECTORY -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" -v</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -7,19 +7,34 @@
Language="$(var.ProductLanguage)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<MediaTemplate EmbedCab="yes" />
<Property Id="ARPPRODUCTICON" Value="mRemoteNG.ico" />
<Property Id="ARPHELPLINK" Value="http://www.mremoteng.org" />
<Property Id="MAINEXE" Value="$(var.ExeProcessName)" />
<Icon Id="mRemoteNG.ico" SourceFile="Resources\mRemoteNG.ico" />
<Feature Id="ProductFeature" Title="Installer" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment Id="FoldersFragment">
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="INSTALLLOCATION" Name="$(var.ProductName)" />
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
</Directory>
</Directory>
</Fragment>
<Feature Id="MinimalFeature" Title="Installer" Level="0">
<ComponentGroupRef Id="MandatoryComponents" />
</Feature>
<Feature Id="CompleteFeature" Title="Installer" Level="1">
<ComponentGroupRef Id="MandatoryComponents" />
<ComponentRef Id="C.DesktopShortcut" />
<ComponentRef Id="C.ApplicationStartMenuShortcut" />
</Feature>
</Product>
</Wix>