Deploying InterBase 2017 ToGo on Mac OS X
InterBase 2017 ToGo Edition is a full-featured, multi-device embeddable database for Windows, Linux and macOS that runs in a stand-alone environment but allows deployment of applications which directly utilize the InterBase engine DLLs. With no separate database server process running, the database engine executes in the application process space providing an extremely small footprint. Together with other key features such as high security, zero administration, and simple installation, InterBase 2017 ToGo is an incredible solution for VARs, OEMs and ISVs
The InterBase ToGo database engine can be embedded in your Mac OS X applications by directly using the InterBase database engine library. InterBase ToGo does not have to be installed on any server or end-user workstation and it does not require that InterBase is installed on a machine before use like InterBase Server and InterBase Desktop. InterBase ToGo is also available on Apple MAC OS X.
This post describes, using RAD Studio (Delphi and/or C++ Builder) how to create and deploy an InterBase ToGo application to Apple Mac OS X.
Note: if you are developing with RAD Studio, the process to deliver the InterBase ToGo license with a packaged application is the same for Mac OS X as it is for the Mobile OS (iOS and Android). So, the InterBase ToGo license activation file, reg_*.txt, should be delivered in the "redist" location where RAD Studio picks up the InterBase license. Be sure to make sure the file name reg_*.txt matches the one listed in the "Deployment" file list when RAD Studio packages the application for Mac OS X.
Part 1 - Install InterBase 2017 ToGo
On Windows, in you RAD Studio IDE, you can use the GetIt Package Manager (Tools | GetIt Package Manager) to install InterBase 2017 ToGo:
The InterBase 2017 ToGo installation installs your redistributable files in the folder C:\Users\Public\Documents\Embarcadero\Interbase\redist\InterBase2017
And your RAD Studio IDE, your IBREDISTDIR Environment Variable (Tools | Options | Environment Options | Environment Variables) should now be set to your InterBase 2017 ToGo redistributable folder:
For the Mac OS X, you have the Mac OS X folder C:\Users\Public\Documents\Embarcadero\Interbase\redist\InterBase2017\osx32_togo with the InterBase 2017 ToGo .dylib (dynamic library extension on OS X) files that need to be deployed to the Mac with your Mac OS X InterBase 2017 ToGo application:
Part 2 - InterBase 2017 ToGo Serial Number
If you don't have your own InterBase ToGo Serial Number, you can get a free 30-day license for InterBase 2017 ToGo for Windows and Mac from here: https://www.embarcadero.com/products/interbase-togo/start-for-free
Enter your Embarcadero Developer Network (EDN) Username and Password, and you will get emailed your Serial Number for your InterBase 2017 ToGo Edition Deployment 30 Days Trial. The email looks like this:
Part 3 - InterBase 2017 ToGo Activation File
The InterBase 2017 ToGo Edition needs to be registered using your InterBase ToGo Serial Number as described here: http://docwiki.embarcadero.com/InterBase/2017/en/Installation,_Registration,_and_Licensing_Information#InterBase_ToGo_Edition
To activate your InterBase 2017 ToGo Trial license, please go to https://reg.embarcadero.com/srs6/activation.do and enter your InterBase ToGo Trial Deployment Serial Number. Enter the Registration Code: 737479
Select Download and Click Register.
After you activate your “ToGo” license, you will get an activation file like this:
This is your InterBase 2017 ToGo license file that you will need to deploy with your InterBase 2017 ToGo application on the Mac OSX.
Note: As you will see, when using the RAD Studio Deployment Manager, if you are Sand-Boxing your Mac OS X application, the license file gets deployed to your Contents\Resources\StartUp\interbase\license\ folder on the Mac.
Part 4 - Create your Multi-Device Database application using InterBase 2017 ToGo
Embarcadero has several tutorials on how to create multi-device applications using FireDAC such as these:
For this example, I'll use the Mobile Tutorial: Using InterBase ToGo with FireDAC (iOS and Android) and show deploying the application to Mac OS X using InterBase 2017 To Go.
Follow the tutorial up to the section Deploying your Application to Mobile. At that point, your Multi-Device application should look like this in your RAD Studio IDE:
Instead of deploying to Mobile (iOS and Android), we will follow the instructions in the next Part 5 - Deploying your Application to OS X to deploy our InterBase 2017 ToGo application to our Mac.
Part 5 - Deploying your Application to OS X
Up to this point, we have used InterBase ToGo on our desktop. This means that the actual database is located at your local hard disk drive (for example, C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\19.0\\Samples\\Data\\dbdemos.gdb). To deploy the application on OS X, you need to copy the database file to the Mac OS file system (for example, /Users/<user>/dbdemos.gdb). Also, the Interbase ToGo files must be deployed to OS X.
Deploy Interbase ToGo to OS X
- Open the Deployment Manager by selecting Project > Deployment.
- Select All-Configurations - OS X platform from the drop-down list of target platforms at the top of the Deployment Manager.
- Select Add Featured Files ():
4. Select the Interbase ToGo database module for OSX. Uncheck the reg_ibtogo.txt and the reg_iblite.txt and then click OK to close the Featured Files dialog box:
5. Using the Deployment Manager , click the Add Files icon, and manually add our InterBase 2017 ToGo Activation file reg1567_0152775697010.txt that we obtained from Part 3 above.
6. Using the Deployment Manager, click the Add Files icon, and manually add our InterBase dbdemos.gdb file.
7. Verify the Deployment Manager shows your dbdemos.gdb, your license activation file reg1567_0152775697010.txt, and the Mac OS X libibtogo.dylib files will be deployed to your Mac:
The Deployment Manager should correctly set the Remote Path on the Mac for all of the needed files to be deployed to the Mac.
Part 6 - Modify your RAD Studio code to connect to your InterBase ToGo Database on Mac OS X
Your TFDConnection component is connected to the InterBase dbdemos.gdb database on Windows. So we need to replace the location of the file before connecting to the database, as follows:
- In the Form Designer, select the FDConnection1 component.
- In the Object Inspector, double-click the Value field of the BeforeConnect event.
- Add the following code to this event handler:
procedure TForm3.FDConnection1BeforeConnect(Sender: TObject);
Note that $(DOC) is a path variable, allowing you to simplify the writing of path expressions. On Mac OS X, the $(DOC) points to the user home directory (/Users/<user>/Documents). So your dbdemos.gds needs to be deployed to folder: "/Users/amannarino/Documents/dbdemos.gdb"
With your PAServer, the Platform Assistant Server Application running on you MAC, select the OSX Target Platform in your RAD Studio IDE:
Run your Application, and on your Mac, you should see your InterBase 2017 ToGo Application running like this:
Please login first in order for you to submit comments