I have been using Delphi 2010 for some time with no issues but recently every time I try to open a project I get a dialog box asking me to open the project
with a folder that doesn't exist. How do I change the path Delphi opens projects.
Assuming you are using Windows...(up to 10 anyway)
Right click on the project's DPR and choose Properties.
What does the Opens with: line say? Mine says bdsLauncher.exe
If it says anything else, then you somehow had the system change it directly or indirectly. Virus, installation of some other text editor, whatever...not a big deal in any case. Do the same check for files with extensions DPROJ, GROUPPROJ, ...
If you need to change it, the file should be in a path similar to my C:\Program Files (x86)\Embarcadero\Studio\21.0\bin except that your version isn't 21.0
I did have issues once upon a time with XE7 where I had to set DPR to open with bds.exe, and DPROJ opened fine with bdsLauncher, but it was probably due to IT's setup of my laptop for someone else, and something with the Win 10 software reset (instead of a format or restore from clone) when they gave it to me. Installing an XE7 update fixed the problem, and it hasn't been an issue since we moved to 10.4
This is my first Delphi upgrade (from XE5 to XE7). After the upgrade, my project still has open units (such as Vcl.Forms) that indicate the XE5 path (C:\Program Files (x86)\Embarcadero\Rad Studio\12.0\Source\VCL\Common\Vcl.Forms.pas) when I hover the mouse over the name of the tab. If I CTRL+click on the word "Forms" under "uses" on one of my units, the IDE directs me to this open page of Forms (12.0). If I close the Forms page and again CTRL+click on "Forms", the IDE then opens a page that indicates it is the new path (C:\Program Files (x86)\Embarcadero\Studio\15.0\Source\VCL\Common\Vcl.Forms.pas). I close all these old pages, save and when I re-open, they are back. I think maybe I need to update some library path or something, but when I go to Tools>Options>Delphi Options>Library everything either says 15.0 in the path or at least has a different path from the XE5 version. Can anyone explain what is going on here and whether this is a problem?
My Rad Studio cant open default extension (like dpr, dproj , pas ). How i can associate these extensions in the RAD Studio XE3 option? I search in the Tools->Options but i don't find path for do that.
Thanks.
Merge this into your registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.DPR]
#="BDS.DprFile"
[HKEY_CLASSES_ROOT\BDS.DprFile]
#="Delphi Project File"
"FriendlyTypeName"=hex(2):40,00,25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,\
00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,\
5c,00,45,00,6d,00,62,00,61,00,72,00,63,00,61,00,64,00,65,00,72,00,6f,00,5c,\
00,53,00,68,00,65,00,6c,00,6c,00,5c,00,42,00,44,00,53,00,53,00,52,00,2e,00,\
64,00,6c,00,6c,00,2c,00,2d,00,31,00,37,00,30,00,39,00,00,00
[HKEY_CLASSES_ROOT\BDS.DprFile\DefaultIcon]
#="\"C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\10.0\\Bin\\delphicoreide170.bpl\",3"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell]
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open]
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\Command]
#="\"C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\10.0\\Bin\\bdsLauncher.exe\" \"C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\10.0\\Bin\\bds.exe\" /np"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\ddeexec]
#="[open(\"%1\")]"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\ddeexec\application]
#="bdslauncher"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\ddeexec\topic]
#="system"
Obviously this assumes your XE3 lives in the same place as mine. If it's elsewhere on your machine, then update the paths accordingly.
This is probably easier than an wholesale re-install.
Is there any way that I can have the Delphi IDE auto-save all opened projects every X minutes, or just before compilatilation? I looked in XE2 and in Gexperts and didn't see anything, but that means nothing as I am thick.
Check the checkbox in Tools->Options->Environment Options->Autosave->Editor Files. It will save the files on compile/run.
(If you haven't already, I'd also check Tools->Options->Editor Options->Create backup files, and set the File backup limit to 10 or more. This enables a sort of version control using the .history folder for each project (which you can access using the History tab at the bottom of the Code Editor.)
Andy's DDevExtensions has a "Compile Backup" option that automatically saves a copy of modified units to a .cbk file (e.g. Example.pas.cbk).
In Delphi Rio
Tools>Options>IDE>Saving and Desktop
CnPack seems to have such function since version 0.8.2
It is at CnPack - IDE enhancement Settings - Editor Enhancements - Tabset / Button - Auto Save All in my version 1.1.4.924 on the XE7:
Delphi is a great IDE and compiler. But sometimes it also has a few minor flaws. Like my problem right now...
I am working on a project that's created in Delphi 2007. But I like to use Delphi XE simply because the IDE has some interesting features and it happens to be more stable on my computer. So I opened the project in Delphi XE and have been changing the code, with backwards-compatibility in mind.
When I save the project again to open it in D2007, it has problems reading the project, though. The dproj file of XE is not compatible with 2007. To open the project in D2007 again, I need to delete the dproj file and open the dpr file. (Or I need to save the old proj file of 2007 and put it back again when I want to use D2007 again.)
This is annoying. Does anyone know a better solution to keep the right dproj file for each version?
One thing you could do would be to place the DPR and DPROJ files in separate directories. Unfortunately you would have to merge any changes you make in one version to the other, but that is fairly simple using Beyond compare:
BCompare.exe .\d2007\project.dpr .\dXE\project.dpr
You can have your project in version control like Subversion. If you omit the .dproj files from version control, it is usually quite manageable to work in different versions of Delphi
I'm using single .dpr and multiple .dproj files in such case.
Basic steps:
- Create project in D2007.
- Close project.
- Copy project.dproj to project.xe.dproj.
- Open project.xe.dproj in XE.
- Let it upgrade the project, save it and overwrite old project.xe.dproj.
- Delete backup copy of project.xe.dproj created during the upgrade.
Now you have project.dproj to use in D2007 and project.xe.dproj to use in XE. Both are using the same codebase - project.dpr.