Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Qt 6 #461

Merged
merged 45 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
cd8c862
Initial shot at upgrade to Qt 6
macumber Oct 31, 2021
b7727ee
Update QtWinMigrate from https://github.com/ChaosInitiative/QtWinMigr…
macumber Oct 31, 2021
b509441
Upgrade QtWinMigrate from https://github.com/ChaosInitiative/QtWinMig…
macumber Oct 31, 2021
81cfa80
Little bit more progress
macumber Oct 31, 2021
349e860
Use Core5Compat for now
macumber Oct 31, 2021
2dbef4a
ModelEditor is compiling
macumber Oct 31, 2021
37ad870
That's enough for tonight
macumber Oct 31, 2021
c8b1909
Almost compiling
macumber Oct 31, 2021
25f15b5
Down to a link error
macumber Oct 31, 2021
7f4dd06
Links, fails to start because no platform plugin
macumber Oct 31, 2021
b5f17de
Can run the App on windows
macumber Nov 1, 2021
068e9d5
Working Windows installer
macumber Nov 1, 2021
4a85c11
Pretty sure Core5Compat is not in 6.2.0 but 6.2.1 is available in the…
macumber Nov 1, 2021
6e7a461
Try this
macumber Nov 1, 2021
0dffbff
Change order
macumber Nov 1, 2021
2a3a0be
Tweak modules line
macumber Nov 1, 2021
068fe52
Add webchannel
macumber Nov 2, 2021
0f644da
Add positioning
macumber Nov 2, 2021
eb3b0ad
Fix test
macumber Nov 2, 2021
5684fbe
Adjustments for mac and linux
macumber Nov 2, 2021
7301e16
Try to fix missing targets in Qt 6.2.1 on Unix (eg: Qt6::QXcbIntegrat…
jmarrec Nov 2, 2021
2b08312
Now that Ubuntu doesn't use FixupBundle, we need to explicitly instal…
jmarrec Nov 2, 2021
8f8eecd
Update AboutBox with new qt version
jmarrec Nov 3, 2021
fe09b44
Fix the fixup_bundle stuff
jmarrec Nov 4, 2021
9e7b56f
Changes for m1 mac
jmarrec Nov 4, 2021
5dce71a
Try to isntall more dependencies on Ubuntu
jmarrec Nov 4, 2021
f895a85
Try to install gcc9 on 18.04 which isn't supported for Qt 6.x
jmarrec Nov 4, 2021
5faa91e
Merge pull request #473 from openstudiocoalition/develop
macumber Dec 16, 2021
dcdfef2
Update .github/workflows/app_build.yml
macumber Jan 14, 2022
076d809
Merge remote-tracking branch 'origin/develop' into 438_qt_6
macumber Jan 14, 2022
b7eeb7f
fix formatting issue
macumber Jan 14, 2022
4e38ca8
Merge remote-tracking branch 'origin/develop' into 438_qt_6
macumber Jan 14, 2022
3cc18af
Merge pull request #492 from openstudiocoalition/develop
macumber Mar 6, 2022
2faa616
Merge remote-tracking branch 'remotes/origin/master' into 438_qt_6
macumber Mar 12, 2022
493da51
Try to build with Qt 6.2.3 and MFC for QWinMigrate
macumber Mar 13, 2022
0f97a04
Update installer and CI script, remove define of QTWINMIGRATE_WITHMFC
macumber Mar 13, 2022
1fcc811
Debug Mac CI
macumber Mar 13, 2022
5a3e6b9
Try again for Mac
macumber Mar 14, 2022
83b5cd9
Try again with Mac
macumber Mar 14, 2022
a0cf8d6
Try again mac
jmarrec Mar 14, 2022
dadca26
Update md5sum for the OS SDK for mac
jmarrec Mar 14, 2022
4e51ac2
Update conan nrel remote, remove 18.04 from matrix
macumber Mar 19, 2022
2f1a438
Fix Mac install paths for SketchUp
macumber Mar 19, 2022
9eb7b99
Merge branch 'develop' into 438_qt_6
jmarrec Apr 8, 2022
28ae4bd
Bump to Qt 6.2.4. Might bump to 6.3.0 in 4 days when it's supposed to…
jmarrec Apr 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 38 additions & 17 deletions .github/workflows/app_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
CPACK_SOURCE_TXZ: OFF
CPACK_SOURCE_TZ: OFF
CPACK_SOURCE_ZIP: OFF
QT_VERSION: 5.15.0
QT_VERSION: 6.2.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qt 6.2.4 was released on march 18th. 250 bug fixes, binary compatibility. It's worth bumping IMHO.

As a patch release, Qt 6.2.4 does not add any new functionality but provides
bug fixes and other improvements and maintains both forward and backward
compatibility (source and binary) with Qt 6.2.3.

https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/6.2.4/release-note.md

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qt 6.3.0 is planned in 4 days (original: 16.03.2022 , updated: 12.04.2022)

# CPACK_BINARY_DEB: OS-SPECIFIC
# CPACK_BINARY_IFW: OS-SPECIFIC

Expand Down Expand Up @@ -242,13 +242,25 @@ 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
sudo apt install -y mesa-common-dev libglu1-mesa-dev patchelf ninja-build libxkbcommon-x11-dev libgl1-mesa-dev

# Weirdly enough, ninja makes ubuntu unresponsive...
echo CMAKE_GENERATOR='Ninja' >> $GITHUB_ENV

# Qt 6.0 doesn't support Ubuntu 18.04, try to bump the gcc version
if [ $(lsb_release -rs) == '18.04' ]; then
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
fi;
gcc --version

elif [ "$RUNNER_OS" == "Windows" ]; then
curl -L -O https://download.qt.io/official_releases/qt-installer-framework/4.0.1/QtInstallerFramework-win-x86.exe
./QtInstallerFramework-win-x86.exe --verbose --script ./ci/install_script_qtifw.qs
echo "C:/Qt/QtIFW-4.0.1/bin" >> $GITHUB_PATH
curl -L -O https://download.qt.io/official_releases/qt-installer-framework/4.3.0/QtInstallerFramework-windows-x86-4.3.0.exe
./QtInstallerFramework-windows-x86-4.3.0.exe --verbose --script ./ci/install_script_qtifw.qs
dir "C:/Qt/"
echo "C:/Qt/QtIFW-4.3.0/bin" >> $GITHUB_PATH

echo "Using chocolatey to install ninja"
choco install ninja
Expand All @@ -270,18 +282,24 @@ jobs:

brew install md5sha1sum

curl -L -O https://download.qt.io/official_releases/qt-installer-framework/4.0.1/QtInstallerFramework-mac-x64.dmg
hdiutil attach -mountpoint ./qtfiw_installer QtInstallerFramework-mac-x64.dmg
curl -L -O https://download.qt.io/official_releases/qt-installer-framework/4.3.0/QtInstallerFramework-macOS-x64-4.3.0.dmg
hdiutil attach -mountpoint ./qtfiw_installer QtInstallerFramework-macOS-x64-4.3.0.dmg
echo "ls ./qtfiw_installer"
ls ./qtfiw_installer
echo "ls ./qtfiw_installer/QtInstallerFramework-mac-x64.app/"
echo "ls ./qtfiw_installer/QtInstallerFramework-mac-x64.app/Contents/"
echo "ls ./qtfiw_installer/QtInstallerFramework-mac-x64.app/Contents/MacOS"
echo "ls ./qtfiw_installer/QtInstallerFramework-mac-x64.app/Contents/Resources"
echo "ls ./qtfiw_installer/QtInstallerFramework-mac-x64.app/Contents/Frameworks"

sudo ./qtfiw_installer/QtInstallerFramework-mac-x64.app/Contents/MacOS/QtInstallerFramework-mac-x64 --verbose --script ./ci/install_script_qtifw.qs
echo "~/Qt/QtIFW-4.0.1/bin/" >> $GITHUB_PATH
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/MacOS"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/MacOS
echo "ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/Resources"
ls ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/Resources

sudo ./qtfiw_installer/QtInstallerFramework-macOS-x64-4.3.0.app/Contents/MacOS/QtInstallerFramework-macOS-x64-4.3.0 --verbose --script ./ci/install_script_qtifw.qs
ls ~
ls ~/Qt/ || true
ls ~/Qt/QtIFW-4.3.0 || true
echo "~/Qt/QtIFW-4.3.0/bin/" >> $GITHUB_PATH
fi;

CONAN_INSTALL_MD5=$(md5sum ConanInstall.cmake | awk '{print $1}')
Expand All @@ -295,7 +313,7 @@ jobs:
uses: actions/cache@v2
with:
path: build/
key: ${{ matrix.os }}-build-cache-${{ secrets.CACHE_KEY }}
key: ${{ matrix.os }}-build-cache-qt6-${{ secrets.CACHE_KEY }}

- name: Did restoring the build-cache work? No
# If the build cache wasn't found in the cache
Expand Down Expand Up @@ -418,15 +436,18 @@ 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"
elif [ "$RUNNER_OS" == "macOS" ]; then
QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/macos"
else
QT_INSTALL_DIR="$(pwd)/build/Qt-install/$QT_VERSION/${{ matrix.QT_ARCH }}"
fi
rm -rf $QT_INSTALL_DIR
if [ -d "$QT_INSTALL_DIR" ]; then
echo "Qt $QT_VERSION already installed"
else
echo "Install aqtinstall, then install Qt $QT_VERSION for ${{ matrix.QT_OS_NAME }} ${{ matrix.QT_ARCH }}"
pip3 install aqtinstall
aqt install --outputdir ./build/Qt-install/ $QT_VERSION ${{ matrix.QT_OS_NAME }} desktop ${{ matrix.QT_ARCH }} -m qtwebengine qtwebglplugin
aqt install-qt --outputdir ./build/Qt-install/ ${{ matrix.QT_OS_NAME }} desktop $QT_VERSION ${{ matrix.QT_ARCH }} -m qtwebchannel qtwebengine qtwebview qt5compat qtpositioning
fi

echo "$QT_INSTALL_DIR/bin" >> $GITHUB_PATH
Expand Down
153 changes: 68 additions & 85 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ if(MSVC)
# all warnings - DLM: probably too high to ever use
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")

# needed for compiling with Qt6
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")

# create compiler processes on all effective processors
# /MP is useless for ninja and will cause problems. BUILD_WITH_MULTIPLE_PROCESSES shouldn't have been set if ninja but let's be safe
if(BUILD_WITH_MULTIPLE_PROCESSES AND NOT NINJA)
Expand Down Expand Up @@ -443,10 +446,9 @@ set(SWIG_EXECUTABLE "${CURRENT_CONAN_SWIG_ROOT}/bin/swig")
set(SWIG_LIB "${CURRENT_CONAN_SWIG_ROOT}/bin/swiglib")

# Qt
# e.g. QT_INSTALL_DIR = C:/Qt-5.15.0/5.15.0/msvc2019_64
# e.g. QT_INSTALL_DIR = C:/Qt/6.2.1/msvc2019_64
set(QT_INSTALL_DIR "" CACHE PATH "Path to Qt Install")
mark_as_advanced(QT_INSTALL_DIR)
set(QT_VERSION "5.15.0")
set(QT_VERSION "6.2.3")
#if(NOT EXISTS ${QT_INSTALL_DIR})
## download qt
#if(WIN32)
Expand Down Expand Up @@ -505,27 +507,15 @@ set(QT_VERSION "5.15.0")
#set(QT_INSTALL_DIR "${PROJECT_BINARY_DIR}/Qt-install/${QT_VERSION}/win64_msvc2019_64")
#endif()

# TODO: how to set OPENSSL_ROOT_DIR to a generator expression?
set(OPENSSL_ROOT_DIR ${CONAN_OPENSSL_ROOT_RELEASE})
message(STATUS "OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}")

message(STATUS "QT_INSTALL_DIR=${QT_INSTALL_DIR}")

find_package(Qt5Core ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Widgets ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Sql ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Network ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Xml ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Concurrent ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5PrintSupport ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Gui ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Quick ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5QuickWidgets ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Qml ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5WebChannel ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5Positioning ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)

find_package(Qt5WebEngine ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt5WebEngineWidgets ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
#find_package(Qt53DCore ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
#find_package(Qt53DInput ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
#find_package(Qt53DRender ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
find_package(Qt6 ${QT_VERSION} COMPONENTS CoreTools GuiTools WidgetsTools QmlTools WebEngineCoreTools REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)

find_package(Qt6 ${QT_VERSION} COMPONENTS Core Core5Compat Gui Widgets Sql Network Xml Concurrent PrintSupport Quick QuickWidgets Qml WebChannel Positioning WebEngineCore WebEngineWidgets REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)

if(APPLE)
set(QtWebEngineProcess "${QT_INSTALL_DIR}/lib/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app" CACHE PATH "Path to the QtWebEngineProcess")
Expand All @@ -540,51 +530,41 @@ find_file(qweb_resources_200 NAMES qtwebengine_resources_200p.pak PATHS "${QT_IN

# DLM: why do we have QT_WEB_LIBS separate from QT_LIBS? can we combine these?
# DLM: now the distincton should be between Qt libs linked by openstudio_modeleditor.so and the OS App
list(APPEND QT_WEB_LIBS Qt5::Core)
list(APPEND QT_WEB_LIBS Qt5::Gui)
list(APPEND QT_WEB_LIBS Qt5::WebEngine)
list(APPEND QT_WEB_LIBS Qt5::WebEngineCore)
list(APPEND QT_WEB_LIBS Qt5::WebEngineWidgets)
#list(APPEND QT_WEB_LIBS Qt5::3DCore)
#list(APPEND QT_WEB_LIBS Qt5::3DInput)
#list(APPEND QT_WEB_LIBS Qt5::3DRender)
list(APPEND QT_WEB_LIBS Qt6::Core)
list(APPEND QT_WEB_LIBS Qt6::Core5Compat)
list(APPEND QT_WEB_LIBS Qt6::Widgets)
list(APPEND QT_WEB_LIBS Qt6::WebEngineCore)
list(APPEND QT_WEB_LIBS Qt6::WebEngineWidgets)
#list(APPEND QT_WEB_LIBS Qt6::3DCore)
#list(APPEND QT_WEB_LIBS Qt6::3DInput)
#list(APPEND QT_WEB_LIBS Qt6::3DRender)
set_target_properties(${QT_WEB_LIBS} PROPERTIES INTERFACE_LINK_LIBRARIES "")

if(NOT APPLE)

find_package(Qt5WebChannel ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::WebChannel)
find_package(Qt6WebChannel ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::WebChannel)

find_package(Qt5Quick ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::Quick)
find_package(Qt6Quick ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::Quick)

find_package(Qt5QuickWidgets ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::QuickWidgets)
find_package(Qt6QuickWidgets ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::QuickWidgets)

find_package(Qt5Qml ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::Qml)
find_package(Qt6Qml ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::Qml)

find_package(Qt5QmlModels ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::QmlModels)
find_package(Qt6QmlModels ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::QmlModels)

find_package(Qt5Positioning ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::Positioning)
find_package(Qt6Positioning ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::Positioning)

if(UNIX)
find_package(Qt5DBus ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::DBus)

# there does not appear to be a normal qt finder for this
# DLM: actually there is, it is a plugin associated with Qt5::Gui
#message( Qt5Gui_PLUGINS = ${Qt5Gui_PLUGINS})
#get_target_property(Qt5QXcbIntegrationPlugin_LOCATION Qt5::QXcbIntegrationPlugin LOCATION)
#get_target_property(Qt5QXcbIntegrationPlugin_TYPE Qt5::QXcbIntegrationPlugin TYPE)
#message("Qt5::QXcbIntegrationPlugin Location = ${Qt5QXcbIntegrationPlugin_LOCATION}")
#message("Qt5::QXcbIntegrationPlugin Type = ${Qt5QXcbIntegrationPlugin_TYPE}")
list(APPEND QT_PLUGINS Qt5::QXcbIntegrationPlugin)
# This one doesn't end up in bin/platforms/, but in bin/xcbglintegrations/ so do not append, will be treated separately
# list(APPEND QT_PLUGINS Qt5::QXcbGlxIntegrationPlugin)
find_library(QT_QXCBQPA NAMES libQt5XcbQpa.so.${QT_VERSION} PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_package(Qt6DBus ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::DBus)

find_library(QT_QXCBQPA NAMES libQt6XcbQpa.so.${QT_VERSION} PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)

find_library(QT_ICU icui18n REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_library(QT_ICUDATA icudata REQUIRED PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
Expand All @@ -600,48 +580,51 @@ if(NOT APPLE)
endif()

if(APPLE)
find_package(Qt5DBus ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt5::DBus)
find_package(Qt6DBus ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_WEB_LIBS Qt6::DBus)
endif()

list(APPEND QT_LIBS Qt5::Core)
list(APPEND QT_LIBS Qt5::Widgets)
list(APPEND QT_LIBS Qt5::Network)
list(APPEND QT_LIBS Qt5::Xml)
list(APPEND QT_LIBS Qt5::Concurrent)
list(APPEND QT_LIBS Qt5::PrintSupport)
list(APPEND QT_LIBS Qt5::Gui)
list(APPEND QT_LIBS Qt6::Core)
list(APPEND QT_LIBS Qt6::Core5Compat)
list(APPEND QT_LIBS Qt6::Widgets)
list(APPEND QT_LIBS Qt6::Network)
list(APPEND QT_LIBS Qt6::Xml)
list(APPEND QT_LIBS Qt6::PrintSupport)
list(APPEND QT_LIBS Qt6::Gui)

if(WIN32)
find_package(Qt5WinExtras ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_LIBS Qt5::WinExtras)
find_package(Qt6OpenGL ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_LIBS Qt6::OpenGL)

find_package(Qt5OpenGL ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_LIBS Qt5::OpenGL)
list(APPEND QT_LIBS Qt5::Gui_EGL)
list(APPEND QT_LIBS Qt5::Gui_GLESv2)
find_program(QT_WINDEPLOY_QT NAMES windeployqt.exe PATHS "${QT_INSTALL_DIR}/bin" NO_DEFAULT_PATH)

find_library(QT_MAIN_LIB NAMES qtmain PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_library(QT_MAIN_LIB_D NAMES qtmaind PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_library(QT_ENTRYPOINT_LIB NAMES Qt6EntryPoint PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
find_library(QT_ENTRYPOINT_LIB_D NAMES Qt6EntryPointd PATHS "${QT_INSTALL_DIR}/lib" NO_DEFAULT_PATH)
endif()

if(UNIX AND NOT APPLE)
# Apparently libqxcb.so depends on libQt6OpenGL.so in Qt 6.2.1 (it depended on libGL on 5.15.0 but not OpenGL)
find_package(Qt6OpenGL ${QT_VERSION} REQUIRED PATHS ${QT_INSTALL_DIR} NO_DEFAULT_PATH)
list(APPEND QT_LIBS Qt6::OpenGL)
endif()

list(APPEND QT_INCLUDES ${Qt5Core_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5Concurrent_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5Widgets_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5Xml_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5Network_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5Gui_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Core_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Concurrent_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Widgets_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Xml_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Network_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Gui_INCLUDE_DIRS})
list(APPEND QT_INCLUDES "${QT_INSTALL_DIR}/include/QtGui/${QT_VERSION}/QtGui") # needed by qtwinmigrate
list(APPEND QT_INCLUDES ${Qt5PrintSupport_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6PrintSupport_INCLUDE_DIRS})

# DLM: added this, but seems to conflict with idea of a separate set of Qt Web dependencies?
list(APPEND QT_INCLUDES ${Qt5Network_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5WebEngine_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5WebEngineCore_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt5WebEngineWidgets_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6Network_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6WebEngine_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6WebEngineCore_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6WebEngineWidgets_INCLUDE_DIRS})

if(UNIX)
list(APPEND QT_INCLUDES ${Qt5XcbQpa_INCLUDE_DIRS})
list(APPEND QT_INCLUDES ${Qt6XcbQpa_INCLUDE_DIRS})
endif()

set(CMAKE_AUTOMOC OFF)
Expand Down
9 changes: 7 additions & 2 deletions FindOpenStudioSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ set(OPENSTUDIO_ARCHIVE_DIR "${PROJECT_BINARY_DIR}/OpenStudio-${OPENSTUDIO_VERSIO

# If downloaded, we need the SHA to match. This block is here since we need "OPENSTUDIO_PLATFORM" anyways
if(APPLE)
set(OPENSTUDIO_EXPECTED_HASH 77c2bf77f07dc2e2af7658df55940c49)
set(OPENSTUDIO_PLATFORM "Darwin")
if(ARCH MATCHES "arm64")
set(OPENSTUDIO_EXPECTED_HASH f215e3db09f3914cf0f2040f601147e1)
set(OPENSTUDIO_PLATFORM "Darwin-arm64")
else()
set(OPENSTUDIO_EXPECTED_HASH 77c2bf77f07dc2e2af7658df55940c49)
macumber marked this conversation as resolved.
Show resolved Hide resolved
set(OPENSTUDIO_PLATFORM "Darwin")
endif()
set(OPENSTUDIO_EXT "tar.gz")
elseif(UNIX)

Expand Down
2 changes: 1 addition & 1 deletion ci/install_script_qtifw.qs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Controller.prototype.TargetDirectoryPageCallback = function()
Controller.prototype.LicenseAgreementPageCallback = function() {
console.log("---- LICENSE AGREEMENT PAGE");
logCurrentPage();
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
gui.currentPageWidget().AcceptLicenseCheckBox.setChecked(true);
gui.clickButton(buttons.NextButton);
};

Expand Down
Loading