﻿<?xml version="1.0" encoding="utf-8"?>
<Package 
  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
  xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
  xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
  xmlns:desktop3="http://schemas.microsoft.com/appx/manifest/desktop/windows10/3"
  xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
  xmlns:desktop5="http://schemas.microsoft.com/appx/manifest/desktop/windows10/5"
  xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
  xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
  xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
  IgnorableNamespaces="uap rescap uap10">
  <!-- CertificateCN and BuildNumber are properties that are replaced during build time-->
  <Identity Name="Microsoft.OneDriveSync" ProcessorArchitecture="neutral" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="25035.223.3.0" />
  <Properties>
    <DisplayName>OneDrive</DisplayName>
    <PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
    <Logo>AppBlue.png</Logo> <!-- Images are actually not used as Executable is headless-->
    <uap10:AllowExternalContent>true</uap10:AllowExternalContent>
    <desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
    <desktop6:FileSystemWriteVirtualization>disabled</desktop6:FileSystemWriteVirtualization>
  </Properties>
  <Resources>
    <Resource Language="en-us" />
  </Resources>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19042.0" MaxVersionTested="10.0.19044.0" />
  </Dependencies>
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <rescap:Capability Name="unvirtualizedResources"/>
  </Capabilities>
  <Applications>
  <!-- Executable is not used for context menu. Use a "stub.exe" as a placeholder so package can compile -->
  <!-- Images are actually not used either. -->
    <Application Id="OneDrive" Executable="stub.exe" uap10:TrustLevel="mediumIL" uap10:RuntimeBehavior="win32App">
      <!-- Square44x44Logo represents the App logo image in the context menu -->
      <!-- To avoid having an icon backplate, File Explorer requires a bundle of visual assets (See files in the Assets folder for more details)-->
      <!-- These images are auto generated by the Visual Studios Manifest designer https://docs.microsoft.com/en-us/windows/apps/design/style/app-icons-and-logos -->
      <!-- When images are generated, there is a corresponding Resources.pri file. -->
      <!-- For Explorer to load the app logo image, OneDrive needs to drop the images & resources.pri file to our External Location URI-->
      <!-- See https://blogs.windows.com/windowsdeveloper/2019/10/29/identity-registration-and-activation-of-non-packaged-win32-apps/ for more info-->    
      <uap:VisualElements 
        AppListEntry="none" 
        DisplayName="OneDrive" 
        Description="Microsoft OneDrive" 
        BackgroundColor="transparent" 
        Square150x150Logo="AppBlue.png" 
        Square44x44Logo="Assets\Square44x44Logo.png">
      </uap:VisualElements>
      <Extensions>
        <desktop3:Extension Category="windows.cloudFiles">
          <desktop3:CloudFiles>
            <desktop3:CustomStateHandler Clsid="389510B7-9E58-40D7-98BF-60B911CB0EA9"/> 
            <desktop3:ThumbnailProviderHandler Clsid="021E4F06-9DCC-49AD-88CF-ECC2DA314C8A"/>
            <!-- not supported by OneDrive but it is a required field -->
            <desktop3:ExtendedPropertyHandler Clsid="20000000-0000-0000-0000-000000000001"/>
            <desktop3:BannersHandler Clsid="2E7C0A19-0438-41E9-81E3-3AD3D64F55BA"/>
            <desktop4:ContentUriSource Clsid="9489FEB2-1925-4D01-B788-6D912C70F7F2"/>
            <desktop3:CloudFilesContextMenus>
              <!-- 5250E46F-BB09-D602-5891-F476DC89B700 (00) is a placeholder command to initialize the context menu. -->
              <!-- CloudFilesContextMenus only affects files/folders within the OneDrive Root directory.-->
              <!-- These CLSIDS are placeholder verbs,  BaseExplorerCommand handles the actual context menu population logic -->
              <desktop3:Verb Id="ODContextMenuCommand00" Clsid="5250E46F-BB09-D602-5891-F476DC89B700" />
              <desktop3:Verb Id="ODContextMenuCommand01" Clsid="5250E46F-BB09-D602-5891-F476DC89B701" />
              <desktop3:Verb Id="ODContextMenuCommand02" Clsid="5250E46F-BB09-D602-5891-F476DC89B702" />
              <desktop3:Verb Id="ODContextMenuCommand03" Clsid="5250E46F-BB09-D602-5891-F476DC89B703" />
              <desktop3:Verb Id="ODContextMenuCommand04" Clsid="5250E46F-BB09-D602-5891-F476DC89B704" />
              <desktop3:Verb Id="ODContextMenuCommand05" Clsid="5250E46F-BB09-D602-5891-F476DC89B705" />
              <desktop3:Verb Id="ODContextMenuCommand06" Clsid="5250E46F-BB09-D602-5891-F476DC89B706" />
              <desktop3:Verb Id="ODContextMenuCommand07" Clsid="5250E46F-BB09-D602-5891-F476DC89B707" />
              <desktop3:Verb Id="ODContextMenuCommand08" Clsid="5250E46F-BB09-D602-5891-F476DC89B708" />
              <desktop3:Verb Id="ODContextMenuCommand09" Clsid="5250E46F-BB09-D602-5891-F476DC89B709" />
              <desktop3:Verb Id="ODContextMenuCommand10" Clsid="5250E46F-BB09-D602-5891-F476DC89B710" />
              <desktop3:Verb Id="ODContextMenuCommand11" Clsid="5250E46F-BB09-D602-5891-F476DC89B711" />
              <desktop3:Verb Id="ODContextMenuCommand12" Clsid="5250E46F-BB09-D602-5891-F476DC89B712" />
              <desktop3:Verb Id="ODContextMenuCommand13" Clsid="5250E46F-BB09-D602-5891-F476DC89B713" />
              <desktop3:Verb Id="ODContextMenuCommand14" Clsid="5250E46F-BB09-D602-5891-F476DC89B714" />
            </desktop3:CloudFilesContextMenus >
            <desktop4:DesktopIconOverlayHandlers>
              <!-- ErrorOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="BBACC218-34EA-4666-9D7A-C78F2274A524"/>
              <!-- SharedOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="5AB7172C-9C11-405C-8DD5-AF20F3606282"/>
              <!-- UpToDateCloudOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="A78ED123-AB77-406B-9962-2A5D9D2F7F30"/>
              <!-- SyncingOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="A0396A93-DC06-4AEF-BEE9-95FFCCAEF20E"/>
              <!-- UpToDatePinnedOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="F241C880-6982-4CE5-8CF7-7085BA96DA5A"/>
              <!-- ReadOnlyOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="9AA2F32D-362A-42D9-9328-24A483E2CCC3"/>
              <!-- UpToDateUnpinnedOverlayHandler -->
              <desktop4:DesktopIconOverlayHandler Clsid="C5FF006E-2AE9-408C-B85B-2DFDD5449D9C"/>
              <!-- ErrorOverlayHandler Server 2012 -->
              <desktop4:DesktopIconOverlayHandler Clsid="7AFDFDDB-F914-11E4-8377-6C3BE50D980C"/>
              <!-- SyncingOverlayHandler Server 2012 -->
              <desktop4:DesktopIconOverlayHandler Clsid="82CA8DE3-01AD-4CEA-9D75-BE4C51810A9E"/>
              <!-- UpToDateOverlayHandler Server 2012 -->
              <desktop4:DesktopIconOverlayHandler Clsid="1BF42E4C-4AF4-4CFD-A1A0-CF2960B8F63E"/>
            </desktop4:DesktopIconOverlayHandlers>
          </desktop3:CloudFiles>
        </desktop3:Extension>
        <!-- FileExplorerContextMenu is an extension category that is called for all files in and out of the OneDrive root directory. -->
        <!-- This is mainly used for commands outside of the sync root like "Move to OneDrive". -->
        <desktop4:Extension Category="windows.fileExplorerContextMenus">
          <desktop4:FileExplorerContextMenus>
            <!-- Manifest file set CLSIDs based on an ItemType. These CLSIDs should cover all files or folders-->
            <!-- Type=Directory represents all folders -->
            <desktop5:ItemType Type="Directory">
              <!-- 1FA0E654-C9F2-4A1F-9800-B9A75D744B00 (00) is a placeholder command to initialize the context menu. -->
              <!-- Refer to BaseExplorerCommand.h to see which classes are placeholders -->
              <desktop5:Verb Id="Command0"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B00" />
              <desktop5:Verb Id="Command1"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B01" />
              <desktop5:Verb Id="Command2"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B02" />
              <desktop5:Verb Id="Command3"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B03" />
              <desktop5:Verb Id="Command4"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B04" />
              <desktop5:Verb Id="Command5"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B05" />
            </desktop5:ItemType>
            <!-- Type=* represents all Files with any extensions. Files with no extensions will also be covered here -->
            <desktop5:ItemType Type="*">
              <desktop5:Verb Id="Command0"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B00" />
              <desktop5:Verb Id="Command1"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B01" />
              <desktop5:Verb Id="Command2"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B02" />
              <desktop5:Verb Id="Command3"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B03" />
              <desktop5:Verb Id="Command4"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B04" />
              <desktop5:Verb Id="Command5"  Clsid="1FA0E654-C9F2-4A1F-9800-B9A75D744B05" />
            </desktop5:ItemType>
            <!-- For LNK files, Explorer will check the extension of the target. This does not work well with Vault shortcut because the target is an odopen protocol -->
            <!-- To initialize the context menu for Vault, ItemType ="*" will not work. We must explicitly add the CLSID to initialize the context menu for LNK files -->
            <!-- The rest of the context menu commands will be handled by CloudFilesContextMenus and fileExplorerContextMenus. There is no need to add other CLSIDs here-->
            <desktop5:ItemType Type=".lnk">
              <desktop5:Verb Id="Command0"  Clsid="5250E46F-BB09-D602-5891-F476DC89B700" />
            </desktop5:ItemType>
          </desktop4:FileExplorerContextMenus>
        </desktop4:Extension>
        <com:Extension Category="windows.comServer">
          <com:ComServer>
           <!-- SurrogateServer specifies that all COM calls will be an out of proc call to DLLhost.exe-->
            <com:SurrogateServer DisplayName="Context Menu Items">
              <!-- Depending on build arch, FileSyncShellPath will replaced with either FileSyncShell64.dll or FileSyncShell.dll -->
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B700" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B701" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B702" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B703" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B704" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B705" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B706" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B707" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B708" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B709" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B710" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B711" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B712" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B713" Path="FileSyncShell64.dll" ThreadingModel="STA"/> 
              <com:Class Id="5250E46F-BB09-D602-5891-F476DC89B714" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="1FA0E654-C9F2-4A1F-9800-B9A75D744B00" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="1FA0E654-C9F2-4A1F-9800-B9A75D744B01" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="1FA0E654-C9F2-4A1F-9800-B9A75D744B02" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="1FA0E654-C9F2-4A1F-9800-B9A75D744B03" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="1FA0E654-C9F2-4A1F-9800-B9A75D744B04" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
              <com:Class Id="1FA0E654-C9F2-4A1F-9800-B9A75D744B05" Path="FileSyncShell64.dll" ThreadingModel="STA"/>
            </com:SurrogateServer>
          </com:ComServer>
        </com:Extension>
      </Extensions>
    </Application>
  </Applications>
</Package>