9

Does anyone know how to update dUnit which comes with Delphi 2010 to the latest svn source code?

mjn
  • 36,362
  • 28
  • 176
  • 378
Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121
  • 1
    Uh, download it, and update the various library paths (environment and of your projects) to point to the source dir of the download instead of $(BDS)\Lib\DUnit? – Marjan Venema Jun 07 '11 at 17:16

2 Answers2

9

Steps

  • Goto http://sourceforge.net/projects/dunit/
  • Download the zip file (currently version 9.3.0)
  • Unpack to a folder of your choice
  • Use Components|Install packages to remove the current DUnit package bpl.
  • Compile and install (optional) the new version. Compilation is needed only if you want to install the design time wizards or if you do not build your projects using the source. Installation is only needed if you want to use the design time wizards. Read the various doc and readme files for further instructions.
  • Update your environment's library path and the search paths of projects using DUnit:
    • take out any references to $(BDS)\source\DUnit*
    • put in a reference to the src subfolder of where you installed the new version

Update

The latest version on sourceforge is 9.3.0, but that is not the latest DUnit version. To get the latest DUnit version, you can go to its SVN repository: https://dunit.svn.sourceforge.net/svnroot/dunit/trunk/

The are at 9.4.0 (revision 41 according to the top of the page, version found in readme-9.4.txt and release.ini).

The sources found there do not contain any packages for Delphi versions past D7, but as mentioned in my response to Serg, these packages are for the DUnitWizards which were contributed from outside the main DUnit project. To use DUnit, you don't need these wizards. In fact, DUnit itself does not have any packages!

I think you can still use the wizards (or should I say project/unit templates) that come standard with Delphi and just make sure that your library and search paths point to the new version... In fact, I know you can, because that is what I did a couple of days ago: use the File|New|Other|Unit test| project and unit templates that come standard with the IDE, but compile against the newest sources downloaded from SVN.

Marjan Venema
  • 19,136
  • 6
  • 65
  • 79
  • 1
    It may be a bit more complicated especially installing design time since it seems there are other design packages dependent on unittestide (at least I noticed intraweb) but good advice in general. +1 – Ondrej Kelle Jun 07 '11 at 18:17
  • newer packages will not install until previous version has been removed. – Premature Optimization Jun 07 '11 at 18:22
  • @TOndrej: where did you notice IntraWeb? I am looking through DUnit and I can't find any references...? – Marjan Venema Jun 07 '11 at 18:29
  • @user759588: you did notice the "Use Components|Install packages to remove the current DUnit package bpl" step? – Marjan Venema Jun 07 '11 at 18:30
  • -1. Did you ever have a look at DUnit 9.3.0? It contains packages for Delphi 5, 6 and 7 only. – kludg Jun 07 '11 at 18:38
  • @Serg: that is only for the DUnitWizards which were contributed from "outside" the DUnit project. DUnit itself is fully up-to-date. In fact I am using it with D2010. But admittedly, that is version 9.4.0, though that doesn't even have any packages for the wizards that I can find. Checking the link for a better download... – Marjan Venema Jun 07 '11 at 18:39
  • @Marjan: But it does not contain packages to install in Delphi 2010. At least I have not found them when I was thinking about upgrading DUnit. I don't know how to install DUnit from sourceforge project. – kludg Jun 07 '11 at 18:44
  • @Serg: by the looks of it you do not need to install anything. See update to my answer. – Marjan Venema Jun 07 '11 at 18:53
  • @Marjan It's intraweb that references dunit, not the other way round. – Ondrej Kelle Jun 07 '11 at 20:06
  • @TOndrej: ah, ok, yes that could be a problem. But I think it isn't a problem as long as the IDE can find that unittestide bpl. At least I have D2010 installed without that (I excluded DUnit from the install as I knew I was going to use the newer version) but with the IntraWeb design time package. And I haven't heard the IDE complaining... Plus, the unittestide bpl is probably something Delphi/IDE specific and not part of DUnit in itself. I guess it contains the project and unit templates for the File|New|Other|Unit Tests page. – Marjan Venema Jun 07 '11 at 20:36
  • I'm shocked that dUnit on sourceforge doesn't contain packages for newer versions than Delphi 7. – Warren P Jun 08 '11 at 09:48
  • @Warren: again, the packages in question are not a part of DUnit itself, but from a third party contribution. If I were on the DUnit team I'd probably consider not distributing out-of-date third party stuff anymore, but then again why take it away? Someone might be interested enough to bring them into today's world and possibly contribute their port back to the project... – Marjan Venema Jun 08 '11 at 10:00
  • Is there a sourceforge project for the thirdparty contributions? Why did they stay "third party" if they're open source and only useful for dUnit? – Warren P Jun 08 '11 at 13:07
  • @Warren: don't know about a project for those contributions. As for the "why": anything I say would be speculation. – Marjan Venema Jun 08 '11 at 14:00
  • @Warren P: current versions of DUnit test framework now require Delphi 2007 and higher to compile ... – mjn Dec 01 '11 at 13:54
0

You can either unregister current DUnit package by removing its key from Registry:

HKCU\Software\CodeGear\BDS\7.0\Known IDE Packages\$(BDS)\Bin\unittestide140.bpl

Then download and install the new version from any folder you want, into the IDE as you install any other IDE package.

Or you build the new version, copy the generated BPL file to $(BDS)\bin\ folder, and its .DCU files to $(BDS)\Lib\ folder, and replace $(BDS)\Source\DUnit folder with the source folder you downloaded from SVN.

vcldeveloper
  • 7,399
  • 2
  • 33
  • 39