TurboPack OnGuard is a copy-protection system for VCL and FMX applications built using Delphi and C++ Builder.
In this article, I illustrate using TurboPack OnGuard and an integration with back-end Digital-River’s MyCommerce.
Digital River MyCommece platform is a sales ordering platform for customers to order software.
Table of Contents
Getting Started
In the below video you can see it takes less than a minute to install OnGuard.
Step 1. Select Tools > GetIt Package Manager, as seen below.
When the GetIt Package Manager Window appears (shown below).
1. type in “onguard”.
2. Click on the Install Button.
After installation, go to the Component Palette. Scroll to the bottom, you should see OnGuard, with all the registered components.
1. OnGuard VCL components
My First Licensed App
A sample copy-protected app takes around ~ 5 minutes to make.
Using TurboPower OnGuard, you first create a Key. You can right-click on an OnGuard component and click the “Generate Key” menu.
This will bring-up a Key Maintenance Dialog Box.
1. If you have not created a key. click the Button with Folder picture, to save the OnGuard key to disk.
2. If this is your first time, click the “Add…” button to generate a key.
3. Optional – copy Key to Clipboard.
If you selected [2] from the previous Dialog box, you will go to this small dialog box. Click on the Key Button to generate a key.
Errors Occurred during Development
You need to add code to the Component Event OnGetKey:
[crayon-676cb7684ffe9290365797/]Then, add code to Event GetCode:
Integration with Digital River Back-End
After your first sales, you find, you need to manually issue keys for your customer. If you have many orders, this becomes time-consuming affair. Wouldn’t you wish this could be automatic?
Digital River’s Admin Panel allows Delphi Console-Based VCL App to generate keys to be uploaded!In the below, a Key Issuance console app – digitalriver.keyissuance.yourapp.dpr does the job:
You need to replace PROD constant with the Product SKU ID from Digital River’s Admin Panel.
The CKey is same as embedded in your app.
There is a small test-case included in the source-code –
After compiling the Key Issuance Delphi console application, upload it to Digital River’s Administration Panel.
The below shows example invoice (* certain information redacted as it is test invoice)
Entering Data from into the Demonstration App, the app is licensed –
OnGuard also works with Chinese, Korean, Thai and Arabic Names –
The source-code for this demonstration project is at https://github.com/PolywickStudio/OnGuardRecipe.