Kwakkelflap: tools for the IT pro

Friday, July 20, 2007

x64 Versions and setup

I'm porting our Watchdog application to VC++ 2005. It's a lot of work, and the end result should be no difference for the user. But it's a step I'd have to take eventually.

One advantage of this port is that I'll be able to create 64bit versions of my applications. Some people think it's to early to worry about 64bit, but I don't believe it is. Every new PC sold nowadays is capable of 64bit. And I see a rise in people using a 64bit operating system. Also, it doesn't hurt to be prepared. It's something every misv will have to do eventually, so why not do this early on.

One thing I don't want is a separate download for 32 and 64 bit versions. The installer should check the operating system and install the 32bit or 64bit version. Maybe create an option to install the 32bit version on a 64bit system for compatibility. So I checked Inno setup and apparently they have everything I need (again). Simply set that x86 and x64 are allowed and your setup will automatically detect a 32 or 64bit install. Then, separate the 32bit and 64bit files and add a check with the IsWin64 function to install the correct file. That's all. The setup itself stays 32bit, but that shouldn't be a problem.

It will take some time to create the 64bit versions, and I'll need to test the new system on 32bit and 64bit operating systems. But you can expect 64bit versions of the Kwakkelflap programs in the near future.

Labels: , ,

Tuesday, July 17, 2007

Try, catch or miss?

I'm porting my applications from VC++ 6.0 to VC++ 2K5. Vista and VC++ 6.0 are not the best friends. I just finished porting Fping, where I had some linking problems cause I overloaded the printf() function. In the end, I simply renamed the function and each call to printf(). Next on my list was a simple MFC GUI application: the crash test application that comes with Watchdog – O – Matic.

The intent of this program is to generate first chance and second chance exceptions. To generate a first chance exception I have this code:

CDialog* pDialog = NULL;
try
{
pDialog->Detach();
}
catch(CException* e)
{
e->Delete();
}
catch(...)
{
}


Everything works fine when compiled with VC++ 6.0. The exception is handled. But when I compile this with VC++ 2K5, the exception isn't handled, and I have a second chance exception (a crash). Vista displays a dialog box, and Watchdog – O – Matic detects a crash instead of a first chance exception. I'm still looking for a solution. Hope there aren't many of these problems when converting...

Labels: ,

Tuesday, July 10, 2007

Source Control

As a developer, you need a source control system. Even if you're the only developer.

  • It's great if you have to solve bugs when working on a new version.
  • You can always check the history of each source file to see what happened.
  • Merging different source files is easy.

I used SourceSafe cause it came with the development environment, but never liked it. I don't think it even qualifies as a real Source Control program. So I switched to Perforce a while ago. I love their system. Easy to install, and the GUI is very intuitive. And the best part is: it's free for 2 developers (and 5 client workspaces).

So if you're a developer and you don't use a source control (or even if you do), I advise you to check Perforce. And no, they don't pay me anything to say this. I'm just a very happy user.

Labels: ,

Monday, July 09, 2007

New development box, part 2

I've written about my new development box and the tech support issues I had when ordering. So now, I'll post the conclusion.

After the last problems with the box, I asked a full refund. I received my money after a week, and I was glad that it was settled. Of course, I didn't have the brand new system I was hoping for. So I decided to order a new system from a different shop. And this time, I decided to drive to the shop and install the new PC myself.

I changed my order somewhat. Prices changed since my last order (e.g. cheaper RAM) and I wanted to spoil the little child in me.

This is the new system I ordered:
  • Intel Core 2 Duo E6600
  • 4x1GB DDR2 Corsair PC6400 800MHz CL4
  • Asus P5B Deluxe WIFI-AP Ed.
  • WD 74GB SATA 10000RPM 16MB Raptor
  • Seagate 320GB SATA300 16MB
  • Asus GeForce 8800GTS 640MB

I don't need an 8800GTS. It's silly that I bought one. A regular DX10 card would suffice for me. Not that I'm having second thoughts, but it's probably over the top. The 4GB RAM might also be more than I need. But the price was good, and 2GB is standard nowadays so I thought it would be a good idea to buy more. Anyway, I forgot that I couldn't use the full 4GB in a 32bit OS, so I'd have to install a 64bit Vista.

Everything was in stock within a week, and after a 4 hour drive I got back home with everything I needed. Installing was a breeze (although I was a little scared of breaking the motherboard when installing the cooler). No problems with Vista 64bit either. Every driver was available. And a Vista score of 5.3 is not bad at all.

All that's left to do is install my development environment on Vista and I should be ready to go.

Labels: