<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <VCProjectVersion>17.0</VCProjectVersion>
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{cdfa4c34-767d-49c0-afe1-ee6c49a9da68}</ProjectGuid>
    <RootNamespace>Vivid2DRenderer</RootNamespace>
    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>true</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <UseDebugLibraries>false</UseDebugLibraries>
    <PlatformToolset>v143</PlatformToolset>
    <WholeProgramOptimization>true</WholeProgramOptimization>
    <CharacterSet>Unicode</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Label="Shared">
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;_DEBUG;VIVID2DRENDERER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>WIN32;NDEBUG;VIVID2DRENDERER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>_DEBUG;VIVID2DRENDERER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <SDLCheck>true</SDLCheck>
      <PreprocessorDefinitions>NDEBUG;VIVID2DRENDERER_EXPORTS;_WINDOWS;_USRDLL;GLM_ENABLE_EXPERIMENTAL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <ConformanceMode>true</ConformanceMode>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
      <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
      <LanguageStandard>stdcpp20</LanguageStandard>
      <DisableSpecificWarnings>4828;4251</DisableSpecificWarnings>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <EnableUAC>false</EnableUAC>
    </Link>
    <PostBuildEvent>
      <Command>setlocal enabledelayedexpansion

REM --- DesignTime 保护 ---
REM 检查 $(TargetName) 宏，如果在 DesignTime 环境中可能为空，则退出。
if "$(TargetName)"=="" (
    echo 警告：检测到可能为 DesignTime 构建，跳过后期生成事件。
    goto :EOF
)

REM 定义目标路径变量，使用 VS 宏 $(TargetDir) 
set TARGET_INCLUDE_DIR=$(TargetDir)include
set PROJECT_DIR=$(ProjectDir)
REM 定义需要排除的目录名列表
set EXCLUDE_DIRS_LIST=.idea !DEST_DIR! x64

REM 确保目标目录存在
mkdir "%TARGET_INCLUDE_DIR%"

REM --- 复制操作 ---

REM 1. 复制项目根目录下的 .h 文件
xcopy "%PROJECT_DIR%*.h" "%TARGET_INCLUDE_DIR%" /Y /I

REM 2. 遍历并复制子目录中的 .h 文件，跳过 EXCLUDE_DIRS_LIST 中的目录
REM /D 仅遍历目录
for /D %%d in ("%PROJECT_DIR%*") do (
    set DIR_NAME=%%~nxd
    
    REM 检查当前目录名是否在排除列表中
    set IS_EXCLUDED=0
    for %%e in (%EXCLUDE_DIRS_LIST%) do (
        if /I "%%e"=="!DIR_NAME!" (
            set IS_EXCLUDED=1
        )
    )
    
    REM 如果不在排除列表中，则递归复制该目录下的所有 .h 文件
    if !IS_EXCLUDED!==0 (
        echo 正在复制目录: %%~nxd
        REM /E 确保复制子目录结构，/I 确保目标是目录，避免复制文件失败
        xcopy "%%d\*.h" "%TARGET_INCLUDE_DIR%\%%~nxd" /E /Y /I
    )
)

REM --- 排除操作 ---

REM 3. 递归查找目标目录下的排除文件并删除
for /R "%TARGET_INCLUDE_DIR%" %%f in (framework.h pch.h) do (
    del /Q "%%f"
)

REM 4. 清理排除目录
REM 强制删除目标路径中不应存在的文件夹
for %%e in (%EXCLUDE_DIRS_LIST%) do (
    echo 正在清理排除目录: %TARGET_INCLUDE_DIR%\%%e
    REM /S 删除所有子目录和文件, /Q 安静模式, /F 强制删除只读文件
    rd /S /Q "%TARGET_INCLUDE_DIR%\%%e" 2&gt;nul
)

endlocal

:EOF</Command>
    </PostBuildEvent>
    <PostBuildEvent>
      <Message>==== Package include ====</Message>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemGroup>
    <ClInclude Include="model\AnimationParameter.h" />
    <ClInclude Include="model\FrameInterpolator.h" />
    <ClInclude Include="model\util\AnimationClip.h" />
    <ClInclude Include="model\util\AnimationLayer.h" />
    <ClInclude Include="model\util\LightSource.h" />
    <ClInclude Include="model\Mesh2D.h" />
    <ClInclude Include="model\Model2D.h" />
    <ClInclude Include="model\ModelPart.h" />
    <ClInclude Include="model\util\BoundingBox.h" />
    <ClInclude Include="model\util\ModelPose.h" />
    <ClInclude Include="model\util\PhysicsSystem.h" />
    <ClInclude Include="model\util\VertexList.h" />
    <ClInclude Include="systems\buffer\BufferUploader.h" />
    <ClInclude Include="systems\buffer\BufferBuilder.h" />
    <ClInclude Include="framework.h" />
    <ClInclude Include="pch.h" />
    <ClInclude Include="systems\MultiSelectionBoxRenderer.h" />
    <ClInclude Include="systems\sources\def\Shader2D.h" />
    <ClInclude Include="systems\sources\def\SolidColorShader.h" />
    <ClInclude Include="systems\sources\CompleteShader.h" />
    <ClInclude Include="systems\sources\Shader.h" />
    <ClInclude Include="systems\sources\ShaderManagement.h" />
    <ClInclude Include="systems\sources\ShaderProgram.h" />
    <ClInclude Include="systems\RenderSystem.h" />
    <ClInclude Include="systems\sources\def\TextShader.h" />
    <ClInclude Include="systems\buffer\Tesselator.h" />
    <ClInclude Include="model\util\Vertex.h" />
    <ClInclude Include="systems\Texture.h" />
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="model\AnimationParameter.cpp" />
    <ClCompile Include="model\FrameInterpolator.cpp" />
    <ClCompile Include="model\util\AnimationClip.cpp" />
    <ClCompile Include="model\util\AnimationLayer.cpp" />
    <ClCompile Include="model\util\LightSource.cpp" />
    <ClCompile Include="model\Mesh2D.cpp" />
    <ClCompile Include="model\Model2D.cpp" />
    <ClCompile Include="model\ModelPart.cpp" />
    <ClCompile Include="model\util\BoundingBox.cpp" />
    <ClCompile Include="model\util\ModelPose.cpp" />
    <ClCompile Include="model\util\PhysicsSystem.cpp" />
    <ClCompile Include="model\util\VertexList.cpp" />
    <ClCompile Include="systems\buffer\BufferUploader.cpp" />
    <ClCompile Include="systems\buffer\BufferBuilder.cpp" />
    <ClCompile Include="dllmain.cpp" />
    <ClCompile Include="pch.cpp">
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
    </ClCompile>
    <ClCompile Include="systems\MultiSelectionBoxRenderer.cpp" />
    <ClCompile Include="systems\sources\def\Shader2D.cpp" />
    <ClCompile Include="systems\sources\def\SolidColorShader.cpp" />
    <ClCompile Include="systems\sources\ShaderManagement.cpp" />
    <ClCompile Include="systems\sources\ShaderProgram.cpp" />
    <ClCompile Include="systems\RenderSystem.cpp" />
    <ClCompile Include="systems\sources\def\TextShader.cpp" />
    <ClCompile Include="systems\buffer\Tesselator.cpp" />
    <ClCompile Include="model\util\Vertex.cpp" />
    <ClCompile Include="systems\Texture.cpp" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets" />
</Project>