*** 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 https://developer.apple.com/downloads/index.action# 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:
|
1 |
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.
|
1 |
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):
|
1 |
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Content/Developer |
- or try this command if you get an error:
|
1 |
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer |
|
1 |
/usr/bin/xcodebuild -version |
|
1 2 |
Xcode 4.3.3 Build version 4E3002 |
|
1 2 |
Xcode 4.4.1 Build version 4F1003 |
- or possibly
|
1 2 |
Xcode 4.5 Build version 4G182 |
- Close and re-open terminal, then type the following:
|
1 |
sudo port install wine |
- Once complete (35-45 minutes on average), change directories to where your downloaded setup file resides. For me that command is:
|
1 |
cd /Users/ryan/Downloads |
- Type 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).
|
1 |
wine setup1010.exe |
Note 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.
|
1 |
defaults write com.apple.Finder AppleShowAllFiles YES |
- After 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/system32. Note 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:
|
1 |
defaults write com.apple.Finder AppleShowAllFiles NO |
- And 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).
|
1 |
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!
Thanks!
Ryan

Pingback: Making script app icons different | Pentecostal Blogger
is this legal? I’d like to do this, but doesn’t esword charge to set up on mac already?
Dave
Actually it is legal. Wine is an emulator that allows you to run windows programs under Mac. They created their own routines that do not rely on Windows code which is why they can offer it without violating any copyright or trademark laws from Microsoft. As far as paying for it from Codeweavers (The makers of CrossOver), all CrossOver is doing is wrapping Wine in a nice easy to install and use package, which they then charge you for. The e-Sword program is free. From the e-Sword website: “‘Freely you received, freely give.’ (Matthew 10:8) Jesus told us that since we’ve been blessed we should bless others. I am happy to provide a blessing to others in the form of free Bible study software!”. The Wine package is free (open source). Crossover is not e-Sword specific. They have created a version of wine and have then made easy to install packages that they call CrossTies to install a wide number of software packages, not just e-Sword.
Be sure to see how to make the default AppleScript Icon into an e-Sword icon for easy visual reference by following my tutorial here: http://www.pentecostalblogger.com/2011/11/making-script-app-icons-different/
Thanks, Ryan. I’m not a developer. No experience whatsoever. No interest. Just like eSword and have a mac now. I’m running Lion. I shouldn’t have any issues, right? Nothing damaging?
Hi Ryan
It seemed install correctly but doesn’t run, the following is the contents of the terminal window. Any suggestions?
Last login: Sat Nov 19 14:20:02 on ttys002
/opt/local/bin/wine ~/.wine/drive_c/Program\ Files/e-Sword/e-Sword.exe
macbook:~ JJMAC$ /opt/local/bin/wine ~/.wine/drive_c/Program\ Files/e-Sword/e-Sword.exe
fixme:storage:create_storagefile Storage share mode not implemented.
err:module:import_dll Loading library MFC42.DLL (which is needed by L”C:\\windows\\system32\\tx4ole16.ocx”) failed (error c0000020).
err:ole:COMPOBJ_DllList_Add couldn’t load in-process dll L”C:\\windows\\system32\\tx4ole16.ocx”
err:ole:CoGetClassObject no class object {9c79c30d-fba0-11df-a609-0013d350667c} could be created for context 0×3
err:module:import_dll Loading library MFC42.DLL (which is needed by L”C:\\windows\\system32\\tx4ole16.ocx”) failed (error c0000020).
err:module:import_dll Loading library MFC42.DLL (which is needed by L”C:\\windows\\system32\\tx4ole16.ocx”) failed (error c0000020).
err:ole:COMPOBJ_DllList_Add couldn’t load in-process dll L”C:\\windows\\system32\\tx4ole16.ocx”
err:ole:CoGetClassObject no class object {9c79c30d-fba0-11df-a609-0013d350667c} could be created for context 0×3
macbook:~ JJMAC$
You can ignore the last post, I had not actually downloaded the mfc42.dll
But it still doesn’t run.
Last login: Sat Nov 19 15:49:12 on ttys000
/opt/local/bin/wine ~/.wine/drive_c/Program\ Files/e-Sword/e-Sword.exe
macbook:~ JJMAC$ /opt/local/bin/wine ~/.wine/drive_c/Program\ Files/e-Sword/e-Sword.exe
fixme:storage:create_storagefile Storage share mode not implemented.
err:ole:COMPOBJ_DllList_Add couldn’t load in-process dll L”C:\\windows\\system32\\tx4ole16.ocx”
err:ole:CoGetClassObject no class object {9c79c30d-fba0-11df-a609-0013d350667c} could be created for context 0×3
err:ole:COMPOBJ_DllList_Add couldn’t load in-process dll L”C:\\windows\\system32\\tx4ole16.ocx”
err:ole:CoGetClassObject no class object {9c79c30d-fba0-11df-a609-0013d350667c} could be created for context 0×3
macbook:~ JJMAC$
Well, you should not have any issues. Just to be safe, make a time machine backup of your mac to an external harddrive so you can restore in the event something goofy happens. It shouldn’t though. As far as Lion, I don’t own that OS. I have a mid 2010 Mac with Snow Leopard. I’ve tested this on a clean install of Snow Leopard and everything looks great! If you try this on Lion, please post back and let me know what the results are.
Anyway, all tutorials here are provided for informational purposes only and I cannot be held responsible for any data loss or harm to your computer, however all you’re doing is installing and configuring some pretty thoroughly tested software by a large community of developers so I really doubt anything will go wrong.
Blessings!
Ryan
First, be sure that you copied the MFC42.DLL into C:\windows\system32\ which should be in the /Users/JJMAC/.wine/drive_c/windows/system32 folder. Be sure to show hidden files so you can see the directory to copy and paste the dll in.
Then try restarting your system and see if it works.
If that fails, try installing winetricks by typing:
sudo port install winetricks
into your terminal. When it finishes, start winetricks at the command prompt type:
winetricks vcrun6
This will install the vcrun6 package which is pretty much the same as the MFC42.dll
Recopying the mfc42.dll did the trick.
Thanks Bro
Welcome! Glad it works for you!
Great instructions and a successful installation with absolutely no hiccups. Just that esword is a little ugly wished could change the display fonts. Thanks for the hint how to give the applescript the right icon as well.
Glad it worked for you!
Pingback: Review: eSword 10.0.5 | Pentecostal Blogger
Pingback: e-Sword on a Mac update | Pentecostal Blogger
I have Lion now, and e-Sword runs flawlessly under Lion as well.
Brother, I really appreciate what you’ve done here. However, I am in Lion 10.7.4, with xconde installed from the appstore, and macports from your link, and all I get when I enter “sudo port install wine” , is “Error: Port wine not found”. Hope I’m doing something wrong, but I don’t see what.
Thanks.
Make sure you configure Macport.
Open Terminal and copy the following two lines one at a time. When you paste them into Terminal, hit return to execute them.
echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profileif [
sysctl -n hw.cpu64bit_capable-eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fiAfter that, let me know if you get the following after the first command displayed in Terminal:
export PATH=/opt/local/bin:/opt/local/sbin:$PATHexport MANPATH=/opt/local/man:$MANPATH
And you should see this displayed after running the second command:
+universalOne other thing, make sure to update Macport by running the following command in Terminal:
sudo port selfupdateHey Bro. Gustason,
Just wanted you to know that with the current version of Xcode (4.3) on Lion you need to tell macports where the new location is, as Xcode no longer sits in /Developer, but instead sits in /Applications. This can be accomplished with
$ sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer
You can verify everything is correct by running this command
$ /usr/bin/xcodebuild -version
Output:
Xcode 4.3.3
Build version 4E3002
You would need to do this step immediately before
$ sudo port install wine
Also, this assumes you accepted the default install location of Xcode into /Applications/Xcode.app, if not the xcode-select command above needs to be modified accordingly.
Commenter Jairo Namnun above will get an error
(Error: No valid Xcode installation is properly selected.)
after he gets his macports working correctly, and this will fix it.
God bless, and we look forward to seeing you in HI again.
Stephen
Steve,
Thanks for the tip!
Blessings,
Ryan
Thank you Ryan. This Works on lion. also had to followed Stephen’s Instructions.
you can also save the script file as an app from the file menu. saves you once step while launching eSword.
Glad you have e-Sword running on your Mac!
Hi, I’m working through this. So glad you put it up. Mac version of sword is way too clunky. I’m stuck I got as far as “wine setup1010.exe” and got this in return. Any idea what to do now?
err:mscoree:LoadLibraryShim error reading registry key for installroot
fixme:iphlpapi:NotifyAddrChange (Handle 0xfcf53c, overlapped 0xfcf520): stub
wine: configuration in ‘/Users/hughmatheson/.wine’ has been updated.
wine: cannot find L”C:\\windows\\system32\\setuup1010.exe”
Macintosh-2:Downloads hughmatheson$ Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Hi!
It looks like you might have mistyped setup1010.exe with an extra ‘u’. Look at the 4th line you’ve pasted to see what I’m talking about.
Let me know if it still does not work after that.
I am un able to download e-sword and Download the following Dynamic Link Library mfc42.dll. Or search here if this link breaks in the future. What do I do?
Try a Google search for mfc42.dll and setup1010.exe to obtain download locations for those two files. E-Sword can be found at e-sword.net.
Thanks for the tutorial. After entering wine setup1010.exe, I get the following:
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
wine: cannot find L”C:\\windows\\system32\\setup1010.exe”
Jedidiah, what version of OSX are you running? Did you get any errors installing wine using Macport?
Also, try running the following commands:
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plistlaunchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plistThe first launches dbus and the second launches dbus at startup.
I’m running 10.8.2. I don’t think I saw any other errors.
I ran those commands successfully. I tried “wine setup1010.exe” and it came back with:
wine: cannot find L”C:\\windows\\system32\\setup1010.exe”
unknown60c5470a6152:downloads jedidiah$
It does open X11 when I run the command though.
Make sure you change directory to the Downloads directory before executing wine setup1010.exe
Also, I noticed your prompt says downloads jedediah. Please make sure that it is downloads and not Downloads (which is the default). upper and lower case matters in Mac OSX (Which is a Unix derivative [BSD]).