fix-skadi-race #2

Merged
kanym merged 5 commits from fix-skadi-race into main-backup 2026-08-01 13:30:10 +02:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit 95dcf3c1e6 - Show all commits

Fix build portability: add BepInEx NuGet feed and de-hardcode package paths

BepInEx.Core isn't on nuget.org (only on nuget.bepinex.dev), so restore
failed on machines without it configured globally. PackageThunderstore
also pointed at a contributor's personal desktop path; it now outputs
to a repo-local dist/ folder and uses the checked-in Package/icon.png.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kanym 2026-07-31 11:24:30 +02:00

View file

@ -93,11 +93,15 @@
<CallTarget Targets="CopyToUnity" Condition="Exists('$(UNITY_FOLDER)')" /> <CallTarget Targets="CopyToUnity" Condition="Exists('$(UNITY_FOLDER)')" />
</Target> </Target>
<Target Name="PackageThunderstore" AfterTargets="Build"> <Target Name="PackageThunderstore" AfterTargets="Build" Condition="'$(Configuration)'=='Release'">
<PropertyGroup>
<PackageOutputDir>$(SolutionDir)dist\</PackageOutputDir>
</PropertyGroup>
<MakeDir Directories="$(PackageOutputDir)" Condition="!Exists('$(PackageOutputDir)')" />
<Message Text="Packaging Thunderstore and Nexus Zips..." Importance="high" /> <Message Text="Packaging Thunderstore and Nexus Zips..." Importance="high" />
<Exec Command="powershell -Command &quot;if (!(Test-Path 'C:\Users\FERDINANDO\Desktop\Pacchetto_Rame\racesofvalheim')) { New-Item -ItemType Directory -Force -Path 'C:\Users\FERDINANDO\Desktop\Pacchetto_Rame\racesofvalheim' }; Compress-Archive -Path '$(TargetDir)$(TargetName).dll', '$(ProjectDir)..\manifest.json', '$(ProjectDir)..\README.md', 'C:\Users\FERDINANDO\Desktop\Pacchetto_Rame\racesofvalheim\icon.png' -DestinationPath 'C:\Users\FERDINANDO\Desktop\Pacchetto_Rame\racesofvalheim\RacesOfValheim_Thunderstore.zip' -Force; Compress-Archive -Path '$(TargetDir)$(TargetName).dll' -DestinationPath 'C:\Users\FERDINANDO\Desktop\Pacchetto_Rame\racesofvalheim\RacesOfValheim_Nexus.zip' -Force&quot;" /> <Exec Command="powershell -NoProfile -Command &quot;Compress-Archive -Path '$(TargetDir)$(TargetName).dll', '$(ProjectDir)..\manifest.json', '$(ProjectDir)..\README.md', '$(ProjectDir)Package\icon.png' -DestinationPath '$(PackageOutputDir)RacesOfValheim_Thunderstore.zip' -Force; Compress-Archive -Path '$(TargetDir)$(TargetName).dll' -DestinationPath '$(PackageOutputDir)RacesOfValheim_Nexus.zip' -Force&quot;" />
<Message Text="Copying DLL to Valheim BepInEx plugins..." Importance="high" /> <Message Text="Copying DLL to Valheim BepInEx plugins..." Importance="high" Condition="Exists('$(VALHEIM_INSTALL)\BepInEx\plugins')" />
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\plugins\" /> <Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="$(VALHEIM_INSTALL)\BepInEx\plugins\" Condition="Exists('$(VALHEIM_INSTALL)\BepInEx\plugins')" />
</Target> </Target>

7
NuGet.Config Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="bepinex" value="https://nuget.bepinex.dev/v3/index.json" />
</packageSources>
</configuration>