Files
AutoRefillFires/AutoRefillFires.csproj

96 lines
3.6 KiB
XML

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>AutoRefillFires</AssemblyName>
<RootNamespace>AutoRefillFires</RootNamespace>
<LangVersion>latest</LangVersion>
<PluginVersion>1.2.0</PluginVersion>
<ValheimPath>D:\SteamLibrary\steamapps\common\Valheim</ValheimPath>
<R2ProfileName>Default</R2ProfileName>
<R2BasePath>$(APPDATA)\r2modmanPlus-local\Valheim\profiles\$(R2ProfileName)</R2BasePath>
<BepInExPath>$(R2BasePath)\BepInEx</BepInExPath>
<PluginPath>$(BepInExPath)\plugins\AutoRefillFires</PluginPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="BepInEx">
<HintPath>$(BepInExPath)\core\BepInEx.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="0Harmony">
<HintPath>$(BepInExPath)\core\0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="assembly_valheim">
<HintPath>$(ValheimPath)\valheim_Data\Managed\assembly_valheim.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(ValheimPath)\valheim_Data\Managed\UnityEngine.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(ValheimPath)\valheim_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>PluginVersion</_Parameter1>
<_Parameter2>$(PluginVersion)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Target Name="CopyToR2Modman" AfterTargets="Build">
<MakeDir Directories="$(PluginPath)" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(PluginPath)" />
</Target>
<Target Name="GenerateVersionInfo" BeforeTargets="BeforeCompile">
<WriteLinesToFile File="$(IntermediateOutputPath)VersionInfo.cs" Overwrite="true" Lines="namespace AutoRefillFires { internal static class VersionInfo { public const string Version = &quot;$(PluginVersion)&quot;%3B } }" />
<ItemGroup>
<Compile Include="$(IntermediateOutputPath)VersionInfo.cs" />
</ItemGroup>
</Target>
<Target Name="CreateThunderstorePackage" AfterTargets="Build">
<PropertyGroup>
<PackageRoot>$(SolutionDir)dist\AutoRefillFires</PackageRoot>
<PackagePlugins>$(PackageRoot)\plugins\AutoRefillFires</PackagePlugins>
<PackageZip>$(SolutionDir)dist\AutoRefillFires-$(PluginVersion).zip</PackageZip>
</PropertyGroup>
<RemoveDir Directories="$(PackageRoot)" />
<MakeDir Directories="$(PackageRoot)" />
<MakeDir Directories="$(PackagePlugins)" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(PackagePlugins)" />
<Copy SourceFiles="$(SolutionDir)Thunderstore\README.md" DestinationFolder="$(PackageRoot)" />
<Copy SourceFiles="$(SolutionDir)Thunderstore\CHANGELOG.md" DestinationFolder="$(PackageRoot)" />
<Copy SourceFiles="$(SolutionDir)Thunderstore\icon.png" DestinationFolder="$(PackageRoot)" />
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -Command &quot;(Get-Content '$(SolutionDir)Thunderstore\manifest.json' -Raw).Replace('__VERSION__', '$(PluginVersion)') | Set-Content '$(PackageRoot)\manifest.json' -Encoding UTF8&quot;" />
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -Command &quot;if (Test-Path '$(PackageZip)') { Remove-Item '$(PackageZip)' -Force }; Compress-Archive -Path '$(PackageRoot)\*' -DestinationPath '$(PackageZip)' -Force&quot;" />
</Target>
</Project>