-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomCardTextureLoader.csproj
More file actions
148 lines (127 loc) · 7.14 KB
/
CustomCardTextureLoader.csproj
File metadata and controls
148 lines (127 loc) · 7.14 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<Project Sdk="Godot.NET.Sdk/4.5.1" InitialTargets="CheckDependencyPaths">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable> <!--Makes code analysis regarding null values stricter.-->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefaultItemExcludes>packages/**</DefaultItemExcludes>
<AppOutputBase>$(MSBuildProjectDirectory)\</AppOutputBase>
<PathMap>$(AppOutputBase)=.\</PathMap>
</PropertyGroup>
<!-- OS Detection -->
<PropertyGroup>
<IsWindows>false</IsWindows>
<IsLinux>false</IsLinux>
<IsOSX>false</IsOSX>
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
</PropertyGroup>
<!-- // NOTE: Megadot is version 4.5.1, and the game won't load your .pck if the Godot version used is newer. -->
<!-- Windows -->
<PropertyGroup Condition="'$(IsWindows)' == 'true'">
<AutoSteamPath>$(registry:HKEY_CURRENT_USER\Software\Valve\Steam@SteamPath)\steamapps</AutoSteamPath>
<SteamLibraryPath Condition="Exists('$(AutoSteamPath)/common/Slay the Spire 2')">$(AutoSteamPath)</SteamLibraryPath>
<GodotPath>C:/megadot/MegaDot_v4.5.1-stable_mono_win64.exe</GodotPath>
<!-- If on Windows and Slay the Spire 2 is not installed in your default steam library, adjust the following.-->
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">C:/Program Files (x86)/Steam/steamapps</SteamLibraryPath>
<!-- The below should not need to be changed. -->
<Sts2Path>$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<Sts2Path Condition="Exists('C:/Games/Slay the Spire 2')">C:/Games/Slay the Spire 2</Sts2Path>
<ModsPath>$(Sts2Path)/mods/</ModsPath>
<Sts2DataDir>$(Sts2Path)/data_sts2_windows_x86_64</Sts2DataDir>
</PropertyGroup>
<!-- Linux -->
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/.local/share/Steam/steamapps</SteamLibraryPath>
<GodotPath Condition="'$(GodotPath)' == ''">$(SteamLibraryPath)/common/Godot Engine/godot.x11.opt.tools.64</GodotPath>
<!-- The below should not need to be changed. -->
<Sts2Path>$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath>$(Sts2Path)/mods/</ModsPath>
<Sts2DataDir>$(Sts2Path)/data_sts2_linuxbsd_x86_64</Sts2DataDir>
</PropertyGroup>
<!-- macOS -->
<PropertyGroup Condition="'$(IsOSX)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/Library/Application Support/Steam/steamapps</SteamLibraryPath>
<GodotPath Condition="'$(GodotPath)' == ''">$(HOME)/Applications/Godot_mono.app/Contents/MacOS/Godot</GodotPath>
<!-- The below should not need to be changed. -->
<Sts2Path>$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath>$(Sts2Path)/SlayTheSpire2.app/Contents/MacOS/mods/</ModsPath>
<Sts2DataDir>$(Sts2Path)/SlayTheSpire2.app/Contents/Resources/data_sts2_macos_x86_64</Sts2DataDir>
</PropertyGroup>
<PropertyGroup>
<!-- Diasble architecture mismatch warning; mods are ideally built for all platforms (MSIL)
while your local StS2 version will be for your specific platform. -->
<NoWarn>$(NoWarn);MSB3270</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>stripped_libs/0Harmony-stripped.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="sts2">
<HintPath>stripped_libs/sts2-stripped.dll</HintPath>
<Private>false</Private>
<Publicize>True</Publicize> <!--Allows private/protected field references but may cause errors.-->
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Alchyr.Sts2.ModAnalyzers" Version="*"/>
<AdditionalFiles Include="Custom_Card_Texture_Loader/localization/**/*.json"/>
<PackageReference Include="JetBrains.Annotations" Version="2025.2.4" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Custom_Card_Texture_Loader/**"/>
<Compile Remove="materials/**"/>
<Compile Remove="shaders/**"/>
<Compile Remove="images/**"/>
<EmbeddedResource Remove="Custom_Card_Texture_Loader/**"/>
<EmbeddedResource Remove="materials/**"/>
<EmbeddedResource Remove="shaders/**"/>
<EmbeddedResource Remove="images/**"/>
</ItemGroup>
<ItemGroup>
<None Include=".gitignore"/>
<None Include="project.godot"/>
<None Include="Custom_Card_Texture_Loader/**"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="CHANGELOG.md" />
<Content Include="CustomCardTextureLoader.json" />
<Content Include="README.md" />
</ItemGroup>
<Target Name="CheckDependencyPaths">
<Message
Text=" Slay the Spire 2 data not found at path '$(Sts2DataDir)'"
Condition="'$(Sts2DataDir)' == '' or !Exists('$(Sts2DataDir)')"/>
<Message
Text=" Godot not found at path '$(GodotPath)'"
Condition="'$(GodotPath)' == '' or !Exists('$(GodotPath)')"/>
</Target>
<Target Name="UpdateJsonVersion" BeforeTargets="BeforeBuild">
<Exec Command="git describe --abbrev=0" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="GitTag" />
</Exec>
<Exec Command="dotnet tool install -g dotnet-json" />
<Exec Command="dotnet json set CustomCardTextureLoader.json version "$(GitTag)"" />
</Target>
<Target Name="CopyToModsFolderOnBuild" AfterTargets="PostBuildEvent" Condition="Exists('$(ModsPath)')">
<Message Text="Copying .dll and manifest to mods folder." Importance="high"/>
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
<Copy SourceFiles="CustomCardTextureLoader.json" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
</Target>
<Target Name="CopyToOutputFolderOnBuild" AfterTargets="PostBuildEvent" Condition="!Exists('$(ModsPath)')">
<Message Text="Copying .dll and manifest to mods folder." Importance="high"/>
<Copy SourceFiles="$(TargetPath)" DestinationFolder="bin/$(MSBuildProjectName)/"/>
<Copy SourceFiles="CustomCardTextureLoader.json" DestinationFolder="bin/$(MSBuildProjectName)/"/>
</Target>
<Target Name="GodotPublishSkipped" AfterTargets="Publish" Condition="'$(GodotPath)' == '' or !Exists('$(GodotPath)')">
<Message Text="Skipping Godot .pck export because GodotPath is not configured." Importance="high"/>
</Target>
</Project>