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
8 changes: 8 additions & 0 deletions Build/Installer.legacy.targets
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,15 @@
<!-- copy in new stuff -->
<PropertyGroup>
<OutputDirForConfig>$(fwrt)\Output\$(Configuration)</OutputDirForConfig>
<_FieldWorksPatchableInstallerHeatExclude>$([MSBuild]::NormalizePath('$(fwrt)', 'FLExInstaller', 'PatchableInstallerHeatExclude.xml'))</_FieldWorksPatchableInstallerHeatExclude>
<_PatchableInstallerHeatExcludeDest>$([MSBuild]::NormalizePath('$(fwrt)', 'PatchableInstaller', 'BaseInstallerBuild', 'heat-exclude.xml'))</_PatchableInstallerHeatExcludeDest>
</PropertyGroup>
<Copy
SourceFiles="$(_FieldWorksPatchableInstallerHeatExclude)"
DestinationFiles="$(_PatchableInstallerHeatExcludeDest)"
SkipUnchangedFiles="false"
Condition="Exists('$(_FieldWorksPatchableInstallerHeatExclude)')"
/>
Comment on lines +159 to +167
<ItemGroup>
<DeveloperFiles Include="$(fwrt)\**\.gitignore" />
<DeveloperFiles Include="$(fwrt)\**\*~" />
Expand Down
2 changes: 1 addition & 1 deletion Build/Installer.targets
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<Copy SourceFiles="@(IcuDataFiles)" OverwriteReadOnlyFiles="true" DestinationFolder="$(StagedDataDir)\Icu$(IcuVersion)\%(RecursiveDir)" />
<Copy SourceFiles="@(L10nFilesWithRecursiveDirs)" OverwriteReadOnlyFiles="true" DestinationFolder="$(StagedL10nDir)\%(RecursiveDir)" />
<Copy SourceFiles="@(BinFiles)" OverwriteReadOnlyFiles="true" DestinationFolder="$(StagedBinDir)\%(RecursiveDir)" />
</Target>
</Target>

<Target Name="ValidateInstallerAddons" Condition="'$(BuildAdditionalApps)'=='true'">
<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions FLExInstaller/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Minimal installer guidance for agents.
- Validate prerequisites with `.\Build\Agent\Setup-InstallerBuild.ps1 -ValidateOnly`.
- Follow `.github/instructions/installer.instructions.md` for packaging and evidence rules.

## WiX 3 (PatchableInstaller) notes

- Heat exclusions: **`PatchableInstallerHeatExclude.xml`** is copied to **`PatchableInstaller/BaseInstallerBuild/heat-exclude.xml`** before Heat (see **`Build/Installer.legacy.targets`** `CopyFilesToInstall`).
- **`buildMsi.bat`** passes **`-fv`** to **`light.exe`** so **`MsiAssemblyName`** includes **fileVersion** (same intent as MSBuild **`SetMsiAssemblyNameFileVersion=true`**), which helps GAC servicing when **`AssemblyVersion`** is unchanged but the binary’s **file version** increases.
- Newtonsoft.Json and similar authored components live in **`CustomComponents.wxi`** (overlays **`PatchableInstaller/Common`**), with definitions guarded by **`<?ifdef MASTERBUILDDIR?>`** so patch/update authoring omits them when only **`UPDATEBUILDDIR`** is set. Add matching **`ComponentRef`** entries in **`FLExInstaller/CustomFeatures.wxi`** inside the **same** **`<?ifdef MASTERBUILDDIR?>...<?endif?>`** so patch builds do not emit dangling refs (**LGHT0094**). WiX 6 **`Framework.wxs`** uses the same pattern for **`Feature Complete`**. Do not use **`FeatureRef Id="Complete"`** from an include that appears before **`Framework.wxs`** defines `Complete` (Light **LGHT0095**).

## Constraints

- Keep existing WiX 3 and WiX 6 flows intact.
Expand Down
22 changes: 22 additions & 0 deletions FLExInstaller/CustomComponents.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,27 @@
<?include $(var.HarvestWxiDir)\yoHarvest.wxi?>
<?include $(var.HarvestWxiDir)\zhHarvest.wxi?>
<?include $(var.HarvestWxiDir)\zlmHarvest.wxi?>
<?ifdef MASTERBUILDDIR?>
<!--
WiX 3 / PatchableInstaller: Newtonsoft.Json.dll is excluded from Heat (FLExInstaller/PatchableInstallerHeatExclude.xml
copied to BaseInstallerBuild/heat-exclude.xml; CopyFilesToInstall) and KeyPathFix.xsl. NewtonsoftJsonApp: private
copy next to the app. NewtonsoftJsonGac: GAC (Assembly=.net). GAC file-version servicing: buildMsi.bat passes light -fv.
-->
<DirectoryRef Id="APPFOLDER">
<Component Id="NewtonsoftJsonApp" Guid="{B8A47C61-2E90-4D1A-9F4E-7C3B5A682D01}">
<File Id="NewtonsoftJsonFileApp"
Name="Newtonsoft.Json.dll"
Source="$(var.MASTERBUILDDIR)\Newtonsoft.Json.dll"
KeyPath="yes" />
</Component>
<Component Id="NewtonsoftJsonGac" Guid="*">
<File Id="NewtonsoftJsonFileGac"
Name="Newtonsoft.Json.dll"
Source="$(var.MASTERBUILDDIR)\Newtonsoft.Json.dll"
KeyPath="yes"
Assembly=".net" />
</Component>
</DirectoryRef>
<?endif?>
<?include Fonts.wxi?>
</Include>
5 changes: 5 additions & 0 deletions FLExInstaller/CustomFeatures.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<MergeRef Id="PerlEC"/>
<MergeRef Id="PythonEC"/>
<MergeRef Id="TECkit_DLLs"/>
<!-- Heat-excluded Newtonsoft.Json: components in CustomComponents.wxi are inside <?ifdef MASTERBUILDDIR?>; match that here so patch builds (UPDATEBUILDDIR only) do not emit dangling ComponentRefs (LGHT0094). -->
<?ifdef MASTERBUILDDIR?>
<ComponentRef Id="NewtonsoftJsonApp" />
<ComponentRef Id="NewtonsoftJsonGac" />
<?endif?>

<Feature Id='DesktopShortcut' Title='Desktop Shortcut' Description='Creates a shortcut on the desktop.' Level='1' ConfigurableDirectory='APPFOLDER' AllowAdvertise="no" InstallDefault="source" Absent='allow' TypicalDefault="install" >
<ComponentRef Id='ApplicationShortcutDesktop'/>
Expand Down
8 changes: 8 additions & 0 deletions FLExInstaller/PatchableInstallerHeatExclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
FieldWorks: Heat harvest exclusions for PatchableInstaller (WiX 3 / BaseInstallerBuild).
Copied to PatchableInstaller/BaseInstallerBuild/heat-exclude.xml before buildBaseInstaller.bat (see Build/Installer.legacy.targets).
-->
<HeatHarvestExcludes xmlns="http://fieldworks.sil.org/heat-harvest-excludes/1">
<Exclude Name="Newtonsoft.Json.dll" />
</HeatHarvestExcludes>
Loading
Loading