<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

  <assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="*"
    name="io.flashkraft.flashkraft"
    type="win32"
  />

  <description>FlashKraft — OS Image Writer</description>

  <!--
    Request Administrator elevation via UAC.

    requireAdministrator  — Windows will show the UAC consent/credential
                            dialog before the process token is created.
                            This is the same approach used by Balena Etcher
                            and every other disk-imaging tool on Windows.

    Without this the process runs as a standard user and every attempt to
    open \\.\PhysicalDriveN for writing fails with ERROR_ACCESS_DENIED (5),
    because raw physical disk access requires SeManageVolumePrivilege which
    is only present in an elevated Administrator token.
  -->
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

  <!--
    Tell Windows this application is DPI-aware so the Iced window is
    rendered crisp on high-DPI displays instead of being scaled up blurry
    by the DWM compatibility shim.
  -->
  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
        true/PM
      </dpiAware>
      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
        PerMonitorV2, PerMonitor
      </dpiAwareness>
    </windowsSettings>
  </application>

  <!--
    Declare compatibility with Windows 10 and 11.
    Without this, Windows applies legacy-mode behaviour quirks to the process
    (virtual store redirection, legacy scrollbar metrics, etc.).
  -->
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- Windows 10 / Windows Server 2016 and later -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
      <!-- Windows 8.1 / Windows Server 2012 R2 -->
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
      <!-- Windows 8 / Windows Server 2012 -->
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
    </application>
  </compatibility>

</assembly>
