Blog

Getting the Location of the executing Assembly on the .NET Compact Framework

12.04.2007 at 15:09

Had some time today to familirize myself with the .NET Compact Framework. Took me some time to find out how to get the location of the program on the device. Here is what i came up with afer some research.

System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)

Marc

» read more » comments

Deleting all default wiki pages in Trac

03.04.2007 at 20:00

I am currently evaluating Trac as a web management tool for a school project. By default Trac comes with lots of standard wiki content, mostly help instructions, which i don't need. So here is a simple script which saves the current wiki content and then deletes all pages.

cd /path/to/your/trac/project
mkdir wiki-exported && trac-admin . wiki dump wiki-exported
for page in $(trac-admin . wiki list | awk '{  if($1 ~ /^(Trac|Wiki).*$/) print $1}'); do 
    $(trac-admin . wiki remove $page); 
done

If you want to restore your wiki content then run

trac-admin . wiki load wiki-exported

To upgrade to the latest help instruction issue the following command

trac-admin . wiki upgrade

Marc

» read more » comments

Comparison between Java and C#

28.03.2007 at 11:16

As i am still trying to get familiar with C# i found the following comparison between Java and C# quite usefull.

» read more » comments

MSDN - sucks use the API Documentation in CHM Format

27.03.2007 at 17:19

In my day job i am currently developing a C#/.NET Compact Framework application and one of my first experience is that the MSDN documentation -- well pretty sucks -- it's just way too slow. Fortunately the API Documentation is also available in CHM format.

Marc

» read more » comments

Isolate a buggy commit with git bisec

25.03.2007 at 13:34

A few weeks a go i made a blog post about my success in running Age of Empires II with Wine. Unfortunately the upgrade from wine-0.9.31 to 0.9.32 broke it again. The game doesn't even start anymore and just displays the following message:

Could not initialize graphics system. Make sure your video card and driver are compatible with directdraw.

See the AppDB Comments for further discussions.

So i decided to try to isolate the commit which is responsible for the breakage. The first step was to get all the required build dependencies installed. Next i did a checkout of the wine source and started regression testing as explained on the wine-wiki. By telling git bisect the last good state and a known broken one it can perform a binary search for the buggy commit.

git bisect start
git bisect good wine-0.9.31
git bisect bad wine-0.9.32

Then you can compile Wine and test whether the bug is still there.

CFLAGS=-fno-stack-protector ./configure && make clean && make depend && make

Depending on the result you run git bisect good or git bisect bad respectively. If you want to see which commits could cause the error run git bisect visualize. Recompile and repeat the above steps until you can isolate the problematic commit. In my case it was the following:

27113156d96d20296409fcb92839609c8dd7e34a is first bad commit
commit 27113156d96d20296409fcb92839609c8dd7e34a
Author: Stefan Dösinger <stefan@codeweavers.com>
Date:   Mon Feb 19 15:24:00 2007 +0100

    wined3d: Remove IWineD3DDevice::EnumDisplayModes.

So know that i have isolated the commit, filled a bug report.

Marc

» read more » comments

<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 >>