Skip to content

Latest commit

 

History

History
executable file
·
183 lines (154 loc) · 8.68 KB

Read Before Compiling.md

File metadata and controls

executable file
·
183 lines (154 loc) · 8.68 KB

NVObjTemplate

Getting started

These steps are required before compilation (setup of Omnis API)

  1. 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)
  2. Ensure that you are using Omnis Studio 5+ (This component is Unicode only)
    1. (Mac Only) Ensure that the application path bundle name has no spaces. e.g. /Applications/OmnisStudio5.app
    2. (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
  3. (Mac only) Ensure that omnisrc.app has been copied (or symbolically linked) into /Developer/Tools.
  4. Ensure that this directory is contained in folders with no spaces. e.g
    Mac = /Externals/MyProjects
    Windows = C:\Externals\MyProjects
  5. Ensure that you set the Installation directory for the component and the path used for omnis libraries. See below for OS specific instructions.

Windows

  1. Right-click on My Computer
  2. Click 'Advanced' tab or 'Advanced System Settings'
  3. Click 'Environment Variables'
  4. Under 'System Variables' click 'New'
  5. Variable name = OMNIS_XCOMP_PATH
  6. 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.g C:\TigerLogic\OS501\xcomp
  7. Under 'System Variables' click 'New'
  8. Variable name = OMNIS_LIB_PATH
  9. 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.g C:\Externals\OmnisDependencies\Windows
  10. If Visual Studio is open, close and re-open it.

MacOs

  1. Select 'Go' menu in Finder
  2. Select 'Go to Folder'
  3. Type ~/.MacOSX/
    NOTE: Create the .MacOSX folder if it doesn't exist
  4. Open environment.plist
    NOTE: If it doesn't exist then it can be created using the Property List Editor application in /Developer/Applications/Utilities
  5. Click the 'Root' dictionary line
  6. Click the 'Add Child' toolbar button
  7. Key = OMNIS_XCOMP_PATH
  8. Type = String
  9. 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
  10. Click the 'Root' dictionary line
  11. Click the 'Add Child' toolbar button
  12. Key = OMNIS_LIB_PATH
  13. Type = String
  14. 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
  15. Log off of OS X and log back in

BOOST LIBRARIES

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.

Windows

  1. Right-click on My Computer
  2. Click 'Advanced' tab or 'Advanced System Settings'
  3. Click 'Environment Variables'
  4. Under 'System Variables' click 'New'
  5. Variable name = BOOST_ROOT
  6. 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)
  7. If Visual Studio is open, close and re-open it.

MacOs

  1. Select 'Go' menu in Finder
  2. Select 'Go to Folder'
  3. Type ~/.MacOSX/ NOTE: Create the .MacOSX folder if it doesn't exist
  4. Open environment.plist
    NOTE: If it doesn't exist then it can be created using the Property List Editor application in /Developer/Applications/Utilities
  5. Click the 'Root' dictionary line
  6. Click the 'Add Child' toolbar button
  7. Key = BOOST_ROOT
  8. Type = String
  9. 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)
  10. 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

Windows

(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-

MacOs

(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

6. Setting Build and Run

Ensure that the Omnis executable has been set so 'Build and Run' can be used

Windows

  1. Open Visual Studio 2008 project NVObjTemplate.vcprog
  2. Go to 'Debug' menu
  3. Select 'Start Debugging'
  4. A window will appear asking to find the executable
  5. Enter the executable path
  6. Click OK
  7. A window may appear saying that the executable does not have debug information - that is ok, dismiss the message.

Mac

  1. Open XCode project NVObjTemplate.xcodeproj
  2. Locate "Omnis" under "Executables"
  3. Right-Click on "Omnis" and select "Get Info"
  4. Change "Path" to the path of the Omnis Studio application bundle e.g /Applications/OmnisStudio5.app

7. Attempt to compile the project

Windows

NOTE -- If you did step 6 then the project has already been compiled and Omnis opened, but the steps are here for completeness.

  1. Open Visual Studio 2008 project NVObjTemplate.vcprog
  2. Go to 'Build' menu -or- Go to 'Debug' menu
  3. Select 'Build Solution' -or- Select 'Start Debugging' to compile component and open Omnis

Mac

  1. Open XCode project NVObjTemplate.xcodeproj
  2. Go to 'Build' menu
  3. Select 'Build Results' -or- 'Build and Debug' to compile component and open Omnis

Copyrights

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. 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.
  3. 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.