diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Mba.Core/BundleInfo.cs | 8 | ||||
| -rw-r--r-- | src/WixToolset.Mba.Core/IBundleInfo.cs | 2 | ||||
| -rw-r--r-- | src/WixToolset.Mba.Core/IPackageInfo.cs | 6 | ||||
| -rw-r--r-- | src/WixToolset.Mba.Core/PackageInfo.cs | 64 | ||||
| -rw-r--r-- | src/balutil/balinfo.cpp | 99 | ||||
| -rw-r--r-- | src/balutil/balutil.vcxproj | 4 | ||||
| -rw-r--r-- | src/balutil/inc/balinfo.h | 9 | ||||
| -rw-r--r-- | src/balutil/inc/balutil.h | 3 | ||||
| -rw-r--r-- | src/balutil/packages.config | 2 | ||||
| -rw-r--r-- | src/bextutil/bextutil.vcxproj | 4 | ||||
| -rw-r--r-- | src/bextutil/packages.config | 2 | ||||
| -rw-r--r-- | src/mbanative/mbanative.vcxproj | 4 | ||||
| -rw-r--r-- | src/mbanative/packages.config | 2 |
13 files changed, 177 insertions, 32 deletions
diff --git a/src/WixToolset.Mba.Core/BundleInfo.cs b/src/WixToolset.Mba.Core/BundleInfo.cs index e6d2f6e6..e1a56878 100644 --- a/src/WixToolset.Mba.Core/BundleInfo.cs +++ b/src/WixToolset.Mba.Core/BundleInfo.cs | |||
| @@ -20,10 +20,11 @@ namespace WixToolset.Mba.Core | |||
| 20 | this.Packages = new Dictionary<string, IPackageInfo>(); | 20 | this.Packages = new Dictionary<string, IPackageInfo>(); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | public void AddRelatedBundleAsPackage(DetectRelatedBundleEventArgs e) | 23 | public IPackageInfo AddRelatedBundleAsPackage(DetectRelatedBundleEventArgs e) |
| 24 | { | 24 | { |
| 25 | var package = PackageInfo.GetRelatedBundleAsPackage(e.ProductCode, e.RelationType, e.PerMachine, e.Version); | 25 | var package = PackageInfo.GetRelatedBundleAsPackage(e.ProductCode, e.RelationType, e.PerMachine, e.Version); |
| 26 | this.Packages.Add(package.Id, package); | 26 | this.Packages.Add(package.Id, package); |
| 27 | return package; | ||
| 27 | } | 28 | } |
| 28 | 29 | ||
| 29 | public static IBundleInfo ParseBundleFromStream(Stream stream) | 30 | public static IBundleInfo ParseBundleFromStream(Stream stream) |
| @@ -56,10 +57,7 @@ namespace WixToolset.Mba.Core | |||
| 56 | 57 | ||
| 57 | bundle.LogVariable = BootstrapperApplicationData.GetAttribute(bundleNode, "LogPathVariable"); | 58 | bundle.LogVariable = BootstrapperApplicationData.GetAttribute(bundleNode, "LogPathVariable"); |
| 58 | 59 | ||
| 59 | foreach (var package in PackageInfo.ParsePackagesFromXml(root)) | 60 | bundle.Packages = PackageInfo.ParsePackagesFromXml(root); |
| 60 | { | ||
| 61 | bundle.Packages.Add(package.Id, package); | ||
| 62 | } | ||
| 63 | 61 | ||
| 64 | return bundle; | 62 | return bundle; |
| 65 | } | 63 | } |
diff --git a/src/WixToolset.Mba.Core/IBundleInfo.cs b/src/WixToolset.Mba.Core/IBundleInfo.cs index 3d5b067e..d471c677 100644 --- a/src/WixToolset.Mba.Core/IBundleInfo.cs +++ b/src/WixToolset.Mba.Core/IBundleInfo.cs | |||
| @@ -11,6 +11,6 @@ namespace WixToolset.Mba.Core | |||
| 11 | IDictionary<string, IPackageInfo> Packages { get; } | 11 | IDictionary<string, IPackageInfo> Packages { get; } |
| 12 | bool PerMachine { get; } | 12 | bool PerMachine { get; } |
| 13 | 13 | ||
| 14 | void AddRelatedBundleAsPackage(DetectRelatedBundleEventArgs e); | 14 | IPackageInfo AddRelatedBundleAsPackage(DetectRelatedBundleEventArgs e); |
| 15 | } | 15 | } |
| 16 | } \ No newline at end of file | 16 | } \ No newline at end of file |
diff --git a/src/WixToolset.Mba.Core/IPackageInfo.cs b/src/WixToolset.Mba.Core/IPackageInfo.cs index 5afe4b38..a82e81ea 100644 --- a/src/WixToolset.Mba.Core/IPackageInfo.cs +++ b/src/WixToolset.Mba.Core/IPackageInfo.cs | |||
| @@ -5,12 +5,16 @@ namespace WixToolset.Mba.Core | |||
| 5 | public interface IPackageInfo | 5 | public interface IPackageInfo |
| 6 | { | 6 | { |
| 7 | CacheType CacheType { get; } | 7 | CacheType CacheType { get; } |
| 8 | object CustomData { get; set; } | ||
| 8 | string Description { get; } | 9 | string Description { get; } |
| 9 | bool DisplayInternalUI { get; } | 10 | string DisplayInternalUICondition { get; } |
| 10 | string DisplayName { get; } | 11 | string DisplayName { get; } |
| 11 | string Id { get; } | 12 | string Id { get; } |
| 12 | string InstallCondition { get; } | 13 | string InstallCondition { get; } |
| 13 | bool Permanent { get; } | 14 | bool Permanent { get; } |
| 15 | bool PrereqPackage { get; } | ||
| 16 | string PrereqLicenseFile { get; } | ||
| 17 | string PrereqLicenseUrl { get; } | ||
| 14 | string ProductCode { get; } | 18 | string ProductCode { get; } |
| 15 | PackageType Type { get; } | 19 | PackageType Type { get; } |
| 16 | string UpgradeCode { get; } | 20 | string UpgradeCode { get; } |
diff --git a/src/WixToolset.Mba.Core/PackageInfo.cs b/src/WixToolset.Mba.Core/PackageInfo.cs index 46894d2e..d3199c08 100644 --- a/src/WixToolset.Mba.Core/PackageInfo.cs +++ b/src/WixToolset.Mba.Core/PackageInfo.cs | |||
| @@ -34,17 +34,22 @@ namespace WixToolset.Mba.Core | |||
| 34 | public PackageType Type { get; internal set; } | 34 | public PackageType Type { get; internal set; } |
| 35 | public bool Permanent { get; internal set; } | 35 | public bool Permanent { get; internal set; } |
| 36 | public bool Vital { get; internal set; } | 36 | public bool Vital { get; internal set; } |
| 37 | public bool DisplayInternalUI { get; internal set; } | 37 | public string DisplayInternalUICondition { get; internal set; } |
| 38 | public string ProductCode { get; internal set; } | 38 | public string ProductCode { get; internal set; } |
| 39 | public string UpgradeCode { get; internal set; } | 39 | public string UpgradeCode { get; internal set; } |
| 40 | public string Version { get; internal set; } | 40 | public string Version { get; internal set; } |
| 41 | public string InstallCondition { get; internal set; } | 41 | public string InstallCondition { get; internal set; } |
| 42 | public CacheType CacheType { get; internal set; } | 42 | public CacheType CacheType { get; internal set; } |
| 43 | public bool PrereqPackage { get; internal set; } | ||
| 44 | public string PrereqLicenseFile { get; internal set; } | ||
| 45 | public string PrereqLicenseUrl { get; internal set; } | ||
| 46 | public object CustomData { get; set; } | ||
| 43 | 47 | ||
| 44 | internal PackageInfo() { } | 48 | internal PackageInfo() { } |
| 45 | 49 | ||
| 46 | public static IEnumerable<IPackageInfo> ParsePackagesFromXml(XPathNavigator root) | 50 | public static IDictionary<string, IPackageInfo> ParsePackagesFromXml(XPathNavigator root) |
| 47 | { | 51 | { |
| 52 | var packagesById = new Dictionary<string, IPackageInfo>(); | ||
| 48 | XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); | 53 | XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); |
| 49 | namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); | 54 | namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); |
| 50 | XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixPackageProperties", namespaceManager); | 55 | XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixPackageProperties", namespaceManager); |
| @@ -85,9 +90,6 @@ namespace WixToolset.Mba.Core | |||
| 85 | } | 90 | } |
| 86 | package.Vital = vital.Value; | 91 | package.Vital = vital.Value; |
| 87 | 92 | ||
| 88 | bool? displayInternalUI = BootstrapperApplicationData.GetYesNoAttribute(node, "DisplayInternalUI"); | ||
| 89 | package.DisplayInternalUI = displayInternalUI.HasValue && displayInternalUI.Value; | ||
| 90 | |||
| 91 | package.ProductCode = BootstrapperApplicationData.GetAttribute(node, "ProductCode"); | 93 | package.ProductCode = BootstrapperApplicationData.GetAttribute(node, "ProductCode"); |
| 92 | 94 | ||
| 93 | package.UpgradeCode = BootstrapperApplicationData.GetAttribute(node, "UpgradeCode"); | 95 | package.UpgradeCode = BootstrapperApplicationData.GetAttribute(node, "UpgradeCode"); |
| @@ -96,8 +98,11 @@ namespace WixToolset.Mba.Core | |||
| 96 | 98 | ||
| 97 | package.InstallCondition = BootstrapperApplicationData.GetAttribute(node, "InstallCondition"); | 99 | package.InstallCondition = BootstrapperApplicationData.GetAttribute(node, "InstallCondition"); |
| 98 | 100 | ||
| 99 | yield return package; | 101 | packagesById.Add(package.Id, package); |
| 100 | } | 102 | } |
| 103 | |||
| 104 | ParseBalPackageInfoFromXml(root, namespaceManager, packagesById); | ||
| 105 | return packagesById; | ||
| 101 | } | 106 | } |
| 102 | 107 | ||
| 103 | public static CacheType? GetCacheTypeAttribute(XPathNavigator node, string attributeName) | 108 | public static CacheType? GetCacheTypeAttribute(XPathNavigator node, string attributeName) |
| @@ -154,7 +159,7 @@ namespace WixToolset.Mba.Core | |||
| 154 | } | 159 | } |
| 155 | } | 160 | } |
| 156 | 161 | ||
| 157 | public static PackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, Version version) | 162 | public static IPackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, Version version) |
| 158 | { | 163 | { |
| 159 | PackageInfo package = new PackageInfo(); | 164 | PackageInfo package = new PackageInfo(); |
| 160 | package.Id = id; | 165 | package.Id = id; |
| @@ -177,5 +182,50 @@ namespace WixToolset.Mba.Core | |||
| 177 | 182 | ||
| 178 | return package; | 183 | return package; |
| 179 | } | 184 | } |
| 185 | |||
| 186 | internal static void ParseBalPackageInfoFromXml(XPathNavigator root, XmlNamespaceManager namespaceManager, Dictionary<string, IPackageInfo> packagesById) | ||
| 187 | { | ||
| 188 | XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixBalPackageInfo", namespaceManager); | ||
| 189 | |||
| 190 | foreach (XPathNavigator node in nodes) | ||
| 191 | { | ||
| 192 | string id = BootstrapperApplicationData.GetAttribute(node, "PackageId"); | ||
| 193 | if (id == null) | ||
| 194 | { | ||
| 195 | throw new Exception("Failed to get package identifier for WixBalPackageInfo."); | ||
| 196 | } | ||
| 197 | |||
| 198 | if (!packagesById.TryGetValue(id, out var ipackage)) | ||
| 199 | { | ||
| 200 | throw new Exception(string.Format("Failed to find package specified in WixBalPackageInfo: {0}", id)); | ||
| 201 | } | ||
| 202 | |||
| 203 | var package = (PackageInfo)ipackage; | ||
| 204 | |||
| 205 | package.DisplayInternalUICondition = BootstrapperApplicationData.GetAttribute(node, "DisplayInternalUICondition"); | ||
| 206 | } | ||
| 207 | |||
| 208 | nodes = root.Select("/p:BootstrapperApplicationData/p:WixMbaPrereqInformation", namespaceManager); | ||
| 209 | |||
| 210 | foreach (XPathNavigator node in nodes) | ||
| 211 | { | ||
| 212 | string id = BootstrapperApplicationData.GetAttribute(node, "PackageId"); | ||
| 213 | if (id == null) | ||
| 214 | { | ||
| 215 | throw new Exception("Failed to get package identifier for WixMbaPrereqInformation."); | ||
| 216 | } | ||
| 217 | |||
| 218 | if (!packagesById.TryGetValue(id, out var ipackage)) | ||
| 219 | { | ||
| 220 | throw new Exception(string.Format("Failed to find package specified in WixMbaPrereqInformation: {0}", id)); | ||
| 221 | } | ||
| 222 | |||
| 223 | var package = (PackageInfo)ipackage; | ||
| 224 | |||
| 225 | package.PrereqPackage = true; | ||
| 226 | package.PrereqLicenseFile = BootstrapperApplicationData.GetAttribute(node, "LicenseFile"); | ||
| 227 | package.PrereqLicenseUrl = BootstrapperApplicationData.GetAttribute(node, "LicenseUrl"); | ||
| 228 | } | ||
| 229 | } | ||
| 180 | } | 230 | } |
| 181 | } | 231 | } |
diff --git a/src/balutil/balinfo.cpp b/src/balutil/balinfo.cpp index b36e3741..492c8e08 100644 --- a/src/balutil/balinfo.cpp +++ b/src/balutil/balinfo.cpp | |||
| @@ -7,6 +7,10 @@ static HRESULT ParsePackagesFromXml( | |||
| 7 | __in BAL_INFO_PACKAGES* pPackages, | 7 | __in BAL_INFO_PACKAGES* pPackages, |
| 8 | __in IXMLDOMDocument* pixdManifest | 8 | __in IXMLDOMDocument* pixdManifest |
| 9 | ); | 9 | ); |
| 10 | static HRESULT ParseBalPackageInfoFromXml( | ||
| 11 | __in BAL_INFO_PACKAGES* pPackages, | ||
| 12 | __in IXMLDOMDocument* pixdManifest | ||
| 13 | ); | ||
| 10 | 14 | ||
| 11 | 15 | ||
| 12 | DAPI_(HRESULT) BalInfoParseFromXml( | 16 | DAPI_(HRESULT) BalInfoParseFromXml( |
| @@ -44,6 +48,9 @@ DAPI_(HRESULT) BalInfoParseFromXml( | |||
| 44 | hr = ParsePackagesFromXml(&pBundle->packages, pixdManifest); | 48 | hr = ParsePackagesFromXml(&pBundle->packages, pixdManifest); |
| 45 | BalExitOnFailure(hr, "Failed to parse package information from bootstrapper application data."); | 49 | BalExitOnFailure(hr, "Failed to parse package information from bootstrapper application data."); |
| 46 | 50 | ||
| 51 | hr = ParseBalPackageInfoFromXml(&pBundle->packages, pixdManifest); | ||
| 52 | BalExitOnFailure(hr, "Failed to parse bal package information from bootstrapper application data."); | ||
| 53 | |||
| 47 | LExit: | 54 | LExit: |
| 48 | ReleaseObject(pNode); | 55 | ReleaseObject(pNode); |
| 49 | 56 | ||
| @@ -55,7 +62,8 @@ DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage( | |||
| 55 | __in BAL_INFO_PACKAGES* pPackages, | 62 | __in BAL_INFO_PACKAGES* pPackages, |
| 56 | __in LPCWSTR wzId, | 63 | __in LPCWSTR wzId, |
| 57 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 64 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
| 58 | __in BOOL /*fPerMachine*/ | 65 | __in BOOL /*fPerMachine*/, |
| 66 | __out_opt BAL_INFO_PACKAGE** ppPackage | ||
| 59 | ) | 67 | ) |
| 60 | { | 68 | { |
| 61 | HRESULT hr = S_OK; | 69 | HRESULT hr = S_OK; |
| @@ -104,6 +112,11 @@ DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage( | |||
| 104 | 112 | ||
| 105 | // TODO: try to look up the DisplayName and Description in Add/Remove Programs with the wzId. | 113 | // TODO: try to look up the DisplayName and Description in Add/Remove Programs with the wzId. |
| 106 | 114 | ||
| 115 | if (ppPackage) | ||
| 116 | { | ||
| 117 | *ppPackage = pPackage; | ||
| 118 | } | ||
| 119 | |||
| 107 | LExit: | 120 | LExit: |
| 108 | return hr; | 121 | return hr; |
| 109 | } | 122 | } |
| @@ -139,10 +152,13 @@ DAPI_(void) BalInfoUninitialize( | |||
| 139 | ReleaseStr(pBundle->packages.rgPackages[i].sczDisplayName); | 152 | ReleaseStr(pBundle->packages.rgPackages[i].sczDisplayName); |
| 140 | ReleaseStr(pBundle->packages.rgPackages[i].sczDescription); | 153 | ReleaseStr(pBundle->packages.rgPackages[i].sczDescription); |
| 141 | ReleaseStr(pBundle->packages.rgPackages[i].sczId); | 154 | ReleaseStr(pBundle->packages.rgPackages[i].sczId); |
| 155 | ReleaseStr(pBundle->packages.rgPackages[i].sczDisplayInternalUICondition); | ||
| 142 | ReleaseStr(pBundle->packages.rgPackages[i].sczProductCode); | 156 | ReleaseStr(pBundle->packages.rgPackages[i].sczProductCode); |
| 143 | ReleaseStr(pBundle->packages.rgPackages[i].sczUpgradeCode); | 157 | ReleaseStr(pBundle->packages.rgPackages[i].sczUpgradeCode); |
| 144 | ReleaseStr(pBundle->packages.rgPackages[i].sczVersion); | 158 | ReleaseStr(pBundle->packages.rgPackages[i].sczVersion); |
| 145 | ReleaseStr(pBundle->packages.rgPackages[i].sczInstallCondition); | 159 | ReleaseStr(pBundle->packages.rgPackages[i].sczInstallCondition); |
| 160 | ReleaseStr(pBundle->packages.rgPackages[i].sczPrereqLicenseFile); | ||
| 161 | ReleaseStr(pBundle->packages.rgPackages[i].sczPrereqLicenseUrl); | ||
| 146 | } | 162 | } |
| 147 | 163 | ||
| 148 | ReleaseMem(pBundle->packages.rgPackages); | 164 | ReleaseMem(pBundle->packages.rgPackages); |
| @@ -218,12 +234,6 @@ static HRESULT ParsePackagesFromXml( | |||
| 218 | hr = XmlGetYesNoAttribute(pNode, L"Vital", &prgPackages[iPackage].fVital); | 234 | hr = XmlGetYesNoAttribute(pNode, L"Vital", &prgPackages[iPackage].fVital); |
| 219 | ExitOnFailure(hr, "Failed to get vital setting for package."); | 235 | ExitOnFailure(hr, "Failed to get vital setting for package."); |
| 220 | 236 | ||
| 221 | hr = XmlGetYesNoAttribute(pNode, L"DisplayInternalUI", &prgPackages[iPackage].fDisplayInternalUI); | ||
| 222 | if (E_NOTFOUND != hr) | ||
| 223 | { | ||
| 224 | ExitOnFailure(hr, "Failed to get DisplayInternalUI setting for package."); | ||
| 225 | } | ||
| 226 | |||
| 227 | hr = XmlGetAttributeEx(pNode, L"ProductCode", &prgPackages[iPackage].sczProductCode); | 237 | hr = XmlGetAttributeEx(pNode, L"ProductCode", &prgPackages[iPackage].sczProductCode); |
| 228 | if (E_NOTFOUND != hr) | 238 | if (E_NOTFOUND != hr) |
| 229 | { | 239 | { |
| @@ -286,3 +296,78 @@ LExit: | |||
| 286 | 296 | ||
| 287 | return hr; | 297 | return hr; |
| 288 | } | 298 | } |
| 299 | |||
| 300 | |||
| 301 | static HRESULT ParseBalPackageInfoFromXml( | ||
| 302 | __in BAL_INFO_PACKAGES* pPackages, | ||
| 303 | __in IXMLDOMDocument* pixdManifest | ||
| 304 | ) | ||
| 305 | { | ||
| 306 | HRESULT hr = S_OK; | ||
| 307 | IXMLDOMNodeList* pNodeList = NULL; | ||
| 308 | IXMLDOMNode* pNode = NULL; | ||
| 309 | LPWSTR scz = NULL; | ||
| 310 | BAL_INFO_PACKAGE* pPackage = NULL; | ||
| 311 | |||
| 312 | hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixBalPackageInfo", &pNodeList); | ||
| 313 | ExitOnFailure(hr, "Failed to select all packages."); | ||
| 314 | |||
| 315 | while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, NULL))) | ||
| 316 | { | ||
| 317 | hr = XmlGetAttributeEx(pNode, L"PackageId", &scz); | ||
| 318 | ExitOnFailure(hr, "Failed to get package identifier for WixBalPackageInfo."); | ||
| 319 | |||
| 320 | hr = BalInfoFindPackageById(pPackages, scz, &pPackage); | ||
| 321 | ExitOnFailure(hr, "Failed to find package specified in WixBalPackageInfo: %ls", scz); | ||
| 322 | |||
| 323 | hr = XmlGetAttributeEx(pNode, L"DisplayInternalUICondition", &pPackage->sczDisplayInternalUICondition); | ||
| 324 | if (E_NOTFOUND != hr) | ||
| 325 | { | ||
| 326 | ExitOnFailure(hr, "Failed to get DisplayInternalUICondition setting for package."); | ||
| 327 | } | ||
| 328 | |||
| 329 | ReleaseNullObject(pNode); | ||
| 330 | } | ||
| 331 | ExitOnFailure(hr, "Failed to parse all WixBalPackageInfo elements."); | ||
| 332 | |||
| 333 | hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixMbaPrereqInformation", &pNodeList); | ||
| 334 | ExitOnFailure(hr, "Failed to select all packages."); | ||
| 335 | |||
| 336 | while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, NULL))) | ||
| 337 | { | ||
| 338 | hr = XmlGetAttributeEx(pNode, L"PackageId", &scz); | ||
| 339 | ExitOnFailure(hr, "Failed to get package identifier for WixMbaPrereqInformation."); | ||
| 340 | |||
| 341 | hr = BalInfoFindPackageById(pPackages, scz, &pPackage); | ||
| 342 | ExitOnFailure(hr, "Failed to find package specified in WixMbaPrereqInformation: %ls", scz); | ||
| 343 | |||
| 344 | pPackage->fPrereqPackage = TRUE; | ||
| 345 | |||
| 346 | hr = XmlGetAttributeEx(pNode, L"LicenseFile", &pPackage->sczPrereqLicenseFile); | ||
| 347 | if (E_NOTFOUND != hr) | ||
| 348 | { | ||
| 349 | ExitOnFailure(hr, "Failed to get LicenseFile setting for prereq package."); | ||
| 350 | } | ||
| 351 | |||
| 352 | hr = XmlGetAttributeEx(pNode, L"LicenseUrl", &pPackage->sczPrereqLicenseUrl); | ||
| 353 | if (E_NOTFOUND != hr) | ||
| 354 | { | ||
| 355 | ExitOnFailure(hr, "Failed to get LicenseUrl setting for prereq package."); | ||
| 356 | } | ||
| 357 | |||
| 358 | ReleaseNullObject(pNode); | ||
| 359 | } | ||
| 360 | ExitOnFailure(hr, "Failed to parse all WixMbaPrereqInformation elements."); | ||
| 361 | |||
| 362 | if (S_FALSE == hr) | ||
| 363 | { | ||
| 364 | hr = S_OK; | ||
| 365 | } | ||
| 366 | |||
| 367 | LExit: | ||
| 368 | ReleaseStr(scz); | ||
| 369 | ReleaseObject(pNode); | ||
| 370 | ReleaseObject(pNodeList); | ||
| 371 | |||
| 372 | return hr; | ||
| 373 | } | ||
diff --git a/src/balutil/balutil.vcxproj b/src/balutil/balutil.vcxproj index f37fde17..31f0a9f7 100644 --- a/src/balutil/balutil.vcxproj +++ b/src/balutil/balutil.vcxproj | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" /> |
| 7 | 7 | ||
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|Win32"> | 9 | <ProjectConfiguration Include="Debug|Win32"> |
| @@ -91,7 +91,7 @@ | |||
| 91 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 91 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
| 92 | </PropertyGroup> | 92 | </PropertyGroup> |
| 93 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" /> | 93 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 94 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props'))" /> | 94 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props'))" /> |
| 95 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 95 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
| 96 | </Target> | 96 | </Target> |
| 97 | </Project> | 97 | </Project> |
diff --git a/src/balutil/inc/balinfo.h b/src/balutil/inc/balinfo.h index be4b75d0..0d838ae3 100644 --- a/src/balutil/inc/balinfo.h +++ b/src/balutil/inc/balinfo.h | |||
| @@ -34,12 +34,16 @@ typedef struct _BAL_INFO_PACKAGE | |||
| 34 | BAL_INFO_PACKAGE_TYPE type; | 34 | BAL_INFO_PACKAGE_TYPE type; |
| 35 | BOOL fPermanent; | 35 | BOOL fPermanent; |
| 36 | BOOL fVital; | 36 | BOOL fVital; |
| 37 | BOOL fDisplayInternalUI; | 37 | LPWSTR sczDisplayInternalUICondition; |
| 38 | LPWSTR sczProductCode; | 38 | LPWSTR sczProductCode; |
| 39 | LPWSTR sczUpgradeCode; | 39 | LPWSTR sczUpgradeCode; |
| 40 | LPWSTR sczVersion; | 40 | LPWSTR sczVersion; |
| 41 | LPWSTR sczInstallCondition; | 41 | LPWSTR sczInstallCondition; |
| 42 | BAL_INFO_CACHE_TYPE cacheType; | 42 | BAL_INFO_CACHE_TYPE cacheType; |
| 43 | BOOL fPrereqPackage; | ||
| 44 | LPWSTR sczPrereqLicenseFile; | ||
| 45 | LPWSTR sczPrereqLicenseUrl; | ||
| 46 | LPVOID pvCustomData; | ||
| 43 | } BAL_INFO_PACKAGE; | 47 | } BAL_INFO_PACKAGE; |
| 44 | 48 | ||
| 45 | 49 | ||
| @@ -78,7 +82,8 @@ DAPI_(HRESULT) BalInfoAddRelatedBundleAsPackage( | |||
| 78 | __in BAL_INFO_PACKAGES* pPackages, | 82 | __in BAL_INFO_PACKAGES* pPackages, |
| 79 | __in LPCWSTR wzId, | 83 | __in LPCWSTR wzId, |
| 80 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 84 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
| 81 | __in BOOL fPerMachine | 85 | __in BOOL fPerMachine, |
| 86 | __out_opt BAL_INFO_PACKAGE** ppPackage | ||
| 82 | ); | 87 | ); |
| 83 | 88 | ||
| 84 | 89 | ||
diff --git a/src/balutil/inc/balutil.h b/src/balutil/inc/balutil.h index b2d50752..bbfb16a2 100644 --- a/src/balutil/inc/balutil.h +++ b/src/balutil/inc/balutil.h | |||
| @@ -11,7 +11,10 @@ extern "C" { | |||
| 11 | 11 | ||
| 12 | #define BalExitOnFailure(x, f, ...) if (FAILED(x)) { BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } | 12 | #define BalExitOnFailure(x, f, ...) if (FAILED(x)) { BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } |
| 13 | #define BalExitOnRootFailure(x, f, ...) if (FAILED(x)) { BalLogError(x, f, __VA_ARGS__); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f, __VA_ARGS__); goto LExit; } | 13 | #define BalExitOnRootFailure(x, f, ...) if (FAILED(x)) { BalLogError(x, f, __VA_ARGS__); Dutil_RootFailure(__FILE__, __LINE__, x); ExitTrace(x, f, __VA_ARGS__); goto LExit; } |
| 14 | #define BalExitOnLastError(x, f, ...) { x = ::GetLastError(); x = HRESULT_FROM_WIN32(x); if (FAILED(x)) { BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } } | ||
| 15 | #define BalExitOnNull(p, x, e, f, ...) if (NULL == p) { x = e; BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } | ||
| 14 | #define BalExitOnNullWithLastError(p, x, f, ...) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } | 16 | #define BalExitOnNullWithLastError(p, x, f, ...) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } |
| 17 | #define BalExitWithLastError(x, f, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BalLogError(x, f, __VA_ARGS__); ExitTrace(x, f, __VA_ARGS__); goto LExit; } | ||
| 15 | 18 | ||
| 16 | #ifndef FACILITY_WIX | 19 | #ifndef FACILITY_WIX |
| 17 | #define FACILITY_WIX 500 | 20 | #define FACILITY_WIX 500 |
diff --git a/src/balutil/packages.config b/src/balutil/packages.config index 7fb53719..251df9d0 100644 --- a/src/balutil/packages.config +++ b/src/balutil/packages.config | |||
| @@ -2,5 +2,5 @@ | |||
| 2 | <packages> | 2 | <packages> |
| 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> |
| 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" /> |
| 5 | <package id="WixToolset.DUtil" version="4.0.22" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.23" targetFramework="native" /> |
| 6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
diff --git a/src/bextutil/bextutil.vcxproj b/src/bextutil/bextutil.vcxproj index 50c6c7d2..d6fa3816 100644 --- a/src/bextutil/bextutil.vcxproj +++ b/src/bextutil/bextutil.vcxproj | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" /> |
| 7 | 7 | ||
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|Win32"> | 9 | <ProjectConfiguration Include="Debug|Win32"> |
| @@ -80,7 +80,7 @@ | |||
| 80 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 80 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
| 81 | </PropertyGroup> | 81 | </PropertyGroup> |
| 82 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" /> | 82 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 83 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props'))" /> | 83 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props'))" /> |
| 84 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 84 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
| 85 | </Target> | 85 | </Target> |
| 86 | </Project> | 86 | </Project> |
diff --git a/src/bextutil/packages.config b/src/bextutil/packages.config index 7fb53719..251df9d0 100644 --- a/src/bextutil/packages.config +++ b/src/bextutil/packages.config | |||
| @@ -2,5 +2,5 @@ | |||
| 2 | <packages> | 2 | <packages> |
| 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> |
| 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" /> |
| 5 | <package id="WixToolset.DUtil" version="4.0.22" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.23" targetFramework="native" /> |
| 6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
diff --git a/src/mbanative/mbanative.vcxproj b/src/mbanative/mbanative.vcxproj index 5a998182..f86c7fef 100644 --- a/src/mbanative/mbanative.vcxproj +++ b/src/mbanative/mbanative.vcxproj | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" /> |
| 7 | 7 | ||
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|Win32"> | 9 | <ProjectConfiguration Include="Debug|Win32"> |
| @@ -70,7 +70,7 @@ | |||
| 70 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 70 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
| 71 | </PropertyGroup> | 71 | </PropertyGroup> |
| 72 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" /> | 72 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 73 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.22\build\WixToolset.DUtil.props'))" /> | 73 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.23\build\WixToolset.DUtil.props'))" /> |
| 74 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 74 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
| 75 | </Target> | 75 | </Target> |
| 76 | </Project> | 76 | </Project> |
diff --git a/src/mbanative/packages.config b/src/mbanative/packages.config index 7fb53719..251df9d0 100644 --- a/src/mbanative/packages.config +++ b/src/mbanative/packages.config | |||
| @@ -2,5 +2,5 @@ | |||
| 2 | <packages> | 2 | <packages> |
| 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> |
| 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" /> |
| 5 | <package id="WixToolset.DUtil" version="4.0.22" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.23" targetFramework="native" /> |
| 6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
