Macintosh Installation Instructions
To install FreeWRL on OS X is pretty simple.
- Down load the "dmg" file, eg, from http://freewrl.sourceforge.net/download.html
- Double Click the dmg icon.
- follow the up to date "README" in the dmg package.
--- Text below is only for those crazy loonies (like the developers) who want to compile the code from source ---
The following instructions are for compiling the FreeWRL rendering engine for use with the FreeWRL Aqua GUI for Mac OSX.
The releases of Mac OS X used were Mac OS X v 10.3.8, with updates current to April 8, 2005, and 10.4.2, with updates
current to October 12, 2005.
The instructions assume that you are starting with a freshly
installed Mac OS system, with an installed FreeWRL package,
and all supporting packages required are listed and referenced. You may already have some
of these packages installed on your system. If so, you may be able to skip some steps.
NOTE 1: You need to do this ONLY if you wish to change the source code. The "dmg" OS X
install installs a functioning system.
NOTE 2:
This package compiles the FreeWRL library, which contains 99.9% of the FreeWRL code. The Cocoa
and Carbon interface files are not here; please ask us for these files if you wish. The Cocoa
and Carbon interfaces mimic the commands found in the CFrontEnd source code files, but with
windowing commands suitable for OS X, instead of X-11.
NOTE 2: OSX 10.4 (Tiger) builds - follow these instructions. The line numbers for include
file edits are generally very close; IIRC, they were within a line or two of the 10.3 file locations; the file paths
are the same as OSX 10.3, with the exception of the Perl directories; edit files in ../Perl/5.8.6/.. rather than 5.8.1
for 10.3.
-
(if required) enable root password - via finder start Applications/NetInfo manager.
From the "Security" pull down menu, first authenticate, then enable root, and give root a password.
-
Install Xcode-1.2 package from Apple disc. This has has cvs, etc.
-
Install all software updates from Apple via the "software update" function of OS X.
-
Download and install the ImageMagick package from www.entropy.ch/software/macosx/. The package available
from this location is self-installing and requires no tweaking to install on Darwin.
-
Download and install the FreeWRL for Aqua package from Sourceforge. This package will install the latest functional version of FreeWRL for Aqua on your system. It will also install all needed perl modules and OSX frameworks. This package is self-installing. Double-click to begin the install process and indicate that FreeWRL should be installed on your primary hard drive. (If you have a partitioned drive, or multiple drives, you must install FreeWRL on the same partition as that which contains the /Library/Frameworks directory).
-
Download the FreeWRL source code.
You can download via "cvs", or just download the latest source package.
If you are installing from cvs, run the "packagemaker" script, and go to the directory that it makes. (eg, cd ../FreeWRL-1.11-pre5)
-
Download expat-1.95.8.tar.gz from
http://sf.net/projects/expat.
- Untar (eg, gunzip expat-1.95.8.tar.gz)
- cd into it (eg, cd expat-1.95.8)
- ./configure
- make install
- cd ..
-
Download XML-Parser-2.31.tar.gz from
http://www.cpan.org/modules/01modules.index.html.
- Untar
- cd into it
- perl Makefile.PL
- make install
- cd ..
-
For the builds following, make the symbolic link:
- cd /usr
- ln -s /usr/share/man
- cd -
You can remove this link after successful compiling if you want.
-
Download libjpeg from
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
- Untar
- cd into it
- ./configure --prefix="/usr" --mandir="/usr/share"
- make install
- make install-lib
- cd ..
-
Download zlib There is already a zlib there, but we need some more files.
http://www.gzip.org/zlib/zlib-1.2.2.tar.gz;
- untar
- rename zlib-1.2.2 to zlib
- cd zlib
- ./configure --prefix="/usr"
- make install
- cd ..
-
Download libpng.
http://sf.net/projects/libpng.
- untar
- move to libpng (same as zlib);
- ./configure --prefix="/usr"
- make install
- cd ..
-
Download freetype2.
http://sf.net/projects/freetype.
- untar
- cd into it
- ./configure --prefix="/usr"
- make install
- cd ..
-
In the FreeWRL source directory: perl Makefile.PL - note, the end has "warnings":
- Unrecognized argument in LIBS ignored: '-F/System/Library/Frameworks'
- Unrecognized argument in LIBS ignored: '-framework'
- Unrecognized argument in LIBS ignored: 'OpenGL'
- Unrecognized argument in LIBS ignored: '-framework'
- Unrecognized argument in LIBS ignored: 'GLUT'
- Unrecognized argument in LIBS ignored: '-framework'
- Unrecognized argument in LIBS ignored: 'Cocoa'
And, the top will have some warnings about not finding some executables; these
are for Unix (non apple) machines only, and can be ignored.
-
edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/sv.h.
on line 387 (OSX 10.4: Perl 5.8.6, line 388), comment out the
DIR * xiou_dirp; /* for opendir, readdir, etc */
line.
-
edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/reentr.h
(OSX 10.4: Perl 5.8.6; line numbers 720, 723);
- On line 716, comment out the
struct tm _gmtime_struct;
- and on line 719, comment out the:
struct tm _localtime_struct;
line.
-
edit /usr/include/dirent.h
- On line 113 (OSX 10.4 line 114), comment out the line:
struct dirent *readdir(DIR *);
- NOTE: you may have to change the permissions on this file in order to write it.
-
edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/proto.h line 915 (OSX 10.4; perl 5.8.6, line 916)
comment out line 915:
PERL_CALLCONV DIR* Perl_dirp_dup(pTHX_ DIR* dp);
-
ranlib /usr/lib/libjpeg.a
-
The Cocoa frontend needs this path update:
- cd /usr/local/lib
- ln -s /usr/lib/AquaIntLib.dylib
- cd -
-
In the FreeWRL Source directory,
to make the new OSX FreeWRL backend.