Sunday, January 1, 2012

Installing WINE on CentOS 6

There really isn't too much to installing and setting up WINE on CentOS 6, just make sure to setup the EPEL and ATrpms repositories as described in my The OS Install post and run:
[root@htpc ~]# yum install wine
Since the /home/mythtv directory doesn't really have much space allocated to it, I wanted to change the location of the C: drive to /var/lib. First, login to the Gnome desktop as the mythtv user and run the following to create the hidden /home/mythtv/.wine folder (there is also the Wine Configuration launcher under Applications -> Wine which does the same thing)
[mythtv@htpc ~]# winecfg
In the window that popped up, I selected Windows 7 as the windows version in the Applications tab and then clicked on the Audio tab and allowed Wine the select the best driver for my setup. I didn't play around with any other settings and hit the OK button to save my settings and close the window.

Now that the /home/mythtv/.wine folder has been created, I performed the following to move the C: drive to /var/lib.

As root:
[root@htpc ~]# mkdir -p /var/lib/wine/mythtv
[root@htpc ~]# chown mythtv:mythtv /var/lib/wine/mythtv
As mythtv:
[mythtv@htpc ~]$ mv /home/mythtv/.wine/drive_c /var/lib/wine/mythtv
[mythtv@htpc ~]$ rm '/home/mythtv/.wine/dosdevices/c:'
[mythtv@htpc ~]$ ln -s /var/lib/wine/mythtv/drive_c '/home/mythtv/.wine/dosdevices/c:'
Finally, I wanted to test to see if the free version of Trackmania Forever worked. I downloaded the installer and ran:
[mythtv@htpc ~]$ wine tmnationsforever_setup.exe
The installer created a handy desktop launcher when it was done and I simply double clicked on it and the game started up and ran without any issues. Sweetness.

Now the challenge will be to get some of my other games to work, however, that may be difficult since the WINE version on EPEL is kind of old. I'll tackle that another day.