Share via


如何建立 Windows 8 的基本套件資訊清單

注意如 Windows 10,請參閱Windows 10 的不同之處。

 

若要封裝您的應用程式,您必須建立套件資訊清單,其中包含封裝資訊清單架構所需的元素。

或者,您可以使用 Visual Studio 封裝您的應用程式。 請參閱使用 Visual Studio 封裝您的應用程式

指示

步驟1:建立 package.appxmanifest 檔案

使用文字編輯器,建立包含 XML) 的檔案 (,並將它命名為 package.appxmanifest。

步驟 2:新增基本範本

將此範本新增至 package.appxmanifest 檔案。

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
  <Identity Name="" 
            Version="" 
            Publisher="" />
  <Properties>
    <DisplayName></DisplayName>
    <PublisherDisplayName></PublisherDisplayName>
    <Logo></Logo>
  </Properties>
  <Prerequisites>
    <OSMinVersion></OSMinVersion>
    <OSMaxVersionTested></OSMaxVersionTested>
  </Prerequisites>
  <Resources>
    <Resource Language="" />
  </Resources>
  <Applications>
    <Application Id="" StartPage="">
      <VisualElements DisplayName="" Description=""
           Logo="" SmallLogo=""  
           ForegroundText="" BackgroundColor="">
         <SplashScreen Image="" />
      </VisualElements>
    </Application>
  </Applications>
</Package>

接下來的步驟會示範如何填入完成範本所需的元素和屬性。

步驟3:新增身分識別資訊

Identity元素有3個必要的屬性。 以下是一個屬性以預留位置文字填上的 Identity 元素範例。 Name屬性的值和Publisher屬性 (下列範例中CNOLSC) 的值,是由上傳至存放區之應用程式的存放區所提供。

<Identity Name="MyCompany.MySuite.MyApp" 
          Version="1.0.0.0" 
          Publisher="CN=MyCompany, O=MyCompany, L=MyCity, S=MyState, C=MyCountry"/>

步驟4:加入封裝屬性

Properties元素有3個必要的子項目。 以下是以預留位置文字填上元素的 Properties 節點範例。 DisplayName 是您將應用程式上傳至Microsoft Store之後,在Microsoft Store中保留的您應用程式的名稱。

<Properties>
  <DisplayName>MyApp</DisplayName>
  <PublisherDisplayName>MyCompany</PublisherDisplayName>
  <Logo>images\icon.png</Logo>
</Properties>

步驟5:加入必要條件

以下是範例 必要條件 節點。

<Prerequisites>
  <OSMinVersion>6.2.1</OSMinVersion>
  <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>

步驟6:新增資源

以下是 資源 節點範例。

<Resources>
  <Resource Language="en-us" />
</Resources>

步驟7:新增選擇性資訊

您可以使用 應用程式 元素來指定封裝的一或多個應用程式。 請注意,雖然每個套件都可包含一或多個應用程式,但包含多個應用程式的套件不會通過 Microsoft Store 的認證處理常式。

應用程式的專案必須指定 v s 專案和 SplashScreen 元素的某些屬性。 這個專案也可以指定 DefaultTile 元素。 以下是包含預留位置文字的範例 應用程式 節點。

<Applications>
  <Application Id="MyApp" StartPage="default.html">
    <VisualElements DisplayName="My App" Description="A useful description." 
         Logo="images\icon.png" SmallLogo="images\small_icon.png" 
         ForegroundText="dark" BackgroundColor="#FFFFFF" >
      <SplashScreen Image="images\splash.png" />
    </VisualElements>
  </Application>
</Applications>

如何手動建立基本套件資訊清單