<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<OutputType>WinExe</OutputType>
		<TargetFrameworks>net6.0-windows;net7.0-windows</TargetFrameworks>
		<UseWindowsForms>true</UseWindowsForms>
		<ApplicationIcon>Resources\as.ico</ApplicationIcon>
		<Version>0.90.10</Version>
		<AssemblyVersion>0.90.10</AssemblyVersion>
		<FileVersion>0.90.10</FileVersion>
		<Copyright>Copyright © Razmoth 2022; Copyright © Perfare 2018-2022</Copyright>
		<DebugType>embedded</DebugType>
	</PropertyGroup>

	<ItemGroup>
		<ProjectReference Include="..\AssetStudioUtility\AssetStudioUtility.csproj" />
		<ProjectReference Include="..\AssetStudio\AssetStudio.csproj" />
	</ItemGroup>

	<ItemGroup>
		<EmbeddedResource Update="Properties\Resources.resx">
			<Generator>ResXFileCodeGenerator</Generator>
			<LastGenOutput>Resources.Designer.cs</LastGenOutput>
		</EmbeddedResource>
		<Compile Update="Properties\Resources.Designer.cs">
			<AutoGen>True</AutoGen>
			<DependentUpon>Resources.resx</DependentUpon>
			<DesignTime>True</DesignTime>
		</Compile>
		<Compile Update="Properties\Settings.Designer.cs">
		  <DesignTimeSharedInput>True</DesignTimeSharedInput>
		  <AutoGen>True</AutoGen>
		  <DependentUpon>Settings.settings</DependentUpon>
		</Compile>
	</ItemGroup>

	<ItemGroup>
		<ContentWithTargetPath Include="Libraries\x86\AssetStudioFBXNative.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x86\AssetStudioFBXNative.dll</TargetPath>
		</ContentWithTargetPath>
		<ContentWithTargetPath Include="Libraries\x64\AssetStudioFBXNative.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x64\AssetStudioFBXNative.dll</TargetPath>
		</ContentWithTargetPath>
	</ItemGroup>

	<ItemGroup>
		<ContentWithTargetPath Include="Libraries\x86\fmod.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x86\fmod.dll</TargetPath>
		</ContentWithTargetPath>
		<ContentWithTargetPath Include="Libraries\x64\fmod.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x64\fmod.dll</TargetPath>
		</ContentWithTargetPath>
	</ItemGroup>

	<ItemGroup>
		<ContentWithTargetPath Include="Libraries\x86\acl.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x86\acl.dll</TargetPath>
		</ContentWithTargetPath>
		<ContentWithTargetPath Include="Libraries\x64\acl.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x64\acl.dll</TargetPath>
		</ContentWithTargetPath>
	</ItemGroup>

	<ItemGroup>
		<ContentWithTargetPath Include="Libraries\x86\sracl.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x86\sracl.dll</TargetPath>
		</ContentWithTargetPath>
		<ContentWithTargetPath Include="Libraries\x64\sracl.dll">
			<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
			<TargetPath>x64\sracl.dll</TargetPath>
		</ContentWithTargetPath>
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
		<PackageReference Include="OpenTK" Version="4.8.0" />
		<Reference Include="OpenTK.WinForms">
			<HintPath>Libraries\OpenTK.WinForms.dll</HintPath>
		</Reference>
	</ItemGroup>

	<ItemGroup>
	  <None Update="Properties\Settings.settings">
	    <Generator>SettingsSingleFileGenerator</Generator>
	    <LastGenOutput>Settings.Designer.cs</LastGenOutput>
	  </None>
	</ItemGroup>

	<Target Name="CopyExtraFiles" AfterTargets="AfterBuild">
		<Copy SourceFiles="$(SolutionDir)AssetStudioFBXNative\bin\Win32\$(Configuration)\AssetStudioFBXNative.dll" DestinationFolder="$(TargetDir)x86" ContinueOnError="true" />
		<Copy SourceFiles="$(SolutionDir)AssetStudioFBXNative\bin\x64\$(Configuration)\AssetStudioFBXNative.dll" DestinationFolder="$(TargetDir)x64" ContinueOnError="true" />
	</Target>

	<Target Name="PublishExtraFiles" AfterTargets="Publish">
		<Copy SourceFiles="$(TargetDir)x86\AssetStudioFBXNative.dll" DestinationFolder="$(PublishDir)x86" ContinueOnError="true" />
		<Copy SourceFiles="$(TargetDir)x64\AssetStudioFBXNative.dll" DestinationFolder="$(PublishDir)x64" ContinueOnError="true" />
	</Target>
</Project>