WX.Net

About/News
Screenshots

Documentation
    Why WX.Net? 
    Roadmap
    Release Notes
    Building From Source
    Tutorial
    User Manual
    Reference Doc.
    WX.Build Doc.
    wxWidgets

Download

Who's Who
SourceForge

Get WX.Net at SourceForge.net. Fast, secure and Free Open Source software downloads

Built with wxWidgets

Works on Mono

?????????????????????????

MacOS X Build Instructions

Introduction

The MacOS X version of wx.NET is still in a state of flux as wxWidgets is undergoing significant improvements on the MacOS side. But with the release of wxWidgets 2.6, Mac wxWidgets (aka wxMac) is very usable.

In the rest of this document I'll use WXNET_TOP to refer to the top-level wx.NET module directory; for example, /usr/local/src/wx.NET-CVS/wx.NET. The build system lives under WXNET_TOP/Build/MacOS.

Install your .NET Package(s)

There are two open source .NET runtimes and development environments available:

As of July 2004 Mono is at version 1.0. PNET is at v0.6.6.

Installing Mono

Download the Framework installer here:

http://www.mono-project.com/downloads/

When you run the installer, Mono will get installed under /Library/Frameworks/Mono.framework. Links to commands such as mono (the runtime) and mcs (the C# compiler) will get created in /usr/bin. So once the install is finished you should be ready to go.

Installing DotGNU Portable.Net

The easiest way to install PNET is to first install DarwinPorts, which provides an easy to use environment for compiling, installing, and maintaining Open Source packages in a custom tree on your MacOS X system. It is very similar to Perl's CPAN module. It is available at http://darwinports.opendarwin.org/. A nice summary and how-to is available at O'Reilly's Website.

Make sure you add the DarwinPorts "bin" to your PATH. For example, on my system I used /usr/local/dports as my prefix so I made sure that PATH contained /usr/local/dports/bin before the standard system directories.

There is usually a DarwinPort of the latest PNET release. As of early July 2004 PNET 0.6.6 is available using DarwinPorts. To install PNET type:

$ port install treecc pnet pnetlib ml-pnet

If you have previously installed an older version PNET you will get an error that you need to un-install the older version. To un-install type:

$ port uninstall pnet 
$ port uninstall pnetlib
$ port uninstall ml-pnet

Then re-run the entire port install command above. This installs PNET developer and runtime tools and libraries along with the some Mono libraries to supplement those that are available via PNET.

Acquire wxWidgets Source

As of this writing, wx.NET requires version 2.6 of wxWidgets. There are a variety of ways you can build and install wxWidgets.

Downloading the 2.6 Release

Download this release from:

http://www.wxwidgets.org/dl_mac2.htm#dev

Untar the file wxMac-2.6.x.tar.gz some, where x is a minor release revision number such as 1.

Download a Nightly CVS Snapshot

If you know of a bug that is resolved in CVS, using a snapshot of CVS is probably the easiest approach to take. The source tarball is available at:

http://wxwindows.sourceforge.net/snapshots/

Using the Latest CVS HEAD

If you want the latest and greatest development version of wxWidgets, use the latest unreleased "CVS HEAD" version. This just means the latest developer version.

Standard checkout command:

$ cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwindows \
  co wxWidgets

Use the password "anoncvs".

Configure the Build

Inside of the WXNET_TOP/Build/MacOS directory copy Defs.in.template to Defs.in. Open Defs.in in an editor. Defs.in is a mini-Makefile that contains a few definitions that drive the build process. It should be well documented so I won't discuss the various defines here.

You must change:

  • WXW_SOURCE_DIR
  • WXW_INSTALL_DIR

And you should probably review:

  • WXNET_INSTALL_DIR
  • DOTNET

The default for WXW_CONFIG and WXNET_CONFIG is probably good for now.

Build Wx.Widgets

Inside of a shell do the following:

$ cd WXNET_TOP/Build/MacOS
$ make wxw

This will:

  • Configure wxWidgets via it's configure script
  • Build the wxWidgets core libraries and one contrib library (STC)
  • Install the libraries and header files to WXW_INSTALL_DIR

The wxw build is actually broken into steps. To see a list of sub-builds you can perform, you can type make without any arguments:

$ make 

You can find the list of commands here.

The wxw target does not build the wxWidgets samples. If this is your first time using wxWidgets/wx.NET, I suggest building these as well:

$ make wxw-samples

Please see the samples section for details about the wxWidgets samples.

Build wx.NET

Inside of a shell do the following:

$ cd WXNET_TOP/Build/MacOS
$ make wxnet

This will:

  • Configure the build by running premake in various directories
  • Build the wxWidgets C++ wrapper library, wx-c.dylib
  • Build the wx.NET .NET assembly, wx.NET.dll
  • Build the wx.NET samples
  • Build the wx.NET utilities

Upon successful build libraries and assemblies are all placed in a common "bin" folder, WXNET_TOP/Bin.

You can also "install" wx.NET to another directory on your Mac. This is a great way to archive different builds of wx.NET or test on another Mac. The install will be done to the directory defined by WXNET_INSTALL_DIR, which should be something like /usr/local/wxnet or $(HOME)/wxnet-0.5. Just don't use something like /usr or /usr/local.

To start the install type:

$ make wxnet-install

See Install Package for a description of what gets installed. And note that the install step is optional. You do not have to do it to run the samples or even develop using wx.NET.

Try Out the Samples

Using the Finder, open the top-level source or install folder and launch the Sample-Launcher application shortcut. This will start a sample browser using the .NET runtime you defined in Defs.in. Please review the Samples section for a list of any outstanding bugs or issues. You can also launch samples directly by opening up the MacBundles folder and then launching the sample of interest.

Last changed on $Date: 2005/07/25 16:24:20 $ by $Author: t9mike $  •  Original Author: Michael S. Muegel