Component Writer's Guide :: Installing into the IDE
From RadPHP XE2 Documentation
To install your component, you need to create a package. A package is simply is a .package.php script with special function calls to instruct the IDE which components to install. Below is a code example:
<?php require_once("rpcl/rpcl.inc.php"); use_unit("designide.inc.php"); setPackageTitle("Put the title of your package here"); //Change this setting to the path where the icons for the components reside setIconPath("./icons"); //Change yourunit.inc.php to the php file which contains the component code registerComponents("Samples",array("MyFirstComponent"),"myfirstcomponent.inc.php"); ?>
This script includes the unit designide.inc.php, which provides the functions you need to tell the IDE information about your components.
- setPackageTitle() Tells the IDE the description for this package.
- setIconPath() Tells the IDE where to find the icons for the components setup on this package, the path is relative to the path of the .package.php.
- registerComponents() Tells the IDE the Page where to place the components, the ClassNames of the component and the Unit to include on the form to make the component work.
If you want to show some information on the splash window in the IDE, starting from 2.0, you can use the function addSplashBitmap() for this, let's check this sample:
addSplashBitmap("RPCL 3.0 from qadram software","qadram.bmp");
You can specify a text and a bitmap that will be placed at the left of the text. Bitmap must reside on the same path you specified for component icons.