Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default directory

Status
Not open for further replies.

mjt39

Technical User
Aug 14, 2000
25
DE
I am new to Delphi (Delphi 5).
I would like to put my Delphi projects in a directory defined by me. This directory should be shown when I click File > open, File > close, etc.
 
If you have 'autosave project desktop' On. (in enviroment options), then the last project will re-open when you start Delphi, the project open dialog will be set to the folder containing this project.

You can 'Save as' your projects to anywhere you like.

I dont think it possible to set a 'default' project folder? but you dont need to.


[red]Support the GNBM You know it makes sense[/red] More on this at forum1091
Steve: Delphi a feersum engin indeed.
 
I have Delphi 7, but maybe you can do this too.

Check in Project | Options the Directories/Conditions tab.
There is also a "Default" checkbox.

From the Delphi helpfile:
The Directories/Conditionals page of the Project Options dialog box lets you specify the location of files needed to compile, link, and distribute your Delphi application.

Directories

Output directory Specifies where the compiler should put the Delphi compiled units and the executable file.
Unit output directory Specifies a separate directory to contain the .dcu files.
Note: .dcp files can be relocated by setting the DCP output directory path on the library page of the Tools|Environment Options dialog box.
Search path Specifies the location of your source files. Only those files on the compiler's search path or the library search path will be included in the build. If you try to build your project with a file not on the search path, you will receive a compiler error. You must include the entire search path.

If you check Use Debug DCUs on the Compiler page of the Project|Options, the Debug DCU path (Tools|Debugger options|General) is prepended to this search path.

Debug source path Search path for the debugger. The debugger searches paths defined by the compiler by default. If the directory structure has changed since the last compile, a path can be entered here to include a file in the debugging session.

BPL output directory Specifies where the compiler puts generated package files (bpl files).
DCP output directory Specifies where your .dcp file is placed at compilation time. If left blank, the global dcp output directory specified in the Tools|Environment Options Library page is used instead.

Conditionals

Conditional defines Symbols referenced in conditional compiler directives. You can separate multiple defines with semicolons.

Aliases

Unit aliases Useful for backwards compatibility. Specify alias names for units that may have changed names or were merged into a single unit. The format is <oldunit>=<newunit> (for example, QForms=QXforms). You can separate multiple aliases with semicolons.
The default value for Delphi is:
WinTypes=Windows;WinProcs=Windows.Default.

Guidelines for search paths

Use the following guidelines when entering directory names into the Search Path edit box:

Separate multiple directory path names with a semicolons.
WhiteSpace before and after the semicolon is allowed but not required.
Relative and absolute path names are allowed, including path names relative to the current position.

[bobafett] BobbaFet [bobafett]

Code:
if not Programming = 'Severe Migraine' then
                       ShowMessage('Eureka!');
faq102-5352
 
Bobba, Wont that just apply to any one project.
It's mainly to ensure that you have the right library locations for compiles.
The project open dialog remembers was it was last. AFAIK


[red]Support the GNBM You know it makes sense[/red] More on this at forum1091
Steve: Delphi a feersum engin indeed.
 
I think that checking the "Default" checkbox will make it
the default locations. Not sure though as I haven't tried
it.

[bobafett] BobbaFet [bobafett]

Code:
if not Programming = 'Severe Migraine' then
                       ShowMessage('Eureka!');
faq102-5352
 
sggaunt!, BobbaFet! thank you for your contributions. The best solution to my problem seem to be menu: file>reopen. My problem must be just one of a Delphi novice, who builds many learning mini-projects and puts them in different directories to keep a survey of which file belongs to which project.
 
I think I have found the solution to my question. With Delphi(5) the “default” directory (folder) is a property of the windows icon and the start shortcut.
Where applicable do:
- Right click the icon > Click Properties > Write directory in “Run in” edit field. > apply > ok.
- Start > Right click shortcut > ...ditto...
Because the directories are properties of the icon resp. shortcut, each can be different.
Background: I couldn’t find an appertaining options setting in Delphi as e.g. in WordPerfect (Tools > Settings > Files > Document > Default document folder. This overrides the Windows settings).

 
Yes of course you can make a shortcut to any Delphi project file *.prj. This will open the IDE and load the appropraite project.
I have a desktop folder containg shortcuts to several projects.


[red]GNBM 4th Feb[/red] More on and other neat UK stuff at forum1091
Steve: Delphi a feersum engin indeed.
 
sggaunt! probably you are right when stating that my last post is an >of course< to almost all members of this forum (except me). too, thanks for your supplementary hints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top