This page under construction
The OpenFrames build process can be broken down into four main steps:
Below are step-by-step instructions on how to perform the aforementioned steps along with the background requirements that are needed before beginning.
Additional Requirements:
(Optional if you want to build the Winteracter demo) Winteracter Open Motif. Download the latest static library for your architecture (32 or 64-bit) and place it in a convenient location. It is recommended to place it in the Winteracter lib directory (e.g. lib.ifi64
) next to the existing Winteracter libraries.
(The following steps correspond to the numbered arrows in Figure 1 below.)
In CMake:
[OF_FOLDER]
as the Source Code location.[OF_FOLDER]\Win64build
as the Build Binaries location. (Mac: [OF_FOLDER]/X11-build
). Note: CMake makes slashes forward slashesName
= OSG_DIR
Type
= PATH
Value
= Path to your [OSG_FOLDER]\install
directory. (Mac: [OSG_FOLDER]/X11-install
)Description
= emptyName
= WINTER_ROOT
Type
= PATH
Value
= Path to your Winteracter \wint
directory, e.g. C:\Users\xyz\Documents\wint
Description
= emptyFigure1: CMake GUI
Figure 2: CMake Specifications
Note: If you get a CMake error "OpenSceneGraph NOT FOUND", make sure you specified OSGDIR correctly (Step 3 above).
Note: If you get a CMake warning "Open Motif NOT FOUND", see below to set the path to libXm if you want to build the Winteracter demo.
Set CMake Variables:
The configure process sets up build variables that can be modified before generating the actual build system. The variable list can be organized by clicking the "Grouped" button. Set the following variables: (See Figure 3)
a. CMAKE_INSTALL_PREFIX
= [OF_FOLDER]\OpenFrames-Windows-install
b.Select OF_FORTRAN_MODULE
to build the Fortran interface and Winteracter example
c. Optional: Use CMAKE_LIBRARY_PATH
to specify the directory containing Open Motif (libXm) if you are building the Winteracter example. Only needed if you did NOT place libXm next to the installed Winteracter libraries. (see Requirements above)
Finally, create the build system:
a. Press the "Configure" button again to enable the variable changes you just made
b. Press the "Generate" button to create the build system
c. Exit CMake
Figure 3: CMake Variables
In Terminal:
[OSG_FOLDER]\install
-D CMAKE_CXX_STANDARD=11 . (terminal based cmake that displays information in a textual based interface)CMAKE_INSTALL_PREFIX
= \[OF_FOLDER\]\install
XXX_LIBRARY
= \[OSG_FOLDER\]\install\lib64\<filename>.so
see reference below.Path to your Winteracter
. (terminal based cmake that displays information in a textual based interface)In Visual Studio: (See Figure 4.)
[OF_FOLDER]\Win64build
folder. Choose OpenFrames.sln and click "Open".ofsplitwindow
executable is in [OF_FOLDER]\OpenFrames-Windows-install\bin
(See Figure 5)Figure 4: MS Visual Studio
Figure 5: Browse to locate ofsplitwindow
In Terminal:
[OF_FOLDER]\build
folder. (Mac: [OF_FOLDER]/X11-build
)make
, or make -jN
where N is the number of cores your computer hasmake install
to install the compiled OpenFrames into the [OF_FOLDER]/OpenFrames-Darwin-install
foldertest1
executable is in [OF_FOLDER]/X11-Darwin-install/bin
In System Properties:
Path
under "User Variables". If Path
doesn't exist, then create it. (See Figure 7)[OF_FOLDER]\OpenFrames-Windows-install\bin
to the Path by clicking "Edit" once Path is selected. Add the path as a new line in the table OSG_FILE_PATH
, and set its value to [OF_FOLDER]\install
. This will allow OpenFrames demos to find their resources (images, models, etc.). If OSG_FILE_PATH
variable already exists, then append the new value to its end by clicking "Edit" and adding a path as a new ling in the table[OF_FOLDER]\OpenFrames-Windows-install\bin
and type ofsplitwindow
. It should bring up a window where the top half has satellites orbiting the Earth, and the bottom half has a 3D time-history plot of one of the satellites.Figure 6: Enviornment Variables
Figure 7: Environment Variables
In Terminal:
export OF_ROOT=/path/to/OpenFrames-Darwin-install export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$OF_ROOT/lib
OpenFrames-Darwin-install/bin
folder, and type ./test1
. XQuartz will launch (if not already running), and an OpenFrames example should run.In Terminal:
1. make sure that LD_LIBRARY_PATH locates the libraries for OSG and OF
* export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:[OF_FOLDER]\install\lib:[OSG_FOLDER]\install\lib64
2. cd [OF_FOLDER]\install\bin
3. ./test1
OpenFrames is now built and installed.
Step 4: Test OpenFrames, Windows, Step 5: I think the value of OSG_FILE_PATH should be [OSG_FOLDER]\install, not OF_FOLDER.