-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathQuickReload.csproj
More file actions
72 lines (61 loc) · 3.83 KB
/
QuickReload.csproj
File metadata and controls
72 lines (61 loc) · 3.83 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
<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>$(DefaultItemExcludes);packages/**</DefaultItemExcludes>
<AppOutputBase>$(MSBuildProjectDirectory)\</AppOutputBase>
<PathMap>$(AppOutputBase)=.\</PathMap>
<RootNamespace>QuickReload</RootNamespace>
</PropertyGroup>
<!-- macOS -->
<PropertyGroup>
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/Library/Application Support/Steam/steamapps</SteamLibraryPath>
<GodotPath Condition="'$(GodotPath)' == ''">/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>
<SteamworksNetPath Condition="'$(SteamworksNetPath)' == ''">$(Sts2DataDir)/Steamworks.NET.dll</SteamworksNetPath>
</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>
<ModDllDeploySource>$(MSBuildProjectDirectory)/.godot/mono/temp/bin/$(Configuration)/$(MSBuildProjectName).dll</ModDllDeploySource>
</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>
</Reference>
<AdditionalFiles Include="QuickReload/localization/**/*.json"/>
</ItemGroup>
<ItemGroup>
<Reference Include="Steamworks.NET">
<HintPath>$(SteamworksNetPath)</HintPath>
<Private>false</Private>
</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="PostBuildEvent">
<Message Text="Copying .dll and manifest to mods folder." Importance="high"/>
<Copy SourceFiles="$(ModDllDeploySource)" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
<Copy SourceFiles="QuickReload.json" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/"/>
</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 "Windows Desktop" "$(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>