Flash Builder如何确定要包含哪些sdk库? [英] How does Flash Builder determine which sdk libraries to include?

查看:150
本文介绍了Flash Builder如何确定要包含哪些sdk库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Flash Builder中创建新项目时,如何确定将哪个sdk库包含在构建路径中?



如果我创建一个新的普通 Actionscript 项目并选择Flex 4.1 ,以下库会显示在构建路径中:

  • textLayout

  • osmf

  • flash-integration

  • 公用事业



  • 如果我回去切换到Flex 3.5 它只包括:


    • playerglobal

    • flex

    • utility



    如果我制作一个新的 Flex Web 项目并选择Flex 3.5 它包括:


  • playerglobal

  • 框架

  • 自动化

  • automation_agent

  • automation_dmv

  • automation_flashflexkit / li>
  • qtp

  • rpc

  • 工具



  • 这些值在Flash Builder中硬编码,还是以某种方式从SDK配置文件读取它们?我查看了所有的XML配置文件,如flex-config.xml和air-config.xml,看起来这个信息不存在于任何地方。



    谢谢。 / b>

    解决方案

    经过大量的反复试验和一些反编译器检查,我得到了答案:


    1. Flash Builder从sdk框架目录加载flex-config.xml或air-config.xml文件(取决于项目类型)。

    2. 它通过 library-path library-external-path 中列出的每个条目将其添加到类路径,如果它是一个SWC。如果条目是一个目录,它会扫描SWCs的目录并包含它们。
    3. 每个项目类型都有一个硬编码的排除列表,告诉Flash Builder哪些SWC离开类路径。对于一个简单的动作项目这个列表有17个项目。对于Flex Web项目,列表仅包含 flex.swc 。这个排除列表被写入到 .actionScriptProperties 文件中。

    4. 所有剩余的(未排除的)SWC会自动添加到类路径中。在 .actionScriptProperties 文件中不需要输入。 (也就是说,您可以在.swc扩展名中引入任何具有.swc扩展名的文件,Flash Builder将包含它。)


    When creating a new project in Flash Builder, how does it determine which sdk libraries to include in the build path?

    If I create a new plain Actionscript project and select Flex 4.1 the following libraries show up in the build path:

    • playerglobal
    • textLayout
    • osmf
    • flash-integration
    • flex
    • utilities

    If I go back and switch to Flex 3.5 it only includes:

    • playerglobal
    • flex
    • utilities

    If I make a new Flex Web project and select Flex 3.5 it includes:

    • playerglobal
    • framework
    • automation
    • automation_agent
    • automation_dmv
    • automation_flashflexkit
    • datavisualization
    • qtp
    • rpc
    • utilities

    Are these values hardcoded in Flash Builder or is it somehow reading them from the SDK config files? I looked through all the xml config files like flex-config.xml and air-config.xml and it doesn't look like this information exists anywhere.

    Thanks.

    解决方案

    After a lot of trial and error and some inspection with a decompiler I have the answer:

    1. Flash Builder loads either the flex-config.xml or air-config.xml file (depending on the project type) from the sdk frameworks directory.
    2. It goes through each entry listed in library-path and library-external-path adds it to the classpath if it is a SWC. If the entry is a directory it scans that directory for SWCs and includes them.
    3. Each project type has a hardcoded list of exclusions which tell Flash Builder which SWCs to leave out of the classpath. For a plain actionscript project this list has 17 items. For a Flex Web project the list consists only of flex.swc. This list of exclusions is written to the .actionScriptProperties file.
    4. Any remaining (not excluded) SWCs are automatically added to the classpath. No entry is necessary in the .actionScriptProperties file. (i.e. You can throw any file with a .swc extension in the frameworks/libs directory and Flash Builder will include it.)

    这篇关于Flash Builder如何确定要包含哪些sdk库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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