Hi

Hi,

It's not a real feature request but maybe something to think about so we can provide a common solution.

I'm currently struggling in upgrading from DelphiXE2 to DelphiXE7, the main part I'm struggling again with the folder structure used by component and libraries.
Have been struggling with this same thing when upgrading from Delphi7 to DelphiXE2, so I have the idea that I'm losing time.

Does a best practice exists on how this could be done, if not maybe we could create one and when community-members review this one could

Wouldn't it be nice that every one uses the same folder structure so you don't spend a lot of time when components, libraries are updated or you have to upgrade/downgrade just some simple find/replaces and you're done
Just check them out from the original source control system, move them to the correct folder in you're own source control system, compile and you're done.

I would suggest following .. It's just a start can be improved

[Structure] =
 \Source = .pas,.dfm ( in subfolders )
 \Packages\[DelphiVersion] = [Component]ProjectGroup groupproj *.dproj *.dpk
 \Bin\[DelphiVersion]\$(Platform)\$(Config) = *.exe's, *.dll's , *.bpl's
 \Lib\[DelphiVersion]\$(Platform)\$(Config) = *.dcu
 \Documents - Some documentation documents
 \Help      - HelpFiles
 \Templates - Code Templates used
 \Samples - Sample Code 
 \Tests [Structure]
 
[Simple-Structure]= 
 \Source = .pas,.dfm ( subfolders when necessary )
 \Packages\[DelphiVersion] = [Component]ProjectGroup groupproj *.dproj *.dpk
 \Documents 
 \Help      
 \Samples  
 \Tests [Structure]
 
Source\Common\[Component1].[Version]\[Structure]
Source\Common\[Component1].[Version]\[Structure]
Source\Common\[Component2].[Version]\[Structure]
Source\Projects\[Project1].[Version]\[Project1]\ [Structure]
Source\Projects\[Project1].[Version]\[Project1.SubProject1]\ [Simple-Structure] ( use bin and lib from [Project1] )
Source\Projects\[Project1].[Version]\[Project1.SubProject2]\ [Simple-Structure] ( use bin and lib from [Project1] )
Source\Projects\[Project2].[Version]\[Structure]
Source\Projects\[Project2].[Version]\[Structure]

[Version] = "Latest" , "Beta"
[DelphiVersion] = "DelphiXE2" or "DelphiXE7" or "CBuilderXE7" 

If everyone follows this structure ( or an improved one) I'm hoping when I'm going to upgrade to DelphiXE8 I'm going to have less troubles and when upgrading to DelphiXE11 all the troubles are gone.

Comments

  1. In addition to what Lars Fosdal​ asked : is this about the Embarcadero provided folder structure as well?

    ReplyDelete
  2. Jeroen Wiert Pluimers Yes the full monty and referring to the discussion Stefan started that's also an issue.
    Adding a unit to the project search path should be almost a no-brainer. 
    Who is providing me this unit let's take for example Spring4D do I want to use the latest version or some kind of specific version  - because I know there is an compatibility issue with some version. In the Spring4D case I know it's save always to use the Latest.
     - Open Project options and adding
    $(SourceRoot)\common\Spring4D.Latest\lib\$(Version)\$(platform)\$(config)
     - Or in the future use some IDE plug-in to select the wanted component/library

    the only thing you have to add to the environment variables are
     $(SourceRoot) = I'm using E:\RAD\
     $(Version) = DelphiXE2 or DelphiXE7 or ...

    I would say don't make me think. It's already difficult enough to provide solutions to customers answer that I have to think and look for the correct path of some kind of component I want to use. All that time could be avoided if there is a unified structure that in the future can be provided by Embarcadero.

    In the past I used environment settings, system wide search paths, IDE search paths , project search paths, all those things when my code compiles I was happy. 
    Sometimes I had to re-install my system and I have to redo that set up again, what a struggle that was and now I want to upgrade and starting to use an automated build server,
    again a big struggle to get everything up and running. So the simplest thing that could is that each .dproj handles it's own dependencies and paths using an unified structure would be awesome. 
    Setup a base configuration, install all the IDE plug-ins and 3rd party design time components you're using. Check out the source code, autocreate a AllProjectsIncludedProjectGroup and say compile all from here and you can start.

    ReplyDelete
  3. Jo Claes a really hard question, not only for Delphi. I tend to be very specific for projects (or suites of projects) and tend to save the complete state with them. This does cost a lot of storage, but allows for independent updating.

    ReplyDelete

Post a Comment