Running LFS on OS X

From LFS Manual
Jump to: navigation, search

This document will guide you through the process of installing and configuring Wine and LFS to allow you to run LFS's game client in Mac OS X. We'll also touch on the subjects of configuring your wheel.

Intro

What to expect

During my brief testing, LFS performed great on OS X. Below I will describe two different methods to get LFS up and running on OS X. Firstly a terminal-oriented approach, secondly a more GUI-oriented one. Pick one or the other.

The steps in this article has been verified to work with:

  • LFS S2 6K
  • OS X El Capitan (10.11.1)
  • Wine-1.8
  • Logitech G25 Racing Wheel

Prerequisites

  • Non in particular other than a willingness to install 3rd party software.

Basic setup

Terminal-based method (Homebrew)

If you are not afraid to open up a terminal this is the recommended method. Homebrew appears to have a more up-to-date version of Wine than WineBottler.

Install Homebrew

Homebrew is a package manager for OS X. To install it, follow the instructions at their website or simply run:

 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then make sure Homebrew and it's packages are up-to-date:

 brew update
 brew upgrade

Install wine and cabextract

After installing Brew, use it to install Wine (the compatibility layer capable of running Windows applications on OS X) and cabextract (a software for extracting Microsoft cabinet (.cab) files):

 brew install wine cabextract

Since the packages need to be downloaded and compile, this could take a while.

Install Winetricks

In order for LFS to run properly, we need winetricks (a helper script to download and install various redistributable runtime libraries) along with additional DLLs. First, install winetricks:

 curl -o /usr/local/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks

Then make the script executable:

 chmod +x /usr/local/bin/winetricks

Finally install the DLLs:

 winetricks d3dcompiler_43 d3dx9_43

Install LFS

Download LFS (list of mirrors):

 curl -O https://www.lfs.net/download/LFS_S3_6K_setup.exe

Then run the executable with Wine to install the game:

 wine LFS_S2_6K_setup.exe

Follow the on-screen instructions. This guide assumes that you install LFS to the default location (C:\LFS\).

Change to the folder where LFS was installed and run LFS:

 cd ~/.wine/drive_c/LFS
 wine LFS.exe

That's it!

GUI-based method (WineBottler)

HomeBrew is a "combo" software suite with two purposes:

  1. Run Windows-based Programs on a Mac (with Wine)
  2. Pack your .exe into an Mac .app (with WineBottler)

We actually don't need the 2nd part but this is an easy way to install Wine on your system.

Install HomeBrew

  1. Create a folder called "Wine Files" in your Home Folder (press 'cmd + shift + H to open your Home Folder in Finder).
  2. Visit HomeBrew's website and download the most recent version (development/rc should work fine).
  3. Run the .dmg and install "Wine" to your Applications folder (there is no need to install WineBottler).
  4. Start wine (you may have to click "Open" to allow the application to start).
  5. Click the Wine glass icon in the menu bar and open Winetricks.
  6. Check "d3dcompiler_43" and "d3dx9_43", then click "Apply".

Install LFS

  1. Visit LFS's download page and download LFS.
  2. Double-click the .exe and select "Run directly in [...]" to launch the installer.
  3. Follow the on-screen instructions to install LFS (This guide assumes that you install LFS to the default location (C:\LFS\)).
  4. Note that the shortcuts created on your desktop ("LFS.lnk" and "LFS.desktop") WILL NOT WORK!
  5. To run LFS, use Finder and navigate to your Home Folder -> Wine Files -> drive_c -> LFS, then double-click LFS.exe

Change icon and create shortcut

  1. Find an icon that you like (preferably transparent), I simply chose https://www.lfs.net/favicon.ico (.png files will also work).
  2. Still in your browser, right click the image and select "Copy Image"
  3. Navigate to your Home Folder -> Wine Files -> drive_c -> LFS
  4. Right click on LFS.exe and select "Get Info"
  5. Click on the icon in the top left corner and press cmd + v to paste the image.
  6. To create a shortcut, simply drag LFS.exe to your launchpad or desktop.

Configure a Logitech wheel

I have not been able to get FTW's native mode and the FFB kext to work simultaneously! :(
When launching FTW, the FFB is disabled.

OS X should have basic support out a Logitech wheel out of the box, see Options - Wheel/Joystick for more information on how to configure it. If you'd like enable missing features such as clutch and/or force feedback, read on.

Enable Native mode

In order to enable 900˚ rotation and separate throttle/break axes, you'll need FreeTheWheel (FTW).

To use it:

  1. Make sure your wheel is connected,
  2. Download the .dmg from their website,
  3. install it to your Applications folder,
  4. and run FreeTheWheel.

You may close the terminal window after the process has completed. You may have to run the program again after a reboot or if your wheel was reconnected.

Enable Force Feedback (FFB)

A kext is a OS X kernel extension that enables additional functionality for third party soft- and hardware. The extension required for FFB (LogitechForceFeedback.kext) is no longer present in OS X since Mountain Lion (10.7).
In order for FFB to work in more recent versions of OS X, we must install it manually.

Disclaimer: DO THIS AT YOUR OWN RISK!

Since I'm not sure if it's legal to mirror the file, I'll simply provide with a link where it can be found. iRacing distributes the file as an attachment in this article (logitechforcefeedback.kext.zip).

Install FFB kext

There are helper utilities but since this kext business is a bit hacky I prefer to install it manually (also, this ensures that you are more aware of what you are doing):

Download the .zip file:

 curl -O http://faq.iracing.com/assets/logitechforcefeedback.kext.zip

Extract it:

 unzip logitechforcefeedback.kext.zip

Copy the contents to your system's Extensions folder:

 sudo cp -R LogitechForceFeedback.kext /System/Library/Extensions/

Make sure not to leave a trailing slash in the filename!

Change the permissions and ownership of the kext:

 sudo chmod -R 755 /System/Library/Extensions/LogitechForceFeedback.kext/
 sudo chown -R root:wheel /System/Library/Extensions/LogitechForceFeedback.kext/

Reboot:

 sudo reboot

... Or use the GUI to reboot :)

Cross you fingers that your system boots up.

Uninstall FFB kext

In case you need to uninstall the kext, simply remove it:

 sudo rm -rf /System/Library/Extensions/LogitechForceFeedback.kext/

Reboot:

 sudo reboot

... Or use the GUI to reboot :)