These steps are required before compilation (setup of Omnis API)
- Ensure that you have the appropriate development environment installed
Windows = Visual Studio 2008
Mac = XCode 3.2+ (XCode 4.1 on OS X 10.6 preferred) - Ensure that you are using Omnis Studio 5+ (This component is Unicode only)
- (Mac Only) Ensure that the application path bundle name has no spaces. e.g.
/Applications/OmnisStudio5.app
- (Windows Only) Ensure that the path to the omnis.exe does not have any spaces (So don't put in "Program Files"). e.g
C:\TigerLogic\OS50\omnis.exe
- (Mac Only) Ensure that the application path bundle name has no spaces. e.g.
- (Mac only) Ensure that omnisrc.app has been copied (or symbolically linked) into /Developer/Tools.
- Ensure that this directory is contained in folders with no spaces. e.g
Mac =/Externals/MyProjects
Windows =C:\Externals\MyProjects
- Ensure that you set the Installation directory for the component and the path used for omnis libraries. See below for OS specific instructions.
- Right-click on My Computer
- Click 'Advanced' tab or 'Advanced System Settings'
- Click 'Environment Variables'
- Under 'System Variables' click 'New'
- Variable name = OMNIS_XCOMP_PATH
- Variable value is the path to the xcomp directory in the Omnis directory
NOTE: There can be no spaces in the path (See Step 2) e.gC:\TigerLogic\OS501\xcomp
- Under 'System Variables' click 'New'
- Variable name = OMNIS_LIB_PATH
- Variable value is the path to the Omnis library dependencies. The folder specified should contain the COMPLIB, EXTLIB and ULIBS folders from the API.
NOTE: There can be no spaces in the path (See Step 2)
e.gC:\Externals\OmnisDependencies\Windows
- If Visual Studio is open, close and re-open it.
- Select 'Go' menu in Finder
- Select 'Go to Folder'
- Type
~/.MacOSX/
NOTE: Create the .MacOSX folder if it doesn't exist - Open environment.plist
NOTE: If it doesn't exist then it can be created using the Property List Editor application in/Developer/Applications/Utilities
- Click the 'Root' dictionary line
- Click the 'Add Child' toolbar button
- Key = OMNIS_XCOMP_PATH
- Type = String
- Value = Path to the xcomp directory in the Omnis application package
NOTE: There can be no spaces in the path (See Step 2)
e.g/Applications/OmnisStudio5.app/Contents/MacOS/xcomp
- Click the 'Root' dictionary line
- Click the 'Add Child' toolbar button
- Key = OMNIS_LIB_PATH
- Type = String
- Value = Path to the Omnis library dependencies.
The folder specified should contain the compile and frameworks folders from the API.
NOTE: There can be no spaces in the path (See Step 2)
e.g\Externals\OmnisDependencies\Mac
- Log off of OS X and log back in
5.a. Some projects may also require the Boost libraries, this requires downloading Boost(http://www.boost.org) extracting it to a directory and setting up the $BOOST_ROOT environment variable. (Boost Getting Started: http://www.boost.org/doc/libs/release/more/getting_started/index.html)
Note that Boost 1.49.00 is the last compatible version with GCC 4.2 and as of this writing (Omnis Studio 6) that means it is the latest version that can be used with Omnis Externals.
- Right-click on My Computer
- Click 'Advanced' tab or 'Advanced System Settings'
- Click 'Environment Variables'
- Under 'System Variables' click 'New'
- Variable name = BOOST_ROOT
- Variable value is the path to the Boost directory
NOTE: There can be no spaces in the path (See Step 2)
e.g C:\Boost\boost_1_49_0 (For Version 1.49, the current version at time of writing) - If Visual Studio is open, close and re-open it.
- Select 'Go' menu in Finder
- Select 'Go to Folder'
- Type ~/.MacOSX/ NOTE: Create the .MacOSX folder if it doesn't exist
- Open environment.plist
NOTE: If it doesn't exist then it can be created using the Property List Editor application in /Developer/Applications/Utilities - Click the 'Root' dictionary line
- Click the 'Add Child' toolbar button
- Key = BOOST_ROOT
- Type = String
- Value = Path to the Boost directory
NOTE: There can be no spaces in the path (See Step 2)
e.g /Boost/boost_1_49_0 (For Version 1.49, the current version at time of writing) - Log off of OS X and log back in
5.b. Some projects may also require Boost libraries to be built. To build boost libraries you must go to the boost directory and execute bjam commands or install the libraries from an installer. The commands are to be executed from the same directory as $BOOST_ROOT from 5a. NOTE: All projects assume this builds libraries into $BOOST_ROOT/stage/lib
(Requires a special flag to comply with Omnis' build requirements on Windows /Zc-wchar_t- -- This is the 'Treat wchar_t as built-in type = NO' option in Visual Studio 2008)
Complete:
bjam -a --layout=versioned --build-type=complete cxxflags=-Zc:wchar_t-
Regular:
bjam -a --layout=versioned cxxflags=-Zc:wchar_t-
Complete - Static:
bjam -a --layout=versioned --build-type=complete link=static cxxflags=-Zc:wchar_t-
Regular - Static:
bjam -a --layout=versioned link=static cxxflags=-Zc:wchar_t-
(Requires special flags for building a universal binary that supports i386, x86_64, ppc and ppc64
Complete:
./bjam -a --layout=versioned --build-type=complete toolset=darwin architecture=combined address-model=32_64 macosx-version=10.5 macosx-version-min=10.4
Regular:
./bjam -a --layout=versioned toolset=darwin architecture=combined address-model=32_64 macosx-version=10.5 macosx-version-min=10.4
Complete - Static:
./bjam -a --layout=versioned --build-type=complete toolset=darwin link=static architecture=combined address-model=32_64 macosx-version=10.5 macosx-version-min=10.4
Regular - Static:
./bjam -a --layout=versioned toolset=darwin link=static architecture=combined address-model=32_64 macosx-version=10.5 macosx-version-min=10.4
Ensure that the Omnis executable has been set so 'Build and Run' can be used
- Open Visual Studio 2008 project NVObjTemplate.vcprog
- Go to 'Debug' menu
- Select 'Start Debugging'
- A window will appear asking to find the executable
- Enter the executable path
- Click OK
- A window may appear saying that the executable does not have debug information - that is ok, dismiss the message.
- Open XCode project NVObjTemplate.xcodeproj
- Locate "Omnis" under "Executables"
- Right-Click on "Omnis" and select "Get Info"
- Change "Path" to the path of the Omnis Studio application bundle
e.g
/Applications/OmnisStudio5.app
NOTE -- If you did step 6 then the project has already been compiled and Omnis opened, but the steps are here for completeness.
- Open Visual Studio 2008 project NVObjTemplate.vcprog
- Go to 'Build' menu -or- Go to 'Debug' menu
- Select 'Build Solution' -or- Select 'Start Debugging' to compile component and open Omnis
- Open XCode project NVObjTemplate.xcodeproj
- Go to 'Build' menu
- Select 'Build Results' -or- 'Build and Debug' to compile component and open Omnis
Copyright (c) 2013 David McKeone All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.