<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net8.0-windows</TargetFramework>
        <LangVersion>preview</LangVersion>
        <PlatformTarget>x64</PlatformTarget>
        <AssemblyTitle>Penumbra</AssemblyTitle>
        <Company>absolute gangstas</Company>
        <Product>Penumbra</Product>
        <Copyright>Copyright © 2022</Copyright>
        <FileVersion>9.0.0.1</FileVersion>
        <AssemblyVersion>9.0.0.1</AssemblyVersion>
        <OutputPath>bin\$(Configuration)\</OutputPath>
        <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
        <Nullable>enable</Nullable>
        <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
        <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
        <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
        <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
    </PropertyGroup>

    <PropertyGroup>
        <MSBuildWarningsAsMessages>$(MSBuildWarningsAsMessages);MSB3277</MSBuildWarningsAsMessages>
        <DefineConstants>PROFILING;</DefineConstants>
    </PropertyGroup>

    <ItemGroup>
      <Compile Remove="Mods\Subclasses\**" />
      <EmbeddedResource Remove="Mods\Subclasses\**" />
      <None Remove="Mods\Subclasses\**" />
    </ItemGroup>

    <ItemGroup>
        <Content Include="tsmLogo.png">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </Content>
    </ItemGroup>

    <PropertyGroup>
        <DalamudLibPath>$(AppData)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
    </PropertyGroup>

    <ItemGroup>
        <Reference Include="Dalamud">
            <HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="ImGui.NET">
            <HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="ImGuiScene">
            <HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="Lumina">
            <HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="Lumina.Excel">
            <HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="FFXIVClientStructs">
            <HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="Newtonsoft.Json">
            <HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="Iced">
            <HintPath>$(DalamudLibPath)Iced.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="SharpDX">
            <HintPath>$(DalamudLibPath)SharpDX.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="SharpDX.Direct3D11">
            <HintPath>$(DalamudLibPath)SharpDX.Direct3D11.dll</HintPath>
            <Private>False</Private>
        </Reference>
        <Reference Include="OtterTex.dll">
            <HintPath>lib\OtterTex.dll</HintPath>
        </Reference>
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="EmbedIO" Version="3.4.3" />
        <PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
        <PackageReference Include="SharpCompress" Version="0.33.0" />
        <PackageReference Include="SharpGLTF.Core" Version="1.0.0-alpha0030" />
        <PackageReference Include="SharpGLTF.Toolkit" Version="1.0.0-alpha0030" />
        <PackageReference Include="PeNet" Version="4.0.5" />
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\OtterGui\OtterGui.csproj" />
        <ProjectReference Include="..\Penumbra.CrashHandler\Penumbra.CrashHandler.csproj" />
        <ProjectReference Include="..\Penumbra.GameData\Penumbra.GameData.csproj" />
        <ProjectReference Include="..\Penumbra.Api\Penumbra.Api.csproj" />
        <ProjectReference Include="..\Penumbra.String\Penumbra.String.csproj" />
    </ItemGroup>

    <ItemGroup>
        <None Update="lib\DirectXTexC.dll">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <TargetPath>DirectXTexC.dll</TargetPath>
        </None>
        <None Update="Penumbra.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
    </ItemGroup>

    <Target Name="GetGitHash" BeforeTargets="GetAssemblyVersion" Returns="InformationalVersion">
        <Exec Command="git rev-parse --short HEAD" ConsoleToMSBuild="true" StandardOutputImportance="low" ContinueOnError="true">
            <Output TaskParameter="ExitCode" PropertyName="GitCommitHashSuccess" />
            <Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" Condition="$(GitCommitHashSuccess) == 0" />
        </Exec>

        <PropertyGroup>
            <InformationalVersion>$(GitCommitHash)</InformationalVersion>
        </PropertyGroup>
    </Target>
</Project>
