diff --git a/BUILD_LINUX.md b/BUILD_LINUX.md index 64c0e9a643..417ed9b8de 100644 --- a/BUILD_LINUX.md +++ b/BUILD_LINUX.md @@ -14,8 +14,8 @@ Should you choose not to install Qt5 via a package manager that handles dependen Install qt: ```bash -wget http://debian.highfidelity.com/pool/h/hi/hifi-qt5.10.1_5.10.1_amd64.deb -sudo dpkg -i hifi-qt5.10.1_5.10.1_amd64.deb +wget http://debian.highfidelity.com/pool/h/hi/hifiqt5.10.1_5.10.1_amd64.deb +sudo dpkg -i hifiqt5.10.1_5.10.1_amd64.deb ``` Install build dependencies: diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index 23df64be2e..b8c4629b90 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -61,13 +61,13 @@ static const ScriptBakeVersion CURRENT_SCRIPT_BAKE_VERSION = (ScriptBakeVersion) BakedAssetType assetTypeForExtension(const QString& extension) { auto extensionLower = extension.toLower(); if (BAKEABLE_MODEL_EXTENSIONS.contains(extensionLower)) { - return Model; + return BakedAssetType::Model; } else if (BAKEABLE_TEXTURE_EXTENSIONS.contains(extensionLower.toLocal8Bit())) { - return Texture; + return BakedAssetType::Texture; } else if (BAKEABLE_SCRIPT_EXTENSIONS.contains(extensionLower)) { - return Script; + return BakedAssetType::Script; } - return Undefined; + return BakedAssetType::Undefined; } BakedAssetType assetTypeForFilename(const QString& filename) { @@ -82,11 +82,11 @@ BakedAssetType assetTypeForFilename(const QString& filename) { QString bakedFilenameForAssetType(BakedAssetType type) { switch (type) { - case Model: + case BakedAssetType::Model: return BAKED_MODEL_SIMPLE_NAME; - case Texture: + case BakedAssetType::Texture: return BAKED_TEXTURE_SIMPLE_NAME; - case Script: + case BakedAssetType::Script: return BAKED_SCRIPT_SIMPLE_NAME; default: return ""; @@ -95,11 +95,11 @@ QString bakedFilenameForAssetType(BakedAssetType type) { BakeVersion currentBakeVersionForAssetType(BakedAssetType type) { switch (type) { - case Model: + case BakedAssetType::Model: return (BakeVersion)CURRENT_MODEL_BAKE_VERSION; - case Texture: + case BakedAssetType::Texture: return (BakeVersion)CURRENT_TEXTURE_BAKE_VERSION; - case Script: + case BakedAssetType::Script: return (BakeVersion)CURRENT_SCRIPT_BAKE_VERSION; default: return 0; @@ -222,7 +222,7 @@ bool AssetServer::needsToBeBaked(const AssetUtils::AssetPath& path, const AssetU BakedAssetType type = assetTypeForFilename(path); - if (type == Undefined) { + if (type == BakedAssetType::Undefined) { return false; } @@ -241,7 +241,7 @@ bool AssetServer::needsToBeBaked(const AssetUtils::AssetPath& path, const AssetU AssetMeta meta; std::tie(loaded, meta) = readMetaFile(assetHash); - if (type == Texture && !loaded) { + if (type == BakedAssetType::Texture && !loaded) { return false; } @@ -1546,7 +1546,7 @@ bool AssetServer::setBakingEnabled(const AssetUtils::AssetPathList& paths, bool auto it = _fileMappings.find(path); if (it != _fileMappings.end()) { auto type = assetTypeForFilename(path); - if (type == Undefined) { + if (type == BakedAssetType::Undefined) { continue; } QString bakedFilename = bakedFilenameForAssetType(type); diff --git a/assignment-client/src/assets/AssetServer.h b/assignment-client/src/assets/AssetServer.h index a55a15e6fc..fb88df0171 100644 --- a/assignment-client/src/assets/AssetServer.h +++ b/assignment-client/src/assets/AssetServer.h @@ -27,7 +27,7 @@ using BakeVersion = int; static const BakeVersion INITIAL_BAKE_VERSION = 0; static const BakeVersion NEEDS_BAKING_BAKE_VERSION = -1; -enum BakedAssetType : int { +enum class BakedAssetType : int { Model = 0, Texture, Script, diff --git a/assignment-client/src/entities/EntityServer.cpp b/assignment-client/src/entities/EntityServer.cpp index d2bcbf2886..e3aca52ee5 100644 --- a/assignment-client/src/entities/EntityServer.cpp +++ b/assignment-client/src/entities/EntityServer.cpp @@ -363,7 +363,9 @@ void EntityServer::nodeAdded(SharedNodePointer node) { void EntityServer::nodeKilled(SharedNodePointer node) { EntityTreePointer tree = std::static_pointer_cast(_tree); - tree->deleteDescendantsOfAvatar(node->getUUID()); + tree->withWriteLock([&] { + tree->deleteDescendantsOfAvatar(node->getUUID()); + }); tree->forgetAvatarID(node->getUUID()); OctreeServer::nodeKilled(node); } @@ -451,8 +453,6 @@ void EntityServer::domainSettingsRequestFailed() { void EntityServer::startDynamicDomainVerification() { qCDebug(entities) << "Starting Dynamic Domain Verification..."; - QString thisDomainID = DependencyManager::get()->getDomainID().remove(QRegExp("\\{|\\}")); - EntityTreePointer tree = std::static_pointer_cast(_tree); QHash localMap(tree->getEntityCertificateIDMap()); @@ -460,15 +460,19 @@ void EntityServer::startDynamicDomainVerification() { qCDebug(entities) << localMap.size() << "entities in _entityCertificateIDMap"; while (i.hasNext()) { i.next(); + const auto& certificateID = i.key(); + const auto& entityID = i.value(); - EntityItemPointer entity = tree->findEntityByEntityItemID(i.value()); + EntityItemPointer entity = tree->findEntityByEntityItemID(entityID); if (entity) { if (!entity->getProperties().verifyStaticCertificateProperties()) { - qCDebug(entities) << "During Dynamic Domain Verification, a certified entity with ID" << i.value() << "failed" + qCDebug(entities) << "During Dynamic Domain Verification, a certified entity with ID" << entityID << "failed" << "static certificate verification."; // Delete the entity if it doesn't pass static certificate verification - tree->deleteEntity(i.value(), true); + tree->withWriteLock([&] { + tree->deleteEntity(entityID, true); + }); } else { QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); QNetworkRequest networkRequest; @@ -477,39 +481,46 @@ void EntityServer::startDynamicDomainVerification() { QUrl requestURL = NetworkingConstants::METAVERSE_SERVER_URL(); requestURL.setPath("/api/v1/commerce/proof_of_purchase_status/location"); QJsonObject request; - request["certificate_id"] = i.key(); + request["certificate_id"] = certificateID; networkRequest.setUrl(requestURL); - QNetworkReply* networkReply = NULL; - networkReply = networkAccessManager.put(networkRequest, QJsonDocument(request).toJson()); + QNetworkReply* networkReply = networkAccessManager.put(networkRequest, QJsonDocument(request).toJson()); + + connect(networkReply, &QNetworkReply::finished, this, [this, entityID, networkReply] { + EntityTreePointer tree = std::static_pointer_cast(_tree); - connect(networkReply, &QNetworkReply::finished, [=]() { QJsonObject jsonObject = QJsonDocument::fromJson(networkReply->readAll()).object(); jsonObject = jsonObject["data"].toObject(); if (networkReply->error() == QNetworkReply::NoError) { + QString thisDomainID = DependencyManager::get()->getDomainID().remove(QRegExp("\\{|\\}")); if (jsonObject["domain_id"].toString() != thisDomainID) { + EntityItemPointer entity = tree->findEntityByEntityItemID(entityID); if (entity->getAge() > (_MAXIMUM_DYNAMIC_DOMAIN_VERIFICATION_TIMER_MS/MSECS_PER_SECOND)) { qCDebug(entities) << "Entity's cert's domain ID" << jsonObject["domain_id"].toString() - << "doesn't match the current Domain ID" << thisDomainID << "; deleting entity" << i.value(); - tree->deleteEntity(i.value(), true); + << "doesn't match the current Domain ID" << thisDomainID << "; deleting entity" << entityID; + tree->withWriteLock([&] { + tree->deleteEntity(entityID, true); + }); } else { - qCDebug(entities) << "Entity failed dynamic domain verification, but was created too recently to necessitate deletion:" << i.value(); + qCDebug(entities) << "Entity failed dynamic domain verification, but was created too recently to necessitate deletion:" << entityID; } } else { - qCDebug(entities) << "Entity passed dynamic domain verification:" << i.value(); + qCDebug(entities) << "Entity passed dynamic domain verification:" << entityID; } } else { - qCDebug(entities) << "Call to" << networkReply->url() << "failed with error" << networkReply->error() << "; deleting entity" << i.value() + qCDebug(entities) << "Call to" << networkReply->url() << "failed with error" << networkReply->error() << "; deleting entity" << entityID << "More info:" << jsonObject; - tree->deleteEntity(i.value(), true); + tree->withWriteLock([&] { + tree->deleteEntity(entityID, true); + }); } networkReply->deleteLater(); }); } } else { - qCWarning(entities) << "During DDV, an entity with ID" << i.value() << "was NOT found in the Entity Tree!"; + qCWarning(entities) << "During DDV, an entity with ID" << entityID << "was NOT found in the Entity Tree!"; } } diff --git a/assignment-client/src/octree/OctreeSendThread.cpp b/assignment-client/src/octree/OctreeSendThread.cpp index d5b9da7353..715e83f403 100644 --- a/assignment-client/src/octree/OctreeSendThread.cpp +++ b/assignment-client/src/octree/OctreeSendThread.cpp @@ -400,7 +400,9 @@ int OctreeSendThread::packetDistributor(SharedNodePointer node, OctreeQueryNode* if (shouldTraverseAndSend(nodeData)) { quint64 start = usecTimestampNow(); - traverseTreeAndSendContents(node, nodeData, viewFrustumChanged, isFullScene); + _myServer->getOctree()->withReadLock([&]{ + traverseTreeAndSendContents(node, nodeData, viewFrustumChanged, isFullScene); + }); // Here's where we can/should allow the server to send other data... // send the environment packet diff --git a/cmake/modules/FindGverb.cmake b/cmake/modules/FindGverb.cmake deleted file mode 100644 index 0c149a7ca1..0000000000 --- a/cmake/modules/FindGverb.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# FindGVerb.cmake -# -# Try to find the Gverb library. -# -# You must provide a GVERB_ROOT_DIR which contains src and include directories -# -# Once done this will define -# -# GVERB_FOUND - system found Gverb -# GVERB_INCLUDE_DIRS - the Gverb include directory -# -# Copyright 2014 High Fidelity, Inc. -# -# Distributed under the Apache License, Version 2.0. -# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -# - -include("${MACRO_DIR}/HifiLibrarySearchHints.cmake") -hifi_library_search_hints("gverb") - -find_path(GVERB_INCLUDE_DIRS gverb.h PATH_SUFFIXES include HINTS ${GVERB_SEARCH_DIRS}) -find_library(GVERB_LIBRARIES gverb PATH_SUFFIXES lib HINTS ${GVERB_SEARCH_DIRS}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Gverb DEFAULT_MSG GVERB_INCLUDE_DIRS GVERB_LIBRARIES) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index fe00d86c3a..ac9441319b 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -180,8 +180,9 @@ else () add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM}) endif () + if (BUILD_TOOLS AND NPM_EXECUTABLE) - # require JSDoc to be build before interface is deployed (Console Auto-complete) + # require JSDoc to be build before interface is deployed add_dependencies(resources jsdoc) endif() @@ -322,6 +323,13 @@ if (APPLE) "${RESOURCES_DEV_DIR}/scripts" ) + # copy JSDoc files beside the executable + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${CMAKE_SOURCE_DIR}/tools/jsdoc/out" + "${RESOURCES_DEV_DIR}/jsdoc" + ) + # call the fixup_interface macro to add required bundling commands for installation fixup_interface() @@ -350,6 +358,13 @@ else() "${RESOURCES_DEV_DIR}/serverless/tutorial.json" ) + # copy JSDoc files beside the executable + add_custom_command(TARGET ${TARGET_NAME} POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory + "${CMAKE_SOURCE_DIR}/tools/jsdoc/out" + "${INTERFACE_EXEC_DIR}/jsdoc" + ) + # link target to external libraries if (WIN32) target_link_libraries(${TARGET_NAME} wsock32.lib Winmm.lib) diff --git a/interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.eot b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.eot similarity index 82% rename from interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.eot rename to interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.eot index d3591e6499..1be5435ced 100644 Binary files a/interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.eot and b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.eot differ diff --git a/interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.svg b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.svg similarity index 92% rename from interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.svg rename to interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.svg index 43c4932879..c68cb63a0d 100644 --- a/interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.svg +++ b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.svg @@ -25,7 +25,6 @@ - @@ -145,4 +144,14 @@ + + + + + + + + + + diff --git a/interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.ttf b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.ttf similarity index 82% rename from interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.ttf rename to interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.ttf index 8907cf7858..edc447c132 100644 Binary files a/interface/resources/fonts/hifi-glyphs/fonts/hifi-glyphs.ttf and b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.ttf differ diff --git a/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.woff b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.woff new file mode 100644 index 0000000000..f26000caf4 Binary files /dev/null and b/interface/resources/fonts/hifi-glyphs-1.31/fonts/hifi-glyphs.woff differ diff --git a/interface/resources/fonts/hifi-glyphs/icons-reference.html b/interface/resources/fonts/hifi-glyphs-1.31/icons-reference.html similarity index 93% rename from interface/resources/fonts/hifi-glyphs/icons-reference.html rename to interface/resources/fonts/hifi-glyphs-1.31/icons-reference.html index 2ca94d4110..b03f5214c9 100644 --- a/interface/resources/fonts/hifi-glyphs/icons-reference.html +++ b/interface/resources/fonts/hifi-glyphs-1.31/icons-reference.html @@ -12,7 +12,7 @@

HiFi Glyphs

-

This font was created for use inHigh Fidelity

+

This font was created for use in High Fidelity

CSS mapping

  • @@ -87,10 +87,6 @@
  • -
  • -
    - -
  • @@ -567,6 +563,46 @@
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +

Character mapping

    @@ -642,10 +678,6 @@
    -
  • -
    - -
  • @@ -1122,6 +1154,46 @@
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +
  • +
  • +
    + +