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.
Th开发者_Go百科e 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.
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:
- Autobuild step, which copies images and extractes fla files to resource folder in each project form the source directory.
- 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. - After that all relative pathes in css started to look like
../../resources/image.png
in both projects.
Maybe someone will find my experience helpful.
精彩评论