mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
installer now saves and loads the previous install location in the registry
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<!-- http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/ -->
|
||||
<!-- This pattern allows a cmdline value to take precedence over values set from searchers (registry/file/etc) -->
|
||||
|
||||
<!-- Save the INSTALLDIR value from the cmdline, if it was provided -->
|
||||
<CustomAction Id="SaveCmdlineINSTALLDIR" Property="CMDLINE_INSTALLDIR" Value="[INSTALLDIR]" Execute="firstSequence" />
|
||||
|
||||
<!-- Set the INSTALLDIR value to the cmdline value, if one was provided -->
|
||||
<CustomAction Id="SetFromCmdlineINSTALLDIR" Property="INSTALLDIR" Value="[CMDLINE_INSTALLDIR]" Execute="firstSequence" />
|
||||
|
||||
|
||||
<InstallUISequence>
|
||||
<Custom Action="SaveCmdlineINSTALLDIR" Before="AppSearch" />
|
||||
<Custom Action="SetFromCmdlineINSTALLDIR" After="AppSearch">
|
||||
CMDLINE_INSTALLDIR
|
||||
</Custom>
|
||||
</InstallUISequence>
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="SaveCmdlineINSTALLDIR" Before="AppSearch" />
|
||||
<Custom Action="SetFromCmdlineINSTALLDIR" After="AppSearch">
|
||||
CMDLINE_INSTALLDIR
|
||||
</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<DirectoryRef Id="TARGETDIR">
|
||||
<Component Id="C.RegistryEntries" Guid="*">
|
||||
<RegistryKey Root="HKLM" Key="Software\mRemoteNG">
|
||||
<RegistryValue Type="string" Name="InstallDir" Value="[INSTALLDIR]" KeyPath="yes" />
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -27,12 +27,14 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CustomActions\CheckForInstalledWindowsUpdates.wxs" />
|
||||
<Compile Include="CustomActions\SaveInstallLocation.wxs" />
|
||||
<Compile Include="CustomActions\UninstallLegacyVersions.wxs" />
|
||||
<Compile Include="Fragments\FilesFragment.wxs" />
|
||||
<Compile Include="Fragments\DirectoriesFragment.wxs" />
|
||||
<Compile Include="Fragments\MainExeFragment.wxs" />
|
||||
<Compile Include="Fragments\MiscTextFilesFragment.wxs" />
|
||||
<Compile Include="Fragments\PuTTYNGFragment.wxs" />
|
||||
<Compile Include="Fragments\RegistryEntriesFragment.wxs" />
|
||||
<Compile Include="Fragments\ShortcutFragment.wxs" />
|
||||
<Compile Include="mRemoteNGV1.wxs" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<PropertyRef Id="NETFRAMEWORK40FULL" />
|
||||
<PropertyRef Id="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" />
|
||||
<Icon Id="mRemoteNG.ico" SourceFile="Resources\mRemoteNG.ico" />
|
||||
<CustomActionRef Id='SaveCmdlineINSTALLDIR' />
|
||||
|
||||
|
||||
<InstallUISequence>
|
||||
@@ -70,6 +71,7 @@
|
||||
<ComponentGroupRef Id="MandatoryComponents" Primary="yes" />
|
||||
<ComponentRef Id="C.MainExe" Primary="yes" />
|
||||
<ComponentGroupRef Id="CG.ProjectInfoFiles" Primary="yes" />
|
||||
<ComponentRef Id="C.RegistryEntries" Primary="yes" />
|
||||
</Feature>
|
||||
|
||||
<Feature Id="F.PuttyNG" Title="PuTTYNG" Absent="allow" AllowAdvertise="no" Level="1">
|
||||
|
||||
Reference in New Issue
Block a user