Skip to content

Configuring OpenStudio Build Environments

Alex Swindler edited this page Jul 10, 2014 · 85 revisions

WikiConfiguring OpenStudio Build Environments

Contents

Recommended: Using the Superbuild

Advanced: Manual Build Instructions

Using the Superbuild

This is the fastest, most reliable method of getting a working OpenStudio build. These instructions assume that you have successfully cloned the OpenStudio repository already, and installed Qt (Note that creating a universal mac build will require that you build Qt yourself - follow the instructions below).

Windows

Install Visual Studio 2013, CMake, and EnergyPlus 8.1.

Clone the repository, create a build directory, and launch CMake:

Linux

Install the command line tools and EnergyPlus 8.1.

sudo apt-get install dpkg-dev git cmake-curses-gui libqt4-dev libboost-all-dev libxt-dev

Clone the repository, create a build directory, and launch CMake:

Mac

Install Xcode, CMake, and EnergyPlus 8.1.

Clone the repository, create a build directory, and launch CMake:


Manual Build Instructions

Windows Configuration

Prerequisites

Install msysGit

Extract SWIG to C:\swig Append C:\swig\swigwin-3.0.2; to the System Path variable

Latest v3.0.2 tested and working

Install CMake

Latest v3.0.0 tested and working

Install EnergyPlus 8.1

For Building Documentation

Install Doxygen

Latest v1.8.7 tested and working

Install Graphviz

Latest v2.38 tested and working

For Building C# Bindings

Install Sandcastle

Latest v2.6.1062.1 tested and working

For Using Radiance

Install Radiance using the installer

Latest v4.2a tested and working

For Building Installer Packages

Install NSIS

v2.46 tested and working

Windows 7/8.1, Visual Studio 2013

Install Boost to the default directory of C:\local

v1.55.0 tested and working

Install Qt

v5.3.0 VS2013 OpenGL tested and working

Professional

Install Visual Studio 2013 Update 2

Professional x64

Follow the previous instructions above to configure the environment for VS2010 Professional. Within CMake, choose Visual Studio 10 Win64 as the generator for the project. CMake will give you some general warnings about 64-bit builds.

The BUILD_QT, BUILD_BOOST, and BUILD_SWIG CMake options are required for 64-bit builds, so they should be enabled. Other options can be chosen like usual.

Express

Install Visual C++ 2010 Express (the Silverlight Runtime and SQL Server 2008 Express options are unnecessary and may be unchecked)

Install Visual Studio 2010 SP1

The MSVC_IS_EXPRESS CMake option is required and should be enabled.

For Building C# Bindings

Install Visual C# 2010 Express (the Silverlight Runtime and SQL Server 2008 Express options are unnecessary and may be unchecked)

Express x64

Follow the previous instructions to configure the environment for VS2010 Express with optional C# support.

Install Windows SDK 7.1, and then add C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 to the System Path variable.

Within CMake, choose Visual Studio 10 Win64 as the generator for the project. CMake will give you some general warnings about 64-bit builds.

The BUILD_QT, BUILD_BOOST, and BUILD_SWIG CMake options are required for 64-bit builds, so they should be enabled. Other options can be chosen like usual.

The MSVC_IS_EXPRESS CMake option is required and should be enabled.

Linux Configuration

Ubuntu 14.04 (x86 and x64)

Build Dependencies:

sudo apt-get install dpkg-dev git cmake-curses-gui qt5-default libqt5webkit5-dev libboost1.55-all-dev swig libssl-dev libxt-dev doxygen graphviz

wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz
tar -xzf ruby-2.0.0-p451.tar.gz
rm ruby-2.0.0-p451.tar.gz
cd ruby-2.0.0-p451
./configure --enable-shared --prefix=/usr/local
make -j2
sudo make install
cd ..
rm -rf ruby-2.0.0-p451

sudo ln -fs /usr/local/bin/ruby /usr/bin/ruby

EnergyPlus 8.1

# Download from http://apps1.eere.energy.gov/buildings/energyplus/register.cfm?goto=eplus with the correct architecture
sudo sh SetEPlusV810009-lin-64.sh
rm SetEPlusV810009-lin-64.sh

Mac Configuration

Prerequisites

Install EnergyPlus 8.1

Install CMake with the option of creating symbolic links in /usr/bin

Install Xcode from the App Store

Install SWIG

curl -LO ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz
tar -xzf pcre-8.35.tar.gz
rm pcre-8.35.tar.gz
cd pcre-8.35
./configure
make
sudo make install
cd ..
rm -rf pcre-8.35
curl -LO http://developer.nrel.gov/downloads/buildings/openstudio/src/swig-3.0.2.tar.gz
tar -xzf swig-3.0.2.tar.gz
rm swig-3.0.2.tar.gz
cd swig-3.0.2
./configure
make
sudo make install
cd ..
rm -rf swig-3.0.2

Modify ~/.bash_profile to help give CMake defaults for the build options

export CMAKE_OSX_ARCHITECTURES='i386;x86_64'
export MACOSX_DEPLOYMENT_TARGET=10.9

For Building Installer Packages

Download the Auxiliary Tools for Xcode - Late July 2012 from https://developer.apple.com/downloads/ then drag PackageMaker.app to /Applications/

For Building Documentation

Download Doxygen and drag it to Applications

Install Graphviz

OS X 10.9

Install Boost

curl -LO http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.gz
tar -xzf boost_1_55_0.tar.gz
rm boost_1_55_0.tar.gz
cd boost_1_55_0
sh ./bootstrap.sh
# *Deprecated*
sudo ./b2 cxxflags="-stdlib=libstdc++" linkflags="-stdlib=libstdc++" variant=release variant=debug address-model=32_64 architecture=x86 --layout=tagged macosx-version-min=10.9 macosx-version=10.9 --without-python --without-math install --prefix=/usr/local -j2
cd ..
rm -rf boost_1_55_0

Install Qt

curl -LO http://qt.mirror.constant.com/archive/qt/5.3/5.3.1/single/qt-everywhere-opensource-src-5.3.1.tar.gz
tar -xzf qt-everywhere-opensource-src-5.3.1.tar.gz
rm qt-everywhere-opensource-src-5.3.1.tar.gz
cd qt-everywhere-opensource-src-5.3.1
# *Deprecated*
./configure -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -debug-and-release -opensource -openssl -arch x86 -arch x86_64 -qt-sql-sqlite -plugin-sql-sqlite -nomake examples -nomake demos -nomake docs -no-phonon -no-phonon-backend -no-qt3support -confirm-license
make -j2
sudo make install
cd ..
rm -rf qt-everywhere-opensource-src-5.3.1
# *Deprecated*
echo 'export PATH=$PATH:/usr/local/Trolltech/Qt-5.3.1/bin' >> ~/.bash_profile