Colin,

we use the same names for projects but they are indifferent directories.

Packages, however have to be named differently between delphi versions anyway - we still keep them in separate folder.

Joylon,

that works brilliantly and now the IDE doesnt fiddle with ifdefs. The only possible downside is that the dproj file has no entries for DCCReference.. It doesnt seem to need it. And the other benefit is that I can use the same name for the include file across the delphi versions. It makes it much easier to Beyond Compare it.

Rohit


On 22/07/2014 11:31 a.m., Colin Johnsun wrote:
Hi David and Jolyon,

Thanks for clarifying the problem.

Even though having different-named projects helps you avoid project conflicts between different versions of Delphi it does force you into having to explicitly keep the projects in sync which can be a big PITA.

Cheers,
Colin


On 22 July 2014 06:32, Jolyon Smith <[email protected] <mailto:[email protected]>> wrote:

    The problem with that Colin is that there is no intrinsic
    mechanism in Delphi to share a DPR between projects of different
    names.  So if your application DPR is in any way non-standard,
    then having different named projects means having to keep the
    separate DPR's all in sync, which I understand is the case in point.

    This is particularly annoying when you realise that the XML in the
    dproj files references the project source (DPR) explicitly, so
    there really is no reason these days for the filename of the DPR
    and the filename of the DPROJ to have to be consistent (unlike,
    for example, in days gone past when the IDE had to infer various
    files associated with a project by coincident filename stem).


    On 21 July 2014 23:47, Colin Johnsun <[email protected]
    <mailto:[email protected]>> wrote:

        Wouldn't it be easier just to have one project called
        MyAppD2007.dproj and another called MyAppDXE3.dproj?

        Just rename the executable after compilation.

        Regards,
        Colin

        On Monday, 21 July 2014, David Brennan
        <[email protected]
        <mailto:[email protected]>> wrote:

            We wrestled with this problem for a while because we were
            using both 2007 and XE3. We also have quite a few projects
            which share sets of files and it was a bit of a mission
            remembering to add new files to all applicable projects.

            In the end we wrote a small program to build DPRs and
            Dproj files from a combination of the old dproj file, a
            custom DPR format (with our own extension) and include
            files which were referenced within the custom DPR. The
            program replaces the include file references in the custom
            DPR and then outputs a proper DPR. Then with the Dproj it
            deletes the old file references and builds new XML file
            records from the include files.

            It would be nice if Delphi fully supported include files
            in the DPR (tricky I know but still) or provided a built
            in method like what we do.

            Cheers,

            David.

            *From:*[email protected]
            [mailto:[email protected]] *On Behalf
            Of *Jolyon Smith
            *Sent:* Monday, 21 July 2014 1:12 p.m.
            *To:* NZ Borland Developers Group - Delphi List
            *Subject:* Re: [DUG] Migrating to XE6 - Project Issues

            ime sharing dpk's (or even dpr's) (or trying to) between
            versions can be a recipe for headaches.

            Have you considered using include files to achieve the
            sharing of the "meat" of your dpk, whilst allowing the IDE
            to maintain "different" versions for each IDE in the dpk
            files themselves (with attendant dproj etc) ?

            package MyPackage2007;

            {$i mypackage.inc}

            end.

            package MyPackageXE6;

            {$i mypackage.inc}

            end.


            The downside is that you lose some of the IDE support for
            working with the content of your DPK/DPR, but if you are
            dependent on $ifdef's in this area then you no doubt
            already find yourself having to steer well clear of such
            IDE support anyway, since it has as tendency to clobber
            such things (and if that's the case, it's worth nothing
            that the contents of your include file(s) will be
            conveniently safe from any inadvertent meddling by the IDE!).

            On 21 July 2014 12:14, Rohit Gupta <[email protected]> wrote:

            Hi Joylon,

            Its sorted now.  It just does not like the old dproj file,
            it doesn't like a cut down edited version, it doesnt like
            a blank one and it doesnt like a missing one  !!!!

            I made a new dpk project and saved it and then copied
            everything from the old dpk and it works.  It seems like
            it wants some new xml lines in it or ELSE..

            The issue here is that we have to work concurrently on
            2007 and XE6 versions with the same source (and a few
            ifdefs).  So the last thing I want is the various clauses
- includes, requires, uses to be in a different order. When its 50 to 100 of them, it makes a huge difference to
            source comparison.

            Rohit

            On 21/07/2014 12:05 p.m., Jolyon Smith wrote:

                It looks like perhaps the IDE is trying to be too
                clever and when it doesn't find a current dproj is
                looking for a historical bdsproj to upgrade from and
                not coping when there isn't one (it being
                inconceivable that there would be anyone using an even
                older version of Delphi that predated the bdsproj).

                To avoid this, instead of deleting the dproj, try
                adding the packages with the current dproj.

                With the prior dproj intact, the IDE should identify
                that you are upgrading and offer to save the old
                version with a different name (or offer to save the
                new version with a different name, I forget which way
                round.  Though I have a niggly feeling that in the
                past I was frustrated by the fact that it was the
                former, which imho is the least useful approach!)


                You have versioning/backups though, so it shouldn't
                matter which particular named variety of these files
                the IDE chooses to mess with.  Once you have an
                upgraded package/project, you "Save As" to get a file
                correctly named for new version you need, and then
                restore your previous versions from source
                control/backups.  Right ?  :)


                hth

                On 21 July 2014 11:28, Rohit Gupta <[email protected]>
                wrote:

                I am trying to migrate a group of projects (packages)
                from 2007 to
                XE6.    I deleted the dcus, drc and dproj files.

                Even when I start from a blank project group and add
                the existing
                project in I get

                "Unable to load project *****.bdsproj

                Of course it doesnt exist, only the dpk does.  A dump
                of error details
                follows.  Incidentally I had the same issue last time
                migrating another
                group to XE5.  That I had to recreate brand new dpk
                file.... and the
                stupid thing was identical to the original one...

                Any clues anyone ?



                [21CA67AE]{delphicoreide200.bpl}
                BaseDelphiProject.TBaseDelphiProject.Create (Line 775,
                "BaseDelphiProject.pas" + 51) + $2C
                [223A563A]{delphide200.bpl}
                DelphiProject.TDelphiProjectCreationTrait.OpenProject
                (Line 314,
                "DelphiProject.pas" + 7) + $19
                [2069F929]{coreide200.bpl}
                ProjectFileUtils.LoadProjectFile (Line 642,
                "ProjectFileUtils.pas" + 29) + $34
                [21D05BED]{delphicoreide200.bpl}
                CommonPasReg.TLegacyModuleHandler.FileOpen (Line 482,
                "CommonPasReg.pas"
                + 38) + $D
                [2086B468]{coreide200.bpl}
                DocModul.TFilterList.OpenFile (Line 807,
                "DocModul.pas" + 36) + $0
                [20870A8C]{coreide200.bpl} DocModul.ProjectOpenDialog
                (Line 3295,
                "DocModul.pas" + 42) + $3E
                [2061437B]{coreide200.bpl}
                ProjectMgr.TProjectManager.AddTarget (Line
                449, "ProjectMgr.pas" + 2) + $7
                [20613C54]{coreide200.bpl}
                ProjectMgr.TProjectManager.CommandHandler
                (Line 272, "ProjectMgr.pas" + 5) + $A
                [204A397B]{coreide200.bpl}
                ContainerIntf.TIDEProjectManagerMenuObject.Execute
                (Line 862,
                "ContainerIntf.pas" + 26) + $17
                [204A559E]{coreide200.bpl}
                ContainerIntf.TProjectManagerMenuItem.Click
                (Line 1110, "ContainerIntf.pas" + 18) + $22
                [506289BC]{vcl200.bpl  }
                Vcl.Menus.TMenu.DispatchCommand (Line 3436,
                "Vcl.Menus.pas" + 5) + $4
                [50629C2E]{vcl200.bpl  } Vcl.Menus.TPopupList.WndProc
                (Line 4597,
                "Vcl.Menus.pas" + 4) + $E
                [50629B7D]{vcl200.bpl  }
                Vcl.Menus.TPopupList.MainWndProc (Line 4572,
                "Vcl.Menus.pas" + 2) + $5
                [501766E4]{rtl200.bpl  } System.Classes.StdWndProc
                (Line 17064,
                "System.Classes.pas" + 6) + $1
                [50644241]{vcl200.bpl  }
                Vcl.Forms.TApplication.CancelHint (Line 11180,
                "Vcl.Forms.pas" + 6) + $D
                [50642EDF]{vcl200.bpl  }
                Vcl.Forms.TApplication.ProcessMessage (Line
                10351, "Vcl.Forms.pas" + 23) + $1
                [50642F22]{vcl200.bpl  }
                Vcl.Forms.TApplication.HandleMessage (Line
                10381, "Vcl.Forms.pas" + 1) + $4
                [50643255]{vcl200.bpl  } Vcl.Forms.TApplication.Run
                (Line 10519,
                "Vcl.Forms.pas" + 26) + $3


                Rohit

                _______________________________________________
                NZ Borland Developers Group - Delphi mailing list
                Post: [email protected]
                Admin: http://delphi.org.nz/mailman/listinfo/delphi
                Unsubscribe: send an email to
                [email protected] with Subject:
                unsubscribe

                _______________________________________________

                NZ Borland Developers Group - Delphi mailing list

                Post:[email protected]

                Admin:http://delphi.org.nz/mailman/listinfo/delphi

                Unsubscribe: send an email 
[email protected]  with Subject: unsubscribe

--
            Regards

            *Rohit Gupta*
            B.E. Elec., M.E., Mem IEEE, Mem IET
            Technical Director
            Computer Fanatics Ltd

            *Tel *4892280
            *Fax *4892290
            *Web *www.cfl.co.nz <http://www.cfl.co.nz>

            
------------------------------------------------------------------------

            This email and any attachments contain information, which
            is confidential and may be subject to legal privilege and
            copyright. If you are not the intended recipient, you must
            not use, distribute or copy this email or attachments. If
            you have received this in error, please notify us
            immediately by return email and then delete this email and
            any attachments.


            _______________________________________________
            NZ Borland Developers Group - Delphi mailing list
            Post: [email protected]
            Admin: http://delphi.org.nz/mailman/listinfo/delphi
            Unsubscribe: send an email to
            [email protected] with Subject: unsubscribe


        _______________________________________________
        NZ Borland Developers Group - Delphi mailing list
        Post: [email protected]
        <mailto:[email protected]>
        Admin: http://delphi.org.nz/mailman/listinfo/delphi
        Unsubscribe: send an email to
        [email protected]
        <mailto:[email protected]> with Subject:
        unsubscribe



    _______________________________________________
    NZ Borland Developers Group - Delphi mailing list
    Post: [email protected]
    <mailto:[email protected]>
    Admin: http://delphi.org.nz/mailman/listinfo/delphi
    Unsubscribe: send an email to [email protected]
    <mailto:[email protected]> with Subject:
    unsubscribe




_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe


--

Regards

*Rohit Gupta*
B.E. Elec., M.E., Mem IEEE, Mem IET
Technical Director
Computer Fanatics Ltd

*Tel *4892280
*Fax *4892290
*Web *www.cfl.co.nz

------------------------------------------------------------------------
This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments.
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [email protected] with 
Subject: unsubscribe

Reply via email to