mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
No longer requires hook and main thread requirements on compiling macro strings. Needs lookup table fixing on Lumina; using reflection to fix for the time being.
208 lines
12 KiB
XML
208 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup Label="Target">
|
|
<TargetFramework>net8.0-windows</TargetFramework>
|
|
<PlatformTarget>x64</PlatformTarget>
|
|
<Platforms>x64;AnyCPU</Platforms>
|
|
<LangVersion>12.0</LangVersion>
|
|
<EnableWindowsTargeting>True</EnableWindowsTargeting>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Label="Feature">
|
|
<DalamudVersion>10.0.0.14</DalamudVersion>
|
|
<Description>XIV Launcher addon framework</Description>
|
|
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
|
<Version>$(DalamudVersion)</Version>
|
|
<FileVersion>$(DalamudVersion)</FileVersion>
|
|
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Label="Output">
|
|
<OutputType>Library</OutputType>
|
|
<OutputPath>..\bin\$(Configuration)\</OutputPath>
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
|
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Label="Documentation">
|
|
<DocumentationFile>$(OutputPath)Dalamud.xml</DocumentationFile>
|
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Label="Build">
|
|
<UseWindowsForms>true</UseWindowsForms>
|
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
|
<DebugSymbols>true</DebugSymbols>
|
|
<DebugType>portable</DebugType>
|
|
<Deterministic>true</Deterministic>
|
|
<Nullable>annotations</Nullable>
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Label="Configuration">
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
</PropertyGroup>
|
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
|
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
</PropertyGroup>
|
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
|
|
<AppOutputBase>$(MSBuildProjectDirectory)\</AppOutputBase>
|
|
<PathMap>$(AppOutputBase)=C:\goatsoft\companysecrets\dalamud\</PathMap>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Label="Warnings">
|
|
<NoWarn>IDE0002;IDE0003;IDE1006;IDE0044;CA1822;CS1591;CS1701;CS1702</NoWarn>
|
|
<!-- IDE1002 - Simplify member access -->
|
|
<!-- IDE1003 - This and me preferences -->
|
|
<!-- IDE1006 - Naming violation -->
|
|
<!-- IDE1006 - Add readonly modifier -->
|
|
<!-- CA1822 - Can be marked as static -->
|
|
<!-- CS1591 - Missing XML comment for publicly visible type or member -->
|
|
<!-- CS1701 - Runtime policy may be needed -->
|
|
<!-- CS1702 - Runtime policy may be needed -->
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="BitFaster.Caching" Version="2.4.1" />
|
|
<PackageReference Include="CheapLoc" Version="1.1.8" />
|
|
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.4" PrivateAssets="all" />
|
|
<PackageReference Include="goaaats.Reloaded.Hooks" Version="4.2.0-goat.4" />
|
|
<PackageReference Include="goaaats.Reloaded.Assembler" Version="1.0.14-goat.2" />
|
|
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0" />
|
|
<PackageReference Include="Lumina" Version="4.2.1" />
|
|
<PackageReference Include="Lumina.Excel" Version="7.0.1" />
|
|
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="9.0.0-preview.1.24081.5" />
|
|
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.46-beta">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="MinSharp" Version="1.0.4" />
|
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
<PackageReference Include="Serilog" Version="2.11.0" />
|
|
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
|
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
|
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
|
|
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
|
|
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
|
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="8.0.0" />
|
|
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
|
|
<PackageReference Include="TerraFX.Interop.Windows" Version="10.0.22621.2" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Dalamud.Common\Dalamud.Common.csproj" />
|
|
<ProjectReference Include="..\lib\FFXIVClientStructs\FFXIVClientStructs\FFXIVClientStructs.csproj" />
|
|
<ProjectReference Include="..\lib\ImGuiScene\deps\ImGui.NET\src\ImGui.NET-472\ImGui.NET-472.csproj" />
|
|
<ProjectReference Include="..\lib\ImGuiScene\deps\SDL2-CS\SDL2-CS.csproj" />
|
|
<ProjectReference Include="..\lib\ImGuiScene\ImGuiScene\ImGuiScene.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<AdditionalFiles Include="..\stylecop.json" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Remove="licenses.txt" />
|
|
<Content Include="licenses.txt">
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</Content>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="Interface\ImGuiSeStringRenderer\Internal\TextProcessing\DerivedGeneralCategory.txt" LogicalName="DerivedGeneralCategory.txt" />
|
|
<EmbeddedResource Include="Interface\ImGuiSeStringRenderer\Internal\TextProcessing\EastAsianWidth.txt" LogicalName="EastAsianWidth.txt" />
|
|
<EmbeddedResource Include="Interface\ImGuiSeStringRenderer\Internal\TextProcessing\emoji-data.txt" LogicalName="emoji-data.txt" />
|
|
<EmbeddedResource Include="Interface\ImGuiSeStringRenderer\Internal\TextProcessing\LineBreak.txt" LogicalName="LineBreak.txt" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="AddRuntimeDependenciesToContent" BeforeTargets="GetCopyToOutputDirectoryItems" DependsOnTargets="GenerateBuildDependencyFile;GenerateBuildRuntimeConfigurationFiles">
|
|
<ItemGroup>
|
|
<ContentWithTargetPath Include="$(ProjectDepsFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectDepsFileName)" />
|
|
<ContentWithTargetPath Include="$(ProjectRuntimeConfigFilePath)" CopyToOutputDirectory="PreserveNewest" TargetPath="$(ProjectRuntimeConfigFileName)" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<PropertyGroup>
|
|
<!-- Needed temporarily for CI -->
|
|
<TempVerFile>$(OutputPath)TEMP_gitver.txt</TempVerFile>
|
|
<CommitHashFile>$(OutputPath)commit_hash.txt</CommitHashFile>
|
|
<DalamudRevisionFile>$(OutputPath)revision.txt</DalamudRevisionFile>
|
|
</PropertyGroup>
|
|
|
|
<Target Name="GetVersionData" BeforeTargets="WriteVersionData" Condition="'$(SCMVersion)'=='' And '$(Configuration)'=='Release'">
|
|
<Exec Command="git -C "$(ProjectDir.Replace('\','\\'))" rev-list --count HEAD" ConsoleToMSBuild="true">
|
|
<Output TaskParameter="ConsoleOutput" PropertyName="DalamudGitCommitCount" />
|
|
</Exec>
|
|
<Exec Command="git -C "$(ProjectDir.Replace('\','\\'))" describe --match=NeVeRmAtCh --always --abbrev=40 --dirty" ConsoleToMSBuild="true">
|
|
<Output TaskParameter="ConsoleOutput" PropertyName="DalamudGitCommitHash" />
|
|
</Exec>
|
|
<Exec Command="git -C "$(ProjectDir.Replace('\','\\'))" describe --tags --always --dirty" ConsoleToMSBuild="true">
|
|
<Output TaskParameter="ConsoleOutput" PropertyName="DalamudGitDescribeOutput" />
|
|
</Exec>
|
|
<Exec Command="git -C "$(ProjectDir.Replace('\','\\'))\..\lib\FFXIVClientStructs" describe --long --always --dirty" ConsoleToMSBuild="true">
|
|
<Output TaskParameter="ConsoleOutput" PropertyName="ClientStructsGitDescribeOutput" />
|
|
</Exec>
|
|
|
|
<PropertyGroup>
|
|
<CommitCount>$([System.Text.RegularExpressions.Regex]::Replace($(DalamudGitCommitCount), @"\t|\n|\r", ""))</CommitCount>
|
|
<CommitHash>$([System.Text.RegularExpressions.Regex]::Replace($(DalamudGitCommitHash), @"\t|\n|\r", ""))</CommitHash>
|
|
<SCMVersion>$([System.Text.RegularExpressions.Regex]::Replace($(DalamudGitDescribeOutput), @"\t|\n|\r", ""))</SCMVersion>
|
|
<CommitHashClientStructs>$([System.Text.RegularExpressions.Regex]::Replace($(ClientStructsGitDescribeOutput), @"\t|\n|\r", ""))</CommitHashClientStructs>
|
|
</PropertyGroup>
|
|
|
|
<Exec Command="echo|set /P ="$(CommitCount)" > $(DalamudRevisionFile)" IgnoreExitCode="true" />
|
|
<Exec Command="echo|set /P ="$(CommitHash)" > $(CommitHashFile)" IgnoreExitCode="true" />
|
|
<Exec Command="echo|set /P ="$(SCMVersion)" > $(TempVerFile)" IgnoreExitCode="true" />
|
|
</Target>
|
|
|
|
<Target Name="GenerateStubVersionData" BeforeTargets="WriteVersionData" Condition="'$(SCMVersion)'=='' And '$(Configuration)'!='Release'">
|
|
<!-- stub out version since it takes a while. -->
|
|
<PropertyGroup>
|
|
<SCMVersion>Local build at $([System.DateTime]::Now.ToString(yyyy-MM-dd HH:mm:ss))</SCMVersion>
|
|
<CommitHashClientStructs>???</CommitHashClientStructs>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<Target Name="WriteVersionData" BeforeTargets="CoreCompile">
|
|
<!-- names the obj/.../CustomAssemblyInfo.cs file -->
|
|
<PropertyGroup>
|
|
<CustomAssemblyInfoFile>$(IntermediateOutputPath)CustomAssemblyInfo.cs</CustomAssemblyInfoFile>
|
|
</PropertyGroup>
|
|
<!-- includes the CustomAssemblyInfo for compilation into your project -->
|
|
<ItemGroup>
|
|
<Compile Include="$(CustomAssemblyInfoFile)" />
|
|
</ItemGroup>
|
|
<!-- defines the AssemblyMetadata attribute that will be written -->
|
|
<ItemGroup>
|
|
<AssemblyAttributes Include="AssemblyMetadata" Condition="'$(SCMVersion)' != ''">
|
|
<_Parameter1>SCMVersion</_Parameter1>
|
|
<_Parameter2>$(SCMVersion)</_Parameter2>
|
|
</AssemblyAttributes>
|
|
<AssemblyAttributes Include="AssemblyMetadata" Condition="'$(CommitCount)' != ''">
|
|
<_Parameter1>GitCommitCount</_Parameter1>
|
|
<_Parameter2>$(CommitCount)</_Parameter2>
|
|
</AssemblyAttributes>
|
|
<AssemblyAttributes Include="AssemblyMetadata" Condition="'$(CommitHashClientStructs)' != ''">
|
|
<_Parameter1>GitHashClientStructs</_Parameter1>
|
|
<_Parameter2>$(CommitHashClientStructs)</_Parameter2>
|
|
</AssemblyAttributes>
|
|
<AssemblyAttributes Include="AssemblyMetadata" Condition="'$(CommitHash)' != ''">
|
|
<_Parameter1>GitHash</_Parameter1>
|
|
<_Parameter2>$(CommitHash)</_Parameter2>
|
|
</AssemblyAttributes>
|
|
</ItemGroup>
|
|
<!-- writes the attribute to the customAssemblyInfo file -->
|
|
<WriteCodeFragment Language="C#" OutputFile="$(CustomAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />
|
|
</Target>
|
|
|
|
<!-- Copy plugin .targets folder into distrib -->
|
|
<Target Name="CopyPluginTargets" AfterTargets="Build">
|
|
<Copy SourceFiles="$(ProjectDir)\..\targets\Dalamud.Plugin.targets;$(ProjectDir)\..\targets\Dalamud.Plugin.Bootstrap.targets" DestinationFolder="$(OutDir)\targets" />
|
|
</Target>
|
|
</Project>
|