From bfceba63a439478543a52d56c882ffd941b6a008 Mon Sep 17 00:00:00 2001
From: Rob Mensching <rob@firegiant.com>
Date: Wed, 7 Apr 2021 14:58:47 -0700
Subject: Update to StandardDirectory

---
 src/ThmViewerPackage/Package.wxs                       | 18 +++++++-----------
 .../HeatFileMultipleFilesSameFileName/Package.wxs      | 10 ++++------
 .../TestData/HeatFilePackage/Package.wxs               | 12 +++++-------
 .../HeatProject/HeatProjectPreSdkStyle/Package.wxs     | 10 ++++------
 .../HeatProject/HeatProjectSdkStyle/Package.wxs        | 10 ++++------
 .../TestData/MergeModule/MergeMsiPackage/Package.wxs   | 14 +++++---------
 .../MergeModule/SimpleMergeModule/MergeModule.wxs      |  6 ++----
 .../MultiCulturalMsiPackage/MsiPackage/Package.wxs     | 12 ++++--------
 .../TestData/SimpleMsiPackage/MsiPackage/Package.wxs   |  6 ++----
 9 files changed, 37 insertions(+), 61 deletions(-)

diff --git a/src/ThmViewerPackage/Package.wxs b/src/ThmViewerPackage/Package.wxs
index e2c3c9f8..cb2139cf 100644
--- a/src/ThmViewerPackage/Package.wxs
+++ b/src/ThmViewerPackage/Package.wxs
@@ -1,8 +1,6 @@
 <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="WiX Toolset Theme Viewer" Manufacturer="WiX Toolset" Language="1033" Version="!(bind.fileVersion.ThmViewerFile)" UpgradeCode="59c4b122-5167-445b-8fc4-09dcd4eced89" Compressed="yes" InstallerVersion="200">
-    
-
     <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
     <MediaTemplate EmbedCab="yes" />
 
@@ -12,7 +10,7 @@
   </Package>
 
   <Fragment>
-    <ComponentGroup Id="Components" Directory="INSTALLFOLDER:\bin\">
+    <ComponentGroup Id="Components" Directory="INSTALLFOLDER" Subdirectory="bin">
       <Component>
         <File Id="ThmViewerFile" Source="thmviewer.exe" />
         <Shortcut Name="!(bind.property.ProductName)" Directory="ShortcutFolder" Advertise="yes" />
@@ -21,14 +19,12 @@
   </Fragment>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="INSTALLFOLDER" Name="WiX Toolset v4.0" />
-      </Directory>
-      <Directory Id="ProgramMenuFolder">
-        <Directory Id="ShortcutFolder" Name="WiX Toolset" />
-      </Directory>
-    </Directory>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="INSTALLFOLDER" Name="WiX Toolset v4.0" />
+    </StandardDirectory>
+    <StandardDirectory Id="ProgramMenuFolder">
+      <Directory Id="ShortcutFolder" Name="WiX Toolset" />
+    </StandardDirectory>
   </Fragment>
 
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
index 4cdcdf15..5abcee9f 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
@@ -1,4 +1,4 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
     
 
@@ -11,10 +11,8 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
-      </Directory>
-    </Directory>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
+    </StandardDirectory>
   </Fragment>
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
index 8e04a8ce..f5fa8cf6 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
@@ -1,4 +1,4 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
     
 
@@ -10,10 +10,8 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
-      </Directory>
-    </Directory>
-  </Fragment>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
+    </StandardDirectory>  
+</Fragment>
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs
index b2988760..6c12861b 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs
@@ -1,4 +1,4 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="HeatProjectPreSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5622BB42-89F6-4810-A2A3-98AFF28282FE" Compressed="yes" InstallerVersion="200">
     
 
@@ -10,10 +10,8 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="ToolsVersion4Cs.Binaries" Name="MsiPackage" />
-      </Directory>
-    </Directory>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="ToolsVersion4Cs.Binaries" Name="MsiPackage" />
+    </StandardDirectory>
   </Fragment>
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs
index fc6e9d29..d30218f3 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs
@@ -1,4 +1,4 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="HeatProjectSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="D2AF3276-A68E-40DE-85A1-4BCD5B35D432" Compressed="yes" InstallerVersion="200">
     
 
@@ -10,10 +10,8 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="SdkStyleCs.Binaries" Name="MsiPackage" />
-      </Directory>
-    </Directory>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="SdkStyleCs.Binaries" Name="MsiPackage" />
+    </StandardDirectory>
   </Fragment>
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
index 71d8fff6..ef62c31b 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
@@ -1,7 +1,5 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
-    
-
     <MediaTemplate />
 
     <Feature Id="ProductFeature" Title="ATitle">
@@ -10,12 +8,10 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="INSTALLFOLDER" Name="MsiPackage">
-          <Merge Id="SimpleMM" Language="1033" SourceFile="$(var.SimpleMergeModule.TargetPath)" DiskId="1" />
-        </Directory>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="INSTALLFOLDER" Name="MsiPackage">
+        <Merge Id="SimpleMM" Language="1033" SourceFile="$(var.SimpleMergeModule.TargetPath)" DiskId="1" />
       </Directory>
-    </Directory>
+    </StandardDirectory>
   </Fragment>
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
index 19a7b7e4..b892debd 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
@@ -1,4 +1,4 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Module Id="SimpleMM" Language="1033" Version="1.0.0.0" Guid="86FB9E91-ACF3-4EDF-B711-72DAF2443692" InstallerVersion="200">
     <SummaryInformation Manufacturer="Example Corporation" />
 
@@ -6,9 +6,7 @@
   </Module>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="MergeRedirectFolder" />
-    </Directory>
+    <Directory Id="MergeRedirectFolder" />
   </Fragment>
 
   <Fragment>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
index 4bdebbcf..df24aa33 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
@@ -1,7 +1,5 @@
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
   <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
-    
-
     <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
     <MediaTemplate />
 
@@ -11,10 +9,8 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
-        <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
-      </Directory>
-    </Directory>
+    <StandardDirectory Id="ProgramFilesFolder">
+      <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
+    </StandardDirectory>
   </Fragment>
 </Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
index 3fd580db..0a133c7d 100644
--- a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
@@ -12,10 +12,8 @@
   </Package>
 
   <Fragment>
-    <Directory Id="TARGETDIR" Name="SourceDir">
-      <Directory Id="ProgramFilesFolder">
+    <StandardDirectory Id="ProgramFilesFolder">
         <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
-      </Directory>
-    </Directory>
+    </StandardDirectory>
   </Fragment>
 </Wix>
-- 
cgit v1.2.3-55-g6feb