如何使用ADT打包AIR应用程序?
我刚刚下载了 AIR SDK,我只是不知道如何继续。互联网上的一些网站告诉我执行
adt -package SIGNING_OPTIONS air_file app_xml [file_or_dir | -C dir 文件或目录 | -e file dir ...] ...
命令行,但我只是不知道该怎么做。
该应用程序已经开发完毕并可以使用,但我无法打包它。 (我使用的是 Flash CS5,它的打包程序无法使用,因为它无法发布“扩展桌面”应用程序)
I just downloaded the AIR SDK, I just don't know how to proceed. Some sites on the internet tells me to execute the
adt -package SIGNING_OPTIONS air_file app_xml [file_or_dir | -C dir file_or_dir | -e file dir ...] ...
command line, but I just don't know how to do it.
The application is already developed and ready to use, but I can't package it.
(I'm using Flash CS5 and it's packager can't be used because it can't publish "Extended Desktop" apps)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
刚刚遇到了同样的问题。特别是当尝试在 Mac 上编译“扩展桌面”应用程序时。诀窍是添加“-target native”并将输出更改为 myApp.dmg
因此,根据 TheDarkIn1978 答案,代码如下所示。
[删除的 ADT 文件路径] –package -storetype pkcs12 -keystore [删除的 cert.p12 文件路径] -target native myApp.dmg [删除的 myApp-app.xml 文件路径] [已删除 myApp.swf 文件路径] [已删除 myIcon.png 文件路径]
[删除的 ADT 文件路径] –package -storetype pkcs12 -keystore [删除的 cert.p12 文件路径] -target native myApp.dmg [删除的 myApp-app.xml 文件路径] [删除的 myApp.swf 文件路径] [删除的 myIcon.png文件路径]
作为参考,我之前收到的错误是“错误 306:描述符必须支持以下配置文件之一:桌面、移动设备、扩展移动设备、电视”
另外如果您收到“错误 302:包中缺少根内容 myApp.swf”,这是因为您尚未将路径放入 swf,或者您没有从应用程序文件夹中运行命令(奇怪)。
希望这有帮助。
Just had the same problem. Specifically when trying to compile an "Extended Desktop" app on Mac. The trick was to add "-target native" and change your output to myApp.dmg
So based on TheDarkIn1978 answer the code would look like.
[dropped ADT file path] –package -storetype pkcs12 -keystore [dropped cert.p12 file path] -target native myApp.dmg [dropped myApp-app.xml file path] [dropped myApp.swf file path] [dropped myIcon.png file path]
[dropped ADT file path] –package -storetype pkcs12 -keystore [dropped cert.p12 file path] -target native myApp.dmg [dropped myApp-app.xml file path] [dropped myApp.swf file path] [dropped myIcon.png file path]
For reference the error I was receiving before was "error 306: Descriptor must support one of the following profiles: desktop, mobileDevice, extendedMobileDevice, tv"
Also if you get an "error 302: Root content myApp.swf is missing from package" it's because you haven't dropped the path in to your swf, or your not running the command from within in your application folder (weird).
Hope this helps.
这是ADT 命令的当前站点。请点击链接前往ADT 包命令小节。
如果您要打包 AIR 2.7,则需要更改 myApp-app.xml 文件以反映 SDK 版本:
打包 AIR 应用程序非常简单 - 不要让命令行吓到您。
如果您使用的是 Mac,则可以将文件拖放到终端中,而不必写出其完整路径。首先放入命令行 AIR SDK >仓> adt,后跟:
现在在同一行上,拖入您的 cert.p12 文件,然后是您想要命名的 Air 包,即“myApp.air”,然后是您的应用程序描述符 .xml 文件,您的 . swf 文件以及与包相关的任何其他文件(例如应用程序图标)。确保每个命令行参数之间有一个空格。
完整的命令将如下所示:
然后按回车键,输入 cert.p12 文件的密码,ADT 将根据终端的当前目录打包您的 AIR 应用程序,或者您也可以为 myApp 提供路径。空气参数,它将被写在那里,IE:
/Users/me/Desktop/myApp.air
this is the current site for ADT commands. follow the link to the subsection on ADT package commands.
if you are packaging for AIR 2.7, you will need to change the myApp-app.xml file to reflect the SDK version:
packaging AIR apps is super easy - don't let the command line frighten you.
if you're on a Mac you can drag and drop files into Terminal instead of having to write out their complete path. start by dropping onto the command line AIR SDK > bin > adt, followed by:
now on the same line, drag in your cert.p12 file, followed by what you want to name your air package, IE "myApp.air", followed by your application discriptor .xml file, your .swf file and any other files related to the package (such as your application icon). make sure there is a space between each command line argument.
the complete command will look something like this:
then hit return, enter the password for your cert.p12 file, and ADT will package your AIR application according to the current director of Terminal, or you can also supply a path for your myApp.air argument and it will be written there, IE:
/Users/me/Desktop/myApp.air