AIR 应用程序描述符文件每个 AIR 应用程序都需要一个应用程序描述符文件。应用程序描述符文件是定义应用程序基本属性的 XML 文档。 当您创建项目时,许多支持 AIR 的开发环境会自动生成应用程序描述符。如果不能自动生成,则您必须创建自己的描述符文件。示例描述符文件 descriptor-sample.xml 位于 AIR 和 Flex SDK 的 samples 目录中。 任何文件名都可用于应用程序描述符文件。当您打包应用程序时,应用程序描述符文件被重命名为 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> |
![]() |