Skip to content

Commit ec75d33

Browse files
authored
Clean up CopyDLLs build target (#797)
* Assume Chorus and Palaso files exist * Rename NuGottenFiles to GeckoFiles, since other NuGet packages have been moved to the new system * Omit NDesk.DBus.dll.config from Palaso files, since it is copied automatically to Output by NuGet
1 parent 13752f3 commit ec75d33

1 file changed

Lines changed: 8 additions & 64 deletions

File tree

Build/PackageRestore.targets

Lines changed: 8 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,9 @@
4545
<PalasoFiles Include="Keyman7Interop.dll" Condition="'$(OS)'=='Windows_NT'" />
4646
<PalasoFiles Include="KeymanLink.dll" Condition="'$(OS)'=='Windows_NT'" />
4747
<!-- Platform-specific irrKlang native DLL (from SIL.Media package contentFiles) -->
48-
<PalasoFiles
49-
Include="lib/win-x86/irrKlang.NET4.dll"
50-
Condition="'$(OS)'=='Windows_NT' AND '$(Platform)'!='x64'"
51-
/>
52-
<PalasoFiles
53-
Include="lib/win-x64/irrKlang.NET4.dll"
54-
Condition="'$(OS)'=='Windows_NT' AND '$(Platform)'=='x64'"
55-
/>
48+
<PalasoFiles Include="lib/win-x64/irrKlang.NET4.dll" Condition="'$(OS)'=='Windows_NT'" />
5649
<!-- Platform-specific Interop.WIA.dll (from SIL.Windows.Forms package) -->
5750
<PalasoFiles Include="Interop.WIA.dll" />
58-
<!-- NDesk.DBus.dll.config file (config files not auto-copied by NuGet) -->
59-
<PalasoFiles Include="NDesk.DBus.dll.config" />
6051
<!-- Chorus.exe application (entry point, not just a library) -->
6152
<ChorusFiles Include="Chorus.exe" />
6253
<!-- ICU native binaries and static libraries -->
@@ -447,53 +438,16 @@
447438
OverwriteReadOnlyFiles="true"
448439
/>
449440
<!-- Copy native/special-case artifacts that PackageReference doesn't handle automatically -->
450-
<ItemGroup>
451-
<!-- REVIEW (Hasso) 2026.03: when do we expect any of these files not to exist? If they don't, do we really want to continue building merrily? -->
452-
<ExistingPalasoFiles
453-
Include="@(PalasoFiles)"
454-
Condition="Exists('$(PalasoArtifactsDir)/%(Identity)')"
455-
/>
456-
<ExistingChorusFiles
457-
Include="@(ChorusFiles)"
458-
Condition="Exists('$(ChorusArtifactsDir)/%(Identity)')"
459-
/>
460-
</ItemGroup>
461-
<!--
462-
Expected Warning: "Missing Palaso native files"
463-
These are Windows-only native interop DLLs for optional features:
464-
- Keyman*Interop.dll, KeymanLink.dll: Keyman keyboard integration
465-
- irrKlang.NET4.dll: Audio playback via irrKlang engine
466-
- Interop.WIA.dll: Windows Image Acquisition for scanning
467-
- NDesk.DBus.dll.config: Linux D-Bus configuration (not needed on Windows)
468-
469-
This warning is EXPECTED in CI environments where:
470-
1. These optional native dependencies aren't installed
471-
2. The NuGet packages don't include all platform-specific files
472-
3. Full functionality requires a complete Windows development environment
473-
474-
The warning does NOT fail the build. Features using these DLLs will gracefully
475-
degrade or show appropriate error messages at runtime if the files are missing.
476-
-->
477-
<Message
478-
Text="Missing Palaso native files (skipping): @(PalasoFiles)"
479-
Importance="low"
480-
Condition="'@(ExistingPalasoFiles)'!='' AND '@(PalasoFiles)'!='@(ExistingPalasoFiles)'"
481-
/>
482-
<Message
483-
Text="Missing Chorus application files (skipping): @(ChorusFiles)"
484-
Importance="low"
485-
Condition="'@(ExistingChorusFiles)'!='' AND '@(ChorusFiles)'!='@(ExistingChorusFiles)'"
486-
/>
487441
<!-- Copy native Keyman/irrKlang/Interop.WIA files from Palaso packages -->
488442
<Copy
489-
SourceFiles="@(ExistingPalasoFiles -&gt; '$(PalasoArtifactsDir)/%(Identity)')"
443+
SourceFiles="@(PalasoFiles -&gt; '$(PalasoArtifactsDir)/%(Identity)')"
490444
DestinationFolder="$(dir-outputBase)"
491445
SkipUnchangedFiles="true"
492446
OverwriteReadOnlyFiles="true"
493447
/>
494448
<!-- Copy Chorus.exe application -->
495449
<Copy
496-
SourceFiles="@(ExistingChorusFiles -&gt; '$(ChorusArtifactsDir)/%(Identity)')"
450+
SourceFiles="@(ChorusFiles -&gt; '$(ChorusArtifactsDir)/%(Identity)')"
497451
DestinationFolder="$(dir-outputBase)"
498452
SkipUnchangedFiles="true"
499453
OverwriteReadOnlyFiles="true"
@@ -539,27 +493,17 @@
539493
OverwriteReadOnlyFiles="true"
540494
Condition="'$(OS)'=='Windows_NT'"
541495
/>
542-
<!-- Native Geckofx package (complex multi-file layout requires manual copying) -->
496+
<!-- Native Geckofx browser engine package (managed wrapper + native XULRunner files) -->
543497
<PropertyGroup>
544498
<Architecture>64</Architecture>
545-
<GeckoDir Condition="'$(OS)'=='Windows_NT'"
546-
>$(PackagesDir)/Geckofx60.$(Architecture).60.0.56</GeckoDir
547-
>
499+
<GeckoDir Condition="'$(OS)'=='Windows_NT'">$(PackagesDir)/Geckofx60.$(Architecture).60.0.56</GeckoDir>
548500
</PropertyGroup>
549501
<ItemGroup>
550-
<!-- Geckofx native browser engine (managed wrapper + native XULRunner files) -->
551-
<NuGottenFiles
552-
Include="$(GeckoDir)/lib/net45/*.*"
553-
Condition="'$(OS)'=='Windows_NT'"
554-
/>
555-
<NuGottenFiles Include="$(GeckoDir)/content/**/*.*" />
556-
<!-- NOTE: All other managed DLLs are now handled automatically by PackageReference.
557-
MSBuild's automatic assembly resolution copies them to the output directory.
558-
SIL.BuildTasks is now a PackageReference in FwBuildTasks.csproj. -->
502+
<GeckoFiles Include="$(GeckoDir)/lib/net45/*.*" Condition="'$(OS)'=='Windows_NT'" />
503+
<GeckoFiles Include="$(GeckoDir)/content/**/*.*" />
559504
</ItemGroup>
560-
<!-- REVIEW (Hasso) 2026.03: do we still need to copy NuGottenFiles explicitly here? -->
561505
<Copy
562-
SourceFiles="@(NuGottenFiles)"
506+
SourceFiles="@(GeckoFiles)"
563507
DestinationFolder="$(dir-outputBase)/%(RecursiveDir)"
564508
SkipUnchangedFiles="true"
565509
OverwriteReadOnlyFiles="true"

0 commit comments

Comments
 (0)