How to use a relative path for a swc library in Fl

2019-07-25 13:23发布

问题:

I'm using Flash Builder 4.6 and in one of my ActionScript projects, I have a referenced .swc library file.

The way I added it was Project > Properties > Flex Library Build Path > Library Path tab > Add SWC...

Here a popup occurs and I must select a .swc file by browsing through my machine and selecting one. Once I do that, it'll display the added library like this:

somelibrary.swc - /Full/Path/to/the/swc/here/lib/somelibrary.swc

What I want to be able to do is use a relative path instead, like:

somelibrary.swc - ../../lib/somelibrary.swc

Does anyone know a way to do this or a workaround to be able to use relative paths for swc libraries in Flash Builder?

Thanks!

回答1:

I would suggest to dump mxmlc compilator's settings to xml file (where you can add all required swcs and its paths by hands using your favorite text editor).

  1. Add compilator option -dump-config=build.xml
  2. Find this xml config, modify it for your needs
  3. Replace -dump-config=build.xml with -load-config=build.xml



回答2:

Add compilator option:

-library-path=../../lib/somelibrary.swc