[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Library Search Path

Posted on 2003-12-08
9
Medium Priority
?
389 Views
Last Modified: 2010-04-05
Hi,

How should I manage the Library Search Path. It's the folders where the components are.
The problem is that I've lots of components. So I put them all in the same directory. Whatelse if I create a directory per component, then the library search path couldn't have all the directory.
Can anyone give a good idea or a trick to put my library in order, and don't stay in a complete chaos.
Thanks,
Luis
0
Comment
Question by:lfgmartins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 8

Accepted Solution

by:
gmayo earned 500 total points
ID: 9896031
You can have more than one path. Click on the ... next to the search path box and add each seperate path. They'll come up seperated by semicolons (eg 'C:\ProjA;C:\ProjB'). At least I *think* that's what you're talking about...

Geoff M.
0
 
LVL 27

Assisted Solution

by:kretzschmar
kretzschmar earned 500 total points
ID: 9896067
yep, geoff is right,
you could also use the sub-dialog, which somes up,
if you press the ...-button
0
 
LVL 17

Assisted Solution

by:Wim ten Brink
Wim ten Brink earned 500 total points
ID: 9896143
The use of multiple paths is the best way to use the library path, however it will slow down some things within Delphi itself, like compilation. Now, if you have a fast machine then you won't notice much about it but otherwise there is a nice trick you can do by making packages part of your project.

Since your components are probably part of packages, you can install and uninstall these packages quite easily, whenever needed. Therefore, I split my components up in two groups. One group are the global components for which the path is set by Tools/Environment options/Library and the other group are actually project-related packages, meaning that these components are often used by only one or two of my projects. For these packages I just set the Project/Options/Search path to look to the location of my package source. The package will output all DCU's to the same folder as my project itself so my project can easily find these components. Now, all I have to do to get the project working is to install the package.
And packages are part of a project group so installation is easy.

Now, what if a component set is part of multiple projects? Personally, for security reasons I just keep a version of the package per project because if a package is changed, it might have unexpected effects on other projects that depend on the package. I've had more than enough bad experiences that my application couldn't compile anymore because another developer rewrote a function in one package and e.g. added an additional parameter or changed a type declaration. The package would then still work for HIS project but mine would just not work anymore.
So, personally I try to keep custom components close to my project. Which means I let them output the DCU's to the projects DCU folder.

About dividing your components over multiple folders, please do it in a logical way and make sure that related components share the same folder. Only keep the original Delphi libraries in their original location.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:lfgmartins
ID: 9896157
Hi all,

OK I understand that, but in my case I've around 100 components. I don't use them all. Thank god :) What's your recomendation for my case? Can I add 100 paths like F:\PROGRAM FILES\BORLAND\LIB\USR_COMPONETS\COMPONENT1 and the same for 2 and 3...
How will Delphi handle all these? What is the Delphi Path limit? Do you have any other idea?
Thanks,
Luis
0
 
LVL 8

Expert Comment

by:gmayo
ID: 9896325
You might be better off keeping the originals somewhere safe and just dumping a copy of all the components into one directory. It would be a PITA to set these paths up for every project.

100 might be ok, but it depends on how long each path name is.

Geoff M.
0
 
LVL 1

Assisted Solution

by:roknjohn
roknjohn earned 500 total points
ID: 9896823
I have two main folders for components.  MyComponents, for the components that I write myself, and a ThirdParty folder for those I acquire elsewhere.  There are many subfolders within the ThirdParty folder,  as I like to keep each component installation separate.  In other words, when ever I download a new component, I will create a new folder for it under ThirdParty.  However, in many cases I will COPY the .pas and/or .dcu files up to the ThirdParty folder in order to keep my library paths from being too numerous.  

0
 
LVL 8

Expert Comment

by:gmayo
ID: 9896928
Nice to hear somebody already does what I'm suggesting to Luis, John!

Cheers

Geoff M.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question