Solved

Library Search Path

Posted on 2003-12-08
9
382 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
9 Comments
 
LVL 8

Accepted Solution

by:
gmayo earned 125 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 125 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 125 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
loading dll from external path 1 210
Magic Software info 18 125
Reconfigure Delphi Install? 2 46
can't find the executable in Simulator 1 80
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now