Release Build settings - compiling from source

Stimulsoft Reports.Flex discussion
Locked
brettcrossley
Posts: 6
Joined: Fri Dec 02, 2011 9:02 am
Location: Charlotte, NC

Release Build settings - compiling from source

Post by brettcrossley »

When I build the ViewerFx.swc from source and then use the .swc in my application, it runs correctly in my FlashBuilder debug environment, but it does not run correctly in a compiled AIR app.

I see a bunch of compiler arguments in each of the projects when I imported them from your source, similar to this:
-locale en_US -define+=CONFIG::Demo,false -define+=CONFIG::Release,true -define+=CONFIG::AspNet,false

What are the correct settings for a release build of the ViewerFx.swc?

Also - I can see the project dependencies, so I just built them in reverse order of dependency (e.g. Stimulsoft_Base has no dependencies, so I built it first).
Then I set the path library for each project to point to the compiled .swc's I previously built.

Is this how you guys build these, or do you compile everything at once from linked source?

Also - are you using external linkages for your projects, or merging into code?

I have to make some changes in the source so I can't just use the compiled swc.

Thanks for any help.
Brett.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Release Build settings - compiling from source

Post by Vladimir »

Hello,

You have specified the correct configuration string for the compiler:

Code: Select all

-locale en_US -define+=CONFIG::Demo,false -define+=CONFIG::Release,true -define+=CONFIG::AspNet,false
This string you must specify for the following libraries:

Code: Select all

Stimulsoft_DesignerFx
Stimulsoft_PropertyGrid
Stimulsoft_Report
Stimulsoft_ViewerFx
and for the AIR applications.

For the AIR application you should use the following libraries in this order:

Code: Select all

Stimulsoft_DesignerFx
ApiProvider_AIR
We are using the merging into code linkages.

Thank you.
brettcrossley
Posts: 6
Joined: Fri Dec 02, 2011 9:02 am
Location: Charlotte, NC

Release Build settings - compiling from source

Post by brettcrossley »

Got it working!

I tried what you described below and still couldn't get it to work.
So I unzipped my .swc compiled from source and yours, and diffed the catalog.xml files.

Yours had a bunch of references to custom metadata tags. With a little research I figured out how to add them, you need this on your compile arguments:

Code: Select all

-debug=false -keep-as3-metadata=Transient,ReadOnly,NotSupported,Description,TypeConverter,EnumType,Type,TypeEditor,ChangeEvent,Order,DefaultValue,Managed,Localization,NonCommittingChangeEvent,SerializeValue,Category,Bindable,PropertyLevel,ShowInnerProperties,Serializable,Browsable,SerializeName
So the whole thing for the Additional compiler arguments is:

Code: Select all

-locale en_US -define+=CONFIG::Demo,false -define+=CONFIG::Release,true -define+=CONFIG::AspNet,false -debug=false -keep-as3-metadata=Transient,ReadOnly,NotSupported,Description,TypeConverter,EnumType,Type,TypeEditor,ChangeEvent,Order,DefaultValue,Managed,Localization,NonCommittingChangeEvent,SerializeValue,Category,Bindable,PropertyLevel,ShowInnerProperties,Serializable,Browsable,SerializeName
Now it works like a champ.
Maybe there is some other way to fix this issue, I can't be the only person who is compiling all this from source?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Release Build settings - compiling from source

Post by Vladimir »

Hello,

Sorry, we forgot to specify a configuration line to add a meta tags. All meta tags are located in the 'meta-config.xml' file (please see attached file), it must be copied into the 'src' folder of the project. The connection string looks like this:

Code: Select all

-locale en_US -load-config+=":meta-config.xml"
Thank you.
Attachments
1626.meta-config.xml
(661 Bytes) Downloaded 302 times
taytay
Posts: 1
Joined: Thu Mar 29, 2012 5:08 am

Release Build settings - compiling from source

Post by taytay »

Wow! I'm so glad I stumbled across this! This was biting us even though we use the compiled swc in our release AIR app. We needed to add the -locale en_US -load-config+="meta-config.xml" (sans colon) to the compilation when we used -debug=false and -optimize=true settings. That's because the metadata was getting stripped out of our reports our app defined, and was causing either blank reports or a null pointer crash on lines like this: report.getComponentByName("col_date").width;
report.getComponentName was returning null, but only in release mode! I wanted to post my experience here in case it helps future Googlers. :)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Release Build settings - compiling from source

Post by Alex K. »

Hello,

Thank you for information.
Locked