Navigation:  Introduction >

Overview (how it works)

Previous pageReturn to chapter overviewNext page

How it works :

 

(our demo applications (clarion 6 and clarion 7) are built to SHOW you how to define all with STEP by STEP comments so DO take the time to study it in details)

 

The shipped executables are built in local mode so you can run them on your machine without fearing a dll problem.

 

 

The way your application communicates with the Runtime Engine (called RT) is simple :

- DMC (on your machine) when you Export a Project generates a special "LINK" table (TPS encrypted) along with the necessary files

- Your application knows this "LINK" Table as you have a DCTX/TXD to import the structure in your DCT, so it is easy for you - in your application - to CHANGE some values to match your end-user's machine paths ODBC logins etc...

- The Runtime Engine when it is started always reads this "LINK" table to CHANGE there some settings to MATCH your client's machine (compared to yours where you created the project)

 

How to set it up :

 

1. From your machine's DMC Enterprise version create (for example) an SQL Backup Task and save it to a Project

2. From your machine's DMC Enterprise version Export this Project

3. In your application add the DMC RT template and import the DCTX or TXD and TXA supplied (only in the application you need to use it - for MultiDll systems)

4. Define all specifications in your application as explained in the RT Help (or copied from the DEMO) so as to dynamically change some settings to match your end-users machine on path location or ODBC connections (see step 7. hereunder) and to call the RT engine.

5. In your application Installer ADD the SB silent self deleting  DMC RT installer (like we did in the demo app)  and run it at the end of your install

6. ADD in YOUR Installer YOUR DMC License File (precise location of this file)

7. ADD in YOUR Installer (or a separate one) the FOLDER containing the Exported Project and/or the "Port to SQL" Script file (Dmc_Dctx_Scripts_YourDctName.tps) and install anywhere you want on your client's machine (you must "know" where this folder is to call it from your application)

 

General Rules :

 

You can distribute the RT engine up to 2 500 end users royalty free with the special Runtime Engine License (above 2 500 end users please contact us).

 

You can distribute as many Projects as you wish (older ones will be always structure wise updated by the RT itself when you start it)

 

You can place the Project folders anywhere you wish on your client's machine - simply you have to "tell" the RT engine where to look for them in YOUR application

 

You can place the (Port your application to SQL) SQL Scripts tps file anywhere you wish on your client's machine - simply you have to "tell" the RT engine where to look for it in YOUR application

 

You can use ANY type of Saved Projects generated from YOUR machine's DMC Enterprise version to be shipped to your end-users

 

You can also use the RT to simply open and Visualize ANY File - Table from your end-user's machine (careful to what you allow them to do here)

 

You can define if the RT will run Silently or not

 

You can define if you "pass" onto the RT the Path to look for your project from a Registry entry OR from an INI file (those two being always the same)

 

You can dynamically define from YOUR application for example the Charset to use in a Viewer List Box when displaying foreign language Tables.

 

You can add a "call" (or several) to the RT in your application in any Button or embed point code or even Timer event - you have a TXA to import in your application which is a centralized procedure to use (adding all code there to cope with the different projects you want to use)

 

The RT engine Installer is an auto delete typed one (Setup Builder) so as not to leave anything not needed on your end-users machines

 


PATH to the RT Engine on your end-users machine

It is ALWAYS installed in the same path and you can query it with this code

 

      ! PATH of the **DMC RT engine** ALWAYS read from REGISTRY  ***DO NOT CHANGE***

      RTPath     = GETREG(REG_CURRENT_USER,'SOFTWARE\CGF\Data Management Center RT','Directory Installation')

      ! PATH of the DMC RT engine **DATA SUBFOLDER** ALWAYS read from REGISTRY ***DO NOT CHANGE***

      RTPathData = GETREG(REG_CURRENT_USER,'SOFTWARE\CGF\Data Management Center RT','Directory Data')

 

      ! on a clean install the CU Key is not filled in by the RT installer

       ! read from LM Key which IS filled in by the SB Installer

      IF ~RTPath

           RTPath     = GETREG(REG_LOCAL_MACHINE,'SOFTWARE\CGF\Data Management Center RT','Directory Installation')

          ! PATH of the DMC RT engine **DATA SUBFOLDER** ALWAYS read from REGISTRY ***DO NOT CHANGE***

          RTPathData = GETREG(REG_LOCAL_MACHINE,'SOFTWARE\CGF\Data Management Center RT','Directory Data')

      END

      RTPathData = CLIP(RTPathData) & '\cgf_import\'

 


PATH to installed Projects

 

The RT Engine needs to know where to READ the Files from and you have 3 choices :

1. Subdirectory under the RT Engine itself (this option limits the shipped Projects to only one usable in this place at a time)

2. Reading a REGISTRY Key

3. Reading an INI File

 

You can ship and install your Projects to ANY folder anywhere on your end-users machine

The easiest way is to create a sub directory under your application DATA file path and place them there

 

Example :

Your DATA folder is c:\users\documents\MyApp\Data

Create a folder called c:\users\documents\MyApp\Data\DMCRT

When you ship a Project install the FOLDER generated from DMC UNDER this Folder and use this full path in your application

ie "c:\users\documents\MyApp\Data\DMCRT\MyProjetcName"

 


How to inform the RT engine where to look for your Project

Use the /R:1 OR the /I:1 parameters

OR

do NOT use those parameters and the RT engine will look in it's own sub folder ie RTPathData variable read earlier

(done for you in the TXA Process if you follow all steps there)

 

If you chose to use the /R or the /I parameters, then this is where to STORE the PATH for the RT engine to READ it from

 

1. REGISTRY key is ALWAYS this one : GETREG(REG_CURRENT_USER,'SOFTWARE\CGF\Data Management Center RT','PathToUse')

2. INI File is ALWAYS this one : GETINI('Path','Project','',CLIP(RTPathData) & 'dmc_rt.ini')

 

Example :

 

1. REGISTRY

    ! EXAMPLE of REGISTRY PATH

       !GLODMC:READ_REG   = 1                                          ! Setting to tell the RT to **READ** PATH from REGISTRY

       ! This means YOU have to FILL in this REGISTRY Value with YOUR PATH **and** use a setting of GLODMC:READ_REG = 1

       !PUTREG(REG_CURRENT_USER,'SOFTWARE\CGF\Data Management Center RT','PathToUse',CLIP(LONGPATH() & '\Projects')

       !where CLIP(LONGPATH() & '\Projects' is an **EXAMPLE**

 

2. INI FILE

    ! EXAMPLE of INI FILE PATH

       !GLODMC:READ_INI   = 1                                          ! Setting to tell the RT to **READ** PATH from INI FILE

       ! This means YOU have to FILL in this INI FILE Value with YOUR PATH **and** use a setting of GLODMC:READ_INI = 1

       !PUTINI('Path','Project',CLIP(LONGPATH() & '\Projects',CLIP(RTPathData) & 'dmc_rt.ini')

       !where CLIP(LONGPATH() & '\Projects' is an **EXAMPLE**

 

 

INI File when asking a DataBase Creation or SQL Tables Creation :

 

The file named "dmc_rt.ini" MUST be placed in CLIP(RTPathData) & 'dmc_rt.ini'

 

This INI file's content MUST be like this example :

 

[DB]

Driver=SQL Server

Server=SERVEUR-CGF\SQL_2005

User=sa

Pwd=xxxxxxx

Port=

DBName=DCT_Test

SQL_Type=SQL

Path=D:\Apps Tests\Dmc_Invoice_Demo\Dmc_Dctx_Scripts_dmc_invoice_demo.tps

CreateDB=Yes                                                                                                       ! or NO

MasterDB=master                                                                                                  ! define ONLY if NOT MsSQL - MySQL or PostGre

[Path]

Project=D:\Apps Tests\Project_Invoice                                                                     ! <- ONLY IF you want to CREATE all SQL tables or use the /DEPLOY parameter - otherwise leave empty)

 

 

 


The RT engine cannot be started by double-clicking on the executable in Windows Explorer - this is what you would see onscreen :

rt_start