embed + compiler define works different with air 3.7+ comparing to 3.5
Hello.
I've noticed that new compiler works differently when using construct Embed with conditional compilation (comoiler define option).
It looks like new compiler always embeds files in output swf even if Embed construct is used in dead code. Here is full example:
package {
import flash.display.MovieClip;
public class Main extends MovieClip {
CONFIG::FOO {
[Embed(source="foo.mp3")]
public static var MusicTrack: Class;
}
CONFIG::BAR {
[Embed(source="bar.mp3")]
public static var MusicTrack: Class;
}
}
}
I have 2 files: foo.mp3 (~2MB) and bar.mp3 (~2.3MB). I want to embed only one of them defining CONFIG::FOO as true and CONFIG::BAR as false.
When I compile it using AIR 3.5 with following command I get (as expected) file with size ~2.0MB:
/opt/adobe_sdks/flex_sdk_4.6_AIR_3.5/bin/mxmlc -compiler.source-path . -swf-version 14 -define=CONFIG::FOO,true -define=CONFIG::BAR,false -o Main.swf -- Main.as
(...)
/private/tmp/bug/Main.swf (2030814 bytes)
But when I use newer AIR sdk (I tried with 3.7, 3.8 and 4.0 beta) I'm getting file with size ~4.3MB.
/opt/adobe_sdks/AIR_4.0/bin/mxmlc -compiler.source-path . -swf-version 14 -define=CONFIG::FOO,true -define=CONFIG::BAR,false -o Main.swf -- Main.as
(...)
4328386 bytes written to /private/tmp/bug/Main.swf in 9,634 seconds
Is it expected behaviour? Is there any chance that new compiler will work in this case the same as older one?
