Log in

View Full Version : 32-bit Xvid in 64-bit Windows from source: xvid.inf is broken


ZoFreX
29th July 2009, 04:02
I decided to try compiling Xvid for fun (don't judge me) and did so with Visual Studio 2008 and MASM, which was an extremely painless process :D

However, getting the damn thing working turned out to be quite tricky! The basic problem is, in 64-bit Windows, the c:\windows\system32 folder is for 64-bit things. 32-bit things are supposed to go in c:\windows\syswow64. Similarly, there are different areas of the registry too: HKLM\SOFTWARE\Microsoft for 64-bit things, and HKLM\SOFTWARE\Wow6432Node\Microsoft for 32-bit.

The problem with these is that the 64-bit paths are the same as the 32-bit paths when using 32-bit Windows. This means the xvid.inf provided by the Xvid project works for a 32-bit Xvid in 32-bit Windows, or a 64-bit Xvid in a 64-bit Windows, but it will not properly install a 32-bit Xvid in a 64-bit Windows.

After much fiddling I have modified it to correctly install 32-bit Xvid in 64-bit Windows: http://pastebin.ca/1510679

This script will install to the proper alternate locations if run in 64-bit Windows (and if I've done my job properly, should still work for installing in 32-bit Windows too!).

Please note that this script will NOT properly install 64-bit Xvid in 64-bit Windows - for that the unmodified xvid.inf should be used.

So I'm posting this for three reasons:

Hopefully this will be useful to someone else
I want to know if this works, which means testing it on more than just my system
If people think it's good enough then I'll propose a patch to Xvid to add this in... but I thought I'd post here first, because mailing lists scare me