Delphi not opening projects - delphi

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

Related

Delphi 2007 can't start anymore - root element is missing

Delphi 2007 can't start anymore.
I 've tried re-installed many times but still not working.
You are probably encountering the following issue mentioned on the Delphi Wikia page:
Root element is missing
If you get the error "root element is missing" when you start the Delphi 2007 IDE, this can be caused by a corrupt file EnvOptions.proj, located in the Application Data\Borland\BDS\5.0 subdirectory of your profile. Move this file somewhere else and restart the IDE. If that was the problem, the IDE will regenerate the file and work again.
I had the very same error message when Windows update force shutdown my system.
My system is Win11, and Alexandria 11.2, while I am testing my project with Android Phone. The IDE showed me "Root element is missing. it cannot process myproject.deployproj".
I tried to save the project as another project, and select the very same name as origin project file, and then recompile it.
Everything comes normal.

Delphi 2007 (CodeGear Delphi) locks EXE after link - (Win7 x64)

Delphi 2007 sometimmes holds a handle to the EXE it's linker makes. Sometimes it works fine. But other times it's a whole day saying: "Cannot make EXE file" or something similar when trying to compile or build a solution.
When I try to launch EXE made from Delphi it says that another process is holding the file. Going to "unlocker" says: bds.exe. Even if I unlock it I must rename it to eg. app1.ex_ and copy it back to app1.exe. But still Delphi is holding the handle to that .ex_ file.
Needless to say it makes debugging (or even running) and developing quite slow: having to deal with locked exe...
Any suggestion? Workaroung or fix available - I've been looking for it but can seem to find it: I'm sure others have the same problems (I've seen it) - is there any fix for this?
env.: Win7 Ent. x64, Delphi CodeGear 2007
Thanks!
Going to "unlocker" says: bds.exe. Even if I unlock it I must rename
it to eg. app1.ex_ and copy it back to app1.exe. But still Delphi is
holding the handle to that .ex_ file.
Based on the fact that renaming file causes the BDS.exe to "hold the lock" of renamed file I seriously doubt the BDS.exe is actually the one that is holding the lock. If BDS would be holding the lock on that file you wouldn't even be able to rename it.
So I would seriously suspect that your AntiVirus software might be behind it.
I even remeber having similar difficulties years back using Delphi 7. The cause then was ma AntiVirus software (Nod32 version 2). First workaround I was unsing was to simply delete the application exe file prior compiling, but later I simply added entire Folder into the AV residental protection ignore list.
So try adding your project folder into ignore list and see if it solves the problem.

Delphi IDE is not visible

I double click the Delphi icon on the desktop, but the IDE does not show up. Looking into the Task Manager list, the BDS.exe appears under the Processes list, while it should appear under the Applications list. Has anyone any idea why this is happening? Note: the IDE version I'm currently using is XE3, but the 2010 version, wich is also installed, behaves the same way. Windows version is 8.1. I really appreciate any help.
Often this happens because you've got either a poorly behaving third-party component installed, or you've set the IDE to load the last project when it opens and it can't do that for some reason.
There are a few things that can help resolve this; they involve editing the shortcut to Delphi temporarily (or creating a new shortcut and modifying it instead, of course).
Edit the shortcut and add the -np parameter to the command line; it tells the IDE to not load a project on startup. If this works, you can try opening your project. If the IDE hangs again, rename your .dproj file to a different extension and open it with just the .dpr; the IDE will create a new .dproj file;
If the above doesn't work, edit the shortcut again, remove the -np, and replace it with -rFoo. This tells the IDE to load the Foo configuration from the registry on startup instead of the normal Delphi configuration. (Foo doesn't exist, so the IDE will create an all-new configuration in the registry named Foo, with no third-party components installed and all of the default settings for folders and options.) If this works, you can reinstall your third-party component sets one at a time to identify the problem package, and the edit the registry to remove it from your normal Delphi configuration.
Note: Foo in the second bullet point item above is just a name. It has no special meaning; it's just something that's commonly used as a dummy type or variable content. The parameter can be set to anything that doesn't already exist as a configuration in the Delphi registry settings; Bar, Dummy or Zombie will work just as well.
Once you've tried these (whether they fix the issue or not), don't forget to go back to remove the no longer needed command line parameter.
If none of the above works, a reinstall may be in order.
If you want to try a reinstall, uninstall the existing version (using the usual Control Panel Uninstall Software applet).
Doing an uninstall does not remove the registry keys, and a new install will see it exists and not create a new one, so you'll need to use RegEdit to delete the HKCU\Software\Embarcadero\BDS\10.0 tree (or rename it to something different like Old 10.0), and then reinstall Delphi. (As you're using other Delphi versions, make sure you leave those keys alone so you don't damage those installs. Only alter or delete the 10.0 tree.)
In Delphi 4 and 5 it was the delphi32.dsk file. You can delete this file but you can also edit the file, section 'Main Window'. First kill the process in the taskmanager before you edit/delete this disk file.
[Main Window]
Create=1
Visible=0 <-- This value must be **1**
State=0
......
......
Start Delphi - et viola! It is back again.
Offtopic: Still running Delphi 5 on Windows 7, blazing fast, yes!

AV in IDE when opening any project or creating new in Delphi 7

After many years of trouble-free use, Delphi 7 is now throwing an Access violation at address
40233A3E in module 'vclx70.bpl'. Read of address 0000021C.
When starting the IDE, the default empty project and unit/form appear and compile and run fine.
I'm developing Windows apps, running on Windows 7 (x64).
I haven't installed any new packages or tools in many, many months.
I stopped, dead in the water, unable to work.
Any suggestions other than a complete rip and re-install (which takes many hours...)
EDIT: I un-installed and re-installed Delphi 7. Now I'm getting Access violation in vcl70.bpl. I would have thought that uninstalling D7 would completely remove all of its libraries, etc... Are there folders that I should manually delete after uninstalling D7?
Problem fixed (and major machine rebuild averted)!
Gerrit Beuze of ModelMaker Tools suggested elsewhere:
Remove all .dsk (project desktop) files for the project you try to load, Temp remove all *.dst (desktop files) from C:\Program Files\Borland\Delphi7\Bin
After performing these steps, the problem appears to have been fixed.
A read at that low a memory address is typically a problem in a third-party component. However, you say you haven't installed anything new in months.
The other thing that's strange is that you're getting the error in vclx70, which is one of the CLX libraries. Are you doing anything using the CLX (leftover cross platform - Kylix) forms or dialogs?
If not, you might do a search in your source for QDialogs, QForms, or any of the other units in %PROGRAMFILES%\Borland\Delphi7\Source\Clx, and see if something mistakenly was added that you didn't intend that's pulling CLX into your project. If so, change it to the VCL version instead (by just removing the 'Q' from the front of the unit name in your source).
EDIT: You might try going into the registry (D7 would be HKCU\Software\Borland\Delphi\7.0) and temporarily changing the name of the delphiCLXide entry in Known IDE Packages to something else (put an underscore in front of the name or something). Then start the IDE. You should get an error message about Delphi being unable to load the package, and asking if you want to try and load it again in the future. Answer 'Yes', and let the IDE continue to load. Then try again with your project and see what happens.
The step above removes CLX temporarily from loading in the IDE designer. (Don't worry, you can just rename the key again to put it back if it's not the problem. If it doesn't come back, make sure the IDE didn't add an entry in the Disabled Packages entry; if it did, just remove it.)
If this works, you can open the project options (.DOF) file for your project, and remove the CLX libraries from the Packages list. This prevents it from being included when your project is loaded.
Once you've established whether the problem actually
My first suggestion would be to use XP Mode or another VM infrastructure to run such an old Delphi version on Windows 7 (I do it that way).
Another potential method is to use the compatibility settings in Windows 7 to set it to XP and to exempt the Delphi 7 process from DEP (data execution prevention) policies the system may otherwise impose. I've had some trouble with enabled DEP with older Borland IDEs and also VS 2003.

Force Delphi to open a project with chdir the project's dir

I have Delphi 6 prof, with Win7.
We have many projects. Some of them are favourites, commonly used/edited.
Formerly I used GExperts' fav. files that is shown in "Open dialog" for this.
But this is vanished with Win7.
The main problem that Delphi don't forcable to use a folder as initial folder.
What's this meaning?
When I start a Delphi with clicking on a dpr, or start with a link that points to Delphi + the needed dpr, Delphi remains in the prev. dir.
Ok, the project is opening, but I'm in the last dir that used in Delphi.
No matter that I shut down, and open the Delphi again. It is remaining in this folder.
Delphi can opens the project dir in two times:
- a.) select a dpr with opendialog
- b.) use the "closed projects" (but this have only 4 items, no more)
I tried many things.
I tried to use batchfile that prev. opens the needed dir, and next start the Delphi with the needed project.
I tried to set "starting folder" in a link. I try to find the dirs...
But no matter what I did, Delphi not use the project's folder.
This problem, because we have many same folder, and I easily miss something, confuse files, because I think I'm in good directory.
Do you have some idea, how to force Delphi to open the folder where the actual project is in?
Thanks for your help:
dd
I suspect it's a registry setting. Look at the registry and try editing the relevant values there (I don't have D6 handy, and I know it's changed in D2010 which is what I have right now).

Resources