Posts Tagged ‘Windows’

CGT finally works on Windows

So after some work, some more frustration and even more complaining, the thing actually builds, links and runs without crashing.

Windows Seven Annoyances

So I have Windows 7 in a virtual machine, totally legal, provided by the university through the MSDN Acadimec Alliance (the ugliest website I’ve seen in a while, and stupid too).

I can confess that the desktop has almost cought up with KDE and Gnome in terms of look and feel. The icons have the effect of a halo of sorts when hovered, very similar to that in early KDE 4.0.

But of course, it is also damn annoying. Please note that I have the Professinal edition, and as such expected less eye candy and more usefullness. Youth is foolishness, they say, and I was very young about this assumption.

  1. Windows Explorer has reached a critical mess. It has a new concept of libraries, which is somewhat cool. You can put links to all folders with pictures into the Pictures library, and so on. I, however, still fail to see how are they different from normal folders. Or in what way could they be on par with Nepomuk. Now even if the libraries are not a radical new breakthrough in usabiliy, it wouldn’t bother me as much if there were a visible setting for the normal folder-tree. But it isn’t. Insted there’s a list of libraries again, and some other folders in the sidebar. Why these other folders don’t include the Home folder (C:\Users\Miha) is beyond me.
  2. Every time a change folders, there’s a sound. Every time. And because I keep my files organized (see Libraries above), there’s a lot of that. I feel as if I just fulfilled an achievement by double-clicking a folder in the explorer. But it’s damn annoying. And there’s more: the same sound it heard when a webpage starts loading in IE. If it were at least when it finished loading, so I’d know to pay attention to it, but alas that’s too much. You hear a “bing” and then the page starts showing up.
  3. Double-clicking everywhere. If the make the desktop look like KDE, they should make it feel like it too. The right mouse button is there for a reason, and 90% of the time you want to execute the file anyway.
  4. The abundance of centers. There’s the Media center, Mobility center, even Ease of Access center. Didn’t notice that last one? Maybe that’s because it in Start => All Programs => Accessories =>Ease of Access => Ease of Access Center. How’s that for Ease of Access? Its description says “Makes your computer easier to use”. Why can’t it be easier to use by default? I clicked it and it didn’t install Kubuntu.
  5. The Network and Sharing Center, in particular, is (even for Windows) exceptionally messed up. The network map looks nice, but rarely what you want.  There is a plethora of links to places you never want, and many an important thing is three dialogs deep (As in Setting => Configure => Advanced Configuration). There’s no way to connect to a WAP-Enterprise protected network (such as Eduroam), even though the hardware supports it. You need a special client. I suppose the visual map with the little house was a priority. And all this time I though Wifi is an annoyance on Linux. I should note here that connection troubleshooting works wonders. Sometimes. At least on my virtual machine.
  6. Desktop Gadgets. There’s a whole nine of them to choose from, and no HotNewStuff to easily download more. Instead, the link to get more gadgets online opens a browser and sends you to a page with two more. Then at the bottom of that page is a link to the actual gallery.  There are many more of them, including a Daily Dilbert, but it’s no Comic Plasmoid.
  7. No desktop cube effect. This may seem like pure candy, but is actually very useful for switching between windows, as you get a good look of them, and it doesn’t require the keyboard. They could at least put in the Window Showcase (I thing called Expose on Macs). I use both regularely and it would be hard to live without them.
You need a special client.

CGT on Windows

After reading many times the famous Qt tagline “Code once, deploy everywhere”, I expected that porting CGT to Window would be quick and painless.

It wasn’t. There were a great number of issue to make it even compile, and then some for running and installing. But I admit at least some of them were my fault:

  • CGT_EXPORT macros in public classes in libraries are not needed on Linux, but reqiured on Windows and present in virtually all libraries I looked into. Only my laziness is at fault here.
  • passing an integer to ceil() works on Linux, but not in Windows. I had to change ceil(something) to ceil(1.0 * something) globally.
  • getting application data path (AppData) is different, as there’s no cross-platform method for that in Qt.
  • Qt is comiled with “Treat WChar_t as built-in type” set to “No”, unlike the Visual Studio default. So I had to change that, and it’s not the easiest thing to find in the maze mess of configuration menus.
  • CMake targets for libraries had to be fixed to separate dll’s and lib’s.
  • cmake && make install doesn’t have permission to install into Program Files, so I had to use CPack to build an installer. That’s actually a good thing that had to be done anyway, but it’s another hurdle. It also doesn’t work right now, and I don’t know why.
  • For some reason, Qt binaries install to a location outside of PATH, so they’re not found when I try to start the program (but are found by CMake for linking).
  • You can’t link to libraries built with Visual Studio 2008 from an application built with VS 2010. And heaven forbid that told that to me, the lowly developer. No, all they told me is: The application was unable to start correctly. Go figure. It might be me (the lowly developer again, spoiled by Qt/KDE/Linux), but I haven’t the slightest clue why would the same code, only compiled with a different version of the same compiler be binary incompatible. Why can’t the .lib file, the public interface to the .dll object, be compatible?
  • I had to put up with using Windows (but that’s a subject for another post).

I suppose I could compile Qt with VS2010, and then it would work (maybe), but how’s tht for deployability? I’d like to offer this program to other people without shipping the whole 200MB of Qt libs in the package. Does it really have to be that complicated to write software?