Skip to content

Commit fd4b3e3

Browse files
committed
Align WiX3 patchable installer inputs with modernization
* Update WiX 3 bundles and framework sources for build-arch handling in BaseInstallerBuild. * Adjust build scripts to pass BuildArch and resolve WiX tool discovery in setVars. * Refresh common WiX includes (custom components/features/overrides/redistributables/fonts). * Refresh installer resources (icons/license) to match current assets.
1 parent 09e75db commit fd4b3e3

15 files changed

Lines changed: 1137 additions & 153 deletions

BaseInstallerBuild/Bundle.wxs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<WixVariable Id="WixStdbaThemeXml" Value="BundleTheme.xml" />
2323
<WixVariable Id="WixStdbaThemeWxl" Value="BundleTheme.wxl" />
2424
<Chain>
25-
<PackageGroupRef Id="NetFx48Web" />
25+
<PackageGroupRef Id="FwNetFx48Web" />
2626
<PackageGroupRef Id="vcredists" />
2727
<RollbackBoundary />
2828
<PackageGroupRef Id='AppPackageGroup'/>
@@ -53,8 +53,8 @@
5353
<WixVariable Id="NetFx48WebInstallCondition" Value="" Overridable="yes" />
5454
<WixVariable Id="NetFx48WebPackageDirectory" Value="redist\" Overridable="yes" />
5555

56-
<PackageGroup Id="NetFx48Web">
57-
<ExePackage Id="NetFx48Web"
56+
<PackageGroup Id="FwNetFx48Web">
57+
<ExePackage Id="FwNetFx48Web"
5858
InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
5959
RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
6060
UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
@@ -78,7 +78,7 @@
7878
</PackageGroup>
7979
</Fragment>
8080

81-
<?if $(sys.BUILDARCH)="x86"?>
81+
<?if $(var.BuildArch)="x86"?>
8282
<!-- 32bit VC++ redistributable download section -->
8383
<!-- When updating or adding a redistributable you can generate the RemotePayload with the WIX's heat tool -->
8484
<!-- e.g. "%WIX%\bin\heat" payload C:\fwroot\fw\PatchableInstaller\libs\vcredist_2008_x64.exe -o c:\Repositories\fw\PatchableInstaller\VC2008Frag.wxs -->
@@ -200,7 +200,7 @@
200200
</ExePackage>
201201
</PackageGroup>
202202
</Fragment>
203-
<?elseif $(sys.BUILDARCH)="x64"?>
203+
<?elseif $(var.BuildArch)="x64"?>
204204
<!-- 64bit VC++ redistributable download section -->
205205
<!-- When updating or adding a redistributable you can generate the RemotePayload with the WIX's heat tool -->
206206
<!-- e.g. "%WIX%\bin\heat" payload C:\fwroot\fw\PatchableInstaller\libs\vcredist_2008_x64.exe -o c:\Repositories\fw\PatchableInstaller\VC2008Frag.wxs -->
@@ -334,7 +334,7 @@
334334
DownloadUrl="$(var.VC15to19RedistWebLink)"
335335
InstallCommand="/quiet /norestart"
336336
DetectCondition="!(wix.CPP14DetectCondition)">
337-
<RemotePayload
337+
<RemotePayload
338338
Size="25169400"
339339
Version="14.29.30040.0"
340340
ProductName="Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.28.29914"
@@ -345,7 +345,7 @@
345345
</PackageGroup>
346346
</Fragment>
347347
<?else?>
348-
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
348+
<?error Unsupported value of BuildArch=$(var.BuildArch)?>
349349
<?endif?>
350350
<?include ../Common/Redistributables.wxi?>
351351
</Wix>

BaseInstallerBuild/Framework.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<?if $(sys.BUILDARCH) = x64?>
2+
<?if $(var.BuildArch) = x64?>
33
<?define PFDir = ProgramFiles64Folder?>
44
<?define CFDir = CommonFiles64Folder?>
55
<?else?>

BaseInstallerBuild/OfflineBundle.wxs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<WixVariable Id="WixStdbaThemeXml" Value="BundleTheme.xml" />
2323
<WixVariable Id="WixStdbaThemeWxl" Value="BundleTheme.wxl" />
2424
<Chain>
25-
<PackageGroupRef Id="NetFx48Redist" />
25+
<PackageGroupRef Id="FwNetFx48Redist" />
2626
<PackageGroupRef Id="vcredists" />
2727
<RollbackBoundary />
2828
<PackageGroupRef Id='AppPackageGroup'/>
@@ -50,8 +50,8 @@
5050
Value="(Netfx4FullRelease &gt;= $(var.NetFx48MinRelease)) AND (NOT VersionNT64 OR (Netfx4x64FullRelease &gt;= $(var.NetFx48MinRelease)))" />
5151
<WixVariable Id="NetFx48RedistInstallCondition" Value="" Overridable="yes" />
5252

53-
<PackageGroup Id="NetFx48Redist">
54-
<ExePackage Id="NetFx48Redist"
53+
<PackageGroup Id="FwNetFx48Redist">
54+
<ExePackage Id="FwNetFx48Redist"
5555
InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
5656
RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
5757
UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
@@ -72,7 +72,7 @@
7272
</ExePackage>
7373
</PackageGroup>
7474
</Fragment>
75-
<?if $(sys.BUILDARCH)="x86"?>
75+
<?if $(var.BuildArch)="x86"?>
7676
<Fragment>
7777
<Property Id="CRVSINSTALLED">
7878
</Property>
@@ -160,7 +160,7 @@
160160
</ExePackage>
161161
</PackageGroup>
162162
</Fragment>
163-
<?elseif $(sys.BUILDARCH)="x64"?>
163+
<?elseif $(var.BuildArch)="x64"?>
164164
<!-- Some 64-bit runtimes register themselves in the 32-bit space.
165165
Check for Runtimes\X64 or similar under each space; if either exists, the 64-bit redistributable is installed. -->
166166
<Fragment>
@@ -278,7 +278,7 @@
278278
</PackageGroup>
279279
</Fragment>
280280
<?else?>
281-
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
281+
<?error Unsupported value of BuildArch=$(var.BuildArch)?>
282282
<?endif?>
283283
<?include ../Common/Redistributables.wxi?>
284284
</Wix>

BaseInstallerBuild/buildExe.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ call setVars.bat %*
33

44
REM build the ONLINE EXE bundle.
55
(
6-
candle.exe -v -arch %Arch% -dApplicationName=%AppName% -dSafeApplicationName=%SafeAppName% -dYear=%CopyrightYear% -dManufacturer=%Manufacturer% -dSafeManufacturer=%SafeManufacturer% -dVersionNumber=%Version% -dUpgradeCode=%UPGRADECODEGUID% -dTruncatedVersion=%TRUNCATEDVERSION% -ext WixFirewallExtension -ext WixUtilExtension -ext WixBalExtension -ext WixUIExtension -ext WixNetFxExtension -ext WixDependencyExtension Bundle.wxs
6+
candle.exe -v -arch %Arch% -dBuildArch=%Arch% -dApplicationName=%AppName% -dSafeApplicationName=%SafeAppName% -dYear=%CopyrightYear% -dManufacturer=%Manufacturer% -dSafeManufacturer=%SafeManufacturer% -dVersionNumber=%Version% -dUpgradeCode=%UPGRADECODEGUID% -dTruncatedVersion=%TRUNCATEDVERSION% -ext WixFirewallExtension -ext WixUtilExtension -ext WixBalExtension -ext WixUIExtension -ext WixNetFxExtension -ext WixDependencyExtension Bundle.wxs
77
) && (
88
light.exe -v Bundle.wixobj -ext WixFirewallExtension -ext WixUIExtension -ext WixBalExtension -ext WixUtilExtension -ext WixNetFxExtension -ext WixDependencyExtension %SuppressICE% -out %SafeAppName%_%Version%_Online.exe
99
) && (
1010
@REM build the OFFLINE EXE bundle.
11-
candle.exe -v -arch %Arch% -dApplicationName=%AppName% -dSafeApplicationName=%SafeAppName% -dYear=%CopyrightYear% -dManufacturer=%Manufacturer% -dSafeManufacturer=%SafeManufacturer% -dVersionNumber=%Version% -dUpgradeCode=%UPGRADECODEGUID% -dTruncatedVersion=%TRUNCATEDVERSION% -ext WixFirewallExtension -ext WixUtilExtension -ext WixBalExtension -ext WixUIExtension -ext WixNetFxExtension -ext WixDependencyExtension OfflineBundle.wxs
11+
candle.exe -v -arch %Arch% -dBuildArch=%Arch% -dApplicationName=%AppName% -dSafeApplicationName=%SafeAppName% -dYear=%CopyrightYear% -dManufacturer=%Manufacturer% -dSafeManufacturer=%SafeManufacturer% -dVersionNumber=%Version% -dUpgradeCode=%UPGRADECODEGUID% -dTruncatedVersion=%TRUNCATEDVERSION% -ext WixFirewallExtension -ext WixUtilExtension -ext WixBalExtension -ext WixUIExtension -ext WixNetFxExtension -ext WixDependencyExtension OfflineBundle.wxs
1212
) && (
1313
light.exe -v OfflineBundle.wixobj -ext WixFirewallExtension -ext WixUIExtension -ext WixBalExtension -ext WixUtilExtension -ext WixNetFxExtension -ext WixDependencyExtension %SuppressICE% -out %SafeAppName%_%Version%_Offline.exe
1414
) && (

BaseInstallerBuild/buildMsi.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ call setVars.bat %*
1313
heat.exe dir %MASTERDATADIR% -cg HarvestedDataFiles -gg -scom -sreg -sfrag -srd -sw5150 -sw5151 -dr HARVESTDATAFOLDER -var var.MASTERDATADIR -t KeyPathFix.xsl -out DataHarvest.wxs
1414
) && (
1515
@REM Compile (candle) and Link (light) the MSI file.
16-
candle.exe -arch %Arch% -dApplicationName=%AppName% -dSafeApplicationName=%SafeAppName% -dManufacturer=%Manufacturer% -dSafeManufacturer=%SafeManufacturer% -dVersionNumber=%Version% -dMajorVersion=%Major% -dMinorVersion=%Minor% -dMASTERBUILDDIR=%MASTERBUILDDIR% -dMASTERDATADIR=%MASTERDATADIR% -dUpgradeCode=%UPGRADECODEGUID% -dProductCode=%PRODUCTIDGUID% Framework.wxs AppHarvest.wxs DataHarvest.wxs WixUI_DialogFlow.wxs GIInstallDirDlg.wxs GIProgressDlg.wxs GIWelcomeDlg.wxs GICustomizeDlg.wxs GISetupTypeDlg.wxs -ext WixFirewallExtension -ext WixUtilExtension
16+
candle.exe -arch %Arch% -dBuildArch=%Arch% -dApplicationName=%AppName% -dSafeApplicationName=%SafeAppName% -dManufacturer=%Manufacturer% -dSafeManufacturer=%SafeManufacturer% -dVersionNumber=%Version% -dMajorVersion=%Major% -dMinorVersion=%Minor% -dMASTERBUILDDIR=%MASTERBUILDDIR% -dMASTERDATADIR=%MASTERDATADIR% -dUpgradeCode=%UPGRADECODEGUID% -dProductCode=%PRODUCTIDGUID% Framework.wxs AppHarvest.wxs DataHarvest.wxs WixUI_DialogFlow.wxs GIInstallDirDlg.wxs GIProgressDlg.wxs GIWelcomeDlg.wxs GICustomizeDlg.wxs GISetupTypeDlg.wxs -ext WixFirewallExtension -ext WixUtilExtension
1717
) && (
1818
light.exe Framework.wixobj AppHarvest.wixobj DataHarvest.wixobj WixUI_DialogFlow.wixobj GIInstallDirDlg.wixobj GIProgressDlg.wixobj GIWelcomeDlg.wixobj GICustomizeDlg.wixobj GISetupTypeDlg.wixobj -ext WixFirewallExtension -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc WixUI_en-us.wxl %SuppressICE% -sw1076 -out %SafeAppName%_%Version%.msi
1919
) && (

BaseInstallerBuild/setVars.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ REM For some reason, ICE08 works without admin, and the quickest way to suppress
3939
C:\Windows\System32\whoami /groups | find "BUILTIN\Administrators" > nul 2> nul
4040
if errorlevel 1 set SuppressICE=-ice:ICE08
4141

42+
REM Default WIX if not already set
43+
if "%WIX%"=="" if exist "%LOCALAPPDATA%\FieldWorksTools\Wix314\heat.exe" set WIX=%LOCALAPPDATA%\FieldWorksTools\Wix314
44+
4245
REM Ensure WiX tools are on the PATH
4346
where heat >nul 2>nul
44-
if not %errorlevel% == 0 set PATH=%WIX%/bin;%PATH%
47+
if not %errorlevel% == 0 if exist "%WIX%\bin\heat.exe" set PATH=%WIX%\bin;%PATH%
48+
if not %errorlevel% == 0 if not exist "%WIX%\bin\heat.exe" set PATH=%WIX%;%PATH%
4549

4650
REM single quotes, since we expect %msbuild% is already double giquoted
4751
if '%msbuild%' == '' set msbuild=msbuild

Common/CustomActionSteps.wxi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Include>
3-
<!-- Must be paired with an <CustomAction Id='LaunchFile'..> in Overrides.wxi -->
4-
<!-- <Custom Action='LaunchFile' After='InstallFinalize'>NOT Installed</Custom> -->
3+
<Custom Action='LaunchUnicodeCharEditor' After='InstallFinalize'>NOT Installed</Custom>
54
</Include>

0 commit comments

Comments
 (0)