e-Sword on a Mac

E-sword on a Mac computer has been possible for quite some time, thanks to the makers of WINE, an open source port of windows dynamic link library binaries and other code necessary to run Windows programs on a Mac. I have made the graphic to the left for those of you who have followed my tutorial for installing e-Sword on a Mac computer running any version of OSX 10.6 or higher (Snow Leopard to Mountain Lion) and the companion tutorial for creating an Applescript App for launching e-Sword. WINE is able to be run on any Intel based Mac, including all late model MacBooks and MacBook Pros.

If you are a new Mac user, who has previously used Windows and would like to have e-Sword on the Mac you have two options. Follow my tutorial to get e-Sword up and running on your Mac, or pay CodeWeavers for their proprietary implementation of the WINE engine for creating “crossties” which are virtual Windows machines for running e-Sword and other programs.

As an update to those articles, you can also install Winebottler which installs both Wine and Winebottler. The Wine App lets you double click on a .msi or .exe file in Finder and open it automatically with WINE. The Winebottler App allows you to create as many “virtual Windows machines”, known as bottles, as you’d like. I prefer to install and compile it on my machine using MacPorts, but if you find the tutorial a bit to confusing or hard to follow, just install Winebottler then double click your .exe file and it should install the application for you. Then, just click the Wine glass symbol in the menu bar  , click DOS prompt, then type in

Still, if you want a truly native Mac bible study app which is truly powerful and is the best for in depth bible study, turn no further than to Accordance. For a review of Accordance 9, their older version, check out my review. Accordance is now up to version 10.1 and is available in Apple’s Apps Store. I have several modules, including Apostolic Pentecostal Accordance Modules available for free on my site. Click on the previous hyperlink, or click on Accordance in the menu bar above.

Also, as an addendum, if you are getting blank white boxes where the text of the bibles, commentaries, dictionaries, etc… should be then, in terminal, type winecfg, and press return, and when the GUI for Wine Config pops up, choose the Libraries tab, then in the “New override for library” box type oleaut32, click add, then click the oleaut32 in the existing overrides, click edit, choose builtin (WINE). Do the exact same steps for  riched20 as well.

e-Sword on a Mac update

Just thought I’d throw together this quick post letting everyone know that I’ve updated (upgraded) my Mac OSX to Lion (10.7) and e-Sword still runs, so I’m assuming my instructions for installing e-Sword on a Mac are valid for Lion as well as Snow Leopard.  The only reason I upgraded to Snow Leopard was to try our Biblereader from Olivetree on Lion.  I was not disappointed.  Olivetree has tossed together a very fine App. Kudos guys and gals at Olivetree!

Making script app icons different

As a follow up to my post e-Sword installed on a mac, I’d like to share how you can make the applescript app launcher for e-Sword have a distinctive icon rather than the default applescript icon.

  • Download a suitable icon approximately 48×48 pixels from the internet.  Just do a google image search for e-Sword and you’ll find plenty to choose from.
  • Open the image in Apple Preview.
  • Select all ⌘A
  • Copy ⌘C
  • Right click on the applescript “e-Sword” app that was saved to your desktop in the previous post.
  • Choose “Get Info” from the menu.
  • Click on the icon in the top left as shown in this picture.

 

 

 

 

  • Now you should see it glow like such:

 

 

 

 

  • Then press ⌘V to paste in the graphic you’ve downloaded.  
  • The net result should look like the following image.

 

 

 

That’s all there is to it. Now you have a snazzy e-sword icon for your applescript launcher.

Installing E-Sword on the Mac

e-Sword

*** 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:

  • Enter your password and press return. Enter the following next.

  • If you are running Lion or Mountain Lion, type the following text into terminal (Thanks to Stephen for the update):

  • or try this command if you get an error:

Then verify by typing:

Lion output should read:

Mountain Lion output should read:
  • or possibly

  • Close and re-open terminal, then type the following:

  • Once complete (35-45 minutes on average), change directories to where your downloaded setup file resides.  For me that command is:

  • 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).

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.

  • 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:

  • 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).

  • 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