-
Notifications
You must be signed in to change notification settings - Fork 2
/
Directory.Build.props
39 lines (37 loc) · 1.92 KB
/
Directory.Build.props
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
<Project>
<!-- Specify here the path to ATLYSS's install folder. It also needs BepInEx 5 to be installed. -->
<!-- You can use Python to run the find_game.py script and try to automagically detect it -->
<PropertyGroup>
<ATLYSS_PATH>D:\SteamLibrary\steamapps\common\ATLYSS\</ATLYSS_PATH>
<ATLYSS_MANAGED>$(ATLYSS_PATH)\ATLYSS_Data\Managed</ATLYSS_MANAGED>
<ATLYSS_BEPINEX>$(ATLYSS_PATH)\BepInEx\core</ATLYSS_BEPINEX>
</PropertyGroup>
<!-- Adapted from https://github.com/BepInEx/BepInEx.Templates/blob/master/BepInEx.PluginInfoProps/BepInEx.PluginInfoProps.props -->
<Target Name="AddModInfo" BeforeTargets="BeforeCompile;CoreCompile" Inputs="$(MSBuildAllProjects)" Outputs="$(IntermediateOutputPath)GeneratedModInfo.cs">
<PropertyGroup>
<BepInExPluginGuid Condition="'$(BepInExPluginGuid)' == ''">$(AssemblyName)</BepInExPluginGuid>
<BepInExPluginName Condition="'$(BepInExPluginName)' == ''">$(Product)</BepInExPluginName>
<BepInExPluginVersion Condition="'$(BepInExPluginVersion)' == ''">$(Version)</BepInExPluginVersion>
<GeneratedText>
<![CDATA[
// auto-generated by Directory.Build.props
namespace $(RootNamespace)
{
static class ModInfo
{
public const string PLUGIN_GUID = "$(BepInExPluginGuid)"%3B
public const string PLUGIN_NAME = "$(BepInExPluginName)"%3B
public const string PLUGIN_VERSION = "$(BepInExPluginVersion)"%3B
}
}
]]>
</GeneratedText>
<GeneratedFilePath>$(IntermediateOutputPath)GeneratedModInfo.cs</GeneratedFilePath>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
<FileWrites Include="$(GeneratedFilePath)" />
</ItemGroup>
<WriteLinesToFile Lines="$(GeneratedText)" File="$(GeneratedFilePath)" WriteOnlyWhenDifferent="true" Overwrite="true" />
</Target>
</Project>