Skip to content
Merged
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ FwHelpAbout.cs -whitespace
LICENSE -whitespace
RealSplashScreen.cs -whitespace
run-app -whitespace
Bin/ilrepack-assemblies -whitespace
*.json -whitespace
*.js -whitespace
Src/LexText/ParserCore/ParserCoreTests/**/*.txt -whitespace
Expand Down
31 changes: 0 additions & 31 deletions Bin/ilrepack-assemblies

This file was deleted.

4 changes: 4 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<!-- System.Security.Permissions (LT-22394): ProDotNetZip needs >= 8.0.0,
System.Security.AccessControl needs >= 6.0.0. Pin to 9.0.16. -->
<PackageVersion Include="System.Security.Permissions" Version="9.0.16" />
<!-- System.Text.Encoding.CodePages: SIL.Machine requires 10.0.x,
other chains resolve to 9.0.9. Pin to 10.0.3 to match the plugin project. -->
<PackageVersion Include="System.Text.Encoding.CodePages" Version="10.0.3" />
</ItemGroup>

<!--
Expand Down Expand Up @@ -103,6 +106,7 @@
=============================================================
-->
<ItemGroup Label="SIL Tools">
<PackageVersion Include="ILRepack" Version="2.0.18" />
<PackageVersion Include="SIL.Chorus.App" Version="$(SilChorusVersion)" />
<PackageVersion Include="SIL.Chorus.LibChorus" Version="$(SilChorusVersion)" />
<PackageVersion Include="SIL.DesktopAnalytics" Version="4.0.0" />
Expand Down
2 changes: 2 additions & 0 deletions FLExInstaller/PatchableInstallerHeatExclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
-->
<HeatHarvestExcludes xmlns="http://fieldworks.sil.org/heat-harvest-excludes/1">
<Exclude Name="Newtonsoft.Json.dll" />
<!-- Pre-ILRepack copy used only by tests; the packed FwParatextLexiconPlugin.dll is the shipping assembly. -->
<Exclude Name="FwParatextLexiconPlugin.PreMerge.dll" />
</HeatHarvestExcludes>
2 changes: 2 additions & 0 deletions FLExInstaller/wix6/Shared/Base/heat-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
-->
<HeatHarvestExcludes xmlns="http://fieldworks.sil.org/heat-harvest-excludes/1">
<Exclude Name="Newtonsoft.Json.dll" />
<!-- Pre-ILRepack copy used only by tests; the packed FwParatextLexiconPlugin.dll is the shipping assembly. -->
<Exclude Name="FwParatextLexiconPlugin.PreMerge.dll" />
</HeatHarvestExcludes>
2 changes: 2 additions & 0 deletions Src/FwParatextLexiconPlugin/FwParatextLexiconPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<PackageReference Include="SIL.LCModel.Utils" />
<PackageReference Include="SIL.Machine" />
<PackageReference Include="SIL.WritingSystems" />
<PackageReference Include="ILRepack" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="System.ValueTuple" />
</ItemGroup>
<ItemGroup>
Expand All @@ -53,4 +54,5 @@
<EmbeddedResource Include="question.ico" />
<EmbeddedResource Include="Resources\question.ico" />
</ItemGroup>
<Import Project="ILRepack.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<clear/>
<add name="FwTraceListener" type="SIL.LCModel.Utils.EnvVarTraceListener, SIL.LCModel.Utils, Version=11.0.0.0, Culture=neutral"
initializeData="assertuienabled='false' assertexceptionenabled='true' logfilename='%temp%/asserts.log'"/>
</listeners>
</trace>
</system.diagnostics>
<runtime>
<generatePublisherEvidence enabled="false" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- Binding redirects are auto-generated at build time
(AutoGenerateBindingRedirects=true in Directory.Build.props).
Do NOT add manual redirects here; they will drift from CPM versions. -->
<!-- Chorus 6.0.0 references L10NSharp 9.0.0; redirect to 10.0.0.
Remove when Chorus is updated to reference L10NSharp 10. -->
<dependentAssembly>
<assemblyIdentity name="L10NSharp" publicKeyToken="fd0b3e309a5b7c28" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<!-- Load the pre-ILRepack copy of the plugin so that tests run against
the un-merged assembly. The packed (ILRepack'd) assembly internalizes
SIL.LCModel / SIL.Core / etc., which causes type-identity mismatches
at runtime when the test project also references those NuGet packages. -->
<dependentAssembly>
<assemblyIdentity name="FwParatextLexiconPlugin" culture="neutral" />
<codeBase version="9.3.9.0" href="FwParatextLexiconPlugin.PreMerge.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,20 @@
</ItemGroup>
<ItemGroup>
<Reference Include="netstandard" />
<!-- Reference the pre-ILRepack copy of the plugin assembly. The codeBase redirect
in App.config ensures the runtime also loads this copy instead of the packed one. -->
<Reference Include="FwParatextLexiconPlugin">
<HintPath>$(OutputPath)FwParatextLexiconPlugin.PreMerge.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../../Common/FwUtils/FwUtilsTests/FwUtilsTests.csproj" />
<ProjectReference Include="../FwParatextLexiconPlugin.csproj" />
<!-- Build the plugin first but don't reference its output (which is the ILRepack'd DLL).
Instead, reference the pre-merge copy below so tests compile against the un-merged assembly. -->
<ProjectReference Include="../FwParatextLexiconPlugin.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<None Include="../../AppForTests.config" Link="App.config">
<None Include="App.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
Expand Down
31 changes: 17 additions & 14 deletions Src/FwParatextLexiconPlugin/ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ This software is licensed under the LGPL, version 2.1 or later
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="Current">
<PropertyGroup>
<FwrtPath>../..</FwrtPath>
<ILRepackBin Condition="('$(OS)' == 'Windows_NT')">&quot;$(FwrtPath)\packages\ILRepack.2.0.16\tools\ILRepack.exe&quot;</ILRepackBin>
<ILRepackBin Condition="('$(OS)' != 'Windows_NT')">mono &quot;$(FwrtPath)\packages\ILRepack.2.0.16\tools\ILRepack.exe&quot;</ILRepackBin>
<ILRepackBin>&quot;$(PkgILRepack)\tools\ILRepack.exe&quot;</ILRepackBin>
<PrimaryAssembly>$(OutputPath)/FwParatextLexiconPlugin.dll</PrimaryAssembly>
<!-- Pre-merge copy: used as ILRepack input AND referenced by the test project
so tests compile and run against the un-merged assembly (avoiding type
ambiguity between ILRepack-internalized types and NuGet originals). -->
<PreMergeAssembly>$(OutputPath)/FwParatextLexiconPlugin.PreMerge.dll</PreMergeAssembly>
</PropertyGroup>
<ItemGroup>
<RepackAssemblies Include="$(OutputPath)/SIL.Core.dll"/>
Expand All @@ -27,16 +29,17 @@ This software is licensed under the LGPL, version 2.1 or later
<ItemGroup>
<LibDirs Include="$(OutputPath)"/>
</ItemGroup>
<Target Name="AfterBuild" DependsOnTargets="ILRepack">
<!-- Insert tasks to run after build here -->
</Target>
<Target Name="ILRepack" DependsOnTargets="">
<!-- ILRepack some dependencies into primary assembly, first renaming
primary assembly so the original filename can be used as the
output of ILRepack. -->
<Copy SourceFiles="$(PrimaryAssembly)" DestinationFiles="$(PrimaryAssembly)~" />
<Exec Command="$(ILRepackBin) /internalize /repackDrop:NoLinuxRepack /out:$(PrimaryAssembly) @(LibDirs -> '/lib:%(Identity)', ' ') $(PrimaryAssembly)~ @(RepackAssemblies -> '%(Identity)', ' ')" />
<!-- Any dependency .config files may contain dllmaps that we will need in the repacked assembly. -->
<Copy SourceFiles="$(OutputPath)/SIL.LCModel.Core.dll.config" DestinationFiles="$(PrimaryAssembly).config"/>
<Target Name="ILRepack" AfterTargets="Build">
<!-- Save the un-merged assembly before ILRepack overwrites it.
This copy serves double duty: ILRepack input, and the assembly
that the test project compiles/runs against (via codeBase redirect). -->
<Copy SourceFiles="$(PrimaryAssembly)" DestinationFiles="$(PreMergeAssembly)" />
<!-- Remove auto-generated binding-redirect configs for merged assemblies
to prevent ILRepack config-merge failures (DataSet schema conflicts). -->
<Delete Files="@(RepackAssemblies -> '%(Identity).config')" />
<Exec Command="$(ILRepackBin) /internalize /out:$(PrimaryAssembly) @(LibDirs -> '/lib:%(Identity)', ' ') $(PreMergeAssembly) @(RepackAssemblies -> '%(Identity)', ' ')" />
<!-- SIL.LCModel.Core.dll.config contains dllmaps needed for the repacked assembly.
It was deleted above, so restore it from the NuGet package and copy as the plugin config. -->
<Copy SourceFiles="$(PkgSIL_LCModel_Core)/contentFiles/any/any/SIL.LCModel.Core.dll.config" DestinationFiles="$(PrimaryAssembly).config"/>
</Target>
</Project>
2 changes: 1 addition & 1 deletion Src/FwParatextLexiconPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a787fc88-0ff6-4982-9305-8da92ef8fc7f")]

[assembly: InternalsVisibleTo("FwParatextLexiconPluginTests")]
[assembly: InternalsVisibleTo("FwParatextLexiconPluginTests")]
Loading