Veracity Q&A home login about faq

I want to play with Veracity's source. How do I set up a Mac development environment and get Veracity to compile?

asked Jul 15 '11 at 09:33

Ian%20Olsen's gravatar image

Ian Olsen ♦♦
2.7k93355


Introduction

Assumed - you are running Mac OS Snow Leopard (10.6) and are comfortable at a terminal prompt.

Getting/Unpacking the Source

There are two options.

or

Unpack or checkout in the directory of your choice - for brevity, we'll pretend you unpacked it under ~/v, and so your source tree begins at ~/v/veracity

Prerequisites

XCode Toolkit

If you don't already have XCode 3.2 (or higher) installed, you can find it on your Snow Leopard install DVD.

If you don't have a Snow Leopard install DVD, you can download Xcode from the Apple Developer web site.

If you decide to download Xcode, you'll need to register as an Apple Developer. It's free. It's quick.

Having done that, visit the Download Xcode page, then click "Mac Dev Center" and retrieve the latest Xcode and iPhone SDK -- currently Xcode 3.2.3 and iPhone SDK 4. That's the version used in the preparation of this document.

Install as instructed.

CMake

Install CMake

Download the Darwin installer, and install as instructed.

vv-thirdparty

During the build process, some third party libraries will be built. In order for this libraries to be found and linked by the build process you will need to set an enviroment variable. This path will differ depending on the bitness of your machine. To determine if your machine is 64 bit, run the following command:

sysctl -n hw.cpu64bit_capable

If this command returns 1 your machine can run 64-bit executables. Edit ~/.profile abd add the following line:

export DYLD_LIBRARY_PATH=~/v/vv-thirdparty/universal/lib:$DYLD_LIBRARY_PATH
OR (for 32-bit)
export DYLD_LIBRARY_PATH=~/v/vv-thirdparty/i386/lib:$DYLD_LIBRARY_PATH

You should open a new terminal window to ensure this is in effect before building/running Veracity.

Creating the Build Directory and Building Veracity

cmake will handle the creation of Makefiles, etc. You just need to give it a place to work.

For example, let's create a ~/v/debug, a neighbor of our source directory.

cd to this folder, then run:

cmake -G "Unix Makefiles" ../veracity

You now have a build tree, replete with Makefiles. You'll only need to run the top-level one. So:

cd ~/v/debug
make

Updating your PATH to find Veracity Command Line Tools

To make your life easier at this point, you'll want to add the following to your PATH:

~/v/debug/src/cmd
~/v/debug/src/script

the homes of vv (the Veracity command-line app) and vscript (the scripting engine), respectively.

Running the Test Suite

To run the test suite:

cd ~/v/debug
make test

All tests should pass. If there are failures, you can consult the logs.

link
This answer is marked "community wiki".

answered Jul 15 '11 at 09:34

Ian%20Olsen's gravatar image

Ian Olsen ♦♦
2.7k93355

edited Jan 09 at 09:43

Troy%20Stanger's gravatar image

Troy Stanger ♦♦
9514

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×3
×3

Asked: Jul 15 '11 at 09:33

Seen: 1,254 times

Last updated: Jan 09 at 09:43

powered by OSQA