Saving a separate version of the project file

Delphi enables you to save a separate version of an open project in a directory other than the project directory. The FilelSave Project As command initiates the process. However, because the open project might use shared files in addition to files that were created as part of the current project, the Save Project As command saves only a copy of the project source code (.DPR) file, project options settings (.OPT file), and the project resource (.RES) file to the new location.

Important No unit files are saved to the new location. When you open the copied version, the Project Manager displays all units in the copied project as shared files; that is, none of them reside in the project directory of the currently open project.

â–  To save a separate copy of the project (.DPR) file in another location,

1 Choose FilelSave Project As from the Delphi menu bar to display the Save <projectname> As dialog box.

2 Select the directory where you want to copy the project file.

3 If you want to save the project file under a different name, enter the new name in the File Name edit box. If a .DPR file with the same name exists in the directory you specify, you're prompted as to whether you want to overwrite the existing file.

4 Choose OK to complete the task.

The open project is now the project you just saved.

Delphi saves the .DPR file, the project options (.OPT) file, and the project resource (.RES) file under the name and/or new location you specify. Delphi also saves any modified unit files (in their current location), so you won't be prompted to save these changes again when you close the project. When you open either version of the project, all changes saved with the Save As operation are reflected in both places.

If you check the constituent file list in the Project Manager, you will see that all the files in the currently open version of the project reside in a directory other than the current project directory. If you want separate copies of any of those files in the new project directory, you need to save them individually to the new location using FilelSave File As. (See "Creating a backup of an entire project" on page 139 for more information.)

If you leave the new project unchanged, it continues to use the files in their present (that is, old) location as shared files, which might or might not be what you want. If you don't understand how the new project is using its constituent files, you can run into problems later (see "Project Manager Path column" on page 132 for an example).

Caution Do not use file management tools other than those in Delphi to save a copy of a project to a new location.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment