• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Is there any way to export a desktop AIR package when desktop is not supported by an ANE?

New Here ,
Nov 30, 2012 Nov 30, 2012

Copy link to clipboard

Copied

I have a third party ANE that I need to use. The ANE has a target for Android, but when I add it in Build Path->Native Extensions an error shows up "This ANE does not support Desktop(Mac) platform". Now, my app is targeting android, but to make it easy for others in my company to play builds without having a device, I've been using the "Export Release Build->Signed AIR package for installation on desktop" option. The problem is, since I've added the ANE, I'm no longer able to hit the "finish" button because it's greyed out due to the error (even though the checkbox to include the ANE is unchecked in the export settings. The only way I've found to work around this is to remove the ANE temporarily and comment out references to it to build the desktop package, which is not optimal. Any other suggestions?

Thanks!

Views

836

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 30, 2012 Nov 30, 2012

Copy link to clipboard

Copied

Rather than commenting it out, you could define a compiler parmeter:

  -define=CONFIG::includeAndroidANE,true

Then, in your code, wrap any references to the problem code in the config statement


CONFIG::includeAndroidANE

{


import the.problem.package.ProblemExtensionClass;

}

And:

CONFIG::includeAndroidANE

{

   if(ProblemExtensionClass.isSupported()) {

        var v:ProblemExtensionClass = new ProblemExtensionClass();

         v.init();

         v.doSomethingThatIsntSupportedOnAMac();

   }

}

Then, when you compile for Mac, you just need to set CONFIG::includeAndroidANE,false;

This is what OSMF does to support different versions of the player, and also what SWIZ do to support different versions of Flex.

All good.

G

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 30, 2012 Nov 30, 2012

Copy link to clipboard

Copied

LATEST

Ah thanks! I didn't realize just commenting out the imports would allow it to export the build without removing the ANE. Worked like a charm!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines