Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Plug-ins Explained
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Plug-ins Explained
By: Leidago
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2006-11-13

    Table of Contents:
  • Plug-ins Explained
  • Building your own packages
  • Linking your package
  • An example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Plug-ins Explained - Building your own packages


    (Page 2 of 4 )

    Creating a package is surprisingly easy. Go to File|New|Other and select Package from the object repository:

    Once you've clicked on the packages icon, you should see the following screen:

    The package editor enables you to add and remove units to and from the package. It is always good to save the package in its own folder, to keep the generated files together. Before you compile a package, make sure that the output directory points to the same directory where you want to save the package. You do this by opening up the Project Options dialog box, by clicking on the options button, selecting the "Directory/Conditional" ta,b and then entering the directory location. When you compile the package it will create DCP, DCU and BPL files, which you want to have in the same location, especially if you are going to use them to create plug-ins.

    As you can see from the package editor, the editor has two lists:

    • Contain: The "contains" clause is responsible for listing all the units that the package will contain. You add units to the package by clicking on the "Add" button.
    • Requires: In Delphi 7, the required run-time package is VCL70.dcp. This is required in case your units use anything from the VCL. The package editor will automatically add the required VCL according to what is needed by the units listed in the "Contain" clause.

    To avoid using the VCL twice in your application, make sure that you built your application using the VCL run-time packages.

    When you create, save or compile a package, a couple of files are generated. So let' s look at these files:

    • .DPK  - Contains the package source code.
    • .DCU - Binary image for a unit file contained in the package.  One DCU file is  created for each unit file.
    • DCP -  Links with the run-time package.
    • .BPL - The file that you will need to deploy with your application.

    To finish building a package, simply compile the package and a .bpl will be created and stored in the directory that you specified. If you did not specify an output directory, the .bpl file will be put in the DelphinProjectsBPL directory.

    More Delphi-Kylix Articles
    More By Leidago


       · This article explains how to built a plug-in using Delphi packages.
     

    DELPHI-KYLIX ARTICLES

    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT