elpauer.org

Sunday 29th 2008f June 2008

Amarok 2 on Windows

Filed under: — pgquiles @ 02:11:08

Yesterday I fixed the Phonon DirectShow 9 backend for Windows. Now audio and video are available to KDE applications on Windows, which means Amarok 2-trunk works! Currently, it can only play .WMA files (I think I have to install the .ax files for the MP3, MIDI, WAV, etc codecs in the KDE bin or libs directory, I’ll try and fix that next week). In the meanwhile, you need patch #6 if you want to build Amarok on Windows and hear something. Please note I’ve only tried to build it with MSVC2005, not MinGW, not MSVC2008 yet.

Visual C++ 2008 Feature Pack

Filed under: — pgquiles @ 02:05:14

This afternoon I started to add Visual C++ 2008 support to the emerge tool to build KDE 4 on Windows. After a few changes, I tried to build Qt 4.4.0 but it failed.

“Why, oh why?” I wondered. I had previously built Qt 4.4.0 using VC++2008.

Turns out on this computer I had installed the Visual C++ 2008 Feature Pack, which adds some nice stuff (if the Office 2007 look tastes nice to you) but also breaks some stuff (mostly MFC but also some math functions).

Fortunately, it’s easy to fix the issue: just do not #include <xmath> and everything will work fine. As the same codebase has to work with many other compilers, I cannot just get rid of that line of code: I need to #if-case it for VC++2008 with Feature Pack.

Unfortunately, there is no easy way to check for “VC++2008 with Feature Pack". Sure, you can check for VC++2008 by checking _MSC_VER >= 1500. Easy. Unluckily, the only way to check for the Feature Pack is to check _MFC_VER (check you have MFC 9.0.30411 instead of 9.0.21022), which is only defined if you #include <afxver_ .h>. Of course that file #includes many other files, which means some ugly, confusing problem is waiting to happen.

How dumb can you be, Microsoft? Why aren’t you changing _MSC_VER, too, and make my life easier?

Friday 13th 2008f June 2008

aKademy 2008

Filed under: — pgquiles @ 10:13:36

Another year, another KDE conference. Yes! I’m attending aKademy 2008 in Belgium

Wednesday 28th 2008f May 2008

A deeper look at signals and slots

Filed under: — pgquiles @ 09:47:16

That’s the title of a very useful article by Scott Collins which describes how to combine Boost and Qt in the same application. Unfortunately, Scott’s website went dark many months ago and I’d say it’s not coming back. Luckily, I was able to get a copy from Google’s cache before it was squashed forever. I’d say right now this is the only place in the web you can get this wonderful article: A deeper look at signals and slots

Saturday 24th 2008f May 2008

xkb-data y ~

Filed under: — pgquiles @ 15:27:01

Si utilizas una distribución de Linux/BSD/etc con servidor X11 X.org (el 99%) y estás te ha afectado el bug 9763, que hace que para teclear ‘~’ (dead tilde haya que pulsar AltGr + 4 dos veces (en lugar de una), aquí tienes el parche que corrige el caso de la tilde muerta.

Para Ubuntu Hardy, hay paquetes en mi PPA

Y ahora, que alguien me explique qué clase de mantenedor es el de los mapas de teclado en X.org que cambia el mapa de teclado de español de España porque un usuario brasileño se queja de que cuando tiene puesto el mapa de teclado de portugués y está escribiendo castellano se le hace raro tener que pulsar AltGr+4 para que le salga la ‘~’ (que por otra parte, no hace falta para escribir el idioma, ¡es un carácter especial!). Grrrrr.

Thursday 22nd 2008f May 2008

Kubuntu Hardy, ksynaptics

Filed under: — pgquiles @ 13:10:35

Yesterday I started preparing my computer and myself to upgrade from Kubuntu Gutsy to Kubuntu Hardy.

As trivial as it might seem, any upgrade is quite complex to me because I use a lot of post-stable, and even post-unstable, packages coming from my PPA. I backport packages from Ubuntu unstable, Debian unstable and experimiental, and quite often I package myself versions which are not available yet in any of the former.

Given that the PPA “copy packages” feature does not work for me (when I copy a Gutsy package to a Hardy package, it is built but never made available for Hardy from my PPA), yesterday I spent most of the day producing Hardy versions of my packages and fixing issues (what’s with the libfcgi maintainers!? why are they slightly changing the package name almost with every release!?)

In the end, the upgrade went mostly fine: everything worked save for my USB external disk, the mouse in X, and the volume control. The only missing application was KSynaptics, which I use to disable the touchpad 99% of the time (I like it better my laser mouse).

The external USB disk issue was rather easy to fix: just add usb-storage to /etc/modules.

The mouse problem has drove me crazy for a couple of hours but I finally figured it: the new xorg.conf had set the mouse to InputDevice “Mouse0″ “AlwaysCore” (whatever AlwaysCore means) and the fix was as easy as commenting out the “AlwaysCore” part.

KSynaptics missing proved to be a bit more complex. The application does not work with modern versions of X.org, apparently due to X.org people forgetting about proper versioning of APIs, therefore KSynaptics’ developer decided to stop working on it and starting a new application (TouchFreeze) with a different approach. While TouchFreeze works fine, it was missing the enable/disable touchpad actions, which are the only reason I wanted to use it. But my friends, that’s the joy of open-source: I took the sourced code and a few minutes later I had implemented those actions and added a “disabled” icon like the one KSynaptics had. Here is the patch against TouchFreeze 0.2, in case you want to use it (I’ve sent it to the author to inclusion in a future release of TouchFreeze)

Sunday 04th 2008f May 2008

Cooking

Filed under: — pgquiles @ 15:54:53

Yesterday was a very kitchen-intensive day: about 10 hours baking pastries: muffins (magdalenes in Catalan), tarts (coca de la calda), eggrolls (rotllos d’ou; not Chinese/Korean eggrolls!) and almojàvenes (although here we do not add cheese to the recipe). It was a hard work but I’ve got breakfast and tea snacks for one month :-)

Live translation

Filed under: — pgquiles @ 15:46:29

At Guademy I live translated three conferences from English to Spanish. I have never done that but, given that the translators we had hired told the organization the day before the event they would not come (very unprofessional, btw), there was no other option than using me and my broken English.

All in all, it was an interesting experience. I was told my translation was about 85% accurate, which is IMHO quite good: I had not trained for that, therefore my “buffer” was quite small. The most difficult part of live translating was a) lisp (I’m used to American English, not to British English) and b) memory (I seldomly need to memorize something, therefore my short-term memory is quite bad). Fortunately all the conferences were about open source software I know quite well, therefore specific vocabulary was not difficult.

Tuesday 29th 2008f April 2008

Building Log4CXX 0.10.0 on Windows

Filed under: — pgquiles @ 10:23:58

Apache Log4CXX is a logging framework for C++ patterned after Apache log4j. It also happens to be quite difficult to build on Windows if you are using Microsoft Windows SDK 1.0 (AKA Microsoft Platform SDK 6.0). If you are building software for Windows Vista or Windows Server 2008, or using Visual C++ 2008, you are using Windows SDK 1.0.

The reason Log4CXX 0.10.0 is hard to compile with Windows SDK 1.0 is a bug in APR 1.2.12 (the latest version available as of this writing) and a bug in Windows SDK 1.0 itself (a preprocessor redefinition due to including twice a header file). Here comes the recipe in case you want to build the stuff yourself:

  1. Download APR 1.2.12 and extract it. Rename to apr.
  2. Download APR Util 1.2.12 and extract it. Rename to apr-util.
  3. Download Log4CXX 0.10.0 and extract it
  4. Download GNU Sed and install it
  5. Open cmd.exe and run %PROGRAMFILES%Microsoft Visual Studio 9.0VCvcvarsall.bat
  6. Apply the apr-1.2.12-win32.patch patch to fix bug 40398 in APR 1.2.12 (this step is not needed if you are using APR 1.2.13)
  7. Apply the log4cxx-0.10.0-vc90-support.patch patch
  8. Enter directory apache-log4cxx-0.10.0
  9. Execute configure.bat
  10. Execute configure-aprutil.bat
  11. Open the log4cxx.dsw solution When asked to convert the solution to VC++9, click Yes to All.
  12. Right click on Solution log4cxx and select Build solution

Saturday 26th 2008f April 2008

Improving FreeDesktop.org

Filed under: — pgquiles @ 11:58:50

IMHO FreeDesktop.org is a weak organization and it’s specification are not taken seriously enough. Gnome and KDE are suggesting developers follow those specs, as opposed to strongly demanding they do. The end result of that is worse interoperativity between Gtk+/Gnome and KDE applications, therefore users get frustrated.

IMHO KDE and Gtk+/Gnome should define an “acceptflow” to follow in order for an application/library to be included. Briefly: if you are not using fd.o’s specs, you need to really convince us there is a good reason for that.

Expanding it, this is my proposed workflow:

  1. Developer John Doe writes an application/library
  2. Developer John Doe submits an application or library to KDE or Gnome/Gtk+
  3. Is the application good?
    • No => Not accepted, needs improvement
    • Yes. Next step
  4. Does the application or library follow FreeDesktop.org specs?
  5. Yes => Accepted
  6. No. Why not?
    • There is no FreeDesktop.org spec => Propose one, when there’s agreement in the fd.o community about the spec, go back to step 1 if you want your app/library in the official repository or keep it in your own repository (it will not be part of the official Gtk+/Gnome or KDE)
    • The FreeDesktop.org spec is good but John Doe is smarter than anyone in the world and does not want to use a “bad” spec => Sorry but go back to 1 if you want it to be included in the official repository, or keep your own repository. Fix your ego, too.
    • The FreeDesktop.org spec is not good enough, it’s to up to reality
      • Go to FreeDesktop.org and propose improvement of the spec. When the spec is good enough => Go back to 1 if you want it to be included in the official repository or keep your own repository.
      • Go to Freedesktop.org. Other people working on applications/libraries using that spec do not want to update the spec to be up to reality, for any or no reason => Go to next step
  7. So, there is a FreeDeskop.org spec but it’s not good enough and there’s no way the other people using that fd.o spec will update it. Is John Doe’s application/library really good? I mean, is it true that what he wants to change in fd.o spec should changed?
    • No. Sorry John Doe, you are not the smartest guy in the world => Go back to step 1 if you want your app/library in the official repository or keep it in your own repository. It will not be part of the official Gtk+/Gnome or KDE.
    • Yes => Accept John Doe’s app/library in the official repository and keep trying to update fd.o’s spec.

E-mail me

Powered by WordPress