Repository navigation
Expand file tree
/
Copy pathSaveFileManagerMod.csproj
More file actions
105 lines (95 loc) · 6.57 KB
/
Copy pathSaveFileManagerMod.csproj
File metadata and controls
105 lines (95 loc) · 6.57 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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisMode>recommended</AnalysisMode>
<!-- Ignore warning about processor architecture mismatch with PlayMaker ConditionalExpression -->
<NoWarn>$(NoWarn);MSB3270</NoWarn>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/mich101mich/Silksong.SaveFileManagerMod</RepositoryUrl>
</PropertyGroup>
<PropertyGroup>
<!-- Set the default language for I18N -->
<NeutralLanguage>EN</NeutralLanguage>
</PropertyGroup>
<!--
Imports silksong path properties for non-CI builds. The file should be gitignored.
If you are checking out from git and need to create a new one, you can use `dotnet new silksongpath` to generate one.
Required properties are:
- SilksongFolder: Path to the root folder of the Silksong installation (the one that contains the BepInEx and Hollow Knight Silksong_Data folders)
- SilksongSourceFolder: Path to the (decompiled) source code of Silksong (use ilspycmd on the DLLs in the Hollow Knight Silksong_Data/Managed folder to get this)
- BepInExSourceFolder: Path to the (decompiled) source code of BepInEx (use ilspycmd on the DLLs in the BepInEx/core folder to get this)
- ThirdPartySourceFolder: Path to the source code of third-party mods (either from GitHub or from decompiled BepInEx/plugins DLLs)
-->
<Import Condition="'$(CI)' != 'true'" Project="SilksongPath.props" />
<PropertyGroup>
<SilksongPluginsFolder>$(SilksongFolder)/BepInEx/plugins</SilksongPluginsFolder>
<SilksongScriptsFolder>$(SilksongFolder)/BepInEx/scripts</SilksongScriptsFolder>
<SilksongDllFolder>$(SilksongFolder)/Hollow Knight Silksong_Data/Managed</SilksongDllFolder>
<BepInExDllFolder>$(SilksongFolder)/BepInEx/core</BepInExDllFolder>
<BepInExPluginsFolder>$(SilksongFolder)/BepInEx/plugins</BepInExPluginsFolder>
</PropertyGroup>
<!-- For CI and local builds: Use nuget packages -->
<ItemGroup Condition=" '$(DesignTimeBuild)' != 'true' ">
<PackageReference Include="BepInEx.Core" Version="5.4.21" />
<PackageReference Include="HarmonyX" Version="2.9.0" />
<PackageReference Include="UnityEngine.Modules" Version="6000.0.50" IncludeAssets="compile" />
<PackageReference Include="Silksong.GameLibs" Version="*-*" PrivateAssets="all" />
</ItemGroup>
<!-- For your IDE: Use the decompiled source code as project references to enable features like "Go to definition" -->
<ItemGroup Condition=" '$(DesignTimeBuild)' == 'true' ">
<ProjectReference Include="$(BepInExSourceFolder)\0Harmony\0Harmony.csproj" />
<ProjectReference Include="$(BepInExSourceFolder)\BepInEx\BepInEx.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\TeamCherry.SharedUtils\TeamCherry.SharedUtils.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\TeamCherry.Localization\TeamCherry.Localization.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\Assembly-CSharp\Assembly-CSharp.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine\UnityEngine.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.CoreModule\UnityEngine.CoreModule.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.InputLegacyModule\UnityEngine.InputLegacyModule.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.UI\UnityEngine.UI.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.UIModule\UnityEngine.UIModule.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.AnimationModule\UnityEngine.AnimationModule.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.ImageConversionModule\UnityEngine.ImageConversionModule.csproj" />
<ProjectReference Include="$(SilksongSourceFolder)\UnityEngine.TextRenderingModule\UnityEngine.TextRenderingModule.csproj" />
</ItemGroup>
<!-- Shared Dependencies between all configurations -->
<ItemGroup>
<PackageReference Include="Hamunii.BepInEx.AutoPlugin" Version="2.1.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<Folder Remove="thunderstore/temp;thunderstore/dist" />
<EmbeddedResource Include="assets\finished\Archive_01_idle.png" />
<EmbeddedResource Include="assets\finished\Archive_02_transition.png" />
<EmbeddedResource Include="assets\finished\Archive_03_selected.png" />
<EmbeddedResource Include="assets\finished\Rename_01_idle.png" />
<EmbeddedResource Include="assets\finished\Rename_02_transition.png" />
<EmbeddedResource Include="assets\finished\Rename_03_selected.png" />
<None Include="README.md" Pack="True" PackagePath="README.md" />
<None Include="thunderstore/icon.png" Pack="True" PackagePath="icon.png" />
</ItemGroup>
<Target Name="CopyAndPackageMod" AfterTargets="PostBuildEvent">
<ItemGroup>
<Binaries Include="$(TargetPath)" LocalDir="/" PackDir="$(AssemblyTitle)/" />
<Binaries Include="$(TargetDir)/$(TargetName).pdb" LocalDir="/" PackDir="$(AssemblyTitle)/" />
<Binaries Include="languages/*.json" LocalDir="languages" PackDir="$(AssemblyTitle)/languages" />
</ItemGroup>
<PropertyGroup>
<ThunderstoreDir>$(ProjectDir)/thunderstore</ThunderstoreDir>
</PropertyGroup>
<!-- Local install -->
<Copy SourceFiles="@(Binaries)" DestinationFolder="$(SilksongPluginsFolder)/%(Binaries.PackDir)" Condition="'$(Configuration)' == 'Release' And '$(SilksongPluginsFolder)' != '' And Exists('$(SilksongPluginsFolder)')" />
<Copy SourceFiles="@(Binaries)" DestinationFolder="$(SilksongScriptsFolder)/" Condition="'$(Configuration)' == 'Debug' And '$(SilksongScriptsFolder)' != '' And Exists('$(SilksongScriptsFolder)')" />
<!-- Thunderstore packaging -->
<RemoveDir Directories="$(ThunderstoreDir)/temp;$(ThunderstoreDir)/dist" />
<MakeDir Directories="$(ThunderstoreDir)/temp" />
<Copy SourceFiles="@(Binaries)" DestinationFolder="$(ThunderstoreDir)/temp/%(Binaries.PackDir)" />
<PropertyGroup>
<ThunderstorePkgVersion>$([System.String]::Copy($(Version)).Split('-')[0])</ThunderstorePkgVersion>
</PropertyGroup>
<Exec Command="dotnet tool restore" />
<Exec Command="dotnet tcli build --config-path "$(ThunderstoreDir)/thunderstore.toml" --package-name "$(AssemblyTitle)" --package-version $(ThunderstorePkgVersion)" StandardOutputImportance="High" StandardErrorImportance="High" />
</Target>
</Project>