Skip to content

Commit

Permalink
Merge pull request #611 from openstudiocoalition/develop
Browse files Browse the repository at this point in the history
Merge for 1.6.0 release
  • Loading branch information
macumber authored Jun 6, 2023
2 parents 27a6c1e + a52be84 commit 53c249a
Show file tree
Hide file tree
Showing 66 changed files with 1,842 additions and 1,284 deletions.
66 changes: 52 additions & 14 deletions .github/workflows/app_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-12, macos-arm64]
os: [ubuntu-20.04, ubuntu-22.04, windows-2022, macos-12, macos-arm64]
include:
- os: ubuntu-20.04
allow_failure: true
Expand All @@ -58,7 +58,21 @@ jobs:
COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ
QT_OS_NAME: linux
QT_ARCH: gcc_64
- os: windows-2019
- os: ubuntu-22.04
allow_failure: true
SELF_HOSTED: false
PLATFORM_NAME: Linux
CPACK_BINARY_DEB: ON
CPACK_BINARY_IFW: OFF
CPACK_BINARY_TGZ: ON
CPACK_BINARY_ZIP: OFF
BINARY_EXT: deb
COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Linux/DEB
COMPRESSED_PKG_PATH: _CPack_Packages/Linux/TGZ
QT_OS_NAME: linux
QT_ARCH: gcc_64
- os: windows-2022
allow_failure: false
SELF_HOSTED: false
PLATFORM_NAME: Windows
Expand Down Expand Up @@ -253,7 +267,7 @@ jobs:
if [ "$RUNNER_OS" == "Linux" ]; then
echo "Install needed system dependencies for OPENGL (due to Qt) for Linux"
sudo apt update
sudo apt install -y mesa-common-dev libglu1-mesa-dev patchelf ninja-build libxkbcommon-x11-dev libgl1-mesa-dev
sudo apt install -y mesa-common-dev libglu1-mesa-dev patchelf ninja-build libxkbcommon-x11-dev libgl1-mesa-dev chrpath
# Weirdly enough, ninja makes ubuntu unresponsive...
echo CMAKE_GENERATOR='Ninja' >> $GITHUB_ENV
Expand All @@ -268,8 +282,15 @@ jobs:
echo "Using chocolatey to install ninja"
choco install ninja
# using ccache fails to build .rc files on Windows
# ccache is installed under chocolatey but `choco uninstall ccache` fails
# setting CCACHE_DISABLE=1 did not work, just remove ccache
echo "Remove ccache if it exists"
rm -f "/c/ProgramData/Chocolatey/bin/ccache" || true
# C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
MSVC_DIR=$(cmd.exe /c "vswhere -products * -requires Microsoft.Component.MSBuild -property installationPath -latest")
MSVC_DIR=$(vswhere -products '*' -requires Microsoft.Component.MSBuild -property installationPath -latest)
echo "Latest is: $MSVC_DIR"
echo "MSVC_DIR=$MSVC_DIR" >> $GITHUB_ENV
# add folder containing vcvarsall.bat
Expand Down Expand Up @@ -317,11 +338,9 @@ jobs:
echo CONAN_INSTALL_MD5=$CONAN_INSTALL_MD5 >> $GITHUB_ENV
cmake --version
# TODO: cache the QtIFW folder too

- name: Cache entire build directory
id: cachebuild
if: ${{!matrix.SELF_HOSTED}}
if: ${{ !matrix.SELF_HOSTED }}
uses: actions/cache@v3
with:
path: build/
Expand Down Expand Up @@ -443,7 +462,7 @@ jobs:
if [ "$RUNNER_OS" == "Windows" ]; then
# QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/msvc2019_64"
QT_INSTALL_DIR="$(cmd.exe /c 'cd')\build\Qt-install\${{ env.QT_VERSION }}\msvc2019_64"
QT_INSTALL_DIR="$(cmd.exe //c cd)\build\Qt-install\${{ env.QT_VERSION }}\msvc2019_64"
elif [ "$RUNNER_OS" == "macOS" ]; then
QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/macos"
else
Expand Down Expand Up @@ -526,7 +545,17 @@ jobs:
run: |
echo "Using vcvarsall to initialize the development environment"
call vcvarsall.bat x64
cmake -G Ninja -DQT_INSTALL_DIR=${{ env.QT_INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_DOCUMENTATION=${{ env.BUILD_DOCUMENTATION }} -DBUILD_TESTING=${{ env.BUILD_TESTING }} -DBUILD_BENCHMARK=${{ env.BUILD_BENCHMARK}} -DBUILD_PACKAGE=${{ env.BUILD_PACKAGE }} -DCPACK_BINARY_DEB=${{ env.CPACK_BINARY_DEB }} -DCPACK_BINARY_IFW=${{ env.CPACK_BINARY_IFW }} -DCPACK_BINARY_NSIS=${{ env.CPACK_BINARY_NSIS }} -DCPACK_BINARY_RPM=${{ env.CPACK_BINARY_RPM }} -DCPACK_BINARY_STGZ=${{ env.CPACK_BINARY_STGZ }} -DCPACK_BINARY_TBZ2=${{ env.CPACK_BINARY_TBZ2 }} -DCPACK_BINARY_TGZ=${{ env.CPACK_BINARY_TGZ }} -DCPACK_BINARY_ZIP=${{ env.CPACK_BINARY_ZIP }} -DCPACK_BINARY_TXZ=${{ env.CPACK_BINARY_TXZ }} -DCPACK_BINARY_TZ=${{ env.CPACK_BINARY_TZ }} -DCPACK_SOURCE_RPM=${{ env.CPACK_SOURCE_RPM }} -DCPACK_SOURCE_TBZ2=${{ env.CPACK_SOURCE_TBZ2 }} -DCPACK_SOURCE_TGZ=${{ env.CPACK_SOURCE_TGZ }} -DCPACK_SOURCE_TXZ=${{ env.CPACK_SOURCE_TXZ }} -DCPACK_SOURCE_TZ=${{ env.CPACK_SOURCE_TZ }} -DCPACK_SOURCE_ZIP=${{ env.CPACK_SOURCE_ZIP }} ../
dir
cmake -G Ninja -DQT_INSTALL_DIR:PATH=${{ env.QT_INSTALL_DIR }} -DCMAKE_BUILD_TYPE:STRING=${{ env.BUILD_TYPE }} ^
-DBUILD_DOCUMENTATION:BOOL=${{ env.BUILD_DOCUMENTATION }} -DBUILD_TESTING:BOOL=${{ env.BUILD_TESTING }} -DBUILD_BENCHMARK:BOOL=${{ env.BUILD_BENCHMARK}} ^
-DBUILD_PACKAGE:BOOL=${{ env.BUILD_PACKAGE }} -DCPACK_BINARY_DEB:BOOL=${{ env.CPACK_BINARY_DEB }} -DCPACK_BINARY_IFW:BOOL=${{ env.CPACK_BINARY_IFW }} ^
-DCPACK_BINARY_NSIS:BOOL=${{ env.CPACK_BINARY_NSIS }} -DCPACK_BINARY_RPM:BOOL=${{ env.CPACK_BINARY_RPM }} -DCPACK_BINARY_STGZ:BOOL=${{ env.CPACK_BINARY_STGZ }} ^
-DCPACK_BINARY_TBZ2:BOOL=${{ env.CPACK_BINARY_TBZ2 }} -DCPACK_BINARY_TGZ:BOOL=${{ env.CPACK_BINARY_TGZ }} -DCPACK_BINARY_ZIP:BOOL=${{ env.CPACK_BINARY_ZIP }} ^
-DCPACK_BINARY_TXZ:BOOL=${{ env.CPACK_BINARY_TXZ }} -DCPACK_BINARY_TZ:BOOL=${{ env.CPACK_BINARY_TZ }} -DCPACK_SOURCE_RPM:BOOL=${{ env.CPACK_SOURCE_RPM }} ^
-DCPACK_SOURCE_TBZ2:BOOL=${{ env.CPACK_SOURCE_TBZ2 }} -DCPACK_SOURCE_TGZ:BOOL=${{ env.CPACK_SOURCE_TGZ }} -DCPACK_SOURCE_TXZ:BOOL=${{ env.CPACK_SOURCE_TXZ }} ^
-DCPACK_SOURCE_TZ:BOOL=${{ env.CPACK_SOURCE_TZ }} -DCPACK_SOURCE_ZIP:BOOL=${{ env.CPACK_SOURCE_ZIP }} ^
-DANALYTICS_API_SECRET:STRING=${{secrets.ANALYTICS_API_SECRET }} -DANALYTICS_MEASUREMENT_ID:STRING=${{secrets.ANALYTICS_MEASUREMENT_ID }} ^
../
ninja
ninja package
Expand All @@ -543,7 +572,16 @@ jobs:
# NOTE: If you re-enable 'Download the OpenStudio installer' step, then pass `openstudio_DIR=$openstudio_DIR cmake [etc]`
run: |
set -x
cmake -DQT_INSTALL_DIR=$QT_INSTALL_DIR -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_DOCUMENTATION=$DBUILD_DOCUMENTATION -DBUILD_TESTING=$BUILD_TESTING -DBUILD_BENCHMARK=$BUILD_BENCHMARK -DBUILD_PACKAGE=$BUILD_PACKAGE -DCPACK_BINARY_DEB=$CPACK_BINARY_DEB -DCPACK_BINARY_IFW=$CPACK_BINARY_IFW -DCPACK_BINARY_NSIS=$CPACK_BINARY_NSIS -DCPACK_BINARY_RPM=$CPACK_BINARY_RPM -DCPACK_BINARY_STGZ=$CPACK_BINARY_STGZ -DCPACK_BINARY_TBZ2=$CPACK_BINARY_TBZ2 -DCPACK_BINARY_TGZ=$CPACK_BINARY_TGZ -DCPACK_BINARY_ZIP=$CPACK_BINARY_ZIP -DCPACK_BINARY_TXZ=$CPACK_BINARY_TXZ -DCPACK_BINARY_TZ=$CPACK_BINARY_TZ -DCPACK_SOURCE_RPM=$CPACK_SOURCE_RPM -DCPACK_SOURCE_TBZ2=$CPACK_SOURCE_TBZ2 -DCPACK_SOURCE_TGZ=$CPACK_SOURCE_TGZ -DCPACK_SOURCE_TXZ=$CPACK_SOURCE_TXZ -DCPACK_SOURCE_TZ=$CPACK_SOURCE_TZ -DCPACK_SOURCE_ZIP=$CPACK_SOURCE_ZIP ../
cmake -DQT_INSTALL_DIR:PATH=$QT_INSTALL_DIR -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \
-DBUILD_DOCUMENTATION:BOOL=$DBUILD_DOCUMENTATION -DBUILD_TESTING:BOOL=$BUILD_TESTING -DBUILD_BENCHMARK:BOOL=$BUILD_BENCHMARK \
-DBUILD_PACKAGE:BOOL=$BUILD_PACKAGE -DCPACK_BINARY_DEB:BOOL=$CPACK_BINARY_DEB -DCPACK_BINARY_IFW:BOOL=$CPACK_BINARY_IFW \
-DCPACK_BINARY_NSIS:BOOL=$CPACK_BINARY_NSIS -DCPACK_BINARY_RPM:BOOL=$CPACK_BINARY_RPM -DCPACK_BINARY_STGZ:BOOL=$CPACK_BINARY_STGZ \
-DCPACK_BINARY_TBZ2:BOOL=$CPACK_BINARY_TBZ2 -DCPACK_BINARY_TGZ:BOOL=$CPACK_BINARY_TGZ -DCPACK_BINARY_ZIP:BOOL=$CPACK_BINARY_ZIP \
-DCPACK_BINARY_TXZ:BOOL=$CPACK_BINARY_TXZ -DCPACK_BINARY_TZ:BOOL=$CPACK_BINARY_TZ -DCPACK_SOURCE_RPM:BOOL=$CPACK_SOURCE_RPM \
-DCPACK_SOURCE_TBZ2:BOOL=$CPACK_SOURCE_TBZ2 -DCPACK_SOURCE_TGZ:BOOL=$CPACK_SOURCE_TGZ -DCPACK_SOURCE_TXZ:BOOL=$CPACK_SOURCE_TXZ \
-DCPACK_SOURCE_TZ:BOOL=$CPACK_SOURCE_TZ -DCPACK_SOURCE_ZIP:BOOL=$CPACK_SOURCE_ZIP \
-DANALYTICS_API_SECRET:STRING=${{secrets.ANALYTICS_API_SECRET }} -DANALYTICS_MEASUREMENT_ID:STRING=${{secrets.ANALYTICS_MEASUREMENT_ID }} \
../
# Note: JM 2020-07-22 This is an example of how to get a config log for a failed conan dependency build (no binary available)
# This WILL be handy some day, so leave it here
Expand Down Expand Up @@ -571,19 +609,19 @@ jobs:
echo "Building with $N threads"
cmake --build . --target package -j $N --config $BUILD_TYPE
- name: Test bed Sign inner portable executable files and exe package (Windows)
- name: Test bed Sign inner portable executable files and exe package (Windows 2022)
working-directory: ./build
if: (runner.os == 'Windows')
if: (matrix.os == 'windows-2022')
shell: powershell
run: |
$installer_exe = Get-ChildItem -Filter "${{ matrix.BINARY_PKG_PATH }}/*.${{ env.BINARY_EXT }}" -File | Select-Object -First 1 | % { $_.FullName}
echo $installer_exe
echo "$installer_exe"
- name: Sign inner portable executable files and exe package (Windows)
- name: Sign inner portable executable files and exe package (Windows 2022)
working-directory: ./build
# if: (runner.os == 'Windows')
if: contains(github.ref, 'refs/tags') && (runner.os == 'Windows')
if: contains(github.ref, 'refs/tags') && (matrix.os == 'windows-2022')
shell: powershell
run: |
# Install signpath
Expand Down
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()

project(OpenStudioApplication VERSION 1.5.0)
project(OpenStudioApplication VERSION 1.6.0)

# Check system info globally so we can use it everywhere after: Has to be done before FindOpenStudioSDK.cmake
if(APPLE)
Expand Down Expand Up @@ -44,6 +44,15 @@ elseif(UNIX)
# -is outputs "Ubuntu" or "Fedora"
execute_process(COMMAND ${LSB_RELEASE} -is OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE)

find_program(UNAME uname)
execute_process(COMMAND ${UNAME} -m
OUTPUT_VARIABLE ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (ARCH STREQUAL "aarch64")
set(ARCH "arm64")
endif()

endif()

# set openstudio_DIR to the directory that contains the openstudioConfig.cmake
Expand Down
8 changes: 5 additions & 3 deletions ConanInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)

include(${CMAKE_BINARY_DIR}/conan.cmake)

conan_check(VERSION 1.48.0 REQUIRED)
conan_check(VERSION 1.53.0 REQUIRED)

message(STATUS "openstudio: RUNNING CONAN")

Expand Down Expand Up @@ -133,7 +133,9 @@ if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)
message(STATUS "Conan: Using cmake generator")
set(CONAN_CMAKE_MULTI OFF)
set(CONAN_GENERATOR "cmake")
set(CONAN_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
if (NOT CONAN_CONFIGURATION_TYPES)
set(CONAN_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
endif()
endif()


Expand All @@ -152,7 +154,7 @@ if(NOT CONAN_OPENSTUDIO_ALREADY_RUN)
"jsoncpp/1.9.5#536d080aa154e5853332339bf576747c"
"minizip/1.2.12#0b5296887a2558500d0323c6c94c8d02" # This depends on zlib, and basically patches it
"zlib/1.2.12#3b9e037ae1c615d045a06c67d88491ae" # Also needed, so we can find zlib.h and co (+ pinning exactly is good)
"fmt/8.1.1#b3e969f8561a85087bd0365c09bbf4fb"
"fmt/9.1.0#811e918ca4b4e0b9ddd6d5a2883efa82"
"sqlite3/3.38.5#010911927ce1889b5cf824f45e7cd3d2"
"cpprestsdk/2.10.18#df2f6ac88e47cadd9c9e8e0971e00d89"
"websocketpp/0.8.2#3fd704c4c5388d9c08b11af86f79f616"
Expand Down
48 changes: 22 additions & 26 deletions FindOpenStudioSDK.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
set(OPENSTUDIO_VERSION_MAJOR 3)
set(OPENSTUDIO_VERSION_MINOR 5)
set(OPENSTUDIO_VERSION_MINOR 6)
set(OPENSTUDIO_VERSION_PATCH 1)
set(OPENSTUDIO_VERSION "${OPENSTUDIO_VERSION_MAJOR}.${OPENSTUDIO_VERSION_MINOR}.${OPENSTUDIO_VERSION_PATCH}")

#If this is an official release, leave this "", otherwise put for eg '-rc1'
set(OPENSTUDIO_VERSION_PRERELEASE "")
# Enter SHA, always, eg "+79857912c4"
set(OPENSTUDIO_VERSION_SHA "+22e1db7be5")
set(OPENSTUDIO_VERSION_SHA "+bb9481519e")

# Paths where the cmake-downloaded archives will be put
set(OPENSTUDIO_ARCHIVE_DIR "${PROJECT_BINARY_DIR}/OpenStudio-${OPENSTUDIO_VERSION}")
Expand All @@ -15,25 +15,29 @@ set(OPENSTUDIO_EXT "tar.gz")

# If downloaded, we need the SHA to match. This block is here since we need "OPENSTUDIO_PLATFORM" anyways
if(APPLE)
set(OPENSTUDIO_PLATFORM "Darwin-${ARCH}")
if(ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH 6122d16d70d25f51db28dd3697678c29)
set(OPENSTUDIO_PLATFORM "Darwin-arm64")
set(OPENSTUDIO_EXPECTED_HASH b7401ca882ba6a162a41ba884555171b)
else()
set(OPENSTUDIO_EXPECTED_HASH f21b03a44aa9ac3e52a4bdfa20009171)
set(OPENSTUDIO_PLATFORM "Darwin-x86_64")
set(OPENSTUDIO_EXPECTED_HASH ba881908f683ec695c209399f261b299)
endif()

elseif(UNIX)
if(LSB_RELEASE_VERSION_SHORT MATCHES "20.04")
set(OPENSTUDIO_EXPECTED_HASH 6e5c93002f0cfb445dcdcdb1270261a4)
set(OPENSTUDIO_PLATFORM "Ubuntu-20.04")
else() # Assumes 18.04
set(OPENSTUDIO_EXPECTED_HASH 3c8bba6aa14fa8de9927c928576702a3)
set(OPENSTUDIO_PLATFORM "Ubuntu-18.04")
set(OPENSTUDIO_PLATFORM "${LSB_RELEASE_ID_SHORT}-${LSB_RELEASE_VERSION_SHORT}-${ARCH}")
if(LSB_RELEASE_VERSION_SHORT MATCHES "22.04")
if (ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH 0124e7176d4577bf2152321d1b2770a5)
else()
set(OPENSTUDIO_EXPECTED_HASH 5c45d729f3cadc04a93368e43947dc2d)
endif()
elseif(LSB_RELEASE_VERSION_SHORT MATCHES "20.04")
set(OPENSTUDIO_EXPECTED_HASH 5e67958249d99f96149b4d5576c3d0ef)
else()
message(FATAL_ERROR "OpenStudio SDK no longer provides packages for Ubuntu 18.04")
endif()

elseif(WIN32)
set(OPENSTUDIO_EXPECTED_HASH bc83efcb140d20f8f9758559a58c4347)
set(OPENSTUDIO_EXPECTED_HASH 802f8cffeac24f011e636baf1e6ffd40)
set(OPENSTUDIO_PLATFORM "Windows")
endif()

Expand Down Expand Up @@ -69,10 +73,10 @@ else()
# Note: this should be set to ""http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/develop" for nightly builds
# Occasionally we can point to a specific PR by using something like ""http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/PR-4080"
set(OPENSTUDIO_BASELINK_CI
# "http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/develop"
"http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/develop"
# TODO: TEMPORARY point to a specific subfolder / PR
# "http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/PR-4712"
"http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_PRERELEASE}${WIN_SUBFOLDER}"
# "http://openstudio-ci-builds.s3-website-us-west-2.amazonaws.com/${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_PRERELEASE}${WIN_SUBFOLDER}"

CACHE STRING "Base link to where the openstudio develop archives are hosted" FORCE)

Expand Down Expand Up @@ -187,17 +191,9 @@ else()
endif()

get_filename_component(openstudio_ROOT_DIR "${openstudio_DIR}/../../../" ABSOLUTE)
set(openstudio_ROOT_DIR "${openstudio_ROOT_DIR}" CACHE STRING "This is the path to the root of SDK, under which you'll find bin/, lib/, etc" FORCE)

# Do an extra check?
find_program(openstudio_EXECUTABLE
NAMES openstudio
PATHS "${openstudio_ROOT_DIR}/bin/"
NO_CMAKE_PATH
NO_CMAKE_ENVIRONMENT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
)
set(openstudio_ROOT_DIR "${openstudio_ROOT_DIR}" CACHE PATH "This is the path to the root of SDK, under which you'll find bin/, lib/, etc" FORCE)

get_target_property(openstudio_EXECUTABLE openstudio::openstudio LOCATION)

if (NOT EXISTS "${openstudio_EXECUTABLE}")
message(AUTHOR_WARNING "Could not find the CLI at ${openstudio_EXECUTABLE}")
Expand Down
5 changes: 4 additions & 1 deletion src/model_editor/UserSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

#include "UserSettings.hpp"

#include "../openstudio_lib/OSAppBase.hpp"
#include "../openstudio_lib/OSDocument.hpp"

#include <openstudio/utilities/bcl/LocalBCL.hpp>
#include <openstudio/utilities/bcl/BCLMeasure.hpp>
#include <openstudio/utilities/core/Path.hpp>
Expand All @@ -41,7 +44,7 @@
#include <QSettings>

std::vector<openstudio::BCLMeasure> localBCLMeasures() {
return openstudio::LocalBCL::instance().measures();
return openstudio::OSAppBase::instance()->currentDocument()->getLocalMeasures();
}

std::vector<openstudio::BCLMeasure> userMeasures() {
Expand Down
5 changes: 2 additions & 3 deletions src/openstudio_app/OpenStudioApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ std::vector<std::string> OpenStudioApp::buildCompLibraries() {

m_compLibrary = model::Model();

std::string thisVersion = openStudioVersion();
const std::string thisVersion = openStudioVersion();

for (const auto& libPath : libraryPaths()) {
try {
Expand All @@ -422,8 +422,7 @@ std::vector<std::string> OpenStudioApp::buildCompLibraries() {

osversion::VersionTranslator versionTranslator;
versionTranslator.setAllowNewerVersions(false);
boost::optional<Model> temp = versionTranslator.loadModel(libPath);
if (temp) {
if (boost::optional<Model> temp = versionTranslator.loadModel(libPath)) {
m_compLibrary.insertObjects(temp->objects());
} else {
LOG_FREE(Error, "OpenStudioApp", "Failed to load library");
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/90_1_2004.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{26bdf981-420e-4122-be4c-27b1eafdd4ae}, !- Handle
3.5.1; !- Version Identifier
{44674a1b-c3a2-473f-9db5-73492007e225}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{873e75c7-6e9e-4584-88ed-e4601de70823}, !- Handle
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/90_1_2007.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{95daec7b-b551-4327-9cdf-46aac9e6a746}, !- Handle
3.5.1; !- Version Identifier
{65d009cc-7f84-4a92-86aa-912b58a5cd64}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{38884ae1-ae61-413b-8f73-2efa3598c0a2}, !- Handle
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/90_1_2010.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{236ada49-8e04-4763-a38b-b9d80e86239d}, !- Handle
3.5.1; !- Version Identifier
{38388fe2-f21b-438b-81c0-f16463c77656}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{d2e08bbe-a18b-4637-9c36-771750410e04}, !- Handle
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/90_1_2013.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{66c7583c-b111-4475-9287-0f857541deb7}, !- Handle
3.5.1; !- Version Identifier
{6dd25ba4-1ff7-4de8-95ec-b1eb53710c9a}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{e9016661-a49b-4928-810a-daee6c453993}, !- Handle
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/90_1_2016.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{05b9d305-2e65-4e0f-9071-9ca08de0a491}, !- Handle
3.5.1; !- Version Identifier
{a0444cd2-0699-4f3a-94d8-f53a543d3d52}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{57501346-f27b-4305-b993-141739ccfaca}, !- Handle
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/90_1_2019.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{b2211936-06cb-47e3-b7c5-f4bf5d6374c9}, !- Handle
3.5.1; !- Version Identifier
{6173fdaf-d3e5-4868-a61a-79000a70ea60}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{8958332a-cb2c-4a51-93ca-ed7211f665ee}, !- Handle
Expand Down
4 changes: 2 additions & 2 deletions src/openstudio_app/Resources/DEER_1985.osm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

OS:Version,
{adf2e739-c0bb-485b-82b3-222b97860346}, !- Handle
3.5.1; !- Version Identifier
{18beca39-426a-4723-aae2-0a736fccb659}, !- Handle
3.6.1; !- Version Identifier

OS:Boiler:HotWater,
{0023cba6-4a19-4d02-94f0-ae53c5b884cb}, !- Handle
Expand Down
Loading

0 comments on commit 53c249a

Please sign in to comment.