Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/master_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ jobs:
echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
echo "::set-output name=symbols_archive::${BUILD_NUMBER}-${{ matrix.build_type }}-mac-symbols.zip"
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
# Build with old Qt to work around incompatibility with newer Qt versions and macOSXSDK10.12. See https://github.com/vircadia/vircadia/issues/1516
echo "VIRCADIA_USE_QT_VERSION=5.12.3" >> $GITHUB_ENV
fi
# Windows build variables
if [ "${{ matrix.os }}" = "windows-latest" ]; then
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
echo "CMAKE_EXTRA=-DVIRCADIA_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCLIENT_ONLY=1 -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV
fi
echo "APP_TARGET_NAME=Vircadia" >> $GITHUB_ENV
# Build with old Qt to work around incompatibility with newer Qt versions and macOSXSDK10.12. See https://github.com/vircadia/vircadia/issues/1516
echo "VIRCADIA_USE_QT_VERSION=5.12.3" >> $GITHUB_ENV
fi
# Windows build variables
if [ "${{ matrix.os }}" = "windows-latest" ]; then
Expand Down
7 changes: 7 additions & 0 deletions BUILD_OSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ You will need version `10.12` of the macOS SDK for building, otherwise you may e
cp -rp ~/Downloads/MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
```

When using macOSXSDK10.12, you also need to use an older Qt package to avoid compatibility issues on Big Sur and newer.
To do this, set the appropriate environment variable:
```bash
VIRCADIA_USE_QT_VERSION=5.12.3
```
See https://github.com/vircadia/vircadia/issues/1516.

### OpenSSL

Assuming you've installed OpenSSL using the homebrew instructions above, you'll need to set `OPENSSL_ROOT_DIR` so CMake can find your installations.
Expand Down
3 changes: 2 additions & 1 deletion assignment-client/src/avatars/AvatarMixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Stephen Birarda on 9/5/13.
// Copyright 2013 High Fidelity, Inc.
// Copyright 2021 Vircadia contributors.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand Down Expand Up @@ -1062,7 +1063,7 @@ void AvatarMixer::parseDomainServerSettings(const QJsonObject& domainSettings) {

static const QString AVATAR_WHITELIST_OPTION = "avatar_whitelist";
_slaveSharedData.skeletonURLWhitelist = avatarMixerGroupObject[AVATAR_WHITELIST_OPTION]
.toString().split(',', Qt::KeepEmptyParts);
.toString().split(',', QTCOMPAT_KEEP_EMPTY_PARTS);

static const QString REPLACEMENT_AVATAR_OPTION = "replacement_avatar";
_slaveSharedData.skeletonReplacementURL = avatarMixerGroupObject[REPLACEMENT_AVATAR_OPTION]
Expand Down
6 changes: 3 additions & 3 deletions domain-server/src/NodeConnectionData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c

dataStream >> newHeader.lastPingTimestamp;

SocketType publicSocketType, localSocketType;
quint8 publicSocketType, localSocketType;
dataStream >> newHeader.nodeType
>> publicSocketType >> newHeader.publicSockAddr >> localSocketType >> newHeader.localSockAddr
>> newHeader.interestList >> newHeader.placeName;
newHeader.publicSockAddr.setType(publicSocketType);
newHeader.localSockAddr.setType(localSocketType);
newHeader.publicSockAddr.setType((SocketType)publicSocketType);
newHeader.localSockAddr.setType((SocketType)localSocketType);

// For WebRTC connections, the user client's signaling channel WebSocket address is used instead of the actual data
// channel's address.
Expand Down
26 changes: 19 additions & 7 deletions hifi_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,35 @@ def __init__(self, args):
return

if 'Windows' == system:
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-windows.tar.gz'
if self.version == "5.15.2":
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-windows.tar.gz'
else:
self.version = "5.12.3"
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-windows3.tar.gz%3FversionId=5ADqP0M0j5ZfimUHrx4zJld6vYceHEsI'

elif 'Darwin' == system:
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-macos.tar.gz'
if self.version == "5.15.2":
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-macos.tar.gz'
else:
self.version = "5.12.3"
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz%3FversionId=bLAgnoJ8IMKpqv8NFDcAu8hsyQy3Rwwz'

elif 'Linux' == system:
import distro
cpu_architecture = platform.machine()

if 'x86_64' == cpu_architecture:
u_major = int( distro.major_version() )
u_minor = int( distro.minor_version() )
if distro.id() == 'ubuntu' or distro.id() == 'linuxmint':
if (distro.id() == 'ubuntu' and u_major == 18) or distro.id() == 'linuxmint' and u_major == 19:
if (distro.id() == 'ubuntu' and u_major == 18) or distro.id() == 'linuxmint' and u_major == 19:
if self.version == "5.15.2":
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.15.2-ubuntu-18.04-amd64.tar.xz'
elif (distro.id() == 'ubuntu' and u_major > 18) or (distro.id() == 'linuxmint' and u_major > 19):
self.__no_qt_package_error()
else:
self.__unsupported_error()
self.version = "5.12.3"
self.qtUrl = self.assets_url + '/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'

elif (distro.id() == 'ubuntu' and u_major > 18) or (distro.id() == 'linuxmint' and u_major > 19):
self.__no_qt_package_error()
else:
self.__no_qt_package_error()

Expand Down
13 changes: 8 additions & 5 deletions interface/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Andrzej Kapolka on 5/10/13.
// Copyright 2013 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -24,6 +25,8 @@

#include <gl/Config.h>

#include "QtCompatibility.h"

#include <QtCore/QResource>
#include <QtCore/QAbstractNativeEventFilter>
#include <QtCore/QCommandLineParser>
Expand Down Expand Up @@ -3261,12 +3264,12 @@ void Application::initializeUi() {
auto newValidator = [=](const QUrl& url) -> bool {
QString whitelistPrefix = "[WHITELIST ENTITY SCRIPTS]";
QList<QString> safeURLS = { "" };
safeURLS += qEnvironmentVariable("EXTRA_WHITELIST").trimmed().split(QRegExp("\\s*,\\s*"), Qt::SkipEmptyParts);
safeURLS += qEnvironmentVariable("EXTRA_WHITELIST").trimmed().split(QRegExp("\\s*,\\s*"), QTCOMPAT_SKIP_EMPTY_PARTS);

// PULL SAFEURLS FROM INTERFACE.JSON Settings

QVariant raw = Setting::Handle<QVariant>("private/settingsSafeURLS").get();
QStringList settingsSafeURLS = raw.toString().trimmed().split(QRegExp("\\s*[,\r\n]+\\s*"), Qt::SkipEmptyParts);
QStringList settingsSafeURLS = raw.toString().trimmed().split(QRegExp("\\s*[,\r\n]+\\s*"), QTCOMPAT_SKIP_EMPTY_PARTS);
safeURLS += settingsSafeURLS;

// END PULL SAFEURLS FROM INTERFACE.JSON Settings
Expand Down Expand Up @@ -8843,19 +8846,19 @@ void Application::initPlugins(const QStringList& arguments) {
parser.parse(arguments);

if (parser.isSet(display)) {
auto preferredDisplays = parser.value(display).split(',', Qt::SkipEmptyParts);
auto preferredDisplays = parser.value(display).split(',', QTCOMPAT_SKIP_EMPTY_PARTS);
qInfo() << "Setting prefered display plugins:" << preferredDisplays;
PluginManager::getInstance()->setPreferredDisplayPlugins(preferredDisplays);
}

if (parser.isSet(disableDisplays)) {
auto disabledDisplays = parser.value(disableDisplays).split(',', Qt::SkipEmptyParts);
auto disabledDisplays = parser.value(disableDisplays).split(',', QTCOMPAT_SKIP_EMPTY_PARTS);
qInfo() << "Disabling following display plugins:" << disabledDisplays;
PluginManager::getInstance()->disableDisplays(disabledDisplays);
}

if (parser.isSet(disableInputs)) {
auto disabledInputs = parser.value(disableInputs).split(',', Qt::SkipEmptyParts);
auto disabledInputs = parser.value(disableInputs).split(',', QTCOMPAT_SKIP_EMPTY_PARTS);
qInfo() << "Disabling following input plugins:" << disabledInputs;
PluginManager::getInstance()->disableInputs(disabledInputs);
}
Expand Down
6 changes: 4 additions & 2 deletions interface/src/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Created by Andrzej Kapolka on 5/10/13.
// Copyright 2013 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -15,6 +16,7 @@

#include <functional>

#include "QtCompatibility.h"
#include <QtCore/QHash>
#include <QtCore/QPointer>
#include <QtCore/QSet>
Expand Down Expand Up @@ -648,7 +650,7 @@ private slots:

EntityTreePointer _entityClipboard;

mutable QRecursiveMutex _viewMutex;
mutable QTCOMPAT_DECLARE_RECURSIVE_MUTEX(_viewMutex);
ViewFrustum _viewFrustum; // current state of view frustum, perspective, orientation, etc.
ViewFrustum _displayViewFrustum;

Expand Down Expand Up @@ -774,7 +776,7 @@ private slots:
bool _isMissingSequenceNumbers { false };

void checkChangeCursor();
mutable QRecursiveMutex _changeCursorLock;
mutable QTCOMPAT_DECLARE_RECURSIVE_MUTEX(_changeCursorLock);
Qt::CursorShape _desiredCursor{ Qt::BlankCursor };
bool _cursorNeedsChanging { false };

Expand Down
5 changes: 3 additions & 2 deletions interface/src/graphics/GraphicsEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//
// Created by Sam Gateau on 29/6/2018.
// Copyright 2018 High Fidelity, Inc.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -12,6 +13,7 @@

#include <gl/OffscreenGLCanvas.h>
#include <gl/GLWidget.h>
#include "QtCompatibility.h"
#include <qmutex.h>

#include <render/Engine.h>
Expand Down Expand Up @@ -68,8 +70,7 @@ class GraphicsEngine {
void render_runRenderFrame(RenderArgs* renderArgs);

protected:

mutable QRecursiveMutex _renderArgsMutex;
mutable QTCOMPAT_DECLARE_RECURSIVE_MUTEX(_renderArgsMutex);
AppRenderArgs _appRenderArgs;

RateCounter<500> _renderLoopCounter;
Expand Down
4 changes: 3 additions & 1 deletion interface/src/ui/overlays/Overlays.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//
// Modified by Zander Otavka on 7/15/15
// Copyright 2014 High Fidelity, Inc.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -18,6 +19,7 @@
#ifndef hifi_Overlays_h
#define hifi_Overlays_h

#include "QtCompatibility.h"
#include <QMouseEvent>
#include <QReadWriteLock>
#include <QScriptValue>
Expand Down Expand Up @@ -746,7 +748,7 @@ public slots:
private:
void cleanupOverlaysToDelete();

mutable QRecursiveMutex _mutex;
mutable QTCOMPAT_DECLARE_RECURSIVE_MUTEX(_mutex);
QMap<QUuid, Overlay::Pointer> _overlays;
QList<Overlay::Pointer> _overlaysToDelete;

Expand Down
5 changes: 5 additions & 0 deletions libraries/animation/src/AnimRandomSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ class AnimRandomSwitch : public AnimNode {
std::vector<Transition> _transitions;

private:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
RandomSwitchState(const RandomSwitchState&) = delete;
RandomSwitchState& operator=(const RandomSwitchState&) = delete;
#else
Q_DISABLE_COPY(RandomSwitchState)
#endif
};

public:
Expand Down
Empty file modified libraries/avatars/src/AvatarData.h
100755 → 100644
Empty file.
11 changes: 7 additions & 4 deletions libraries/controllers/src/controllers/UserInputMapper.cpp
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//
// Created by Sam Gateau on 4/27/15.
// Copyright 2015 High Fidelity, Inc.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -10,6 +11,8 @@

#include <set>

#include "QtCompatibility.h"

#include <QtCore/QThread>
#include <QtCore/QFile>

Expand Down Expand Up @@ -738,7 +741,7 @@ Mapping::Pointer UserInputMapper::newMapping(const QString& mappingName) {
// if (request->getResult() == ResourceRequest::Success) {
// result = parseMapping(QString(request->getData()));
// } else {
// qCWarning(controllers) << "Failed to load mapping url <" << jsonUrl << ">" << Qt::endl;
// qCWarning(controllers) << "Failed to load mapping url <" << jsonUrl << ">" << QTCOMPAT_ENDL;
// }
// request->deleteLater();
// }
Expand Down Expand Up @@ -1177,13 +1180,13 @@ Mapping::Pointer UserInputMapper::parseMapping(const QString& json) {
if (doc.isNull()) {
qCDebug(controllers) << "Invalid JSON...\n";
qCDebug(controllers) << error.errorString();
qCDebug(controllers) << "JSON was:\n" << json << Qt::endl;
qCDebug(controllers) << "JSON was:\n" << json << QTCOMPAT_ENDL;
return Mapping::Pointer();
}

if (!doc.isObject()) {
qWarning() << "Mapping json Document is not an object" << Qt::endl;
qCDebug(controllers) << "JSON was:\n" << json << Qt::endl;
qWarning() << "Mapping json Document is not an object" << QTCOMPAT_ENDL;
qCDebug(controllers) << "JSON was:\n" << json << QTCOMPAT_ENDL;
return Mapping::Pointer();
}
return parseMapping(doc.object());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Created by Bradley Austin Davis Arnold on 2015/06/13
// Copyright 2015 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -13,6 +14,7 @@
#include <atomic>
#include <cstdint>

#include "QtCompatibility.h"
#include <QtCore/QObject>
#include <QtCore/QMutex>
#include <QtCore/QPropertyAnimation>
Expand Down Expand Up @@ -161,7 +163,7 @@ protected slots:
// application specific position, when it's in desktop mode, the reticle position will simply move
// the system mouse.
glm::vec2 _reticlePositionInHMD { 0.0f, 0.0f };
mutable QRecursiveMutex _reticleLock;
mutable QTCOMPAT_DECLARE_RECURSIVE_MUTEX(_reticleLock);

QPointF _lastKnownRealMouse;
bool _ignoreMouseMove { false };
Expand Down
6 changes: 6 additions & 0 deletions libraries/embedded-webserver/src/HTTPConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,15 @@ HTTPConnection::HTTPConnection(QTcpSocket* socket, HTTPManager* parentManager) :
_socket->setParent(this);

// connect initial slots
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
connect(socket, SIGNAL(readyRead()), SLOT(readRequest()));
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(deleteLater()));
connect(socket, SIGNAL(disconnected()), SLOT(deleteLater()));
#else
connect(socket, &QAbstractSocket::readyRead, this, &HTTPConnection::readRequest);
connect(socket, &QAbstractSocket::errorOccurred, this, &HTTPConnection::deleteLater);
connect(socket, &QAbstractSocket::disconnected, this, &HTTPConnection::deleteLater);
#endif
}

HTTPConnection::~HTTPConnection() {
Expand Down
8 changes: 7 additions & 1 deletion libraries/entities/src/EntitySimulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//
// Created by Andrew Meadows on 2014.11.24
// Copyright 2014 High Fidelity, Inc.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -15,6 +16,7 @@
#include <limits>
#include <unordered_set>

#include "QtCompatibility.h"
#include <QtCore/QObject>
#include <QVector>

Expand Down Expand Up @@ -44,7 +46,11 @@ const int DIRTY_SIMULATION_FLAGS =

class EntitySimulation : public QObject, public std::enable_shared_from_this<EntitySimulation> {
public:
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
EntitySimulation() : _mutex(QMutex::Recursive), _nextExpiry(std::numeric_limits<uint64_t>::max()), _entityTree(nullptr) { }
#else
EntitySimulation() : _mutex(), _nextExpiry(std::numeric_limits<uint64_t>::max()), _entityTree(nullptr) { }
#endif
virtual ~EntitySimulation() { setEntityTree(nullptr); }

inline EntitySimulationPointer getThisPointer() const {
Expand Down Expand Up @@ -90,7 +96,7 @@ class EntitySimulation : public QObject, public std::enable_shared_from_this<Ent
void callUpdateOnEntitiesThatNeedIt(uint64_t now);
virtual void sortEntitiesThatMoved();

QRecursiveMutex _mutex;
QTCOMPAT_DECLARE_RECURSIVE_MUTEX(_mutex);

SetOfEntities _entitiesToSort; // entities moved by simulation (and might need resort in EntityTree)
SetOfEntities _simpleKinematicEntities; // entities undergoing non-colliding kinematic motion
Expand Down
Loading