Skip to content

Commit 0fe061c

Browse files
Switched publiciser, revised csproj, updated for patch 2.4.0x
1 parent 80c55d0 commit 0fe061c

File tree

4 files changed

+82
-89
lines changed

4 files changed

+82
-89
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,4 +364,6 @@ MigrationBackup/
364364
FodyWeavers.xsd
365365
/img
366366

367+
GamePath.props
368+
Export/
367369
AutoMount/Reference/

AutoMount/AutoMount.csproj

Lines changed: 75 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,97 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk" InitialTargets="GenerateCustomPropsFile">
2+
<Import Project="$(SolutionDir)GamePath.props" Condition="Exists('$(SolutionDir)GamePath.props')" />
23

34
<PropertyGroup>
45
<TargetFramework>net481</TargetFramework>
56
<ImplicitUsings>enable</ImplicitUsings>
6-
<Nullable>disable</Nullable>
7-
<PackageOutputPath>$(OutputPath)</PackageOutputPath>
8-
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
9-
<LangVersion>preview</LangVersion>
10-
<RunPostBuildEvent>Always</RunPostBuildEvent>
11-
<AssemblyVersion>1.2.0</AssemblyVersion>
12-
<FileVersion>1.2.0</FileVersion>
7+
<AssemblyName>AutoMount</AssemblyName>
8+
<Description>AutoMount for TabletopTweaks</Description>
9+
<Version>1.2.1</Version>
10+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
11+
<LangVersion>latest</LangVersion>
12+
<RootNamespace>AutoMount</RootNamespace>
13+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
14+
<RestoreAdditionalProjectSources>https://api.nuget.org/v3/index.json</RestoreAdditionalProjectSources>
15+
<WrathData>$(LocalAppData)Low\Owlcat Games\Pathfinder Wrath Of The Righteous</WrathData>
1316
</PropertyGroup>
14-
1517
<ItemGroup>
16-
<PackageReference Include="AssemblyPublicizer" Version="1.0.2">
17-
<PrivateAssets>all</PrivateAssets>
18-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19-
</PackageReference>
18+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\Assembly-CSharp.dll*" Publicize="true" Private="false" />
19+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\Assembly-CSharp-firstpass.dll*" Private="false" />
20+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\Core*.dll" Private="false" />
21+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\Newtonsoft.Json.dll*" Private="false" />
22+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\Owlcat*.dll" Publicize="true" Private="false" />
23+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\UniRx.dll*" Private="false" />
24+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\Unity*.dll" Private="false" />
25+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\UnityModManager\UnityModManager.dll*" Publicize="true" Private="false" />
26+
<Reference Include="$(WrathInstallDir)\Wrath_Data\Managed\UnityModManager\0Harmony.dll*" Private="false" />
27+
<Reference Include="$(WrathInstallDir)\Mods\ModMenu\ModMenu.dll" Private="false" />
2028
</ItemGroup>
21-
29+
<Target Name="EmptyModDir" BeforeTargets="Build">
30+
<ItemGroup>
31+
<ModDir Include="$(WrathInstallDir)\Mods\$(AssemblyName)\*.*" />
32+
</ItemGroup>
33+
34+
<Delete Files="@(ModDir)" />
35+
</Target>
2236
<ItemGroup>
23-
<Reference Include="0Harmony">
24-
<HintPath>$(WrathPath)\Wrath_Data\Managed\UnityModManager\0Harmony.dll</HintPath>
25-
<Private>False</Private>
26-
</Reference>
27-
<Reference Include="Assembly-CSharp">
28-
<HintPath>$(SolutionDir)lib\Assembly-CSharp_public.dll</HintPath>
29-
<Private>False</Private>
30-
</Reference>
31-
<Reference Include="Assembly-CSharp-firstpass">
32-
<HintPath>$(WrathPath)\Wrath_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
33-
<Private>False</Private>
34-
</Reference>
35-
<Reference Include="Owlcat.Runtime.Core">
36-
<HintPath>$(WrathPath)\Wrath_Data\Managed\Owlcat.Runtime.Core.dll</HintPath>
37-
</Reference>
38-
<Reference Include="Owlcat.Runtime.UI">
39-
<HintPath>$(WrathPath)\Wrath_Data\Managed\Owlcat.Runtime.UI.dll</HintPath>
40-
</Reference>
41-
<Reference Include="UnityEngine">
42-
<HintPath>$(WrathPath)\Wrath_Data\Managed\UnityEngine.dll</HintPath>
43-
</Reference>
44-
<Reference Include="UnityEngine.CoreModule">
45-
<HintPath>$(WrathPath)\Wrath_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
46-
<Private>False</Private>
47-
</Reference>
48-
<Reference Include="UnityEngine.IMGUIModule">
49-
<HintPath>$(WrathPath)\Wrath_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
50-
<Private>False</Private>
51-
</Reference>
52-
<Reference Include="UnityEngine.TextRenderingModule">
53-
<HintPath>$(WrathPath)\Wrath_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
54-
</Reference>
55-
<Reference Include="UnityModManager">
56-
<HintPath>$(WrathPath)\Wrath_Data\Managed\UnityModManager\UnityModManager.dll</HintPath>
57-
<Private>False</Private>
58-
</Reference>
59-
<Reference Include="ModMenu">
60-
<HintPath>$(WrathPath)\Mods\ModMenu\ModMenu.dll</HintPath>
61-
<Private>False</Private>
62-
</Reference>
37+
<None Include="Info.json" CopyToOutputDirectory="PreserveNewest" />
6338
</ItemGroup>
39+
<Target Name="Deploy" AfterTargets="Build">
40+
<ItemGroup>
41+
<Files Include="$(TargetDir)\**\*.*" />
42+
</ItemGroup>
6443

65-
<ItemGroup>
66-
<Compile Update="Properties\Resources.Designer.cs">
67-
<DesignTime>True</DesignTime>
68-
<AutoGen>True</AutoGen>
69-
<DependentUpon>Resources.resx</DependentUpon>
70-
</Compile>
71-
</ItemGroup>
44+
<PropertyGroup>
45+
<ModDescription>$(Description.Replace(' ', '_'))</ModDescription>
46+
</PropertyGroup>
7247

48+
<Copy
49+
SourceFiles="@(Files)"
50+
DestinationFiles="@(Files->'$(WrathInstallDir)\Mods\$(AssemblyName)\%(RecursiveDir)%(Filename)%(Extension)')"
51+
OverwriteReadOnlyFiles="true"
52+
SkipUnchangedFiles="false"
53+
/>
54+
55+
<MakeDir Directories="$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName)" />
56+
<Move SourceFiles="@(Files)" DestinationFolder="$(MSBuildProjectDirectory)\$(OutputPath)\$(AssemblyName)"/>
57+
58+
<ZipDirectory
59+
SourceDirectory="$(MSBuildProjectDirectory)\$(OutputPath)"
60+
DestinationFile="$(SolutionDir)Export\$(ModDescription)_v$(Version).zip"
61+
Overwrite="true"
62+
/>
63+
</Target>
7364
<ItemGroup>
74-
<EmbeddedResource Update="Properties\Resources.resx">
75-
<Generator>ResXFileCodeGenerator</Generator>
76-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
77-
</EmbeddedResource>
65+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
66+
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" IncludeAssets="build; contentfiles" Version="0.4.2" PrivateAssets="all" />
7867
</ItemGroup>
68+
<Target Name="GenerateCustomPropsFile" Condition="$(WrathInstallDir) == ''">
69+
<Exec Command="findstr /C:&quot;Mono path[0]&quot; &quot;$(WrathData)\Player.log&quot;" IgnoreExitCode="true" ConsoleToMSBuild="true">
70+
<Output TaskParameter="ExitCode" PropertyName="ExitCode" />
71+
<Output TaskParameter="ConsoleOutput" PropertyName="MonoPathLine" />
72+
</Exec>
7973

80-
<Target Name="Deploy" AfterTargets="Build">
74+
<PropertyGroup>
75+
<MonoPathRegex>^Mono path\[0\] = '(.*?)/Wrath_Data/Managed'$</MonoPathRegex>
76+
</PropertyGroup>
77+
78+
<PropertyGroup>
79+
<WrathInstallDir>$([System.Text.RegularExpressions.Regex]::Match($(MonoPathLine), $(MonoPathRegex)).Groups[1].Value)</WrathInstallDir>
80+
</PropertyGroup>
81+
82+
<WriteLinesToFile File="$(SolutionDir)GamePath.props" Lines="&lt;Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'&gt;&#xD;&#xA; &lt;PropertyGroup&gt;&#xD;&#xA; &lt;WrathInstallDir&gt;$(WrathInstallDir)&lt;/WrathInstallDir&gt;&#xD;&#xA; &lt;/PropertyGroup&gt;&#xD;&#xA;&lt;/Project&gt;" Overwrite="true" Encoding="utf-8" />
83+
</Target>
84+
<Target Name="DeleteFiles" BeforeTargets="Clean">
8185
<ItemGroup>
82-
<Files1 Include="$(OutDir)\**\AutoMount.*" />
86+
<PropsFile Include="GamePath.props" />
8387
</ItemGroup>
8488
<ItemGroup>
85-
<Files2 Include="$(ProjectDir)\Info.json" />
89+
<ExportDir Include="$(SolutionDir)Export\*.zip" />
8690
</ItemGroup>
8791

88-
<Copy
89-
SourceFiles="@(Files1);@(Files2)"
90-
DestinationFolder="$(WrathPath)\Mods\$(MSBuildProjectName)"
91-
OverwriteReadOnlyFiles="true"
92-
SkipUnchangedFiles="false"
93-
/>
92+
<Delete Files="@(PropsFile);@(ExportDir)" />
9493
</Target>
95-
96-
<Target Name="Publicize" AfterTargets="Clean">
97-
<ItemGroup>
98-
<Assemblies Include="$(WrathPath)\Wrath_Data\Managed\Assembly-CSharp.dll" />
99-
</ItemGroup>
100-
101-
<PublicizeTask InputAssemblies="@(Assemblies)" OutputDir="$(SolutionDir)lib/" />
94+
<Target Name="PostClean" AfterTargets="Clean">
95+
<RemoveDir Directories="$(OutDir)"/>
10296
</Target>
103-
104-
<ProjectExtensions><VisualStudio><UserProperties info_1json__JsonSchema="https://json.schemastore.org/global.json" /></VisualStudio></ProjectExtensions>
105-
10697
</Project>

AutoMount/Info.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"Id": "AutoMount",
33
"DisplayName": "Auto Mount for TabletopTweaks",
44
"Author": "Zepheon, DarthParametric",
5-
"Version": "1.2.0",
6-
"GameVersion": "2.3.3",
5+
"Version": "1.2.1",
6+
"GameVersion": "2.4.0",
77
"ManagerVersion": "0.28.2",
88
"Requirements": [ "ModMenu-1.3.2" ],
9-
"LoadAfter": [ "MewsiferConsole.Mod", "0ToyBox0", "TabletopTweaks-Core", "TabletopTweaks-Base", "MorePartySlots" ],
9+
"LoadAfter": [ "MewsiferConsole.Mod", "TabletopTweaks-Core", "TabletopTweaks-Base", "MorePartySlots" ],
1010
"AssemblyName": "AutoMount.dll",
1111
"EntryMethod": "AutoMount.Main.Load",
1212
"Repository": "https://raw.githubusercontent.com/DarthParametric/AutoMount_for_TabletopTweaks/master/AutoMount/Repository.json",

AutoMount/Repository.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"Releases": [
33
{
44
"Id": "AutoMount",
5-
"Version": "1.2.0",
6-
"DownloadUrl": "https://github.com/DarthParametric/AutoMount_for_TabletopTweaks/releases/download/1.2.0/AutoMount_for_TabletopTweaks_v1.2.0.zip"
5+
"Version": "1.2.1",
6+
"DownloadUrl": "https://github.com/DarthParametric/AutoMount_for_TabletopTweaks/releases/download/1.2.1/AutoMount_for_TabletopTweaks_v1.2.1.zip"
77
}
88
]
99
}

0 commit comments

Comments
 (0)