Can relative paths be used when using include libraries in the Flex mxmlc compiler?

I am trying to bind all classes in .swc to my Flex project SWF file. From the docs:

http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_03.html

library of include libraries [...]

Associates all classes within a SWC file with the resulting application SWF file, whether they are used or not. Contrast this option with the library path option, which includes only those classes that are referenced at compile time. To link one or more classes regardless of whether they are used or not, and not the entire SWC file, use the includes parameter. This parameter is typically used to specify resource packages.

Unfortunately, this seems to work in my Flex Builder project when I specify the absolute path to my .swc as an argument. My .swc is located in the "lib" directory, which is added as a "SWC folder" in my Flex project configuration. Does anyone know the syntax to reference it relatively?

+3
source share
3 answers

I always use:

mxmlc [...] -library-path + = lib / whatever / default / [...]

+2
source

If you are talking only about compilation time, this information is in the .actionScriptProperties file in the project directory.

The entries are as follows:

<libraryPath defaultLinkType="1">
  <libraryPathEntry kind="3" linkType="1" path="/OtherProjectInTheSameWorkspace/bin/LibName.swc" useDefaultLinkType="false"/>
  <libraryPathEntry kind="1" linkType="1" path="lib"/>
</libraryPath>

Note that the second libraryPathEntry is the relative path to the lib / directory in the current project.

SWC , .

0

flex config.xml src.

If your mxml file is named project.mxml , then the configuration file should be project-config.xml

This is the default name that will attempt to load both the built-in FlexBuilder compiler and the mxmlc command-line compiler.

Here is an example configuration file with only the specific entry you are asking about. However, all that you can add to the command line, which you can specify in the config.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<flex-config>
<compiler append="true">
        <include-libraries append="true">
            <library>libs/myLibrary.swc</library>
        </include-libraries>    
</compiler>
</flex-config>
0
source

Source: https://habr.com/ru/post/1708365/


All Articles