-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDisableStarsInTimeline.csproj
More file actions
140 lines (121 loc) · 7.09 KB
/
DisableStarsInTimeline.csproj
File metadata and controls
140 lines (121 loc) · 7.09 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
<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>
<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.BaseLib" Version="*" PrivateAssets="All" />
<PackageReference Include="Alchyr.Sts2.ModAnalyzers" Version="*" />
<AdditionalFiles Include="DisableStarsInTimeline/localization/**/*.json"/>
</ItemGroup>
<ItemGroup>
<Compile Remove="DisableStarsInTimeline/**" />
<Compile Remove="materials/**" />
<Compile Remove="shaders/**" />
<Compile Remove="images/**" />
<EmbeddedResource Remove="DisableStarsInTimeline/**" />
<EmbeddedResource Remove="materials/**" />
<EmbeddedResource Remove="shaders/**" />
<EmbeddedResource Remove="images/**" />
</ItemGroup>
<ItemGroup>
<None Include=".gitignore" />
<None Include="DisableStarsInTimeline.json" />
<None Include="project.godot"/>
<None Include="DisableStarsInTimeline/**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</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="PostBuildEvent">
<Message Text="Copying .dll and manifest to mods folder." Importance="high" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/" />
<Copy SourceFiles="DisableStarsInTimeline.json" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/" />
<Message Text="Copying BaseLib to mods folder." Importance="high" />
<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/" />
</Target>
<Target Name="GodotPublish" AfterTargets="Publish" Condition="'$(GodotPath)' != '' and Exists('$(GodotPath)') and '$(IsInnerGodotExport)' != 'true'">
<Message Text="Exporting Godot .pck to mods folder" Importance="high"/>
<Exec Command=""$(GodotPath)" --headless --export-pack "BasicExport" "$(ModsPath)$(MSBuildProjectName)/$(MSBuildProjectName).pck""
EnvironmentVariables="IsInnerGodotExport=true;MSBUILDDISABLENODEREUSE=1"
ContinueOnError="WarnAndContinue"/>
</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>