views:

984

answers:

3

I'm moving frequently between D7 and D2009 with library code that works with both. For ease of going both ways, I'm routinely deleting all the D2009 additional files that get created, eg *.dproj etc such that on entry to D2009 I'm only ever taking D7 files. This is nice because D2009 automatically makes a *.dproj, *.dgroup etc and apart from a notification on entry to D2009 that each project has been upgraded you can build immediately.

I have two identical machines, each with D2009 on them. The 'good' one does what I've listed above, creating an upgraded project with the default build configurations 'base', 'debug' and 'release'. Looking in these, I can see my options copied from the Delphi 7 *.dof file (eg compilier options and output directory etc). Suddenly though, on the 'bad' machine with identical D7 projects supplied to it, although it 'upgrades' the projects it does not import the compiler options and output directory stuff. I've not fiddled with build configurations at all. I can manually import an option set saved on the good machine, but this is tedious and I'd like to hunt for why the 'bad' machine behaves in a different way. Is there a 'master' build configuration that might now have a time/date that makes D2009 think I want that instead on a default upgrade?

Thanks in anticipation. Brian

+1  A: 

Ok, just a few questions, you have two machines the good the bad (and not the ugly). The good creates a valid 2009 project from the 7 project. But the bad one misses the compiler options and the directory settings.

At first, are you sure you have provided the .cfg file? This one is needed for this information.

Next, which order are the delphi versions installed. If the newest version is installed before the oldest, there can be some problems. Installing them in correct order gives no problems. (I have had 6, 7, 8, 2006, 2007, 2009 on the same machine without problems).

You said that the problems happened "suddenly". Can you recall what has been changed on the bad machine just before the problems started?

If you have the time, you can try to reïnstall anything.

Hope this helps.

Gamecat
Well, now both machines are behaving this way and yes, the installation was in the order D7>D2007>D2009. I can start with the same source projects (yes, they have *.cfg files) and these appear fine under D7. After deleting all D2009 files, opening the D7 *.dpr's produces the 'ipgraded' *.dproj files but the compiler setttings and directories are missing. I've now worked around it by the excellent D2009 project configuration manager to export a single configuation to all projects.
Brian Frost
A: 

Do you have relative paths in your projects? It seems that D2009 (or the BDS ide in general) reacts slightly different with respect to the work-directory used to resolve partial paths.

Sometimes when you file->open a file, all relative paths are suddenly relative to the path of that opened file. This state also seems to be more persistent.

To exclude such problem, open a file from the respective .dpr/.bdsproj/.dproj dir for each project of your projectgroup and do a build.

Marco van de Voort
No, all directories are specified as full paths. Brian.
Brian Frost
+1  A: 

I've just come across this exact problem.

In my Drag/Drop components, although I support Delphi 5 through Delphi 2010, I only distribute the dof files. I do this to avoid having to keep the dof and dproj files in sync. Now all of a sudden the search path setting from the dof files are not being exported to the dproj files.

The solution I've found is to strip the dof file of everything I don't need:

[FileVersion]
Version=7.0
[Directories]
OutputDir=.
UnitOutputDir=.
SearchPath=..\..\Source

With this change the dof file is imported correctly.

I haven't had time (nor reason or motivation) to investigate precisely which entry in the dof file that is preventing the SearchPath from being exported.

Anders Melander