diff options
| author | Bob Arnson <bob@joyofsetup.com> | 2020-06-23 23:26:22 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-06-24 12:23:25 -0400 |
| commit | 25602a3e613f09794599d24e0c796d3295a22197 (patch) | |
| tree | 2e80e02687f4c9729f99acd5d677ef55090d2e08 /src/WixToolset.Core | |
| parent | 255da01fd31796cbdf6ea33ffb313d77cfd62a7a (diff) | |
| download | wix-25602a3e613f09794599d24e0c796d3295a22197.tar.gz wix-25602a3e613f09794599d24e0c796d3295a22197.tar.bz2 wix-25602a3e613f09794599d24e0c796d3295a22197.zip | |
Reference Media if DiskId is specified.
Diffstat (limited to 'src/WixToolset.Core')
| -rw-r--r-- | src/WixToolset.Core/Bind/FileFacade.cs | 2 | ||||
| -rw-r--r-- | src/WixToolset.Core/Compiler.cs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/WixToolset.Core/Bind/FileFacade.cs b/src/WixToolset.Core/Bind/FileFacade.cs index f0ce14ca..511f4aab 100644 --- a/src/WixToolset.Core/Bind/FileFacade.cs +++ b/src/WixToolset.Core/Bind/FileFacade.cs | |||
| @@ -56,7 +56,7 @@ namespace WixToolset.Core.Bind | |||
| 56 | 56 | ||
| 57 | public int DiskId | 57 | public int DiskId |
| 58 | { | 58 | { |
| 59 | get => this.FileRow == null ? this.FileTuple.DiskId ?? 0 : this.FileRow.DiskId; | 59 | get => this.FileRow == null ? this.FileTuple.DiskId ?? 1 : this.FileRow.DiskId; |
| 60 | set | 60 | set |
| 61 | { | 61 | { |
| 62 | if (this.FileRow == null) | 62 | if (this.FileRow == null) |
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index e2a5721e..56f6322a 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
| @@ -5728,11 +5728,6 @@ namespace WixToolset.Core | |||
| 5728 | id = this.Core.CreateIdentifier("fil", directoryId, name ?? shortName); | 5728 | id = this.Core.CreateIdentifier("fil", directoryId, name ?? shortName); |
| 5729 | } | 5729 | } |
| 5730 | 5730 | ||
| 5731 | if (!this.compilingModule && CompilerConstants.IntegerNotSet == diskId) | ||
| 5732 | { | ||
| 5733 | diskId = 1; // default to first Media | ||
| 5734 | } | ||
| 5735 | |||
| 5736 | if (null != defaultVersion && null != companionFile) | 5731 | if (null != defaultVersion && null != companionFile) |
| 5737 | { | 5732 | { |
| 5738 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile)); | 5733 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "DefaultVersion", "CompanionFile", companionFile)); |
| @@ -5914,6 +5909,11 @@ namespace WixToolset.Core | |||
| 5914 | } | 5909 | } |
| 5915 | } | 5910 | } |
| 5916 | 5911 | ||
| 5912 | if (CompilerConstants.IntegerNotSet != diskId) | ||
| 5913 | { | ||
| 5914 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Media, diskId.ToString(CultureInfo.InvariantCulture.NumberFormat)); | ||
| 5915 | } | ||
| 5916 | |||
| 5917 | // If this component does not have a companion file this file is a possible keypath. | 5917 | // If this component does not have a companion file this file is a possible keypath. |
| 5918 | possibleKeyPath = null; | 5918 | possibleKeyPath = null; |
| 5919 | if (null == companionFile) | 5919 | if (null == companionFile) |
