Gilles' sysadmin & dev blog for Earth Science

Install Tsoft for WINDOWS on your Mac with WINE via MacPorts Project

This page is an update to my previous post (Compile Wine for Mac OS X INTEL) and describes the easiest way to install the WINDOWS application Tsoft on INTEL Macs using the MacPorts Project.

To run WINDOWS applications we need WINE (WINE Is Not an Emulator), a fantastic open-source application first developped on LINUX and now ported to Mac OS X without needing to boot a virtual machine (like Parallels Desktop or vmWare Fusion) or Apple’s Bootcamp and the execution time is full speed! WINE’s compatibility is quite high and the development is top notch: from office to scientific apps and some older 3D-games are running flawlessly. Even printing works great!

Using MacPorts to install the latest WINE development binaries is much easier and faster than compiling from source code with all dependencies 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 the WINDOWS application “Tosft.exe”.

Pre-requirements

  • An INTEL based Macintosh computer (for WINE installation)
  • Apple XCode Development Tools 2.4 or higher for MacPorts required

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.
  • macports-mounted-dmg

  • Double-click the icon and follow the install instructions
  • macports-install-progress

  • After the installation the “/opt/local/” directory is created on your disc. The binary directory is for example installed in /opt/local/bin

Install Porticus (the easy way to manage Macports packages)

Porticus is a GUI (Graphical User Interface) for the MacPorts package manager, written by Richard Laing in Cocoa. Download and install it from it’s website.

porticus-gui

Before installing the development version of WINE you’d better update the packages of MacPorts:

  • Launch Porticus and choose “Ports > Selfupdate …”
  • In Porticus choose on the left pane the folder “All Ports” and search for “wine-devel” in the search bar and install via the menu command “Ports > Install Selected …”

porticus-selfupdate1

Installation and compilation can take some time, so be patient.

After WINE is installed, download the Tsoft installer called Tsoft_c.exe” to your “Downloads” folder or whatever you like.

Open “Terminal.app” and type the command to go to your Downloads folder:

cd Downloads
wine Tsoft_c.exe

This will open an “X11 Terminal” window opens called “EasyZip Self-Extractor” and prompts to extracts the files to “C:/”
Click “Start” and everything is installed in your “.wine” home folder.
In fact all the applications are installed in the hidden folder “.wine” inside your $HOME folder.
Check yourself by typing:
#ls -la /Users/gilles/.wine/

You should have something like:

[gilles@gilles-imac /Users/gilles]#ls -l .wine/
total 4864
drwxr-xr-x 5 gilles gilles 170 Jan 16 23:00 dosdevices
drwxr-xr-x 5 gilles gilles 170 Jan 16 22:47 drive_c
-rw-r--r-- 1 gilles gilles 2205555 Jan 16 23:43 system.reg
-rw-r--r-- 1 gilles gilles 276301 Jan 16 23:43 user.reg
-rw-r--r-- 1 gilles gilles 2384 Jan 16 23:43 userdef.reg

So “drive_c” is nothing else than “C:” in WINE.

if you look inside $HOME/.wine/drive_c it should look like:

[gilles@gilles-imac /Users/gilles]#ls -l .wine/drive_c/
total 0
drwxr-xr-x 4 gilles gilles 136 Jan 16 21:58 Program Files
drwxr-xr-x 11 gilles gilles 374 Jan 16 22:47 Tsoft
drwxr-xr-x 22 gilles gilles 748 Jan 16 22:04 windows

To run Tsoft just type the following command in Terminal.app:
#wine C:/Tsoft/tsoft.exe

You’re done! Tsoft opens in a X11 window thanks to WINE! It’s magic!

Running TSoft in WINE on Mac OS X Leopard

Running TSoft in WINE on Mac OS X Leopard

For fun: create a Tsoft launcher with Applescript

This is really easy:

  • Open “Script Editor” from “Applications” > “Applescript” and copy paste this lines of code:


-- Launch "Tsoft" using "wine" from MacPorts Project
tell application "Terminal"
do script "/opt/local/bin/wine C:/Tsoft/tsoft.exe &"
end tell

Save this script on your Desktop as an “Application” and for Options choose: “Run-Only”.
Voilà! you can now launch Tsoft without typing any command!

If you want more control of Macports use “Terminal.app”

This part is more for UNIX freaks, but it’s really not complicated to manage Macports via Terminal.

  • Open “Terminal.app” from “/Applications/Utilities/” and update the macports application and its database with command:
    #sudo port selfupdate
  • Now install the development version of WINE with command:
  • #sudo port install wine-devel
wine-install-progress
  • It will take some time, but after succesful compilation “wine” is installed in /opt/local/bin/
  • To run Tsoft just type the command:
    #wine C:\Tsoft\tsoft.exe
  • You’re done! Tsoft opens in a X11 window thanks to WINE! Enjoy!