Adobe Air: Two applications, one project

I am trying to build 2 applications from 1 Adobe Air project. One application is for general distribution, one is for a customer with custom features. Is there any way to have multiple TurboActivate.dat files in a project? From what I can guess, the path to TurboActivate.dat is hard coded in the systa binaries, so this seems impossible. Can this be changed in future versions?

Hey Jason,

Is there any way to have multiple TurboActivate.dat files in a project?

Yes, but we don't recommend it. I'd need to know some more about what you're trying to accomplish, but from the sound of it using custom license features would be the best option for you. First create a custom feature that's optional (i.e. you don't have to fill it out every time you create a product key, just for customers who use it). Then, for this special customer, when you create the product key set the custom feature to whatever value you need.

Does this help?

I started down that road. The problem is that when I go to test my "custom" application, I get a failure on isGenuine(), because now I am using a product key / GUID from my main application with an application with a different ID. This will happen anytime someone has both products on their computer, won't it? Unfortunately that's a very likely scenario. No one needs to have both, but anyone who needs the custom one will probably install the general one at some point.

Hmmm. Can you explain what you're trying to accomplish. I'm afraid I only partially understand. Are you trying to do something like a "Basic" and a "Pro" version of your app? Or am I completely misunderstanding you?

Not Basic and Pro. More like a "normal" version for every day users, and then a version branded for one organization, with different features, default settings and some UI changes. License features won't work in this case because we want the branding to appear even before the user puts in his key. And we want the branding on the icons, etc. So in addition to the normal Air application (main.mxml) we've added branded.mxml with its own id.

Ok, there are a few paths you could take. I recommend choice A because it's by-far the easiest.

A. Custom license features

Create a custom license feature, let's call it "Company specific", make it optional. Then, when you create a product key, set the "Company specific" value to "X" (for company X).

Now, in your code, you can check if this feature has been set and what its value is. If it's "X" then load the custom resources.

Now you mentioned running multiple versions of your app on the same computer. You're right, in this case you would have to deactivate the product key with the "X" "Company specific" value and reactivate with a product key without the feature set. But this is only a problem on your development machines, right? No one will get this in the real world, right?

B. New version

The second choice is to create a separate version in LimeLM (click the "Add another version to YourApp" link in your dashboard). There are 2 options:

Option 1: Make a custom installer for this one client

This option is simple. Just create a separate installer that uses the new version's *.dat file and GUID.

Option 2: Include both *.dat files, load at runtime

This seems like the easier of the 2 options, but it's not. Firstly, how do you know when your app starts which *.dat file to load? You could hardcode it in the installer, but then you're back to option 1. But let's say you have a way of identifying the corporate computer, then you can just dynamically load the .dat file.

We didn't include this function in TurboActivate.as file, but here's how you can load the *.dat file at runtime. First add this function to the bottom of TurboActivate.as:

		/**		 * Load the TurboActivate.dat file from a directory other than the same directory as systa.		 * @param file The file path to the TurboActivate.dat file		 */		public function PDetsFromPath(file:String):void		{			PreRun();


			FunctionProcessing = FUNC_PDetsFromPath;			process.standardInput.writeInt(FUNC_PDetsFromPath);			process.standardInput.writeUTF(file);		}

You must call this function before you call any other functions. And you can only run this function once (that is, you can't load one *.dat then load another).

Does this help?

Thanks! I'll give option B a try. I can't use option A because 1) It is very likely users will install both products on their computer and 2) We need the special branding to be visible before the user enters a key.

I'll let you know how this turns out, thanks for your help.

Path "B", Option "2" works great. Thanks!

Great, if you have any other questions we'll be happy to help.