mirror of
https://github.com/ckaczor/WixBalExtensionExt.git
synced 2026-02-16 11:08:30 -05:00
Update for WiX 3.10
This commit is contained in:
@@ -100,6 +100,32 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
{
|
||||
switch (parentElement.LocalName)
|
||||
{
|
||||
case "ExePackage":
|
||||
case "MsiPackage":
|
||||
case "MspPackage":
|
||||
case "MsuPackage":
|
||||
string packageId;
|
||||
if (!contextValues.TryGetValue("PackageId", out packageId) || String.IsNullOrEmpty(packageId))
|
||||
{
|
||||
this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, parentElement.LocalName, "Id", attribute.LocalName));
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (attribute.LocalName)
|
||||
{
|
||||
case "PrereqSupportPackage":
|
||||
if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
|
||||
{
|
||||
Row row = this.Core.CreateRow(sourceLineNumbers, "MbaPrerequisiteSupportPackage");
|
||||
row[0] = packageId;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this.Core.UnexpectedAttribute(sourceLineNumbers, attribute);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "Variable":
|
||||
// at the time the extension attribute is parsed, the compiler might not yet have
|
||||
// parsed the Name attribute, so we need to get it directly from the parent element.
|
||||
@@ -208,6 +234,10 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
{
|
||||
SourceLineNumberCollection sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
string launchTarget = null;
|
||||
string launchTargetElevatedId = null;
|
||||
string launchArguments = null;
|
||||
YesNoType launchHidden = YesNoType.NotSet;
|
||||
string launchWorkingDir = null;
|
||||
string licenseFile = null;
|
||||
string licenseUrl = null;
|
||||
string logoFile = null;
|
||||
@@ -218,6 +248,8 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
YesNoType suppressDowngradeFailure = YesNoType.NotSet;
|
||||
YesNoType suppressRepair = YesNoType.NotSet;
|
||||
YesNoType showVersion = YesNoType.NotSet;
|
||||
YesNoType supportCacheOnly = YesNoType.NotSet;
|
||||
YesNoType showFilesInUse = YesNoType.NotSet;
|
||||
YesNoType launchPassive = YesNoType.NotSet;
|
||||
YesNoType launchQuiet = YesNoType.NotSet;
|
||||
|
||||
@@ -230,6 +262,18 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
case "LaunchTarget":
|
||||
launchTarget = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false);
|
||||
break;
|
||||
case "LaunchTargetElevatedId":
|
||||
launchTargetElevatedId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
|
||||
break;
|
||||
case "LaunchArguments":
|
||||
launchArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false);
|
||||
break;
|
||||
case "LaunchHidden":
|
||||
launchHidden = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
|
||||
break;
|
||||
case "LaunchWorkingFolder":
|
||||
launchWorkingDir = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false);
|
||||
break;
|
||||
case "LicenseFile":
|
||||
licenseFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib, false);
|
||||
break;
|
||||
@@ -266,6 +310,12 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
case "ShowVersion":
|
||||
showVersion = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
|
||||
break;
|
||||
case "SupportCacheOnly":
|
||||
supportCacheOnly = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
|
||||
break;
|
||||
case "ShowFilesInUse":
|
||||
showFilesInUse = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
|
||||
break;
|
||||
default:
|
||||
this.Core.UnexpectedAttribute(sourceLineNumbers, attrib);
|
||||
break;
|
||||
@@ -304,6 +354,26 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
this.Core.CreateVariableRow(sourceLineNumbers, "LaunchTarget", launchTarget, "string", false, false);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(launchTargetElevatedId))
|
||||
{
|
||||
this.Core.CreateVariableRow(sourceLineNumbers, "LaunchTargetElevatedId", launchTargetElevatedId, "string", false, false);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(launchArguments))
|
||||
{
|
||||
this.Core.CreateVariableRow(sourceLineNumbers, "LaunchArguments", launchArguments, "string", false, false);
|
||||
}
|
||||
|
||||
if (YesNoType.Yes == launchHidden)
|
||||
{
|
||||
this.Core.CreateVariableRow(sourceLineNumbers, "LaunchHidden", "yes", "string", false, false);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(launchWorkingDir))
|
||||
{
|
||||
this.Core.CreateVariableRow(sourceLineNumbers, "LaunchWorkingFolder", launchWorkingDir, "string", false, false);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(licenseFile))
|
||||
{
|
||||
this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaLicenseRtf", licenseFile, false);
|
||||
@@ -334,7 +404,7 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
this.Core.CreateWixVariableRow(sourceLineNumbers, "WixExtbaThemeWxl", localizationFile, false);
|
||||
}
|
||||
|
||||
if (YesNoType.Yes == suppressOptionsUI || YesNoType.Yes == suppressDowngradeFailure || YesNoType.Yes == suppressRepair)
|
||||
if (YesNoType.Yes == suppressOptionsUI || YesNoType.Yes == suppressDowngradeFailure || YesNoType.Yes == suppressRepair || YesNoType.Yes == showVersion || YesNoType.Yes == supportCacheOnly || YesNoType.Yes == showFilesInUse)
|
||||
{
|
||||
Row row = this.Core.CreateRow(sourceLineNumbers, "WixExtbaOptions");
|
||||
if (YesNoType.Yes == suppressOptionsUI)
|
||||
@@ -357,15 +427,25 @@ namespace Microsoft.Tools.WindowsInstallerXml.Extensions
|
||||
row[3] = 1;
|
||||
}
|
||||
|
||||
if (YesNoType.Yes == launchPassive)
|
||||
if (YesNoType.Yes == showFilesInUse)
|
||||
{
|
||||
row[4] = 1;
|
||||
}
|
||||
|
||||
if (YesNoType.Yes == launchQuiet)
|
||||
if (YesNoType.Yes == supportCacheOnly)
|
||||
{
|
||||
row[5] = 1;
|
||||
}
|
||||
|
||||
if (YesNoType.Yes == launchPassive)
|
||||
{
|
||||
row[6] = 1;
|
||||
}
|
||||
|
||||
if (YesNoType.Yes == launchQuiet)
|
||||
{
|
||||
row[7] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,46 @@
|
||||
<xs:complexType>
|
||||
<xs:attribute name="LaunchTarget" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If set, the success page will show a Launch button the user can use to launch the application being installed. The string value can be formatted using Burn variables enclosed in brackets, to refer to installation directories and so forth.</xs:documentation>
|
||||
<xs:documentation>
|
||||
If set, the success page will show a Launch button the user can use to launch the application being installed.
|
||||
The string value can be formatted using Burn variables enclosed in brackets,
|
||||
to refer to installation directories and so forth.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LaunchTargetElevatedId" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
Id of the target ApprovedExeForElevation element.
|
||||
If set with LaunchTarget, WixStdBA will launch the application through the Engine's LaunchApprovedExe method instead of through ShellExecute.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LaunchArguments" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
If set, WixStdBA will supply these arguments when launching the application specified by the LaunchTarget attribute.
|
||||
The string value can be formatted using Burn variables enclosed in brackets,
|
||||
to refer to installation directories and so forth.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LaunchHidden" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
If set to "yes", WixStdBA will launch the application specified by the LaunchTarget attribute with the SW_HIDE flag.
|
||||
This attribute is ignored when the LaunchTargetElevatedId attribute is specified.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LaunchWorkingFolder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
WixStdBA will use this working folder when launching the specified application.
|
||||
The string value can be formatted using Burn variables enclosed in brackets,
|
||||
to refer to installation directories and so forth.
|
||||
This attribute is ignored when the LaunchTargetElevatedId attribute is specified.
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LicenseFile" type="xs:string">
|
||||
@@ -126,10 +165,34 @@
|
||||
<xs:documentation>If set to "yes", the application version will be displayed on the UI.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="SupportCacheOnly" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If set to "yes", the bundle can be pre-cached using the /cache command line argument.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ShowFilesInUse" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>If set to "yes", WixStdBA will show a page allowing the user to restart applications when files are in use.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:attribute name="Overridable">
|
||||
<xs:attribute name="PrereqSupportPackage" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
When set to "yes", the Prereq BA will plan the package to be installed if its InstallCondition is "true" or empty.
|
||||
</xs:documentation>
|
||||
<xs:appinfo>
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="ExePackage" />
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MsiPackage" />
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MspPackage" />
|
||||
<xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="MsuPackage" />
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
||||
<xs:attribute name="Overridable" type="YesNoType">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
When set to "yes", lets the user override the variable's default value by specifying another value on the command line,
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
maxValue="1" description="If 1, don't show Repair button during maintenance."/>
|
||||
<columnDefinition name="ShowVersion" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, show the version number on the UI."/>
|
||||
<columnDefinition name="ShowFilesInUse" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, show a special page when files are in use."/>
|
||||
<columnDefinition name="SupportCacheOnly" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, the bundle can be pre-cached using the /cache command line argument."/>
|
||||
<columnDefinition name="LaunchPassive" type="number" length="2" nullable="yes"
|
||||
maxValue="1" description="If 1, execute LaunchTarget automatically during passive install."/>
|
||||
<columnDefinition name="LaunchQuiet" type="number" length="2" nullable="yes"
|
||||
|
||||
Reference in New Issue
Block a user