chore: fix workflows and build now that model files are not in the repository

This commit is contained in:
Stevan Freeborn
2025-02-13 23:20:59 -06:00
parent a0984dd9c9
commit 44386edbe4
3 changed files with 25 additions and 5 deletions
+25
View File
@@ -12,6 +12,31 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DownloadDirectory>Resources\Files</DownloadDirectory>
</PropertyGroup>
<Target Name="DownloadModels" BeforeTargets="PrepareForBuild">
<Message Text="Downloading models..." Importance="high" />
<MakeDir Directories="$(DownloadDirectory)" Condition="!Exists('$(DownloadDirectory)')" />
<Exec
Condition="!Exists('$(DownloadDirectory)\rmbg.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/rmbg.onnx&quot; -o &quot;$(DownloadDirectory)\rmbg.onnx&quot;"
/>
<Exec
Condition="!Exists('$(DownloadDirectory)\u2net.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/u2net.onnx&quot; -o &quot;$(DownloadDirectory)\u2net.onnx&quot;"
/>
<Exec
Condition="!Exists('$(DownloadDirectory)\modnet.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/modnet.onnx&quot; -o &quot;$(DownloadDirectory)\modnet.onnx&quot;"
/>
</Target>
<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />