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

    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <!--<RuntimeIdentifier>cosmos</RuntimeIdentifier>-->
        <Platform>cosmos</Platform>
        <SupportsX86Intrinsics>false</SupportsX86Intrinsics>
        <SelfContained>True</SelfContained>
        <Platforms>AnyCPU;x64;ARM64</Platforms>
        <Configurations>Debug;Release;Fixed_Release</Configurations>
    </PropertyGroup>

    <PropertyGroup>
        <EnableGDB>False</EnableGDB>
        <StartCosmosGDB>False</StartCosmosGDB>
        <VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort>
        <CosmosDebugPort>Serial: COM1</CosmosDebugPort>
        <Launch>VMware</Launch>
        <Profile>VMware</Profile>
        <Description>Use VMware Player or Workstation to deploy and debug.</Description>
        <PxeInterface>192.168.0.8</PxeInterface>
        <CompressionType>Gzip</CompressionType>
        <BinFormat>Bin</BinFormat>
        <DebugEnabled>False</DebugEnabled>
        <CompileVBEMultiboot>False</CompileVBEMultiboot>
        <RemoveBootDebugOutput>True</RemoveBootDebugOutput>
		<CosmosDisableDebugger>true</CosmosDisableDebugger>
		<CosmosDebugLevel>None</CosmosDebugLevel>
		<OptimizationLevel>2</OptimizationLevel>
		<VBEResolution>800x600x32</VBEResolution>
		<RunPostBuildEvent>Always</RunPostBuildEvent>
		<Timeout>0</Timeout>
		<UseUEFI>False</UseUEFI>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
      <WarningLevel>8</WarningLevel>
      <NoWarn>1603,1701;1702,8632</NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
      <WarningLevel>8</WarningLevel>
      <NoWarn>1603,1701;1702,8632</NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
      <WarningLevel>8</WarningLevel>
      <NoWarn>1603,1701;1702,8632</NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
      <WarningLevel>8</WarningLevel>
      <NoWarn>1603,1701;1702,8632</NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fixed_Release|AnyCPU'">
      <WarningLevel>8</WarningLevel>
      <NoWarn>1603,1701;1702,8632</NoWarn>
    </PropertyGroup>

    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Fixed_Release|x64'">
      <WarningLevel>8</WarningLevel>
      <NoWarn>1603,1701;1702,8632</NoWarn>
    </PropertyGroup>

    <ItemGroup>
      <None Remove="font.psf" />
      <None Remove="Solarize.12x29.psf" />
    </ItemGroup>

    <ItemGroup>
        <EmbeddedResource Include="font.psf" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Calculator.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Calendar.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Clock.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\CodeStudio.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Default.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\DemoLauncher.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Demos\Mandelbrot.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Demos\Starfield.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Files.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Info.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Logs.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\MemoryStatistics.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Notepad.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Paint.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Settings.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Stopwatch.bmp" />
      <EmbeddedResource Include="Gui\Resources\AppIcons\Tasks.bmp" />
      <EmbeddedResource Include="Gui\Resources\ButtonBackground.bmp" />
      <EmbeddedResource Include="Gui\Resources\Calculator\Display.bmp" />
      <EmbeddedResource Include="Gui\Resources\Calculator\GridButton.bmp" />
      <EmbeddedResource Include="Gui\Resources\Check.bmp" />
      <EmbeddedResource Include="Gui\Resources\Clock\ClockBackground.bmp" />
      <EmbeddedResource Include="Gui\Resources\Close.bmp" />
      <EmbeddedResource Include="Gui\Resources\CodeStudio\Run.bmp" />
      <EmbeddedResource Include="Gui\Resources\CodeStudio\Splash.bmp" />
      <EmbeddedResource Include="Gui\Resources\Cursor.bmp" />
      <EmbeddedResource Include="Gui\Resources\Dock\StartMenu.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\Directory.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\Drive.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\File.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\File_Config.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\File_Rs.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\File_Text.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\Home.bmp" />
      <EmbeddedResource Include="Gui\Resources\Files\Up.bmp" />
      <EmbeddedResource Include="Gui\Resources\Lock\Background.bmp" />
      <EmbeddedResource Include="Gui\Resources\Lock\Gradient.bmp" />
      <EmbeddedResource Include="Gui\Resources\Lock\Key.bmp" />
      <EmbeddedResource Include="Gui\Resources\Lock\ShutDown.bmp" />
      <EmbeddedResource Include="Gui\Resources\Lock\User.bmp" />
      <EmbeddedResource Include="Gui\Resources\Lock\UserArrow.bmp" />
      <EmbeddedResource Include="Gui\Resources\Logs\Error.bmp" />
      <EmbeddedResource Include="Gui\Resources\Logs\Info.bmp" />
      <EmbeddedResource Include="Gui\Resources\Logs\Warning.bmp" />
      <EmbeddedResource Include="Gui\Resources\Maximise.bmp" />
      <EmbeddedResource Include="Gui\Resources\Minimise.bmp" />
      <EmbeddedResource Include="Gui\Resources\Restore.bmp" />
      <EmbeddedResource Include="Gui\Resources\ScrollbarDown.bmp" />
      <EmbeddedResource Include="Gui\Resources\ScrollbarUp.bmp" />
      <EmbeddedResource Include="Gui\Resources\Settings\Admin.bmp" />
      <EmbeddedResource Include="Gui\Resources\Settings\Info.bmp" />
      <EmbeddedResource Include="Gui\Resources\Settings\User.bmp" />
      <EmbeddedResource Include="Gui\Resources\Sounds\Alert.wav" />
      <EmbeddedResource Include="Gui\Resources\Sounds\Login.wav" />
      <EmbeddedResource Include="Gui\Resources\Start.bmp" />
      <EmbeddedResource Include="Gui\Resources\StartMenu\User.bmp" />
      <EmbeddedResource Include="Gui\Resources\SwitchKnob.bmp" />
      <EmbeddedResource Include="Gui\Resources\SwitchOff.bmp" />
      <EmbeddedResource Include="Gui\Resources\SwitchOn.bmp" />
      <EmbeddedResource Include="Gui\Resources\TitlebarBackground.bmp" />
      <EmbeddedResource Include="Gui\Resources\WaitCursor.bmp" />
      <EmbeddedResource Include="Gui\Resources\Wallpaper_1280_800.bmp" />
        <EmbeddedResource Include="GitCommit.txt" />
        <EmbeddedResource Include="BuildTime.txt" />
        <EmbeddedResource Include="LuaApps\*.lua" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Cosmos.Build" Version="0.1.0-localbuild20260201071808" NoWarn="NU1604">
          <PrivateAssets>all</PrivateAssets>
          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Cosmos.Common" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="Cosmos.Core" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="Cosmos.Debug.Kernel" Version="0.1.0-localbuild20260201071815" NoWarn="NU1604" />
        <PackageReference Include="Cosmos.Debug.Kernel.Plugs.Asm" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="Cosmos.HAL2" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="Cosmos.Plugs" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="Cosmos.System2" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="Cosmos.System2_Plugs" Version="0.1.0-localbuild20260201071815" />
        <PackageReference Include="CosmosFtpServer" Version="1.0.9" />
        <PackageReference Include="CosmosHttp" Version="1.0.4" />
        <PackageReference Include="IL2CPU.API" Version="0.1.0-localbuild20260225062300" />
    </ItemGroup>

    <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
      <Exec Command="powershell -ExecutionPolicy Bypass -File GenerateGitCommit.ps1" WorkingDirectory="$(MSBuildProjectDirectory)" />
      <Exec Command="powershell -ExecutionPolicy Bypass -File BuildTime.ps1" WorkingDirectory="$(MSBuildProjectDirectory)" />
    </Target>

</Project>
