如何使用 FDT 5.5 构建模块化 AIR 应用程序 [英] How To Build A Modular AIR Application With FDT 5.5

查看:24
本文介绍了如何使用 FDT 5.5 构建模块化 AIR 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在 FDT 不再支持来自 AIR 项目的 fdt.launch.Application,您如何为 AIR 应用程序构建模块?您不能只创建多个 AIR 启动配置,因为几乎所有属性都在项目属性中设置,而不是在启动配置中设置.我真的必须为每个模块创建一个新项目吗?当您使用一个项目和一个 Ant 脚本时,一个应用程序有 20 个项目似乎非常混乱.

Now that FDT no longer supports fdt.launch.Application from AIR projects, how do you go about building modules for an AIR application? You can't just create multiple AIR launch configs because almost all the properties are set in the project properties rather than the launch config. Do I really have to create a new project for each module? Having 20 projects for one application seems awfully messy when you used be able to use one project and one Ant script.

这是我可能会使用的示例 build.xml 文件的链接:build.xml

Here's a link to a sample build.xml file I might use: build.xml

推荐答案

在 FDT 5.5 中,您不能仅使用 FDT 的 ANT 任务或启动器来使用您提到的工作流.FDT 团队正在寻求进行调整,以便能够做到.

With FDT 5.5, you cannot use the workflow you mentioned by only using FDT's ANT tasks or launchers. The FDT team is looking to make adjustments so that it can.

在下一个(很快)次要版本之前,您有三个选择:

Until the next (soon) minor release, you have three options:

  1. 为每个模块创建一个新的 AIR 项目并使用 Launcher Chain.在其他两个 stackoverflow 问题中描述了这种技术(以及为什么会这样),此处此处.
  2. 创建另一个不是 AIR 项目的项目,并使用它来容纳您的模块.
  3. 创建自定义项目类型

每个模块的AIR项目

为每个模块创建一个项目并不像看起来那么不寻常.这实际上是 Java 世界中建议的工作流程,许多大型团队都以这种方式工作.他们通常有一个包含 10-50 个模块的项目,每个模块有 1-2 名开发人员.对于单人商店的小型团队来说,这可能没有意义.

AIR project for each module

Creating a project for each module is not as unusual as it may it seem. It's actually the suggested workflow in the Java world and many large teams work this way. They will often have a project with 10-50 modules and have 1-2 developers working on each module. For small teams one-man shops, this might not make sense.

您或许能够创建另一个不是 AIR 项目的项目并使用它来编译您的模块.如果您不使用 AIR API,这很容易;但是,如果是,请尝试调整您的 SDK 设置

You might be able to create another project that isn't an AIR project and use that to compile your modules. If you are not using AIR APIs, this is easy; however, if you are, try to adjust your SDK settings

这是一个小技巧,不推荐用于一般用途;但是,它将解决您的问题.您可以使用被黑"的自定义项目类型来使用 AIR SDK &API 但像 Web 项目一样启动.要使用它,请将其放在您的 FDT 项目类型文件夹中:

This is a bit of a hack and not recommended for general use; however, it will solve your issue. You can use a custom project type that is 'hacked' to use the AIR SDK & API but launch like a web project. To use this, put it in your FDT Project Types folder:

对于 OSX,将其放在:/Users/[您的用户名]/Library/Application\ Support/FDT/projectTypes

For OSX, place it in: /Users/[your user name]/Library/Application\ Support/FDT/projectTypes

...然后重新启动 FDT.接下来创建一个简单的 Web 项目,然后右键单击>Flash 项目>设置项目类型并选择这个新项目类型.我叫我的空气模块"

...then restart FDT. Next create a simple web project than right click >Flash Project>Set Project Type and choose this new project type. I called mine 'Air Module'

这里有一个示例项目类型供下载:

这篇关于如何使用 FDT 5.5 构建模块化 AIR 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆