Pages

2008-02-29

New use for subversion

Have you ever been in the situation where you need to figure out exactly how some legacy software works? I have too, a couple of times. This time I was trying to make a build server for some old Delphi stuff, when I suddenly realized that much of the hard work could be simplified considerably by using version control together with vmware workstation. So I thought it might be worth sharing.

Here's what I did:

  1. Installed xp on a virtual machine.
  2. Checked the Borland\Delphi folder from program files into a subversion repo on my physical machine.
  3. Installed cygwin and did a ls -laR>>somefile.txt from windows/system32, and checked the file into subversion.
  4. Exported each of the root branches from the windows registry to text files and checked them into the repository.

Now, for each upgrade I do, I can just check the new files into the repo, save a snapshot of the virtual machine and continue. If something goes wrong, rewind the virtual machine and try something else.

By having the registry dumped to text files I can at least use a good diff tool to see what each update has changed.

Hope this helps someone else, cause I wish somebody had told me this a couple of years ago.

2008-02-23

I never thought of using tail that way before

While debugging a symfony app I suddenly realized that I could grep tail:

tail -f log/frontend_dev.log|grep someword

I realize it's quite obvious, it just took a couple of years before I thought of it :)

2008-02-17

Update: Ubuntu on GIGABYTE ga-73pvm-s2h

Turned out that the built in sound card didn't work with ALSA. Here is what I found: ubuntuforums.org/showthread.php?t=684839. Here's the command that fixed it: sudo aptitude install linux-backports-modules-`uname -r`. Just needed one more reboot after that and everything worked!

2008-02-16

Building Delphi programs using Want

I've recently been trying to get some Delphi code into continuous integration using want. As there's very little available documentation on the net on this subject, I decided to collect what I've found out.

Want is an ant-like build tool for Delphi. It's available from sourceforge.net, but if you want the latest and greatest binaries, you might (at the time I'm writing this) just as well download it from this confluence page. There's also a jira issue tracker on the same site. You'd most likely also want to have a look at a new page about want available here:www.optimax.com/want/, and the forums that are available at the same site. Although want is no longer maintained by the original author, it seems he's still frequenting the forums. Seems like Delphi build tools is a rather odd topic, so there's almost no flaming and also few pleeeaase help me! topics :)

I'd also like to link to some articles that talk about want. Here's one from CODEGEAR, and from elvenware.

If you're serious about using want for your Delphi builds, the best thing you can do is probably read the builds scripts from the want project itself, and from the DUnit project. They are both easily available from this page: www.suigeneris.org/kb/display/WANT/Home.

Finally: Don't forget to have a look at these alternatives: NAnt (open source) and FinalBuilder (commercial). Here's an example of how to build a Delphi project with Nant and CruiseControl.Net: Extreme Programming in a Delphi Context.

Have you used want, tried to get Delphi into continuous integration?

Delphi 6 and Perforce

Using Delphi 6 with Perforce can be a cumbersome process. Coming from Eclipse I'm used to having the IDE opening the files for edit. Last week I tried to get Delphi to do the same. Here's what I did:

  1. Search for delphi perforce 6
  2. First result: Chris Fairall's Home Page - Delphi
  3. Dowloading, compiling and installing, gives a new menu:
  4. I tried to click logout on the new menu. That was stupid. Trying to login again I got this message box:
  5. Agent Ransack, search for files containing ExplicitTop. Thats FormLogin.dfm
  6. Open in notepad++, remove both occurrences of ExplicitTop
  7. Return to Delphi. Recompile, install, login.
  8. It works! I can log back in. Now if could only remember the password : )

2008-02-09

Ubuntu on GIGABYTE ga-73pvm-s2h

(Updated information is available here.)
I recently installed a new computer with Silverstone SST-LC17 case, GIGABYTE ga-73pvm-s2h mainboard, 4 GB RAM and Intel Core 2 processor. The power supply was a Fortron Source Zen 300W. The computer was built from a recommendation from hardware.no, who also suggested that the pc should work with mythbuntu. After I've testet it, my conclusion is that it will need a better power supply some day. As of now, it sometimes won't start properly before I disconnect the network and some external usb-cables. After booting however it works smooth. The next problem was that the video drivers wouldn't work out of the box with both ubuntu and mythbuntu. I also tested with fedora, and in fedora everything just worked. However, installing mythtv on fedora seemed to be a rather cumbersome unless you can live with fedora 6, so I reistalled mythbuntu, and this time I found envy, which solved my video driver problems. I've been a little concerned about how the mainboard would work with linux, but now everything is running smooth.