Menu

Building OpenFrames for Windows

Ravi Mathur Eduardo Valente Yasir Majeed Khan R. S.

This page under construction

Building OpenFrames

NOTE: These instructions were tested under Windows 7

Requirements

  • CMake to generate platform specific build system (used 3.5.2 as tested)
  • Microsoft Visual Studio to run build and install processes (used VS 2013 Community edition ver 12.0.40629.00 Update 5 as tested)
    Note: MVS is freely available, however, one must register with Microsoft and login to the account within MVS to activate the free license
    Choice of Git Client such as:
  • SourceTree - a GUI git and mercurial client
  • Git for Windows - a command line linux style shell and with git support or GUI based (runs over included MINGW)
  • OpenSceneGraph: See the [Building OpenSceneGraph in Windows] wiki
  • (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.

Download OpenFrames

  1. Get the OpenFrames Git repository. See here for the link. When checking out, ensure you have selected the "develop" branch instead of the "Master" branch.
  2. The root OpenFrames folder will be referred to as [OF_FOLDER] in this page

Setup OpenFrames Build System

In CMake:

  1. Specify [OF_FOLDER] as the Source Code location.
  2. Specify [OF_FOLDER]\build as the Build Binaries location
  3. Click "Add Entry", and specify the following:
    • Name = OSG_DIR
    • Type = PATH
    • Value = Path to your [OSG_FOLDER]\install directory
    • Description = empty
  4. (Optional if you want to build the Winteracter example) Click "Add Entry", and specify the following:
    • Name = WINTER_ROOT
    • Type = PATH
    • Value = Path to your Winteracter \wint directory, e.g. C:\Users\xyz\Documents\wint
    • Description = empty
  5. Press the "Configure" button
    • Say "ok" if you are asked to create the 'build' folder
    • Verify the default generator choice (Visual Studio 12 2013 in our case) or choose a different one
    • Check "Use default native compiler"
    • Click "finish"

If you get a CMake error "OpenSceneGraph NOT FOUND", make sure you specified OSG_DIR correctly (Step 3 above).
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.

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:

  • CMAKE_INSTALL_PREFIX = [OF_FOLDER]\install
  • Select OF_FORTRAN_MODULE to build the Fortran interface and Winteracter example
  • 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:

  1. Press the "Configure" button again to enable the variable changes you just made
  2. Press the "Generate" button to create the build system
  3. Exit CMake

Build OpenFrames

In Visual Studio:

  1. File->Open Project and navigate to [OF_FOLDER]\build folder. Choose OpenFrames.sln and click "Open".
  2. The Solution Explorer window will have ALL_BUILD selected
  3. By default the Debug build solution may be selected. Choose the Release build solution and perform build (Build->Build Solution)
  4. Once the build is complete perform the installation:
  5. Within Solution Explorer window, go to CMakePredefinedTargets,
  6. right-click INSTALL, left-click build
  7. Confirm that the ofsplitwindow executable is in [OF_FOLDER]\install\bin

Test OpenFrames

In System Properties:

  1. Select the "Advanced" tab on your Windows machine.
  2. Click on "Environment Variables" button
  3. Edit Path under "User Variables". If Path doesn't exist, then create it.
  4. Add ;[OF_FOLDER]\install\bin at the end of the Path
  5. Create a new user environment variable named 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 using a semicolon (';')
  6. Click OK to close the editor dialog
  7. Click OK to close the Environement Variables dialog
  8. Open a new terminal (so the above changes take effect), change directory to [OF_FOLDER]\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.

OpenFrames is now built and installed.


Related

Wiki: Building OpenSceneGraph in Windows

Discussion

  • Anika Halota

    Anika Halota - 2017-11-09

    > 7. Confirm that the test1 executable is in [OFFOLDER]\install\bin

    I do not have this test1 appearing in my folder. My "ALL_BUILD" for OpenFrames as well as "INSTALL" report sucess for 11 items.

     

    Last edit: Anika Halota 2017-11-09
    • Ravi Mathur

      Ravi Mathur - 2017-11-09

      I updated the demos a while back with more accurate names. test1 -> ofsplitwindow . My mistake for not updating the Wiki, and thanks for pointing it out!

      If ALL_BUILD reports all projects compiled successfully, then you are good to go.

       
  • Anika Halota

    Anika Halota - 2017-11-09
    1. Add ;[OF_FOLDER]\install at the end of the Path

    This folder doesn't contain anything that would be needed by the demos, just these folders:
    bin
    Images
    Models
    osgEarth
    Shaders
    Stars.

    When I try to run ofsplitwindow, I get an error saying it can't find OpenFrames.dll - I found this under [OF_FOLDER]\build\src\Release , so I addded that to the path as well. Once I did that it works.
    .

     

    Last edit: Anika Halota 2017-11-09
    • Ravi Mathur

      Ravi Mathur - 2017-11-09

      Thanks for pointing that out Anika. The Path should contain [OF_FOLDER]\install\bin, which should contain OpenFrames.dll as well as the demos. You should in general not add parts of the build tree to Path, since that is intended to be a transient folder containing temporary build files.

      I updated the Test OpenFrames section accordingly, and added mention of the OSG_FILE_PATH environment variable that tells OSG & OpenFrames where to find resource files (images, models, star catalog, etc.)

       
      • Anika Halota

        Anika Halota - 2017-11-09

        This is the contents of my [OF_FOLDER]\install\bin:

        • ofcinterface.exe
        • ofjitter.exe
        • ofpointclouds.exe
        • ofrealtimeupdate.exe
        • ofsplitwindow.exe
        • oftrajectoryfollower.exe
        • ofviewer.exe

        It does not contain OpenFrames.dll

         

        Last edit: Anika Halota 2017-11-09
  • Anika Halota

    Anika Halota - 2017-11-09
    1. Open a new terminal (so the above changes take effect), change directory to [OF_FOLDER]\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.

    Since we added [OF_FOLDER]\install\bin to the path, it is not necessary to change directories. 'ofsplitwindow' should work in any directory.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.