如何在 mxmlc 编译器参数中指定链接的资源文件夹?

发布于 2024-12-10 05:12:01 字数 781 浏览 3 评论 0原文

我有一个包含资源(图形、电影等)的外部文件夹,它在几个项目之间共享。我可以在 FlashBuilder 中链接此资源文件夹(如 http://livedocs.adobe.com/flex/3/html/help.html?content=projects_5.html#155069)。之后,所有嵌入路径都与项目相关,这就是我想要的行为。

此链接资源出现在 .project 文件中,如下所示:

<linkedResources>
    <link>
        <name>resources</name>
        <type>2</type>
        <locationURI>DOCUMENTS/Shared/resources</locationURI>
    </link>
</linkedResources>

请注意,它不是源文件夹,也不包含在 compilerSourcePath 标记中。

问题是如何在 mxmlc 命令行参数中指定资源链接文件夹?

-source-path 在这里不起作用,无法解析嵌入的相对路径。

I've got external folder with resources (graphics, movies, etc) which is shared between a couple of projects. I'm able to link this resource folder in FlashBuilder (as described in http://livedocs.adobe.com/flex/3/html/help.html?content=projects_5.html#155069). After that all the pathes to embeds are relative to the project, and that's the behaviour I want.

This linked resource appears in .project file as follows:

<linkedResources>
    <link>
        <name>resources</name>
        <type>2</type>
        <locationURI>DOCUMENTS/Shared/resources</locationURI>
    </link>
</linkedResources>

Note, that it isn't source folder and it is not included in compilerSourcePath tag.

The question is how can I specify resource linked folder in mxmlc command line arguments?

-source-path is not working here, relative pathes to embeds can not be resolved.

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

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

发布评论

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

评论(1

花开雨落又逢春i 2024-12-17 05:12:01

似乎这是不可能的,而且没有这样的选择。 FlashBuilder 以某种方式将所有解决方法传递给 mxmlc java 包装器,因此它知道在哪里搜索资源。

在我的项目中,我使用了另一种方法来实现资源的正确共享:

  1. 自动构建步骤,它将图像复制并将fla文件从源目录提取到每个项目中的资源文件夹中。
  2. 我移动到共享源文件夹的所有 css 文件(例如 Common/css/main.css) - 它们都在源代码管理之下。我通过 -source-path 选项添加了指向它的链接。
  3. 之后,CSS 中的所有相对路径在两个项目中都开始看起来像 ../../resources/image.png

也许有人会发现我的经验很有帮助。

Seems like it's not possible and there's no such option. FlashBuilder somehow passes all the workaround to mxmlc java wrapper, therefore it knows where to search resources.

In my project I used another method to achieve proper sharing of resources:

  1. Autobuild step, which copies images and extractes fla files to resource folder in each project form the source directory.
  2. All css files I moved to shared source folder (e.g. Common/css/main.css) - they are under source control. I added link to it via -source-path option.
  3. After that all relative pathes in css started to look like ../../resources/image.png in both projects.

Maybe someone will find my experience helpful.

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