Glenn1234
Glenn1234

Reputation: 2582

Deploying Custom Units and Components

When it has come to redoing or reinstalling Delphi, I've run into a hassle. When it comes to components and units I've produced to use in projects, I run into having to go through the entire backup of my projects to find all the things I've used in other projects and copy the units over, install the components through the Delphi interface, and make sure everything is present. Then, I usually forget something and then when I pull out a project that uses one of these units or components, I have to stop whatever I'm doing, find the backup disk, find the data do the install, before I continue...

Main question: Has anyone come up with anything to solve this scenario by automating all of this? Otherwise, what do most people here do when it comes to administration of Delphi in this way?

Upvotes: 0

Views: 219

Answers (3)

House of Dexter
House of Dexter

Reputation: 386

I set up Environment Variables

  • Delphi menu \Tools\Options\Environment Variables
  • New User Overrides, Example: Variable Name: OutsideComponents; Variable Value: C:\mycompdir\mycomp

Lots of options in how to use the EV's You can Set them up to use for all your projects...

  • Delphi Menu \Tools\Options\Delphi Options\Library path Example: $(OutsideComponents)\ Or just link use them in the project..
  • Delphi Menu \Project\Options\Directories/Conditionals\Search Path Example: $(OusideComponents)\Comp1

Upvotes: 0

AlexSC
AlexSC

Reputation: 1933

Everytime I produce my own components I consider them as a product I would sell. In this sense, what I do is to build a setup wizard that installs the components in Delphi IDE in the very same way it would for a customer.

Anytime I have to reinstall my computer or Delphi, I just have to run my setup wizards and all the work environment gets ready.

I use InnoSetup (http://www.jrsoftware.org/isinfo.php) to build my setup wizards.

Upvotes: 1

mjn
mjn

Reputation: 36654

Some tips:

  • when possible, avoid installation of components and create instances at run time. This will reduce the time to install them in the IDE. For example, all non-visual components do not have to be installed for design mode.

  • use a build tool like Apache Ant to compile projects with a build script. The build script then also serves as documentation of environment and source path requirements. When I run the build on a new computer, I only need to check the Ant build script configuration file to see which dependencies exist.

Upvotes: 2

Related Questions