GTK for Windows XP/Vista BASEPATH
- Monday Sep 22,2008 02:30 AM
- By wmensah
- In myDiary
Ok, something really weird is going on. Maybe I’m dumb but someone has to explain this to me (so i can quit being dumb). I tried installing GTK 2 Runtime Environment on 2 different operating systems: Windows Vista and XP and got 2 different results which I thought was very strange.
First of all, when installing on XP, the default path was: C:\Program Files\Common Files – what is wrong with that? Nothing – nothing at all but why is it that running the same installer on Vista defaults to C:\GTK? and what happened to that 2.0 directory inside it? That’s some major inconsistency if you’d ask me. Maybe it’s because of how my environment variables are set up.
In XP, the GTK_BASEPATH =?C:\PROGRA~1\COMMON~1\GTK
In Vista, the GTK_BASEPATH = C:\GTK
default value for the environmental variable ‘GTK_BASEPATH’ in Vista 64 bit was set to ‘C:\PROGRA~2\COMMON~1\GTK\2.0′.
I just found a blog via Google search addressing the same issue.
http://dreblen.wordpress.com/2008/08/06/adding-gtk-to-the-windows-path/
and another relevant forum
http://gobby.0×539.de/trac/ticket/292
I still don’t get why there’s a directory ‘C:\GTK\2.0′ in XP but not in the GTK directory in Vista. I’ll try to figure it out later. For now I have created a batch file which kind of fixes the issue:
IF EXIST C:\GTK\2.0 XCOPY C:\GTK\2.0 C:\GTK\ /E /Y
RMDIR C:\GTK\2.0\ /s /q
which simply moves the contents of C:\GTK\2.0 to C:\GTK and removes C:\GTK\2.0
I guess this will do for now till I figure out an alternative method. I know one could be creating a batch file to set the correct GTK_BASEPATH value based on which version of Windows is being run. But that’s just a thought.