| Author |
Message |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 SWC externals still included
Heya,
Using v4.0.4 w/ AIR3.3, compiling for mobile.
I have a few SWC files that I have "Add to Library", and under options, I've selected "External Library (not included)". After compiling, I notice the .SWF explorer in the Project window (clicking the [+]) I can see the classes have been included in the SWF regardless.
I'm attempting to link the .ANE files during the AIR compilation phase but the dual references are making my app crash.
Any idea what's going on? How do I go about making sure the SWC files aren't included?
|
| Wed Jun 20, 2012 8:29 pm |
|
 |
|
Philippe
Admin
Joined: Wed Aug 31, 2005 7:27 am Posts: 10749 Location: Paris, France
|
 Re: SWC externals still included
I just did a quick check here (Flex SDK 4.6) and the SWC's classes are correctly excluded.
If you open /obj/ProjectNameConfig.xml, do you see the SWC inside a <external-library-path> tag?
|
| Thu Jun 21, 2012 10:11 am |
|
 |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 Re: SWC externals still included
Yep, the XML says:
<external-library-path append="true">
and lists my three SWC libraries in there. They aren't mentioned elsewhere...
"Static-link-runtime-shared-libraries" is also enabled? Wild guesses now...
|
| Thu Jun 21, 2012 5:01 pm |
|
 |
|
jtate5
Member
Joined: Thu Nov 03, 2011 1:55 pm Posts: 6
|
 Re: SWC externals still included
I'm having the exact same issue. Any luck?
|
| Sun Jul 01, 2012 3:08 am |
|
 |
|
Philippe
Admin
Joined: Wed Aug 31, 2005 7:27 am Posts: 10749 Location: Paris, France
|
 Re: SWC externals still included
I can't reproduce it with Flex 4.6 SDK - what is your SDK version?
Static linking has been enabled for a while so it shouldn't be that.
|
| Sun Jul 01, 2012 7:31 am |
|
 |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 Re: SWC externals still included
I'm personally using whatever ships with FlashDevelop, I have a fresh install computer here.
edit: which appears to be Flex 4.6, according to the readme in flashdevelop/tools/flexsdk
|
| Sun Jul 01, 2012 8:32 am |
|
 |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 Re: SWC externals still included
OK, FWIW I tried to put together a quick test - started from my main app, stripped everything out except the .SWCs, recompiled... and they aren't included, as should be the case. I didn't change any other object properties; I just made a quick Main.as that referenced the packages.
So that rules out compiler, I think? And probably anything batch-file-oriented.
What could cause the SWC to be included in a large project, but not a small one?
|
| Sun Jul 01, 2012 8:59 am |
|
 |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 Re: SWC externals still included
Figured it out. Any external .SWC included in a Preloader (eg:
[Frame(factoryClass="preloaderas")] public class Main extends Sprite {
) will get included in the final Classes. A lot of extra stuff will, tbh.
|
| Sun Jul 01, 2012 9:05 am |
|
 |
|
Philippe
Admin
Joined: Wed Aug 31, 2005 7:27 am Posts: 10749 Location: Paris, France
|
 Re: SWC externals still included
You mean referencing classes from the SWC in the Preloader class will have them included instead of treated as external?
|
| Sun Jul 01, 2012 9:25 am |
|
 |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 Re: SWC externals still included
Yep. I have a pretty simple sample project I can zip up for you if you like.
Easy though, just use the as3 w/preloader template...
|
| Sun Jul 01, 2012 9:30 am |
|
 |
|
Philippe
Admin
Joined: Wed Aug 31, 2005 7:27 am Posts: 10749 Location: Paris, France
|
 Re: SWC externals still included
Well then that's a serious Flex compiler bug that should be reported!
|
| Sun Jul 01, 2012 10:16 am |
|
 |
|
jtate5
Member
Joined: Thu Nov 03, 2011 1:55 pm Posts: 6
|
 Re: SWC externals still included
Unfortunately my issue remains. I am not referencing any class from the SWC in my preloader class. Any other ideas of what may be going wrong for me?
|
| Sun Jul 01, 2012 12:39 pm |
|
 |
|
Philippe
Admin
Joined: Wed Aug 31, 2005 7:27 am Posts: 10749 Location: Paris, France
|
 Re: SWC externals still included
jtate5 wrote: Unfortunately my issue remains. I am not referencing any class from the SWC in my preloader class. Any other ideas of what may be going wrong for me? Even indirectly?
|
| Sun Jul 01, 2012 2:39 pm |
|
 |
|
jtate5
Member
Joined: Thu Nov 03, 2011 1:55 pm Posts: 6
|
 Re: SWC externals still included
Well I removed all references to any other of my own classes from my preloader and the problem remained.
|
| Sun Jul 01, 2012 3:24 pm |
|
 |
|
weasel
Member
Joined: Wed Jan 27, 2010 11:36 pm Posts: 25
|
 Re: SWC externals still included
jtate5 wrote: Well I removed all references to any other of my own classes from my preloader and the problem remained. Try removing the preloader altogether, it's a quick and simple(r) way to test. edit: I also had to delete my SWF file in flash develop before the class explorer would notice the things are removed/not removed. So, delete, recompile, check the SWF explorer.
|
| Sun Jul 01, 2012 4:38 pm |
|
|