AIR 應用程式描述器檔案每個 AIR 應用程式都需要應用程式描述器檔案。應用程式描述器檔案是一種 XML 文件,可以用來定義應用程式的基本屬性。 在您建立專案時,許多支援 AIR 的開發環境會自動產生應用程式描述器。若無產生,您必須建立自行建立描述器檔案。AIR 和 Flex SDK 的 samples 目錄中提供一個樣本描述器檔案 descriptor-sample.xml。 您可以使用任何檔名做為應用程式描述器檔案的名稱。當您封裝應用程式時,應用程式描述器檔案會更名為 application.xml,並放置在 AIR 套件內部的特定目錄中。 範例應用程式描述器下列的應用程式描述器文件會設定大部分 AIR 應用程式所使用的基本屬性: <?xml version="1.0" encoding="utf-8" ?> <application xmlns="http://ns.adobe.com/air/application/2.6"> <id>example.HelloWorld</id> <versionNumber>1.0.1</versionNumber> <filename>Hello World</filename> <name>Example Co. AIR Hello World</name> <description> <text xml:lang="en">This is an example.</text> <text xml:lang="fr">C'est un exemple.</text> <text xml:lang="es">Esto es un ejemplo.</text> </description> <copyright>Copyright (c) 2010 Example Co.</copyright> <initialWindow> <title>Hello World</title> <content> HelloWorld.swf </content> </initialWindow> <icon> <image16x16>icons/smallIcon.png</image16x16> <image32x32>icons/mediumIcon.png</image32x32> <image48x48>icons/bigIcon.png</image48x48> <image128x128>icons/biggerIcon.png</image128x128> </icon> </application> 如果應用程式使用 HTML 檔案 (而不是 SWF 檔) 當做本身的根內容時,則只有 <content> 元素會有所不同。 <content> HelloWorld.html </content> |
![]() |