-
Notifications
You must be signed in to change notification settings - Fork 0
/
ftk2lorestore.csproj
64 lines (59 loc) · 3.34 KB
/
ftk2lorestore.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="GamePath.props" Condition="Exists('GamePath.props')" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyName>ftk2lorestore</AssemblyName>
<Description>FTK 2 Lore Store Cheats</Description>
<Version>1.1.0</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.bepinex.dev/v3/index.json;
https://nuget.samboy.dev/v3/index.json
</RestoreAdditionalProjectSources>
<FTKIIData>C:\Users\Christian\AppData\LocalLow\IronOak Games\For The King II</FTKIIData>
<RootNamespace>ftk2lorestore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Reference Include="$(FTKIIInstallDir)\For The King II_Data\Managed\Unity*.dll" Private="false" />
<Reference Include="$(FTKIIInstallDir)\For The King II_Data\Managed\FTK2.dll*" Publicize="true" Private="false" />
</ItemGroup>
<Target Name="Deploy" AfterTargets="Build">
<ItemGroup>
<Files Include="$(TargetDir)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(Files)" DestinationFiles="@(Files->'$(FTKIIInstallDir)\Mods\$(AssemblyName)\%(RecursiveDir)%(Filename)%(Extension)')" />
<ZipDirectory SourceDirectory="$(MSBuildProjectDirectory)\$(OutputPath)" DestinationFile="$(MSBuildProjectDirectory)\$(OutputPath)\..\$(AssemblyName)-$(Version).zip" Overwrite="true" />
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" IncludeAssets="build; contentfiles" Version="0.4.2" PrivateAssets="all" />
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
<PackageReference Include="BepInEx.Core" Version="5.*" />
</ItemGroup>
<Target Name="Publicise" AfterTargets="BeforeBuild;Clean" Inputs="@(PubliciseInputAssemblies)" Outputs="$(SolutionDir)lib\%(PubliciseInputAssemblies.FileName)_public.dll;$(SolutionDir)lib\%(PubliciseInputAssemblies.FileName)_public.hash">
<MakeDir Directories="$(SolutionDir)lib/" />
<Publicise InputAssemblies="@(PubliciseInputAssemblies)" OutputPath="$(SolutionDir)lib/" PubliciseCompilerGenerated="true" />
</Target>
<Target Name="GenerateCustomPropsFile" BeforeTargets="BeforeBuild" Condition="$(FTKIIInstallDir) == ''">
<Exec Command="findstr /C:"Mono path[0]" "$(FTKIIData)\Player.log"" IgnoreExitCode="true" ConsoleToMSBuild="true">
<Output TaskParameter="ExitCode" PropertyName="ExitCode" />
<Output TaskParameter="ConsoleOutput" PropertyName="MonoPathLine" />
</Exec>
<PropertyGroup>
<MonoPathRegex>^Mono path\[0\] = '(.*?)/For The King II_Data/Managed'$</MonoPathRegex>
</PropertyGroup>
<PropertyGroup>
<FTKIIInstallDir>$([System.Text.RegularExpressions.Regex]::Match($(MonoPathLine), $(MonoPathRegex)).Groups[1].Value)</FTKIIInstallDir>
</PropertyGroup>
<WriteLinesToFile File="$(SolutionDir)GamePath.props" Lines="<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<FTKIIInstallDir>$(FTKIIInstallDir)</FTKIIInstallDir>
</PropertyGroup>
</Project>" Overwrite="true" Encoding="utf-8" />
</Target>
<Target Name="DeleteCustomPropsFile" BeforeTargets="Clean">
<Delete Files="GamePath.props" />
</Target>
</Project>