Building MesaInjector

Some games will not load opengl32.dll from their directory, instead they explicitly load the one that's in System32, presumably to prevent wallhacks. Unfortunately, this also prevents us from easily applying Mesa3D For Windows to said game.

MesaInjector is a wrapper that uses VMWare Thinapp to "trick" the game into loading Mesa3D's opengl32.dll instead of the real one. And here we'll see how to build it.

What we need

  • VMWare Thinapp version 5.2 or newer. I will assume you're familiar with it.
  • This setup capture
  • Mesa3D's opengl32.dll and optionally dxtn.dll. You can get my builds here or make yor own with this tutorial

Extract the setup capture into Thinapp

Open Thinapp's directory. It's in C:\Program Files (x86)\VMWare\VMWare Thinapp

Extract the Captures directory from the downloaded archive into it. It should look like this:

Add Mesa3D

Enter Captures\MesaInjector\%SystemSystem%. Put your opengl32.dll here. If you want, you can also put dxtn.dll here.

Optional: additional customization

Inside %drive_C% you will find a script called launch.bat. This merely shows the name of the application and launches the specified exe. You can edit it if you want to add your name or change the behaviour.

Optional: change Thinapp settings

In my setup capture, Thinapp is configured for minimum sandboxing. It will only sandbox changes if access is denied. You can change this by editing Package.ini and the various ##Attributes.ini. See Thinapp's documentation on this.


Run build.bat (as administrator if necessary). When it's done, you'll have a new folder called bin, and launch.exe inside it. This is your MesaInjector, rename it and use it however you want.

Updating to a newer version of Thinapp

You can update your MesaInjector to a newer version of Thinapp by using this command from inside the new Thinapp's directory:

relink MesaInjector.exe

Share this article