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>
This commit is contained in:
parent
824622c582
commit
95dcf3c1e6
2 changed files with 15 additions and 4 deletions
|
|
@ -93,11 +93,15 @@
|
|||
<CallTarget Targets="CopyToUnity" Condition="Exists('$(UNITY_FOLDER)')" />
|
||||
</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" />
|
||||
<Exec Command="powershell -Command "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"" />
|
||||
<Message Text="Copying DLL to Valheim BepInEx plugins..." Importance="high" />
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\plugins\" />
|
||||
<Exec Command="powershell -NoProfile -Command "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"" />
|
||||
<Message Text="Copying DLL to Valheim BepInEx plugins..." Importance="high" Condition="Exists('$(VALHEIM_INSTALL)\BepInEx\plugins')" />
|
||||
<Copy SourceFiles="$(TargetDir)$(TargetName).dll" DestinationFolder="$(VALHEIM_INSTALL)\BepInEx\plugins\" Condition="Exists('$(VALHEIM_INSTALL)\BepInEx\plugins')" />
|
||||
</Target>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue