mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Added install conditions:
- Requires Win7 or higher - If Win7, requires SP1 - Requires .Net Framework 4.0 or higher - Requires elevated priveleges to install
This commit is contained in:
17
Installer/Fragments/DirectoriesFragment.wxs
Normal file
17
Installer/Fragments/DirectoriesFragment.wxs
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.PlatformProgramFilesFolder)">
|
||||
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)" />
|
||||
</Directory>
|
||||
|
||||
<Directory Id="DesktopFolder" Name="!(loc.Folders_Desktop)" />
|
||||
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<Condition Message="You need to be an administrator to install this product.">
|
||||
Privileged
|
||||
</Condition>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -27,7 +27,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Fragments\FilesFragment.wxs" />
|
||||
<Compile Include="Fragments\InstallConditionsFragment.wxs" />
|
||||
<Compile Include="Fragments\DirectoriesFragment.wxs" />
|
||||
<Compile Include="Fragments\MiscTextFilesFragment.wxs" />
|
||||
<Compile Include="Fragments\PuTTYNGFragment.wxs" />
|
||||
<Compile Include="Fragments\ShortcutFragment.wxs" />
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<!-- Install Conditions -->
|
||||
<String Id="Upgrade_NewerVersionInstalled" Overridable="yes">A newer version of [ProductName] is already installed.</String>
|
||||
<String Id="Install_NeedToBeAdminToInstall">You need to be an administrator to install this product.</String>
|
||||
<String Id="Install_NeedDotNetFrameworkVersion">mRemoteNG requires Microsoft .NET Framework $(var.RequiredDotNetFrameworkVersion).</String>
|
||||
<String Id="Install_NeedDotNetFrameworkVersion">mRemoteNG requires Microsoft .NET Framework [REQUIREDDOTNETFRAMEWORKVERSION] or higher.</String>
|
||||
<String Id="Install_OSVersionRequirement">mRemoteNG requires Windows 7 SP1 or higher to run. Please update your operating system and try again.</String>
|
||||
<String Id="Install_Win7RequiresSP1">For mRemoteNG to run on Windows 7, it requires Service Pack 1 to be installed. Please install Service Pack 1 and try again.</String>
|
||||
|
||||
<!-- Directories and File names -->
|
||||
<String Id="Folders_Desktop">Desktop</String>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
|
||||
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
|
||||
<Product Name="$(var.ProductNameWithPlatform)" Manufacturer="Next Generation Software" Version="$(var.ProductVersion)"
|
||||
Id="$(var.ProductCode)"
|
||||
@@ -14,20 +14,31 @@
|
||||
<Property Id="APPLICATIONROOTDIRECTORY">
|
||||
<RegistrySearch Id='mRemoteNGRegistry' Type='raw' Root='HKLM' Key='Software\mRemoteNG' Name='InstallDir' />
|
||||
</Property>
|
||||
<Property Id='REQUIREDDOTNETFRAMEWORKVERSION' Value='$(var.RequiredDotNetFrameworkVersion)' />
|
||||
<Icon Id="mRemoteNG.ico" SourceFile="Resources\mRemoteNG.ico" />
|
||||
|
||||
|
||||
<PropertyRef Id="NETFRAMEWORK40FULL" />
|
||||
<PropertyRef Id="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" />
|
||||
|
||||
<!-- Need to be admin to install -->
|
||||
<Condition Message="!(loc.Install_NeedToBeAdminToInstall)">
|
||||
Privileged
|
||||
</Condition>
|
||||
<!-- Windows 7 or higher required -->
|
||||
<Condition Message="!(loc.Install_OSVersionRequirement)">
|
||||
<![CDATA[Installed OR (VersionNT >= 601) OR (VersionNT64 >= 601)]]>
|
||||
</Condition>
|
||||
<!-- If Windows 7, SP 1 is required -->
|
||||
<Condition Message="!(loc.Install_Win7RequiresSP1)">
|
||||
<![CDATA[Installed OR ((VersionNT >= 602) OR (VersionNT64 >= 602)) OR ((VersionNT = 601 OR VersionNT64 = 601) AND ServicePackLevel >= 1)]]>
|
||||
</Condition>
|
||||
<!-- .Net Framework Version Condition -->
|
||||
<Condition Message="!(loc.Install_NeedDotNetFrameworkVersion)">
|
||||
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED = 1]]>
|
||||
</Condition>
|
||||
|
||||
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.PlatformProgramFilesFolder)">
|
||||
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)" />
|
||||
</Directory>
|
||||
|
||||
<Directory Id="DesktopFolder" Name="!(loc.Folders_Desktop)" />
|
||||
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<Feature Id="F.Complete" Title="!(loc.Feature_Complete)" Display="expand" AllowAdvertise="no" Level="1">
|
||||
<Feature Id="F.MinimalFeature" Title="$(var.ProductName)" Absent="disallow" ConfigurableDirectory="APPLICATIONROOTDIRECTORY" Level="1">
|
||||
|
||||
Reference in New Issue
Block a user