简体   繁体   中英

Activating Flex Automation Libraries

To "turn on" or "activate" the automation libraries for a SWF, a valid Flash Builder Pro license key needs to be compiled into the SWF. If you don't compile your SWF with a valid FB Pro license, you'll end up seeing a "License not present. With the trial version only limited records are allowed" error:

在此输入图像描述

Background : I have a licensed version of Flash Builder 4.5 and I'm using Flex SDK 4.1. Watch what happens in the following examples:

Example #1 - Building my project using a licensed version of Flash Builder 4.5 with 4.1 SDK ( http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4 ) FAILS to "turn on" the automation libraries. See Test41 project.

Example #2 - Building my project using a licensed version of Flash Builder 4.5 with 4.5 SDK (comes preinstalled with Flash Builder 4.5) SUCCEEDS to "turn on" the automation libraries. See Test45 project.

Two different results. Hmmm, maybe that has something to do with my REAL problem:

My REAL problem : My SWF is not being compiled directly by Flash Builder but rather by ANT using the MXMLC and COMPC compilers found in the 4.1 SDK. These compilers "read" the flex-config.xml file.

So, inside flex-config.xml I've added this:

    <licenses>
        <license>
            <product>flashbuilder45</product>
            <serial-number>xxxx-xxxx-xxxx-xxxx-xxxx-xxxx</serial-number> <!-- this is my 4.5 license key -->
        </license>
    </licenses>

That didn't work. So I tried the "derived" serial number as discussed here (search for the word "derived"): How to properly define the Flashbuilder 4.5 Premium license for a maven flexmojo based build?

    <licenses>
        <license>
            <product>flashbuilder45</product>
            <serial-number>xxxxxxxxxxxxxxxxxxxxxxxx</serial-number> <!-- "Derived" sn number found in license.properties file -->
        </license>
    </licenses>

That didn't work either.... My guess is that I'm using a 4.5 serial number against a 4.1 SDK...and that's no good.

Besides upgrading my SDK to 4.5, anyone have any ideas what I can do to "activate" my SWF to handle automation using a Flash Builder 4.5 license, ANT, the 4.1 SDK compilers and flex-config.xml?

Here's the answer :

I eluded to this in my question.

If you're using the Flex 4.1 SDK and you want to "activate" your SWF for automation, charting, etc. Then you have to do this:

  • Compile your SWF using a licensed version of Flash Builder 4 WITH a Flash Builder 4 license key

OR

  • Compile your SWF using ANT, MXMLC, COMPC, flex-config and add this to flex-config:

    <licenses>
    <license>
    <product> flashbuilder4 </product>
    <serial-number>xxxx-xxxx-xxxx-xxxx-xxxx-xxxx</serial-number> <!-- this is a FB 4 license key -->
    </license>
    </licenses>

If you only have a FB 4.5 license key and you're using SDK 4.1, I guess you have no choice but to upgrade to SDK 4.5+.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM