Skip to content

Configuring OpenStudio Build Environments

Alex Swindler edited this page Jul 17, 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, Visual Studio 2013 Update 2, CMake, Qt, msysGit, and EnergyPlus 8.1.

Add C:\Qt\Qt5.3.1\5.3\msvc2013_opengl\bin to the System Path variable.

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

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 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 Visual Studio 2013, as well as Visual Studio 2013 Update 2

32-bit

Install Boost, or use the CMake option BUILD_BOOST

Latest v1.55.0 build2 tested and working

Install Qt Append C:\Qt\Qt5.3.1\5.3\msvc2013_opengl\bin; to the System Path variable

Latest v5.3.1 VS2013 OpenGL tested and working

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

Latest v3.0.2 tested and working

64-bit

Install Boost

v1.55.0 build2 x64 tested and working

Install Qt Append C:\Qt\Qt5.3.1\5.3\msvc2013_64_opengl\bin; to the System Path variable

v5.3.1 VS2013 x64 OpenGL tested and working

The BUILD_SWIG CMake option is required for 64-bit builds, so it should be enabled.

Within CMake, choose Visual Studio 12 2013 Win64 as the generator for the project.

Express

Install Visual Studio Express 2013 (all of the optional installs are unnecessary and may be unchecked), as well as Visual Studio 2013 Update 2

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