build(desktop): install the pinned help into dev build output

Only the packaging scripts installed Help\, so F1 and the Help menu in a
dev build always said help was not installed. The build now downloads the
help.json release once into obj\ and copies it beside OpenNest.exe; CI and
publish output are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-10-23 08:58:03 -04:00
1 parent 7ce5e73a82
commit 13352b8acd
2 files changed
+30

No files matched your search

+26
View File
@@ -62,4 +62,30 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<!-- Dev builds get the help release pinned in scripts/help.json, downloaded once into obj/
and refreshed when the pin changes. Packaging scripts install help themselves; CI and
offline builds skip it (/p:InstallHelp=false), and a failed download only warns. -->
<PropertyGroup>
<InstallHelp Condition="'$(InstallHelp)' == '' and '$(CI)' == 'true'">false</InstallHelp>
<HelpPin>$(MSBuildProjectDirectory)\..\scripts\help.json</HelpPin>
<HelpCacheDir>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)help\</HelpCacheDir>
<HelpCacheStamp>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)help.stamp</HelpCacheStamp>
</PropertyGroup>
<Target Name="DownloadPinnedHelp" Condition="'$(InstallHelp)' != 'false' and '$(OS)' == 'Windows_NT'"
Inputs="$(HelpPin)" Outputs="$(HelpCacheStamp)">
<RemoveDir Directories="$(HelpCacheDir)" />
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\..\scripts\Install-Help.ps1&quot; -Destination &quot;$(HelpCacheDir.TrimEnd('\'))&quot;"
ContinueOnError="true" />
<Touch Files="$(HelpCacheStamp)" AlwaysCreate="true" Condition="Exists('$(HelpCacheDir)index.html')" />
</Target>
<Target Name="CopyPinnedHelp" AfterTargets="Build" DependsOnTargets="DownloadPinnedHelp"
Condition="'$(InstallHelp)' != 'false' and '$(OS)' == 'Windows_NT'">
<ItemGroup>
<HelpFile Include="$(HelpCacheDir)**\*" />
</ItemGroup>
<Copy SourceFiles="@(HelpFile)" DestinationFolder="$(OutDir)Help\%(RecursiveDir)" SkipUnchangedFiles="true" />
</Target>
</Project>
+4
View File
@@ -17,6 +17,10 @@ holds only the code that shows that HTML and the pin of which help release ships
- The help folder is `Help\` beside `OpenNest.exe`. Set `OPENNEST_HELP_DIR` to a local
opennest-help `site\` build to preview unreleased pages. Without either, the menu
explains that help is not installed.
- A Windows `dotnet build` of `OpenNest.csproj` downloads the pinned release once into
`obj\help\` (again when `scripts/help.json` changes) and copies it to the build output's
`Help\`. A failed download only warns. CI (`CI=true`) skips it; pass
`-p:InstallHelp=false` to skip it offline. It never reaches `dotnet publish` output.
## Topic IDs