I finally managed to give CMake on Win32 a try, and after a long time struggling with the dreaded __declspec(dllexport) stuff i got safept compiling and working on Win32 - the only thing i haven't yet ported is the signal handling thread code.
So far i am pretty happy with CMake, last post i mentioned that i didn't like CMake scattering files all over your source directory - well there is a very simple way to do that, just step into your build directory e.g. build and call cmake <source dir> - then all the build files will be located there - no need to go clean up after CMake.
When porting SafePt to Win32 i needed to port SafePt's use of pthread's conditional variable implementation, this proved to be rather "interesting" as condition variable's aren't supported on windows until ... Vista! Come on! How long has conditional variables been supported on phread? Since 1990 or something like that?
But luckily there is a guy who has done the hard work and implemented a semi-optimal conditional variable on Win32:http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
I have to admit that it is pretty cool that windows has support for cross-process mutexes, locks and such - but the implementation of it is just so butt ugly - the win32 API is just a mess, not to mention a namespace thrasher, it defined all the "good" names like TRUE, FALSE, etc. so either you need to undefine them all over the place and hope that it still works, or do as i do, and just rename your constants.
Because my current version control system is not supported on windows (being very creative with internal filenames) i decided to check out the new Bazaar 2.0 and thankfully they haven't changed the interface all that much, there are some bad spots in my oppinion:
-
bzr rmdoesn't remove the file, it only marks it as "unversioned" and stops tracking revisions for it, i like "unregister-and-delete" behaviour better. - Revisions is kept in a binary internal "knits" format, this basically means that all revisions that a file has ever had is kept within the same file, they say it's due to speed concerns, but i just really like having plain old text files instead. Not to mention that this is problematic when mirroring a branch, you need to copy all revision everytime instead of just the new revisions. They are now talking about implementing a SmartServer which will expose a richer mirroring protocol, but then we are back to CVS/SVN style stuff in my oppinion - why can't we just do as in Arch/Bazaar1 and have a simple http server, serve up the revisions?
-
Like darcs the revisions are kept in the directory you are working on, this simplifies things alot, since you don't have to think about setting up a repositiory and stuff like that, but there is just the problem that you might accidentally
rm -rfthe.bzrdir, and poof! all your revisions are gone. Of course you push your revisions to a mirror every once in a while, but now you need to worry about that too, and revision control systems are really meant to keep you from worrying. Just my two € cents, the branch is published here:http://dev.infonet.dk/~rto/bzr/safept/trunk/ and the Win32 branch (the one i use when working on the win32 stuff) is here:http://dev.infonet.dk/~rto/bzr/safept/win32/
Trunk pulls the win32 revisions, so that is the one you should use.
Comments (0)
Post comment
If you wish, you can use markdown syntax in the comment field.