-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathWatcher.csproj
More file actions
160 lines (138 loc) · 8.14 KB
/
Watcher.csproj
File metadata and controls
160 lines (138 loc) · 8.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
149
150
151
152
153
154
155
156
157
158
159
160
<Project Sdk="Godot.NET.Sdk/4.5.1">
<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>
<RootNamespace>Watcher</RootNamespace>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)local.props" Condition="Exists('$(MSBuildThisFileDirectory)local.props')"/>
<PropertyGroup>
<AssemblyVersion>1.4.14.0</AssemblyVersion>
<FileVersion>1.4.14.0</FileVersion>
<Version>1.4.14</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<Optimize>false</Optimize>
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<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'">
<GodotPath Condition="'$(GodotPath)' == ''">C:\Users\lamal\Desktop\Programmieren\sts2mods\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 Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath Condition="'$(ModsPath)' == ''">$(Sts2Path)/mods/</ModsPath>
<Sts2DataDir Condition="'$(Sts2DataDir)' == ''">$(Sts2Path)/data_sts2_windows_x86_64</Sts2DataDir>
</PropertyGroup>
<!-- Linux -->
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/.local/share/Steam/steamapps</SteamLibraryPath>
<!-- Change the path here if using a downloaded binary instead of the Steam version-->
<GodotPath Condition="'$(GodotPath)' == ''">$(SteamLibraryPath)/common/Godot Engine/godot.x11.opt.tools.64</GodotPath>
<!-- The below should not need to be changed. -->
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath Condition="'$(ModsPath)' == ''">$(Sts2Path)/mods/</ModsPath>
<Sts2DataDir Condition="'$(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 Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<ModsPath Condition="'$(ModsPath)' == ''">$(Sts2Path)/SlayTheSpire2.app/Contents/MacOS/mods/</ModsPath>
<Sts2DataDir Condition="Exists('$(Sts2Path)/SlayTheSpire2.app/Contents/Resources/data_sts2_macos_arm64')">$(Sts2Path)/SlayTheSpire2.app/Contents/Resources/data_sts2_macos_arm64</Sts2DataDir>
<Sts2DataDir Condition="'$(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>$(Sts2DataDir)/0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="sts2">
<HintPath>$(Sts2DataDir)/sts2.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="SmartFormat">
<HintPath>$(Sts2DataDir)/SmartFormat.dll</HintPath>
<Private>false</Private>
</Reference>
<PackageReference Include="Alchyr.Sts2.BaseLib" Version="3.2.0" PrivateAssets="All" />
<!--Reference Include="BaseLib">
<HintPath>C:\Users\lamal\Desktop\Programmieren\sts2mods\BaseLib-StS2\publish\BaseLib.dll</HintPath>
<Private>false</Private>
</Reference-->
<PackageReference Include="Krafs.Publicizer" Version="2.3.0" PrivateAssets="All"/>
<PackageReference Include="Alchyr.Sts2.ModAnalyzers" Version="0.0.9"/>
<AdditionalFiles Include="Watcher/localization/**/*.json"/>
</ItemGroup>
<ItemGroup> <!--Allows access to originally private/protected members but may (unlikely to) cause errors.-->
<Publicize Include="sts2" IncludeVirtualMembers="false" IncludeCompilerGeneratedMembers="false"/>
</ItemGroup>
<ItemGroup>
<Compile Remove="Watcher/**"/>
<Compile Remove="shaders/**"/>
<EmbeddedResource Remove="Watcher/**"/>
<EmbeddedResource Remove="shaders/**"/>
</ItemGroup>
<ItemGroup>
<None Include="release.ps1"/>
<None Include=".gitignore"/>
<None Include="Watcher.json"/>
<None Include="project.godot"/>
<Content Include="local.props"/>
<Content Include="local.props.example"/>
<None Include="Watcher/**"/>
<None Include="cardloc-presets.json"/>
</ItemGroup>
<ItemGroup>
<Content Include=".editorconfig"/>
</ItemGroup>
<Target Name="CopyToModsFolderOnBuild" AfterTargets="PostBuildEvent">
<Message Text="Copying .dll and manifest to mods folder." Importance="high"/>
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
<Copy SourceFiles="Watcher.json" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
<Copy SourceFiles="$(TargetDir)$(TargetName).pdb"
DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"
Condition="Exists('$(TargetDir)$(TargetName).pdb')"/>
<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>