Archive

Archive for December, 2008

Compile WINE for Mac OS X 10.5 INTEL

December 19th, 2008 Comments off

Note: A much easier and faster method to install Tsoft on INTEL Mac is here!

You wish to run a particular Windows application on your INTEL Mac without launching a virtual machine (VM) like Parallels Desktop, vMWare Fusion or Sun’s VirtualBox ? At full speed ? Then enter WINE (WINE Is Not an Emulator).
From the webpage:

Wine is a translation layer (a program loader) capable of running Windows applications on Linux and other POSIX compatible operating systems. Windows programs running in Wine act as native programs would, running without the performance or memory usage penalties of an emulator, with a similar look and feel to other applications on your desktop.

 

For example if you need to check or analyze tide data with the Windows application TSOFT (a software package for the analysis of Time Series and Earth Tides) without launching the VMs you should try to install WINE on your Mac!
 

Running TSoft in WINE on Mac OS X Leopard

Running TSoft in WINE on Mac OS X Leopard

There are WINE binaries for Mac OS X INTEL available (Darwine) but these aren’t up to date with the latest source code, but it should work though. Another possibility to run a Windows application is to buy the commercial derivative of WINE called “Crossover” from Codeweaver.

But if you wish and prefer to install WINE from the latest source code on OS X Intel, please follow my instructions:

Requirements

  • A Mac INTEL computer with Mac OS X Tiger (10.4.x) or Leopard (10.5.x). WINE will not work on Mac with a PowerPC processor!
  • XCode 3.1.2 Developer Tools for Leopard or 2.4.1 for Tiger and X11 SDK installed. Free download of XCode here

Build instructions

Install the source code in the following order:

  1. GNU’s libtool (To build “jpeglib6″ we need the latest ‘GNU libtool’ since ‘libtool’ from /usr/bin on Mac OS X breaks ‘jpeg’ lib build). Download from here
  2. #tar -zxvf libtool-2.2.6a.tar.gz
    #cd libtool-2.2.6
    #./configure
    #make ; sudo make install
    #make clean

  3. Fontforge libraries. Download here
  4. JPEG library “jpeg6lib”. Download from here
  5. PNG library “libpng”. Download here
  6. FreeType 2.3.8 from here
  7. And finally the latest WINE source files (I succesfuly compiled WINE development version 1.1.12)
Categories: Mac OS X Development Tags: , ,

How to compile “NLLOC 5.0″ on Mac OS X

December 1st, 2008 Comments off

The NonLinLoc (Non-Linear Location) package by Anthony Lomax, is a set of programs for velocity model construction, travel-time calculation and probabilistic, non-linear, global-search earthquake location in 3D structures, and for visualisation of 3D volume data and location results. Many of the programs operate with a 3D Grid structure which defines a specific, gridded, rectangular volume (Non-GLOBAL mdoe) or spherical section (GLOBAL mode).

More info on Anthony Lomax website

Compiled an tested on INTEL-Mac with Mac OS X 10.5.5 and Apple XCode 3.1.1 developer tools

Download the tar-gzipped (.tgz) NonLinLoc Software file on your Mac and decompress it with:


#mkdir NLLoc-5.0-MacOSX
#mv NLL5.00_src.tgz
#cd NLLoc-5.0-MacOSX
#tar -zxvf NLL5.00_src.tar.gz

The uncompressed file should create a “src” directory inside the “NLLoc-5.0-MacOSX” directory. Now we just need to get into the “src” directory and edit some files (Makefile, nrutil.c and Time_3d.c).

#cd src

Open up “TextEdit” or download the free and great “TextWrangler” and follow these steps:

  1. In “nrutil.c” remove line or comment #include <malloc.h>
  2. In “Time_3d.c” remove line or comment #include <malloc.h>
  3. In “Makefile” change “BINDIR=” to #BINDIR=. (or else we get errors “ld: in bin/Grid2GMT, can’t link with a main executable”)
  4. In “Makefile”: to avoid “open_memstream” errors, edit section “Custom Builds”:
    The line should look like “GNU_SOURCE=”  (and not “GNU_SOURCE=-D _GNU_SOURCE”)

  5. # Custom builds
    #
    # For GNU (LINUX) uncomment this line
    # GNU_SOURCE=-D _GNU_SOURCE
    #
    # For Mac OS X uncomment the next line or else you will get "open_memstream" errors:
    GNU_SOURCE=

  6. Then compile the whole stuff in ROOT mode:
  7. #sudo make all

  8. Copy all your files to “/usr/bin” or “/usr/local/bin” (as you whish but don’t forget to update your PATH in .bash_profile or .bashrc in your HOME directory)