-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimplifiedVisuals.csproj
More file actions
166 lines (137 loc) · 7.9 KB
/
SimplifiedVisuals.csproj
File metadata and controls
166 lines (137 loc) · 7.9 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<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>D:\Program Files\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)' == ''">D:/SteamLibrary/steamapps</SteamLibraryPath>
<!-- The below should not need to be changed. -->
<Sts2Path>$(SteamLibraryPath)/common/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 Condition="Exists('$(Sts2DataDir)')">
<Reference Include="0Harmony">
<HintPath>$(Sts2DataDir)/0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="sts2">
<HintPath>$(Sts2DataDir)/sts2.dll</HintPath>
<Private>false</Private>
<Publicize>False</Publicize> <!--Allows private/protected field references but may cause errors.-->
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Alchyr.Sts2.ModAnalyzers" Version="*"/>
<AdditionalFiles Include="SimplifiedVisuals/localization/**/*.json"/>
<PackageReference Include="BSchneppe.StS2.PckPacker" Version="0.1.1" />
</ItemGroup>
<ItemGroup>
<Compile Remove="materials/**"/>
<Compile Remove="shaders/**"/>
<Compile Remove="images/**"/>
<EmbeddedResource Remove="materials/**"/>
<EmbeddedResource Remove="shaders/**"/>
<EmbeddedResource Remove="images/**"/>
</ItemGroup>
<ItemGroup>
<None Include=".gitignore"/>
<None Include="SimplifiedVisuals.json"/>
<None Include="SimplifiedVisuals/**"/>
</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="TODO.txt" />
</ItemGroup>
<ItemGroup>
<Folder Include="SimplifiedVisuals\" />
</ItemGroup>
<ItemGroup>
<Reference Include="BaseLib">
<HintPath>D:\SteamLibrary\steamapps\common\Slay the Spire 2\mods\BaseLib\BaseLib.dll</HintPath>
</Reference>
</ItemGroup>
<Target Name="CheckDependencyPaths">
<Error
Text=" Slay the Spire 2 data not found at path '$(Sts2DataDir)'"
Condition="'$(Sts2DataDir)' == '' or !Exists('$(Sts2DataDir)')"/>
<Error
Text=" Godot not found at path '$(GodotPath)'"
Condition="'$(GodotPath)' == '' or !Exists('$(GodotPath)')"/>
</Target>
<Target Name="CopyToModsFolderOnBuild" AfterTargets="PackPck">
<Message Text="Copying .dll, .pck and manifest to mods folder." Importance="high"/>
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
<Copy SourceFiles="SimplifiedVisuals.json" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
<Copy Condition="Exists('$(OutputPath)$(AssemblyName).pck')" SourceFiles="$(OutputPath)$(AssemblyName).pck" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/" />
<Message Text="Copying BaseLib to mods folder." Importance="high" Condition="!Exists('$(ModsPath)BaseLib/BaseLib.dll')" />
<ItemGroup>
<BaseLibFiles Include="$(NuGetPackageRoot)/alchyr.sts2.baselib/**/lib/**/BaseLib.dll;$(NuGetPackageRoot)/alchyr.sts2.baselib/**/Content/BaseLib.pck;$(NuGetPackageRoot)/alchyr.sts2.baselib/**/Content/BaseLib.json;"/>
</ItemGroup>
<Copy SourceFiles="@(BaseLibFiles)" DestinationFolder="$(ModsPath)BaseLib/" Condition="!Exists('$(ModsPath)BaseLib/BaseLib.dll')" />
<Message Text="Skipping BaseLib copy (already exists)."
Importance="high"
Condition="Exists('$(ModsPath)BaseLib/BaseLib.dll')" />
</Target>
<Target Name="GodotPublish" AfterTargets="Publish" Condition="'$(GodotPath)' != '' and Exists('$(GodotPath)') and '$(IsInnerGodotExport)' != 'true'">
<Message Text="Exporting Godot .pck to project root..." Importance="high"/>
<Exec Command=""$(GodotPath)" --headless --export-pack "BasicExport" "$(ProjectDir)$(MSBuildProjectName).pck""
EnvironmentVariables="IsInnerGodotExport=true;MSBUILDDISABLENODEREUSE=1"
ContinueOnError="WarnAndContinue"/>
<Message Text="Copying .pck to mods folder..." Importance="high"/>
<Copy SourceFiles="$(ProjectDir)$(MSBuildProjectName).pck"
DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"
OverwriteReadOnlyFiles="true" />
</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>