add Directory.Build.targets.example

main
t0stiman 2025-06-19 11:03:45 +02:00
parent 9a3621a55d
commit 994c51932e
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<Project>
<PropertyGroup>
<DvInstallDir>D:\Programs\Derail Valley</DvInstallDir>
<ReferencePath>
$(DvInstallDir)\DerailValley_Data\Managed\;
$(DvInstallDir)\DerailValley_Data\Managed\UnityModManager\;
</ReferencePath>
<AssemblySearchPaths>$(AssemblySearchPaths);$(ReferencePath);</AssemblySearchPaths>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<!-- Copy to build folder -->
<Copy SourceFiles="$(TargetPath)" DestinationFolder="build/" />
<!-- Package after Release build -->
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="powershell -executionpolicy bypass .\package.ps1 -NoArchive -OutputDirectory '$(DvInstallDir)\Mods'" />
<!-- Linux -->
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="pwsh -Command &quot;(package.ps1)&quot;" />
</Target>
</Project>