Installing e-Sword on a Mac (OSX)
R. Gustason, 10 Dec 2011
*** This article has been updated for Lion (10.7) and Mountain Lion (10.8) users.
e-Sword is a great program designed for Windows XP. You can use this program on your Mac using Snow Leopard by following these steps. Thanks to David Baumgold for the first part of this tutorial on how to install wine in OSX.
Download the latest installer for e-Sword. Download the following Dynamic Link Library mfc42.dll. Or search here if this link breaks in the future. Install WINE which stands for WINE is not an Emulator by following these directions: First, Install XCode from your Snow Leopard DVDs. You can also download xCode 3 for Snow Leopard, but you will need to register for a free apple developer account at Apple's Developer Website before you can download it. Note that this is a sizable download weighing in at a hefty 4.1 GB so if you have your original install DVD for Snow Leopard, I'd recommend installing from there. Also of note is that xCode 4 is only for Lion and not Snow Leopard, so you can't download it from the App store! For Mountain Lion, be sure the command line tools are installed. Go to Apple Developer and download the Command Line tools for Mountain Lion. Install the MakePackage after the dmg is downloaded by double clicking it. Ensure you have X11 installed. If not, download it from the XQuartz Wiki site and install it or install it off your original Snow Leopard disks. If it is already installed, you'll find it under Applications>Utilities>X11. Be sure to download the XQuartz version that is compatible with your version of OSX. Second install Macports. Macports is a package manager which makes installing and compiling source code a lot easier. Download the DMG or PKG file for your version of OSX and install it by double clicking it. Configure Macports by doing the following. Open Terminal (Applications>Utilities>Terminal) and type the following:
echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profile
Enter your password and press return. Enter the following next.
if [ `sysctl -n hw.cpu64bit_capable` -eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fi
If you are running Lion or Mountain Lion, type the following text into terminal (Thanks to Stephen for the update):
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Content/Developer
or try this command if you get an error:
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
Xcode 4.3.3 Build version 4E3002
Xcode 4.4.1 Build version 4F1003
Xcode 4.5 Build version 4G182
sudo port install wineOnce complete (35-45 minutes on average), change directories to where your downloaded setup file resides. For me that command is:
cd /Users/ryan/DownloadsType in the following command to run wine and install the setup file you downloaded. Note, you must do this from the directory where the setup file resides (or enter the full path to the installer after the command wine).
wine setup1010.exeNote that the setup file may be a different name. This will launch the e-Sword installer. Just walk through the installer accepting the defaults. Once complete, type the following command in your terminal in order to show hidden files in Finder.
defaults write com.apple.Finder AppleShowAllFiles YESAfter you type the command and execute it by pressing return, you need to restart finder to see the changes. The easiest way I have found to do this is by clicking the apple menu, choose Force Quit ..., select Finder in the list and click ReLaunch then confirm by clicking Relaunch in the dialog box that opens. Now open up finder, browse to where you saved mfc42.dll, and then copy the mfc42.dll file into:
/Users/ryan/.wine/drive_c/windows/system32Note that ryan will be whatever your home directory is. Mine is named ryan. Yours is probably not. While you are in finder, go ahead and copy all of your .bblx, .cmtx, .dctx, .topx files (bibles, commentaries, dictionaries and topic files) into
/Users/ryan/.wine/drive_c/Program Files/e-Sword/directory. Also note that the e-Sword installer created a /Users/ryan/e-Sword directory. You may copy all of your modules in there as an alternative. E-Sword recognizes modules in both directories. Next, hide hidden files again by typing:
defaults write com.apple.Finder AppleShowAllFiles NOAnd again, restart finder for this command to take effect. Next open AppleScript Editor by going to your Applications>Utilities menu and click on AppleScript Editor. Copy the following code into the edit box (top large white box with blinking cursor in it).
do shell script "/opt/local/bin/wine ~/.wine/drive_c/Program\\ Files/e-Sword/e-Sword.exe"After you paste the above into the text box, choose File>Save As... Name it e-Sword and under where choose Desktop. Under File Format choose Application. Click Save. The previous steps just created an launcher application so we can call up terminal automatically and tell WINE to run e-Sword for us. Now to run e-Sword and enjoy this awesome program under Snow Leopard, just double click the e-Sword icon on your Desktop. After the program loads, feel free to close the terminal window only if it has ended and shows the $ prompt. I have tested this on a completely clean install of Snow Leopard (and Lion) and it works flawlessly for me. I have also tested this in Mountain Lion, but I had to upgrade XQuartz to the Mountain Lion version, and I did not do a completely new install but just an upgrade.
If you enjoyed this tutorial, please comment! I enjoy talking with my readers. If you really want to thank me for this, consider buying one of the items on my amazon wishlist in the blog's sidebar to the right!
Filed under: product reviews