forked from Alchyr/BaseLib-StS2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseLib.csproj
More file actions
128 lines (111 loc) · 6.51 KB
/
BaseLib.csproj
File metadata and controls
128 lines (111 loc) · 6.51 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
<Project Sdk="Godot.NET.Sdk/4.5.1">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!-- NuGet Package Configuration -->
<PropertyGroup>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Alchyr.Sts2.BaseLib</PackageId>
<Title>BaseLib-StS2</Title>
<Description>Mod for Slay the Spire 2 providing utilities and features for other mods.</Description>
<Version>0.0.5</Version>
<Authors>Alchyr</Authors>
<PackageReleaseNotes>CustomAncientModel</PackageReleaseNotes>
<PackageTags>c#</PackageTags>
<NoWarn>$(NoWarn);NU5128</NoWarn>
<RepositoryUrl>https://github.com/Alchyr/BaseLib-StS2</RepositoryUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeBuildOutput>true</IncludeBuildOutput>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<LocalizeTemplates>false</LocalizeTemplates>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</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>
<!-- Windows -->
<PropertyGroup Condition="'$(IsWindows)' == 'true'">
<!-- Try getting uninstall location first -->
<Sts2Path Condition="'$(Sts2Path)' == ''">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 2868840', 'InstallLocation', '', RegistryView.Registry64, RegistryView.Registry32))</Sts2Path>
<AutoSteamPath>$(registry:HKEY_CURRENT_USER\Software\Valve\Steam@SteamPath)\steamapps</AutoSteamPath>
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == '' and Exists('$(AutoSteamPath)/common/Slay the Spire 2')">$(AutoSteamPath)</SteamLibraryPath>
<!-- 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>
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<Sts2DataDir Condition="'$(Sts2DataDir)' == ''">$(Sts2Path)/data_sts2_windows_x86_64</Sts2DataDir>
<GodotPath>Z:\Projects\sts2\megadot\MegaDot_v4.5.1-stable_mono_win64.exe</GodotPath>
</PropertyGroup>
<!-- Linux -->
<PropertyGroup Condition="'$(IsLinux)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/.local/share/Steam/steamapps</SteamLibraryPath>
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<Sts2DataDir Condition="'$(Sts2DataDir)' == ''">$(Sts2Path)/data_sts2_linuxbsd_x86_64</Sts2DataDir>
<GodotPath Condition="'$(GodotPath)' == ''">$(HOME)/bin/megadot/megadot</GodotPath>
</PropertyGroup>
<!-- // TODO: Megadot is version 4.5.1, and the game won't load pck if godot is newer. -->
<!-- macOS // TODO -->
<PropertyGroup Condition="'$(IsOSX)' == 'true'">
<SteamLibraryPath Condition="'$(SteamLibraryPath)' == ''">$(HOME)/Library/Application Support/Steam/steamapps</SteamLibraryPath>
<Sts2Path Condition="'$(Sts2Path)' == ''">$(SteamLibraryPath)/common/Slay the Spire 2</Sts2Path>
<Sts2DataDir Condition="'$(Sts2DataDir)' == ''">$(Sts2Path)/data_sts2_macos_x86_64</Sts2DataDir>
<GodotPath Condition="'$(GodotPath)' == ''">$(HOME)/</GodotPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>$(Sts2DataDir)/0Harmony.dll</HintPath>
</Reference>
<Reference Include="sts2">
<HintPath>$(Sts2DataDir)/sts2.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildProjectName)\**" />
<None Include="LICENSE.txt" />
<None Include="mod_manifest.json" />
<None Include="project.godot" />
<None Include="README.md" Pack="true" PackagePath="/"/>
<None Include=".gitignore" />
<None Include="Notes.txt" />
<None Include="export_presets.cfg" />
</ItemGroup>
<ItemGroup>
<!-- Temporary for including in .nupkg for template to auto export to mods folder -->
<Content Include="build\BaseLib.props" PackagePath="/Content/" />
<Content Include="build\BaseLib.pck" PackagePath="/Content/" />
</ItemGroup>
<ItemGroup>
<Folder Include="scenes\baselib\" />
</ItemGroup>
<Target Name="CopyToModsFolderOnBuild" AfterTargets="PostBuildEvent">
<Message Text="Copying .dll to mods folder." Importance="high" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(Sts2Path)/mods/" />
</Target>
<Target Name="GodotPublish" AfterTargets="Publish" Condition="'$(GodotPath)' != '' and Exists('$(GodotPath)') and '$(IsInnerGodotExport)' != 'true'">
<Message Text="Exporting Godot .pck to build folder" Importance="high"/>
<Exec Command=""$(GodotPath)" --headless --export-pack "BasicExport" "build/$(MSBuildProjectName).pck""
EnvironmentVariables="IsInnerGodotExport=true;MSBUILDDISABLENODEREUSE=1"
ContinueOnError="WarnAndContinue"/>
<Message Text="Copying Godot .pck to mods folder" Importance="high"/>
<Copy SourceFiles="build/$(MSBuildProjectName).pck" DestinationFolder="$(Sts2Path)/mods/" />
</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>