Gilles' sysadmin & dev blog for Earth Science

Install teqc on Mac OS X Lion

Update

Finally: a beta of teqc for Mac OS X Snow Leopard and Lion is ready to be tested on UNAVCO’s website.
This version does not use the Rosetta emulation anymore, which makes it much faster than previous versions on Mac OS X.

Install teqc (Windows version) on Mac OS X Lion with WINE

The latest version of teqc (October 2011) is not yet compatible for Mac OS X Lion 10.7.x. since Rosetta emulation to execute Power-PC code has been removed, see UNAVCO’s teqc note here.

A simple solution is to install the MS-Windows version of teqc inside WINE (Wine Is Not an Emulator”) with Macports.

Using MacPorts to install the latest WINE application is much easier and faster than compiling from source code since it does not require any line of compilation from your part. MacPorts will manage everything for you!

After WINE is installed we can run any WINDOWS application without booting into Windows!

Pre-requirements

  • An INTEL based Macintosh computer (for WINE installation)
  • Apple XCode Development Tools 4.2 or higher for compilation within MacPorts required. Free download on the Mac App Store or the Developer Connection Site here

Install MacPorts

From the MacPorts Project Official homepage:

The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system. 

  • Download the disk image (dmg) of MacPorts for Mac OS X from the official website.
  • After the installation the “/opt/local/” directory is created on your disc. The binary port will be installed in /opt/local/bin

Launch Macports from Terminal.app

Launch Terminal.app from /Applications/Utilities/ and type the command:

sudo port selfupdate

Now we install WINE Developer version (WINE-Developer version 1.3.37 tested), this will take some time, so be patient:

sudo port install wine-devel

Launch WineCfg

Launch the WINE configuration utility “winecfg”, this will create the directories inside your HOME’s directory

winecfg

After “winecfg” has been launched inside X11’s terminal, just quit WineCfg application.

Install the MS-Windows version of teqc into WINE

Download the teqc.zip for MS-Windows (the one which reads “Windows 95/98/NT/2000/XP/7 (gcc -mingw32 compile) for 486DX or higher)” from teqc website, unzip it: it will be unzipped as “teqc.exe”

Now that WineCfg has been launched it created a hidden “.wine” directory into your $HOME directory. The simplest solution is to open the “.wine” directory with Terminal.app:

open $HOME/.wine

Copy teqc.exe inside WINE’s Drive C:

The C:/ drive in WINE is in your $HOME directory, so we need to copy the teqc.exe executable here:

Copy “teqc.exe” to $HOME/.wine/drive_c/

Before launching “WINE” you need to launch “dbus” launch daemon for Mac OS X Lion which was installed with Macports or else you get a message error:

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!

For this you can read ‘dbus note’:

port note dbus
dbus has the following notes:
############################################################################
# Startup items have been generated that will aid in
# starting dbus with launchd. They are disabled
# by default. Execute the following command to start them,
# and to cause them to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
# launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
############################################################################

Just type in Terminal.app the two commands:

sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

Ready to launch teqc with WINE

In Terminal.app type the following command to launch “teqc”:

wine c:/teqc.exe

It should spit out:


! Notice ! GPS week will be initially set to 1672 for any data stream needing it
(or use -week option to override)

Enjoy!