aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2019-11-10 18:19:36 -0500
committerBob Arnson <bob@firegiant.com>2019-11-10 18:31:56 -0500
commitdf709d87c25945c10b9d29273dd90b6df6359a99 (patch)
treecd4cfca3ce6f548988a35cf38b7e428e3600505e /src/WixToolset.Core
parente29c25090e26c8cca52232d580528840d1161b73 (diff)
downloadwix-df709d87c25945c10b9d29273dd90b6df6359a99.tar.gz
wix-df709d87c25945c10b9d29273dd90b6df6359a99.tar.bz2
wix-df709d87c25945c10b9d29273dd90b6df6359a99.zip
Clean up upgrade properties; support <?ifdef $()?>
Diffstat (limited to 'src/WixToolset.Core')
-rw-r--r--src/WixToolset.Core/Compiler.cs6
-rw-r--r--src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs4
2 files changed, 2 insertions, 8 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs
index b983981b..56d3a8b4 100644
--- a/src/WixToolset.Core/Compiler.cs
+++ b/src/WixToolset.Core/Compiler.cs
@@ -7137,9 +7137,6 @@ namespace WixToolset.Core
7137 7137
7138 this.Core.AddTuple(tuple); 7138 this.Core.AddTuple(tuple);
7139 7139
7140 // Ensure the action property is secure.
7141 this.AddWixPropertyRow(sourceLineNumbers, new Identifier(AccessModifier.Public, Common.UpgradeDetectedProperty), false, true, false);
7142
7143 // Add launch condition that blocks upgrades 7140 // Add launch condition that blocks upgrades
7144 if (blockUpgrades) 7141 if (blockUpgrades)
7145 { 7142 {
@@ -7167,9 +7164,6 @@ namespace WixToolset.Core
7167 7164
7168 this.Core.AddTuple(upgradeTuple); 7165 this.Core.AddTuple(upgradeTuple);
7169 7166
7170 // Ensure the action property is secure.
7171 this.AddWixPropertyRow(sourceLineNumbers, new Identifier(AccessModifier.Public, Common.DowngradeDetectedProperty), false, true, false);
7172
7173 var conditionTuple = new LaunchConditionTuple(sourceLineNumbers) 7167 var conditionTuple = new LaunchConditionTuple(sourceLineNumbers)
7174 { 7168 {
7175 Condition = Common.DowngradePreventedCondition, 7169 Condition = Common.DowngradePreventedCondition,
diff --git a/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs b/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
index 60726a02..215c7bc4 100644
--- a/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
+++ b/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs
@@ -154,10 +154,10 @@ namespace WixToolset.Core.ExtensibilityServices
154 154
155 public string GetVariableValue(IPreprocessContext context, string variable, bool allowMissingPrefix) 155 public string GetVariableValue(IPreprocessContext context, string variable, bool allowMissingPrefix)
156 { 156 {
157 // Strip the "$(" off the front. 157 // Strip the "$(" off the front and the ")" off the back.
158 if (variable.StartsWith("$(", StringComparison.Ordinal)) 158 if (variable.StartsWith("$(", StringComparison.Ordinal))
159 { 159 {
160 variable = variable.Substring(2); 160 variable = variable.Substring(2, variable.Length - 3);
161 } 161 }
162 162
163 var parts = variable.Split(VariableSplitter, 2); 163 var parts = variable.Split(VariableSplitter, 2);