Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions BaseInstallerBuild/Bundle.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<WixVariable Id="WixStdbaThemeXml" Value="BundleTheme.xml" />
<WixVariable Id="WixStdbaThemeWxl" Value="BundleTheme.wxl" />
<Chain>
<PackageGroupRef Id="NetFx48Web" />
<PackageGroupRef Id="vcredists" />
<PackageGroupRef Id="FwNetFx48Web" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Fw" doesn't sound very generic. I don't think this should be renamed.

<PackageGroupRef Id="prerequisites" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can vcredists and prerequisites live side-by-side in this PR and vcredist be removed in the next PR?

<RollbackBoundary />
<PackageGroupRef Id='AppPackageGroup'/>
</Chain>
Expand Down Expand Up @@ -53,8 +53,8 @@
<WixVariable Id="NetFx48WebInstallCondition" Value="" Overridable="yes" />
<WixVariable Id="NetFx48WebPackageDirectory" Value="redist\" Overridable="yes" />

<PackageGroup Id="NetFx48Web">
<ExePackage Id="NetFx48Web"
<PackageGroup Id="FwNetFx48Web">
<ExePackage Id="FwNetFx48Web"
InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
Expand All @@ -78,7 +78,7 @@
</PackageGroup>
</Fragment>

<?if $(sys.BUILDARCH)="x86"?>
<?if $(var.BuildArch)="x86"?>
<!-- 32bit VC++ redistributable download section -->
<!-- When updating or adding a redistributable you can generate the RemotePayload with the WIX's heat tool -->
<!-- e.g. "%WIX%\bin\heat" payload C:\fwroot\fw\PatchableInstaller\libs\vcredist_2008_x64.exe -o c:\Repositories\fw\PatchableInstaller\VC2008Frag.wxs -->
Expand Down Expand Up @@ -200,7 +200,7 @@
</ExePackage>
</PackageGroup>
</Fragment>
<?elseif $(sys.BUILDARCH)="x64"?>
<?elseif $(var.BuildArch)="x64"?>
<!-- 64bit VC++ redistributable download section -->
<!-- When updating or adding a redistributable you can generate the RemotePayload with the WIX's heat tool -->
<!-- e.g. "%WIX%\bin\heat" payload C:\fwroot\fw\PatchableInstaller\libs\vcredist_2008_x64.exe -o c:\Repositories\fw\PatchableInstaller\VC2008Frag.wxs -->
Expand Down Expand Up @@ -334,7 +334,7 @@
DownloadUrl="$(var.VC15to19RedistWebLink)"
InstallCommand="/quiet /norestart"
DetectCondition="!(wix.CPP14DetectCondition)">
<RemotePayload
<RemotePayload
Size="25169400"
Version="14.29.30040.0"
ProductName="Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.28.29914"
Expand All @@ -345,7 +345,7 @@
</PackageGroup>
</Fragment>
<?else?>
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
<?error Unsupported value of BuildArch=$(var.BuildArch)?>
<?endif?>
<?include ../Common/Redistributables.wxi?>
</Wix>
10 changes: 7 additions & 3 deletions BaseInstallerBuild/Framework.wxs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<?if $(sys.BUILDARCH) = x64?>
<?if $(var.BuildArch) = x64?>
<?define PFDir = ProgramFiles64Folder?>
<?define CFDir = CommonFiles64Folder?>
<?else?>
Expand Down Expand Up @@ -68,6 +68,8 @@

<CustomAction Id="CloseApplications"
Return="check"
Execute="immediate"
Impersonate="yes"
BinaryKey="MyCustomActionsDll"
DllEntry="ClosePrompt" />
<!-- The following two properties can be comma separted lists, but they must have the same number of items. -->
Expand Down Expand Up @@ -101,6 +103,8 @@
<SetProperty Id='APPFOLDERREGSZNAME' Value='Program_Files_Directory_$(var.SafeApplicationName)' Before="AppSearch">not APPFOLDERREGSZNAME</SetProperty>
<SetProperty Id='DATAFOLDERREGSZNAME' Value='Settings_Directory' Before="AppSearch">not DATAFOLDERREGSZNAME</SetProperty>
<SetProperty Id='HARVESTDATAFOLDERREGSZNAME' Value='Data_Directory' Before="AppSearch">not HARVESTDATAFOLDERREGSZNAME</SetProperty>
<SetProperty Id='REGISTRYDATAKEY' Value='[REGISTRYKEY]' Before="AppSearch">not REGISTRYDATAKEY</SetProperty>
<SetProperty Id='REGISTRYDATAVALUENAME' Value='[DATAFOLDERREGSZNAME]' Before="AppSearch">not REGISTRYDATAVALUENAME</SetProperty>
<CustomAction Id='UseDefDataFolder' Property='DATAFOLDER' Value='[DEFDATAFOLDER]' />
<CustomAction Id='UseOvrDataFolder' Property='DATAFOLDER' Value='[OVRDATAFOLDER]' /> <!-- from Overrides.wxi -->
<CustomAction Id='UseRegDataFolder' Property='DATAFOLDER' Value='[REGDATAFOLDER]' />
Expand All @@ -115,7 +119,6 @@
<CustomAction Id='CheckPatchValue' Property='ISPATCH' Value='True' />

<InstallExecuteSequence>
<Custom Action="CloseApplications" Before="AppSearch"></Custom>
<!--<Custom Action="SetFontValues" After="AppSearch"></Custom>-->
<Custom Action="DeleteRegistryVersionNumber" Before="RemoveRegistryValues">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
<RemoveExistingProducts Before="InstallInitialize" />
Expand All @@ -127,8 +130,9 @@
</InstallExecuteSequence>

<InstallUISequence>
<Custom Action="CloseApplications" Before="AppSearch">UILevel &gt;= 3</Custom>
<Custom Action="SetDefDataFolder" After="FindRelatedProducts"></Custom>
<Custom Action="VerifyDataPath" After="SetDefDataFolder"></Custom>
<Custom Action="VerifyDataPath" After="AppSearch"></Custom>
<Custom Action="UseDefAppFolder" After="AppSearch">(NOT REGAPPFOLDER) and (NOT OVRAPPFOLDER)</Custom>
<Custom Action="UseOvrAppFolder" After="AppSearch">(NOT REGAPPFOLDER) and (OVRAPPFOLDER)</Custom>
<Custom Action="UseRegAppFolder" After="AppSearch">REGAPPFOLDER</Custom>
Expand Down
14 changes: 7 additions & 7 deletions BaseInstallerBuild/OfflineBundle.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<WixVariable Id="WixStdbaThemeXml" Value="BundleTheme.xml" />
<WixVariable Id="WixStdbaThemeWxl" Value="BundleTheme.wxl" />
<Chain>
<PackageGroupRef Id="NetFx48Redist" />
<PackageGroupRef Id="vcredists" />
<PackageGroupRef Id="FwNetFx48Redist" />
<PackageGroupRef Id="prerequisites" />
<RollbackBoundary />
<PackageGroupRef Id='AppPackageGroup'/>
</Chain>
Expand All @@ -50,8 +50,8 @@
Value="(Netfx4FullRelease &gt;= $(var.NetFx48MinRelease)) AND (NOT VersionNT64 OR (Netfx4x64FullRelease &gt;= $(var.NetFx48MinRelease)))" />
<WixVariable Id="NetFx48RedistInstallCondition" Value="" Overridable="yes" />

<PackageGroup Id="NetFx48Redist">
<ExePackage Id="NetFx48Redist"
<PackageGroup Id="FwNetFx48Redist">
<ExePackage Id="FwNetFx48Redist"
InstallCommand="/q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
RepairCommand="/q /norestart /repair /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
UninstallCommand="/uninstall /q /norestart /ChainingPackage &quot;[WixBundleName]&quot; /log &quot;[NetFx48FullLog].html&quot;"
Expand All @@ -72,7 +72,7 @@
</ExePackage>
</PackageGroup>
</Fragment>
<?if $(sys.BUILDARCH)="x86"?>
<?if $(var.BuildArch)="x86"?>
<Fragment>
<Property Id="CRVSINSTALLED">
</Property>
Expand Down Expand Up @@ -160,7 +160,7 @@
</ExePackage>
</PackageGroup>
</Fragment>
<?elseif $(sys.BUILDARCH)="x64"?>
<?elseif $(var.BuildArch)="x64"?>
<!-- Some 64-bit runtimes register themselves in the 32-bit space.
Check for Runtimes\X64 or similar under each space; if either exists, the 64-bit redistributable is installed. -->
<Fragment>
Expand Down Expand Up @@ -278,7 +278,7 @@
</PackageGroup>
</Fragment>
<?else?>
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
<?error Unsupported value of BuildArch=$(var.BuildArch)?>
<?endif?>
<?include ../Common/Redistributables.wxi?>
</Wix>
4 changes: 2 additions & 2 deletions BaseInstallerBuild/buildExe.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ call setVars.bat %*

REM build the ONLINE EXE bundle.
(
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
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing %arch% twice isn't a problem per se, but it seems redundant. I think -arch %Arch% should be removed in a follow-up PR (here and elsewhere).

) && (
light.exe -v Bundle.wixobj -ext WixFirewallExtension -ext WixUIExtension -ext WixBalExtension -ext WixUtilExtension -ext WixNetFxExtension -ext WixDependencyExtension %SuppressICE% -out %SafeAppName%_%Version%_Online.exe
) && (
@REM build the OFFLINE EXE bundle.
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
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
) && (
light.exe -v OfflineBundle.wixobj -ext WixFirewallExtension -ext WixUIExtension -ext WixBalExtension -ext WixUtilExtension -ext WixNetFxExtension -ext WixDependencyExtension %SuppressICE% -out %SafeAppName%_%Version%_Offline.exe
) && (
Expand Down
4 changes: 2 additions & 2 deletions BaseInstallerBuild/buildMsi.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ call setVars.bat %*
heat.exe dir %MASTERDATADIR% -cg HarvestedDataFiles -gg -scom -sreg -sfrag -srd -sw5150 -sw5151 -dr HARVESTDATAFOLDER -var var.MASTERDATADIR -t KeyPathFix.xsl -out DataHarvest.wxs
) && (
@REM Compile (candle) and Link (light) the MSI file.
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
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
) && (
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
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 -sw1055 -sw1056 -out %SafeAppName%_%Version%.msi
) && (
call signingProxy %CD%\%SafeAppName%_%Version%.msi
)
17 changes: 15 additions & 2 deletions BaseInstallerBuild/setVars.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,29 @@ SHIFT
SET SafeManufacturer=%1
SHIFT
SET Arch=%1
if "%Arch%" == "" set Arch=x86
if "%Arch%" == "" set Arch=x64
if /I not "%Arch%"=="x64" (
echo ERROR: Unsupported architecture "%Arch%". FieldWorks installer builds are x64-only.
exit /b 1
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change the default Arch to x64 (preferably in a follow-up PR with other breaking changes), but we shouldn't demand x64, since FLEx Bridge, which also uses the genericinstaller, is x86.


REM ICE validation must be run with admin privileges. The jenkins user is not an admin. Suppress ICE validation so it doesn't fail.
REM For some reason, ICE08 works without admin, and the quickest way to suppress everything else on the command line is to specify one ICE to run.
C:\Windows\System32\whoami /groups | find "BUILTIN\Administrators" > nul 2> nul
if errorlevel 1 set SuppressICE=-ice:ICE08

REM Default WIX if not already set
if "%WIX%"=="" if exist "%LOCALAPPDATA%\FieldWorksTools\Wix314\heat.exe" set WIX=%LOCALAPPDATA%\FieldWorksTools\Wix314
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's let the client do this


REM Ensure WiX tools are on the PATH
where heat >nul 2>nul
if not %errorlevel% == 0 set PATH=%WIX%/bin;%PATH%
if %errorlevel% == 0 goto :WixPathReady
if exist "%WIX%\bin\heat.exe" (
set PATH=%WIX%\bin;%PATH%
) else (
if exist "%WIX%\heat.exe" set PATH=%WIX%;%PATH%
)
:WixPathReady
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, let's not change this at all (unless you can think of a specific case when %WIX%\heat.exe exists); the client is always welcome to put WiX on the PATH before calling this script.

The error with heat not being on the PATH yesterday was outside of the genericinstaller.


REM single quotes, since we expect %msbuild% is already double giquoted
if '%msbuild%' == '' set msbuild=msbuild
Expand Down
3 changes: 1 addition & 2 deletions Common/CustomActionSteps.wxi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<!-- Must be paired with an <CustomAction Id='LaunchFile'..> in Overrides.wxi -->
<!-- <Custom Action='LaunchFile' After='InstallFinalize'>NOT Installed</Custom> -->
<Custom Action='LaunchUnicodeCharEditor' After='InstallFinalize'>NOT Installed</Custom>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops (this change was made by the FLEx build process)

</Include>
Loading