Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

safe(st) way rename a delphi Project

Im sure this will be a simple one but have a project that started as a test.
When it was created it was saved as "Project2.dpr"

Now the test is no longer a 'test', i would like to change the projects name to something more meaningful.

whats the best way to do this?

Any issues with just changing the file name and the Program line to the new name? i.e.

meaningful.dpr

Program meaningful;   

Note:Delphi 7 if it matters

like image 816
Christopher Chase Avatar asked Nov 18 '08 01:11

Christopher Chase


People also ask

How do I rename a Delphi project?

In the Project Manager, right-click the file that you want to rename. The context menu is displayed. Choose Rename.

How do I change unit name in Delphi?

Use the Refactor > Rename identifierType 'identifierName' dialog box to perform rename refactoring on an identifier, such as a variable, type, field, method, parameter, and others currently selected in the Code Editor. In Delphi, you can rename identifiers used with generics.


2 Answers

Just do "Save Project as" from the file menu in Delphi giving it the name you want and, later on when you feel like, remove the Project2.* files from your folder as they are not needed anymore.

like image 143
Francesca Avatar answered Sep 30 '22 01:09

Francesca


FYI: Starting with Delphi 8 you can simply right-click the project in the project manager and select "Rename" (or simply press F2). This has the benefit over the "Save As" approach that you don't end up with a copy.

(sorry, no Delphi 7 - thanks to Lars for the update)

like image 22
Oliver Giesen Avatar answered Sep 30 '22 02:09

Oliver Giesen