Unsolved Program versions
-
I have a program I'd like to distribute in two versions, call them "standard" and "plus". The underlying c++ code is the same, the only difference is in what features are exposed to the user via the .ui files. What is the best way to deal with this scenario?
- Two different projects.
- Two sets of .ui files
- Something else...
Thanks for any feedback.
-
If you are old enough you remember CD KEYS: http://stackoverflow.com/questions/3002067/how-are-software-license-keys-generated
-
@Jedd I wouldn't really do either 1 or 2. Both have pretty big problems associated with them. Mostly you have to maintain 2 code bases and that is just asking for problems. Even if you are the sole developer I pretty much guarantee that at some point you will get them out of sync for releases.
If I had to to tackle that problem I would probably write a LicenseManager type class that would tell me if a particular function was available with the current license.
I write the majority of my guis in code so I don't use .ui files much. I would then check the license before showing (or enabling) the specific feature in the GUI. You can also show disabled menu items and such with words like
Some feature (Plus Only)... Ctrl+L
in your menu items. Since it is disabled and tells them why it is free advertising to encourage upgrades.The down side to using this method is that hackers can fairly easily write cracks to bypass your plus version security.
So to avoid that, you can do something like conditional compilation. You still have the single code base but you have things like
#if defined(PLUS_VERSION)
and then do your plus version gui stuff in there. You will also need a different key scheme for the plus version so that hackers can't use the plus version binaries with a basic version license.The conditional compilation should do what you need and protect you, however the first method is probably easier to deal with for your customers. That allows them to change from basic to plus with entering a new key rather than uninstalling and installing a new version. Even Microsoft doesn't do multiple versions any more. Windows 10 home can turn into pro with just a key change.
-
Thanks for the feedback.