如何重新编译 Flex 4 Framework RSL?

发布于 2024-09-09 03:04:32 字数 559 浏览 8 评论 0原文

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

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

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

因此,我认为我需要重新编译 RSL。当然,欢迎任何有关如何解决问题的其他提示。

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

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.

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.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我爱人 2024-09-16 03:04:32

嗯,关于 Flex RSL、如何重新编译 Flex SDK 及其未签名的 RSL,我学到的知识超出了我需要了解的知识,并且不需要重新编译。

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

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

下面列出了经过提炼的工作“重新编译”。您需要替换或声明 FLEX_HOME 和 release_build 的变量

首先指定签名的 RSL,然后进行故障转移,您必须设置 -use-network=false 进行本地测试,否则播放器将抛出 Flash 安全错误

mxmlc -use-network=假\
-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 复制到输出路径的便捷命令:
找到 $FLEX_HOME/frameworks/rsls ( -name '.swf' -o -name '.swz' ) -exec cp {} ../cmd-bin-debug \;

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.

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

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.

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

Specify signed RSL first and then the fail over, you must set -use-network=false to test locally otherwise the player will throw a Flash security error

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

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 \;

风情万种。 2024-09-16 03:04:32

理论上,您应该能够从开源 Flex SDK 下载所有代码,创建 SWC 项目,添加 Flex 框架中的源代码并以这种方式进行编译。然而,使用 Adob​​e RSL 的好处是播放器可以缓存它们。您的最终用户有可能永远不会向您的服务器请求 Flex Framework RSL;已经从其他站点缓存了它们。

也就是说,我不确定我是否理解问题所在。如果您通过网络服务器向用户分发应用程序,那么这些用户可以像任何其他应用程序一样浏览该应用程序并以这种方式进行测试。 Flash Builder 使用的文件夹或自动命令行构建脚本不应与用户使用文件的能力无关。

其次,我将所有应用程序编译到名为“bin”的目录,绕过 Flex Builder 建议的默认“bin-debug”目录。我在分发应用程序供用户查看时从来没有遇到过任何麻烦。或者因此将代码分发给其他用户。

In theory, you should be able to download all the code from the open source Flex SDK, create a SWC project, add the source code from the Flex framework and compile it that way. However, the benefit of using Adobe RSL is that the player can cache them. There is a chance that your end user will never request your server for the Flex Framework RSLs; having already cached them from some other site.

That said, I'm not sure I understand what the problem is. If you're distributing an application to your users via a web server, then those users can just surf it like any other application and test it that way. The folder used by Flash Builder, or your automated command line build script should have no relation to the user's ability to use the files.

Second, I compile all my applications to a directory named "bin" bypassing the default "bin-debug" directory suggested by Flex Builder. I've never had any trouble distributing applications for users to view. Or distributing code to other users due to this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文