What is the question: I want to use compc (either the command line or ant) ββto build .swc from some actionscript and mxml code. Right now, I have a command:
FLEX_HOME="${FLEX_HOME:?'FLEX_HOME must be set'}"
PROJECT_DIR=$(unset CDPATH; cd `dirname $0`/..; pwd)
COMPC="${FLEX_HOME}/bin/compc"
"$COMPC" \
-source-path $PROJECT_DIR/src \
-include-sources $PROJECT_DIR/src \
-compiler.library-path "$FLEX_HOME/frameworks/libs" "$PROJECT_DIR/libs" "$HOME/projects/advanis/flex_libs/libs" \
-output $PROJECT_DIR/bin/myLibrary.swc
However, when I use this, the .swc catalog.xml file has, in addition to the classes in $ PROJECT_DIR / src, the .swc file has classes from the dependent libraries and from the structure itself. I know that this cannot be done, because (for example) the Cairngorm library depends on the Flash Event object, but this object is not located in the .swc file library.swfanywhere, or I'm pretty sure about that speed.
If this helps, here is my full scenario, and maybe someone can tell me why I did it wrong:
Flash Flash Builder 4 Flash Application, :
- SDK v3.4.1
- FlexUnit 4, .swc RSL:
- FlexUnit4_1.0.swc
- flexunitextended.swc
- Cairngorm 2.2.1, SWC, RSL
- mock-as3, , , ,
- hamcrest-as3, , , , ,
FlexUnit, Cairngorm, mock-as3 hamcrest-as3 RSL, .swf, , , :
VerifyError: Error
, , mock-as3, - . SWF RSL , , :
optimizer -keep-as3-metadata="Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient" \
-input library.swf \
-output $swf_file
, , : .swc , .swf , ?