Cygnes' Weblog

Tuesday, December 11, 2007

Vista Network File Copying

I'm using CruiseControl.net for my auto build environment. One part of the build is copying my release to a network server. The bad part about this is that my build is taking ages, just because of the slow Vista file copying. 2 MB file is taking more than 2 minutes to copy. Copying is taking more time than building the whole project. So I really needed a faster method to copy my files. I tried RoboCopy, copy and xcopy. They are all slow, so I decided to write a simple delphi console application that copies a file to a destination path. Guess what, instead of 2 minutes it takes less than 2 seconds, so beat this Vista. All I used is a TFileStream for input and a TFileStream from output. Geez, that's all it took.

Go Delphi! You made my day, again!

Labels: , , , , , ,

Thursday, December 6, 2007

My employer is looking for Delphi and C# developers

Hey developers,

looking for a developer job in Belgium. Good news! my employer has some job offerings.

More info about the job can be found here:

www.vacature.com (dutch)

For more information you can contact Tom De Decker at Aucxis trading Solutions

Maybe we'll be colleagues in the near future.

Labels: , , , , , , , , ,

Wednesday, October 17, 2007

Delphi 2007 - File Browser expert

We finally started using Codegear Delphi 2007 (Update 3) at work. It's a big step forward since we were using Delphi 7. First impressions are very good. I noticed the new file browser. This browser is like windows explorer docked into the IDE. One useful feature is that you can use all explorer shell extensions. For instance TortoiseSVN is a very important one since I'm using it daily for versioning. The file browser misses clearly one important feature, synchronizing with the active project. I always have to scroll to the project directory to do anything meaningful with it. Asking around in the opentools newsgroup I found out that there's no interface to this new file browser. So I decided to rewrite the file browser as an IDE-expert. Thanks to the components of VirtualShellTools (http://www.mustangpeak.net) I managed to build a new Delphi 2007 IDE expert. It supports 2 types of auto-synchronizing.

1) All folders are visible and the file browser expands the path of the current project.
2) Only the project folder is visible (by changing the root folder)

The auto sync mode can only be changed in the form menu which is only visible in undocked mode. (sorry for that)

I've added a file filter so it can display only the file types you want, just like the original file browser. But it's also possible to set an exclude filter. So you can show all files, except *.dcu and so on.

You can download this expert here. It's version 0.1 and more or less a test version. You can also download the installer here.

I know it's far from perfect, but hey, it's a start.

Please send bug reports to drastic@pandora.be

Labels: , , , ,

Tuesday, September 4, 2007

Vrede feesten 2007 - Sint-Niklaas - day 2

Last Saturday we visited the event again. A weather was much better.

Saturday, September 1, 2007

Vrede feesten 2007 - Sint-Niklaas - day 1

Yesterday I visited a hot air balloon event in our city Sint-Niklaas. This is the video I made with my sony cybershot.

Labels:

Friday, April 27, 2007

Editing HTML with TWebBrowser

Coltrui asked me if I knew any good HTML editors that can be used in a delphi application. I don't know any free components for Delphi for WYSIWYG editing. But I know the TWebBrowser has an edit mode.

So now it's time to get started on html editing with TWebBrowser. A few steps to get started:

1) add a TWebBrowser control to your application

2) open a webpage or an empty page.

ie. WebBrowser1.navigate('http://zinloos.be/wordpress');
WebBrowser1.navigate('about:blank');


3) Put TWebBrowser in edit mode.

(WebBrowser1.Document as IHTMLDocument2).DesignMode := 'On';

4) Start editing!

5) Save HTML to file

var
persist: IPersistFile;
begin
Persist := (WebBrowser1.Document as IPersistFile);
Persist.Save(StringToOleStr(ExtractFilePath(application.exename) +
'test.html'), True);
end;


These are some basics without special features. But you can select a part of the html text and press CTRL+B for BOLD, CTRL+I for ITALIC, CTRL+U for UNDERLINE.

Even creating a link with CTRL+K works great.

Labels: , , , ,

Thursday, April 19, 2007

Continuous Integration with CruiseControl.NET

Steve Trefethen recently posted two blog articles about "continuous integration". These posts get you on track setting up your own environment.

The links are:

CCNetConfig to help you create and maintain your CruiseControl.NET server

Video: Setting up a continuous integration environment

I was curious so I tried to setup an CI-environment. It was much easier than excepected. Now running 4 projects using CruiseControl.NET. There's one Delphi5 project and 3 Delphi7 projects. In a few weeks I will also try a Delphi2007 project with MSBuild.

I managed to synchronize the executables version information with the published label. For this I use my own command line tool that uses a template to generate a
version.rc, which can be build by brcc32.exe (resource compiler) and linked into the projects.

I bet there must be an easier way to do this, so if you have info about doing this just let me know.


I'm still having problems publishing the latest build to a network drive since I get an "access is denied" error. But I'm not logged on to the domain and that's probably the reason why it doesn't work.

[update]
Changing the service login account to my user account fixed the problem.
[/update]

Here you can find an article about continuous integration by Martin Fowler

Labels: , , , , ,