如何向 adobe air 安装程序添加其他文件?
我创建了一个 AIR 应用程序,但它使用外部 SWF 来实现额外功能。 我希望该 SWF 包含在安装中,但目前并未包含在内。 无论如何,我可以使用 FlexBuilder 或任何其他工具来在安装程序中包含这个额外的文件吗? 我尝试手动添加文件(因为 .air 文件只是伪装的 zip 文件),但文件内部必须进行哈希检查。
I've created an AIR application, but it uses an external SWF for extra functionality. I want that SWF to be included in the install, but currently it's not. Is there anyway I can get FlexBuilder or any other tool to include this extra file in the installer? I've tried manually adding the file (as a .air file is just a zip file in disguise), but there must be hash checks inside the file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您将 SWF 文件放置在应用程序的 src 目录中,您将可以选择将其包含在安装程序中(之前我尝试将其放置在应用程序的根文件夹中)。
If you place the SWF file in your application's src directory it will give you the option to include in the installer (previously I tried putting it in the application's root folder).
如果您使用 Flash,请转至“文件”>“Adobe AIR 2.0 设置”。 对话框的底部是包含文件的列表。 将您的 SWF 添加到该列表中。
If you are working in Flash, go to File>Adobe AIR 2.0 Settings. At the bottom of the dialgoue box is a list of included files. Add your SWF to that list.
如果您想使用 Flex Builder 将文本文件添加到安装程序中该怎么办? 我尝试使用导出发布构建向导添加它,但我没有看到应用程序目录中生成的文本文件...有什么想法吗?
What if you wanted to add a text file instead to the installer using Flex Builder? I tried to add it using the export release build wizard, but I don't see the text file generated in the application directory...any ideas?
我会在项目 -> 下添加一个自定义构建器 属性-> 我在我的一个项目中使用类似以下内容的内容
,我想将一些 mxml 打包为文件,以便编译器不会尝试在导出时编译它们。 将下面的 xml 保存为类似于 copy_files.xml 的文件,并将新的 Ant Builder 添加到您的项目中。 在构建器的目标选项卡下,我将我的设置设置为在每次清理时运行复制文件目标。
I would add a custom builder, under project -> properties -> builders
I use something like the following for one of my projects that I want to package some mxml and as files with so that the compiler doesn't try to compile them on export. Save the xml below as something like copy_files.xml and add a new Ant Builder to your project. Under the targets tab of the builder I have mine set to run the copy-files target on every clean.