-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathBaseLib.csproj
More file actions
119 lines (104 loc) · 5.77 KB
/
BaseLib.csproj
File metadata and controls
119 lines (104 loc) · 5.77 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
<Project Sdk="Godot.NET.Sdk/4.5.1">
<Import Project=".\local.props" Condition="Exists('.\local.props')"/>
<Import Project=".\Sts2PathDiscovery.props"/>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppOutputBase>$(MSBuildProjectDirectory)\</AppOutputBase>
<PathMap>$(AppOutputBase)=.\</PathMap>
</PropertyGroup>
<!-- NuGet Package Configuration -->
<PropertyGroup>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<OutputPath>publish/</OutputPath>
<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.2.8</Version>
<Authors>Alchyr</Authors>
<PackageReleaseNotes>health bar displays, CustomID attribute, energy icon in keyword tips, adjusted patch process and increased logging</PackageReleaseNotes>
<PackageTags>c#</PackageTags>
<NoWarn>$(NoWarn);NU5128;MSB3270</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>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<!-- Sts2Path / Sts2DataDir: Sts2PathDiscovery.props (+ optional local.props). GodotPath in local.props for .pck export. -->
<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>
<PackageReference Include="Krafs.Publicizer" Version="2.3.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup>
<Publicize Include="sts2" IncludeVirtualMembers="false" IncludeCompilerGeneratedMembers="false" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildProjectName)\**" />
<None Include="LICENSE.txt" />
<None Include="project.godot" />
<None Include="README.md" Pack="true" PackagePath="/"/>
<None Include=".gitignore" />
<None Include="local.props" Condition="Exists('local.props')" Pack="false" CopyToOutputDirectory="Never" />
<None Include="local.props.template" />
<None Include="Sts2PathDiscovery.props" />
<None Include="Notes.txt" />
<None Include="export_presets.cfg" />
<None Include="BaseLib.json" />
<None Include="Publish/*" />
<None Include="**/*.gd" />
</ItemGroup>
<ItemGroup>
<!-- For including in .nupkg for template to auto export to mods folder -->
<Content Condition="Exists('build\BaseLib.props')" Include="build\BaseLib.props" PackagePath="/Content/" />
<Content Condition="Exists('build\BaseLib.pck')" Include="build\$(MSBuildProjectName).pck" PackagePath="/Content/" />
<Content Include="$(MSBuildProjectName).json" PackagePath="/Content/" />
</ItemGroup>
<Target Name="UpdateManifestVersion" BeforeTargets="BeforeBuild">
<PropertyGroup>
<ManifestPath>$(MSBuildProjectName).json</ManifestPath>
</PropertyGroup>
<PropertyGroup>
<OldContent>$([System.IO.File]::ReadAllText($(ManifestPath)))</OldContent>
<NewContent>$([System.Text.RegularExpressions.Regex]::Replace($(OldContent), '("version":\s*")[^"]*', '$1v$(Version)'))</NewContent>
</PropertyGroup>
<WriteLinesToFile
Condition="'$(OldContent)' != '$(NewContent)'"
File="$(ManifestPath)"
Lines="$(NewContent)"
Overwrite="true"
Encoding="UTF-8" />
<Message Condition="'$(OldContent)' != '$(NewContent)'"
Text="Updated mod_manifest.json to version $(Version)"
Importance="high" />
</Target>
<Target Name="CopyToModsFolderOnBuild" AfterTargets="AfterBuild">
<Message Text="Copying .dll and manifest to mods folder ($(ModsPath))." Importance="high" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/" />
<Copy SourceFiles="$(MSBuildProjectName).json" DestinationFolder="$(ModsPath)$(MSBuildProjectName)/" />
</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="$(ModsPath)$(MSBuildProjectName)/" />
</Target>
<Target Name="GodotPublishSkipped" AfterTargets="Publish" Condition="'$(GodotPath)' == '' or !Exists('$(GodotPath)')">
<Message Text="Skipping Godot .pck export: set GodotPath in local.props — see local.props.template." Importance="high"/>
</Target>
</Project>