本文介绍了如何重新编译 Flex 4 Framework RSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何重新编译 Adob​​e Flex 4 框架 RSL?

Does anyone know how to recompile Adobe Flex 4 framework RSLs?

我正在使用编译器指令 -dump-config 来获取 FlashBuilder IDE 用于编译我的应用程序的构建配置文件.然后我将该配置文件传递给 mxmlc 编译器,以便我可以从命令行进行构建.命令行构建的结果输出到 bin-debug 以外的文件夹.bin-debug 是一个本地信任路径,它将使应用程序从那里运行而不会出错.任何其他路径中的 Flash 应用程序都需要将 Flash Player 配置为信任该路径或使用 -use-network=false 指令完成编译.我更喜欢后者,因为我会将结果分发给非专业用户进行评估,而且我不想要求他们修改 Flash Player 安全设置.

I'm using the compiler directive -dump-config to get the build config file that the FlashBuilder IDE is using for compiling my application. I then pass that config file into the mxmlc compiler so I can build from the command-line. The results of the command-line build are output to a folder other than bin-debug. bin-debug is a localtrust path, and it will an application will run from there without error. A Flash application in any other path requires configuring the Flash Player to trust that path OR that the compile be done with the -use-network=false directive. I prefer latter since I'll be distributing the results to lay users for evaluation, and I don't want to request that they modify Flash Player security settings.

构建配置文件未指定使用 -use-network false 指令重新构建框架 RSL.FlashBuilder 本身甚至不编译框架 RSL.它只是将 RSL swfs 从框架目录复制到 bin-debug.这些 swf 显然是由 Adob​​e 编译的,默认设置为 -use-network=true.

The build config file doesn't specify that framework RSLs be rebuilt using the -use-network false directive. FlashBuilder itself doesn't even compile framework RSLs. It merely copies RSL swfs from the framework directory into the bin-debug. Those swfs apparently were compiled by Adobe with the default -use-network=true.

所以,我相信我需要重新编译 RSL.当然,欢迎提供有关如何解决问题的任何其他提示.

So, I believe I need to recompile the RSLs. Of course any other tips on how to solve the problem are welcome.

推荐答案

嗯,关于 Flex RSL,我学到的比我需要知道的更多,如何重新编译 Flex SDK 及其未签名的 RSL,而且重新编译不是必需的.

Well, I learned more than I need to know about Flex RSLs, how to recompile the Flex SDK along with its unsigned RSLs, and that recompiling isn't necessary.

目前,我从构建过程中删除了 flex 配置文件,并且能够只关注 RSL 问题.由于类依赖性和进程顺序,列出 -runtime-shared-library-path 的顺序很重要.此外,请务必至少将未签名的 RSL 复制到您的输出路径中.否则,您将看到以下错误:错误 #2032:流错误.网址:file:///.../cmd-bin-debug/textLayout_1.1.0.604.swf

For the moment, I eliminated the flex config file from the build process and was able to focus on just the RSL issue. The order in which -runtime-shared-library-path's are listed is important because of class dependencies and order of process. Also, be sure to copy at least the unsigned RSLs into your output path. Otherwise, you'll see the following error:Error #2032: Stream Error. URL: file:///.../cmd-bin-debug/textLayout_1.1.0.604.swf

最后,如果您确实需要使用由 FlashBuilder 转储的 flex 配置文件,您需要将其转换为 RSL 的完整路径.此外,请注意 FlashBuilder 项目设置与转储到 flex 配置中的内容之间的差异.我发现我需要告诉 FlashBuilder 多次清理项目才能让它更新配置文件.

Finally, if you do need to use the flex config file dumped by FlashBuilder you'll need to transform it to prepend full paths to the RSLs. Also, watch for discrepancies between FlashBuilder project settings and what is dumped into the flex config. I found that I needed to tell FlashBuilder to clean the project more than once to get it to update the config file.

下面列出了经过提炼的、有效的重新编译".您需要为 FLEX_HOME 和 release_build 替换或声明变量

The distilled, working "recompile" is listed below. You'll need to replace or declare variables for FLEX_HOME and release_build

mxmlc -use-network=false \
-runtime-shared-library-path=$FLEX_HOME/frameworks/libs/framework.swc,framework_$release_build.swz,,framework_$release_build.swf \
-runtime-shared-library-path+=$FLEX_HOME/frameworks/libs/textLayout.swc,textLayout_1.1.0.604.swz,,textLayout_1.1.0.604.swf \
-runtime-shared-library-path+=$FLEX_HOME/frameworks/libs/spark.swc,spark_$release_build.swz,,spark_$release_build.swf \
-debug=true $fullfile -output ../cmd-bin-debug/$filename.swf

mxmlc -use-network=false \
-runtime-shared-library-path=$FLEX_HOME/frameworks/libs/framework.swc,framework_$release_build.swz,,framework_$release_build.swf \
-runtime-shared-library-path+=$FLEX_HOME/frameworks/libs/textLayout.swc,textLayout_1.1.0.604.swz,,textLayout_1.1.0.604.swf \
-runtime-shared-library-path+=$FLEX_HOME/frameworks/libs/spark.swc,spark_$release_build.swz,,spark_$release_build.swf \
-debug=true $fullfile -output ../cmd-bin-debug/$filename.swf

哦,这是将 RSL 复制到输出路径的便捷命令:find $FLEX_HOME/frameworks/rsls ( -name '.swf' -o -name '.swz' ) -exec cp {} ../cmd-bin-debug \;

Oh, and here's a convenient command to copy the RSLs to an output path:find $FLEX_HOME/frameworks/rsls ( -name '.swf' -o -name '.swz' ) -exec cp {} ../cmd-bin-debug \;

这篇关于如何重新编译 Flex 4 Framework RSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 10:56