aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Compiler_2.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Compiler_2.cs')
-rw-r--r--src/WixToolset.Core/Compiler_2.cs46
1 files changed, 5 insertions, 41 deletions
diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs
index 72550ed9..7e2485e1 100644
--- a/src/WixToolset.Core/Compiler_2.cs
+++ b/src/WixToolset.Core/Compiler_2.cs
@@ -2309,25 +2309,6 @@ namespace WixToolset.Core
2309 { 2309 {
2310 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 2310 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
2311 } 2311 }
2312 else if (0 < name.Length)
2313 {
2314 if (this.Core.IsValidShortFilename(name, true))
2315 {
2316 if (null == shortName)
2317 {
2318 shortName = name;
2319 name = null;
2320 }
2321 else
2322 {
2323 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
2324 }
2325 }
2326 else if (null == shortName) // generate a short file name.
2327 {
2328 shortName = this.Core.CreateShortName(name, true, true, node.Name.LocalName, componentId);
2329 }
2330 }
2331 2312
2332 if (!onInstall.HasValue && !onUninstall.HasValue) 2313 if (!onInstall.HasValue && !onUninstall.HasValue)
2333 { 2314 {
@@ -2352,8 +2333,9 @@ namespace WixToolset.Core
2352 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id) 2333 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id)
2353 { 2334 {
2354 ComponentRef = componentId, 2335 ComponentRef = componentId,
2355 FileName = this.GetMsiFilenameValue(shortName, name), 2336 FileName = name,
2356 DirProperty = directory ?? property ?? parentDirectory, 2337 ShortFileName = shortName,
2338 DirPropertyRef = directory ?? property ?? parentDirectory,
2357 OnInstall = onInstall, 2339 OnInstall = onInstall,
2358 OnUninstall = onUninstall, 2340 OnUninstall = onUninstall,
2359 }); 2341 });
@@ -2440,7 +2422,7 @@ namespace WixToolset.Core
2440 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id) 2422 this.Core.AddSymbol(new RemoveFileSymbol(sourceLineNumbers, id)
2441 { 2423 {
2442 ComponentRef = componentId, 2424 ComponentRef = componentId,
2443 DirProperty = directory ?? property ?? parentDirectory, 2425 DirPropertyRef = directory ?? property ?? parentDirectory,
2444 OnInstall = onInstall, 2426 OnInstall = onInstall,
2445 OnUninstall = onUninstall 2427 OnUninstall = onUninstall
2446 }); 2428 });
@@ -4293,24 +4275,6 @@ namespace WixToolset.Core
4293 { 4275 {
4294 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); 4276 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
4295 } 4277 }
4296 else if (0 < name.Length)
4297 {
4298 if (this.Core.IsValidShortFilename(name, false))
4299 {
4300 if (null == shortName)
4301 {
4302 shortName = name;
4303 }
4304 else
4305 {
4306 this.Core.Write(ErrorMessages.IllegalAttributeValueWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Name", name, "ShortName"));
4307 }
4308 }
4309 else if (null == shortName) // generate a short file name.
4310 {
4311 shortName = this.Core.CreateShortName(name, true, false, node.Name.LocalName, componentId, directory);
4312 }
4313 }
4314 4278
4315 if ("Component" != parentElementLocalName && null != target) 4279 if ("Component" != parentElementLocalName && null != target)
4316 { 4280 {
@@ -4319,7 +4283,7 @@ namespace WixToolset.Core
4319 4283
4320 if (null == id) 4284 if (null == id)
4321 { 4285 {
4322 id = this.Core.CreateIdentifier("sct", directory, LowercaseOrNull(name) ?? LowercaseOrNull(shortName)); 4286 id = this.Core.CreateIdentifier("sct", directory, LowercaseOrNull(name));
4323 } 4287 }
4324 4288
4325 foreach (var child in node.Elements()) 4289 foreach (var child in node.Elements())