22. Distributing FileFlex

You can license FileFlex for distribution, whether to others within your organization or to customers and users outside.

FileFlex Runtime Edition

Most developers don't develop software solely for their own use. Most develop software for use by others. FileFlex exists so that you can embed relational database functionality within your own projects and applications, and can then provide those finished applications to your users.

You can purchase a license to distribute FileFlex to your users for a nominal fee: $100 per product title you're distributing. This fee is the same whether you're distributing it internally, for profit in a consumer product, as a shareware product, or even giving it away.

Along with your distribution license (more described below), you will receive a special Runtime Version of FileFlex. This version is identical to the Developer Version with a few exceptions.

Special Note for Macromedia Director 5 Users

If you are a registered Director 5 user, Macromedia has purchased for you the right to distribute your productions with FileFlex Lite at no additional fee. You are still required to agree to the licensing terms and send in your license form, but you will not be asked to pay the $100 per-product fee.

Further, FileFlex Lite users do not need to use the special Runtime Edition of FileFlex in the products you distribute. You may take the FileFlex Lite engine and distribute that with your application.

Please note that this special privilege is limited to distribution of the Lite edition--if you choose to upgrade to the professional edition with access to an unlimited number of records, you will need to pay a runtime fee for distribution of runtime software.

"R" and "Licensed Runtime Version" from DBVersion

In the professional edition, you can issue a DBVersion function call [FileFlex(0) in the direct XFCN interface] and get back a version number. In the Runtime Version, when you issue a DBVersion call, you'll get the version number with an "R" appended, as in "1.7R". Also, the full version string will include the phrase "Licensed Runtime Version", telling you and your users that they have a legitimate copy of the FileFlex runtime.

DBCreate and DBCreateIndex Disabled

Because we expect you to distribute pre-constructed databases to your customers, we've eliminated the DBCreate and DBCreateIndex functions from the FileFlex Runtime Version. If you want to distribute empty databases, use DBCreate in the Developer Version then use the command:
  get DBZapRecs(1,DBCount())
to clear the database of information. This will give you an empty shell database you can distribute.

Eliminating these two functions will make it harder for users of your applications to pull out the FileFlex XFCNs and use them directly--thereby protecting our extensive product development investment while still allowing you widespread distribution.

FileFlex Lite: If you plan to distribute FileFlex Lite only, you're not subject to this limitation. However, if you ever expect to expand beyond 1,000 records, you should design your software with this limitation in mind.

Note: If you run into some unexpected snag with this limitation, please contact us and we'll try to figure out a good way to handle it.

DBUse and DBUseIndex File Encryption Keys

Even with DBCreate and DBCreateIndex disabled, it was still possible for anyone who had an existing DBF file to make full use of the FileFlex runtimes. And since you can create DBF files in many other products, including FoxPro, FileMaker, Excel, and other tools, there was very little protection for the product.

We hesitated to grant licenses for widespread distribution, especially shareware authors, because anyone who had a copy of the distributed product would, in actuality, have a fully working copy of FileFlex. This was a doomsday scenario for us, because with a small market, each unlicensed copy is less we can invest in creating new versions.

But we're nothing if not creative developers. And a simple, elegant solution presented itself. The key, if you'll pardon the expression, was a very limited form of encryption-but not of the data or the program code. Encryption of the file names.

Here's how it works. The only way FileFlex knows what files to operate on are with the DBUse and DBUseIndex functions. In each case, a filename (or full path) string is passed to the function. The function then looks on disk for a file of the corresponding name and opens it for further processing.

But if the DBUse and DBUseIndex functions expect an encrypted string, which they then translate to your normal file name internally, anyone who gets the FileFlex Runtime as part of your product can't open any files other than those you specify.

Here's an example. Let's say you want to open the file VIDEO.DBF with a DBUse and VIDEOBYNAME.NDX with a DBUseIndex. Here's what the program would look like using the Developer Version:
  put DBUse("VIDEO") into vidID
  if vidID < 0 then
    -- process some kind of error handler
    -- and leave the routine
  end if
  put DBUseIndex("VIDEOBYNAME") into vidDexID
  if vidDexID < 0 then
    -- process some kind of error handler
    -- and leave the routine
  end if
In the Runtime Version, your code would be identical, except the filenames would be changed (encrypted) to protect the innocent:
  put DBUse("%#Jd0") into vidID
  if vidID < 0 then
    -- process some kind of error handler
    -- and leave the routine
  end if
  put DBUseIndex("Kdfue&g-mne") into vidDexID
  if vidDexID < 0 then
    -- process some kind of error handler
    -- and leave the routine
  end if
Your data files would still be named VIDEO.DBF and VIDEOBYNAME.NDX respectively, but the runtime version wouldn't know those names until it unscrambled the encrypted file names provided to it.

When you get your copy of the FileFlex Runtime Version with your approved license, you'll get a copy of a program that will generate the encrypted file names. Just type in the normal file names and it'll tell you the encrypted character sequence.

FileFlex Lite: Again, for FileFlex Lite, this restriction does not exist. However, if you ever expect to expand beyond 1,000 records, you should design your software with this limitation in mind.

Opening Distribution Doors Wide

The benefit of this is that we at Component no longer need to live in fear of FileFlex being distributed to thousands of users who can then pull the FileFlex engine and use it on their own.

Because of the protection offered by file encryption keys, we're able to license FileFlex runtimes for distribution by you to anyone you please, whether commercial, shareware, freeware, or however you'd like.

And since the only changes you need make to your code are a few text strings for file names, and since you can generate new strings any time you wish, we think (and hope) this protection won't be too painful for you to tolerate.
Before we go on to the Runtime License itself, we want to thank Brian Molyneaux for taking the time to discuss licensing issues and for his permission to copy some of the material from his WindowScript license agreement for use in ours.




  [Previous Chapter]    [Table of Contents]    [Next Chapter]


Copyright (c) 1996 David Gewirtz under license to Component Software Corp. All rights reserved worldwide.