Merge branch 'master' of https://github.com/highfidelity/hifi into domaincheckin

This commit is contained in:
Roxanne Skelly 2019-05-31 11:07:12 -07:00
commit 970fa8b5f0
30 changed files with 987 additions and 295 deletions

View file

@ -428,7 +428,7 @@ void AvatarMixerClientData::resetSentTraitData(Node::LocalID nodeLocalID) {
_lastSentTraitsTimestamps[nodeLocalID] = TraitsCheckTimestamp();
_perNodeSentTraitVersions[nodeLocalID].reset();
_perNodeAckedTraitVersions[nodeLocalID].reset();
for (auto && pendingTraitVersions : _perNodePendingTraitVersions) {
for (auto&& pendingTraitVersions : _perNodePendingTraitVersions) {
pendingTraitVersions.second[nodeLocalID].reset();
}
}
@ -488,4 +488,8 @@ void AvatarMixerClientData::cleanupKilledNode(const QUuid&, Node::LocalID nodeLo
removeLastBroadcastTime(nodeLocalID);
_lastSentTraitsTimestamps.erase(nodeLocalID);
_perNodeSentTraitVersions.erase(nodeLocalID);
_perNodeAckedTraitVersions.erase(nodeLocalID);
for (auto&& pendingTraitVersions : _perNodePendingTraitVersions) {
pendingTraitVersions.second.erase(nodeLocalID);
}
}

View file

@ -52,13 +52,12 @@ macro(setup_qt)
message(FATAL_ERROR "VCPKG_QT_CMAKE_PREFIX_PATH should have been set by hifi_vcpkg.py")
endif()
if (NOT DEV_BUILD)
if (APPLE)
# HACK: manually set the QT_CMAKE_PREFIX_PATH so that hard-coded paths find new QT libs where we'll put them
set(QT_CMAKE_PREFIX_PATH "/var/tmp/qt5-install/lib/cmake")
elseif (UNIX AND DEFINED ENV{QT_CMAKE_PREFIX_PATH})
if (UNIX AND DEFINED ENV{QT_CMAKE_PREFIX_PATH} AND NOT APPLE)
# HACK: obey QT_CMAKE_PREFIX_PATH to allow UNIX to use older QT libs
message("HACK: obey QT_CMAKE_PREFIX_PATH on UNIX")
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
else()
message("override QT_CMAKE_PREFIX_PATH with VCPKG_QT_CMAKE_PREFIX_PATH")
set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH})
endif()
else()
@ -70,6 +69,8 @@ macro(setup_qt)
endif()
endif()
message("QT_CMAKE_PREFIX_PATH = " ${QT_CMAKE_PREFIX_PATH})
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
set(QT_VERSION "unknown")

View file

@ -9,6 +9,8 @@
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
#
include(vcpkg_common_functions)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)

View file

@ -214,12 +214,8 @@ endif()
f.write(self.tagContents)
def getQt5InstallPath(self):
qt5InstallPath = os.path.join(self.path, 'installed', 'qt5-install')
if platform.system() == "Darwin" and self.args.release_type != "DEV":
# HACK for MacOS Jenkins PRODUCTION and PR builds during Qt-5.12.3 transition
# we always supply /var/tmp/qt5-install for QT_CMAKE_PREFIX_PATH
qt5InstallPath = "/var/tmp/qt5-install"
elif self.args.android:
qt5InstallPath = os.path.join(self.path, 'installed', 'qt5-install')
if self.args.android:
precompiled = os.path.realpath(self.androidPackagePath)
qt5InstallPath = os.path.realpath(os.path.join(precompiled, 'qt'))
return qt5InstallPath
@ -260,7 +256,7 @@ endif()
if platform.system() == 'Windows':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows2.tar.gz'
elif platform.system() == 'Darwin':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz'
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos2.tar.gz'
elif platform.system() == 'Linux':
if platform.linux_distribution()[1][:3] == '16.':
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04.tar.gz'

View file

@ -5361,6 +5361,26 @@ void Application::loadSettings() {
}
}
if (_firstRun.get()) {
// If this is our first run, evalute the Platform Tier and assign the matching Performance profile by default.
// A bunch of Performance, Simulation and Render settings will be set to a matching default value from this
// Here is the mapping between pelatformTIer and performance profile
const std::array<PerformanceManager::PerformancePreset, platform::Profiler::NumTiers> platformToPerformancePresetMap = {{
PerformanceManager::PerformancePreset::MID, // platform::Profiler::UNKNOWN
PerformanceManager::PerformancePreset::LOW, // platform::Profiler::LOW
PerformanceManager::PerformancePreset::MID, // platform::Profiler::MID
PerformanceManager::PerformancePreset::HIGH // platform::Profiler::HIGH
}};
// What is our profile?
auto platformTier = platform::Profiler::profilePlatform();
// Then let's assign the performance preset setting from it
getPerformanceManager().setPerformancePreset(platformToPerformancePresetMap[platformTier]);
}
// finish initializing the camera, based on everything we checked above. Third person camera will be used if no settings
// dictated that we should be in first person
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPerson, isFirstPerson);

View file

@ -57,6 +57,7 @@
#include "gpu/Context.h"
#include "LoginStateManager.h"
#include "Menu.h"
#include "PerformanceManager.h"
#include "RefreshRateManager.h"
#include "octree/OctreePacketProcessor.h"
#include "render/Engine.h"
@ -203,6 +204,8 @@ public:
CompositorHelper& getApplicationCompositor() const;
Overlays& getOverlays() { return _overlays; }
PerformanceManager& getPerformanceManager() { return _performanceManager; }
RefreshRateManager& getRefreshRateManager() { return _refreshRateManager; }
size_t getRenderFrameCount() const { return _graphicsEngine.getRenderFrameCount(); }
@ -734,6 +737,7 @@ private:
QUuid _loginDialogID;
QUuid _avatarInputsBarID;
LoginStateManager _loginStateManager;
PerformanceManager _performanceManager;
RefreshRateManager _refreshRateManager;
quint64 _lastFaceTrackerUpdate;

View file

@ -59,7 +59,12 @@ void LocationBookmarks::setHomeLocation() {
}
void LocationBookmarks::setHomeLocationToAddress(const QVariant& address) {
Bookmarks::insert("Home", address);
Bookmarks::insert(HOME_BOOKMARK, address);
}
QString LocationBookmarks::getHomeLocationAddress() {
return addressForBookmark(HOME_BOOKMARK);
}
void LocationBookmarks::teleportToBookmark() {

View file

@ -47,6 +47,12 @@ public slots:
*/
void setHomeLocationToAddress(const QVariant& address);
/**jsdoc
* @function LocationBookmarksgetHomeLocationAddress
* @returns {string} The url for the home location bookmark
*/
QString getHomeLocationAddress();
protected:
void addBookmarkToMenu(Menu* menubar, const QString& name, const QVariant& address) override;

View file

@ -0,0 +1,63 @@
//
// PerformanceManager.cpp
// interface/src/
//
// Created by Sam Gateau on 2019-05-29.
// Copyright 2019 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 "PerformanceManager.h"
#include "scripting/RenderScriptingInterface.h"
PerformanceManager::PerformanceManager()
{
}
void PerformanceManager::setPerformancePreset(PerformanceManager::PerformancePreset preset) {
if (getPerformancePreset() != preset) {
_performancePresetSettingLock.withWriteLock([&] {
_performancePresetSetting.set((int)preset);
});
applyPerformancePreset(preset);
}
}
PerformanceManager::PerformancePreset PerformanceManager::getPerformancePreset() const {
PerformancePreset preset = PerformancePreset::MID;
preset = (PerformancePreset) _performancePresetSettingLock.resultWithReadLock<int>([&] {
return _performancePresetSetting.get();
});
return preset;
}
void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformancePreset preset) {
switch (preset) {
case PerformancePreset::HIGH:
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::DEFERRED);
RenderScriptingInterface::getInstance()->setShadowsEnabled(true);
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
break;
case PerformancePreset::MID:
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::DEFERRED);
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
break;
case PerformancePreset::LOW:
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::FORWARD);
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::ECO);
break;
default:
break;
}
}

View file

@ -0,0 +1,43 @@
//
// PerformanceManager.h
// interface/src/
//
// Created by Sam Gateau on 2019-05-29.
// Copyright 2019 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
//
#ifndef hifi_PerformanceManager_h
#define hifi_PerformanceManager_h
#include <string>
#include <SettingHandle.h>
#include <shared/ReadWriteLockable.h>
class PerformanceManager {
public:
enum PerformancePreset {
LOW = 0,
MID,
HIGH,
PROFILE_COUNT
};
PerformanceManager();
~PerformanceManager() = default;
void setPerformancePreset(PerformancePreset performancePreset);
PerformancePreset getPerformancePreset() const;
private:
mutable ReadWriteLockable _performancePresetSettingLock;
Setting::Handle<int> _performancePresetSetting { "performancePreset", PerformanceManager::PerformancePreset::MID };
// The concrete performance preset changes
void applyPerformancePreset(PerformanceManager::PerformancePreset performancePreset);
};
#endif

View file

@ -19,6 +19,19 @@ PerformanceScriptingInterface::PerformanceScriptingInterface() {
});
}
void PerformanceScriptingInterface::setPerformancePreset(PerformancePreset performancePreset) {
qApp->getPerformanceManager().setPerformancePreset((PerformanceManager::PerformancePreset)performancePreset);
}
PerformanceScriptingInterface::PerformancePreset PerformanceScriptingInterface::getPerformancePreset() const {
return (PerformanceScriptingInterface::PerformancePreset)qApp->getPerformanceManager().getPerformancePreset();
}
QStringList PerformanceScriptingInterface::getPerformancePresetNames() const {
static const QStringList performancePresetNames = { "Low", "Mid", "High" };
return performancePresetNames;
}
void PerformanceScriptingInterface::setRefreshRateProfile(RefreshRateProfile refreshRateProfile) {
qApp->getRefreshRateManager().setRefreshRateProfile((RefreshRateManager::RefreshRateProfile)refreshRateProfile);
}
@ -27,6 +40,11 @@ PerformanceScriptingInterface::RefreshRateProfile PerformanceScriptingInterface:
return (PerformanceScriptingInterface::RefreshRateProfile)qApp->getRefreshRateManager().getRefreshRateProfile();
}
QStringList PerformanceScriptingInterface::getRefreshRateProfileNames() const {
static const QStringList refreshRateProfileNames = { "Eco", "Interactive", "Realtime" };
return refreshRateProfileNames;
}
int PerformanceScriptingInterface::getActiveRefreshRate() const {
return qApp->getRefreshRateManager().getActiveRefreshRate();
}

View file

@ -14,12 +14,22 @@
#include <QObject>
#include "../PerformanceManager.h"
#include "../RefreshRateManager.h"
class PerformanceScriptingInterface : public QObject {
Q_OBJECT
public:
// PerformanceManager PerformancePreset tri state level enums
enum PerformancePreset {
LOW = PerformanceManager::PerformancePreset::LOW,
MID = PerformanceManager::PerformancePreset::MID,
HIGH = PerformanceManager::PerformancePreset::HIGH,
};
Q_ENUM(PerformancePreset)
// Must match RefreshRateManager enums
enum RefreshRateProfile {
ECO = RefreshRateManager::RefreshRateProfile::ECO,
@ -28,19 +38,23 @@ public:
};
Q_ENUM(RefreshRateProfile)
PerformanceScriptingInterface();
~PerformanceScriptingInterface() = default;
public slots:
void setPerformancePreset(PerformancePreset performancePreset);
PerformancePreset getPerformancePreset() const;
QStringList getPerformancePresetNames() const;
void setRefreshRateProfile(RefreshRateProfile refreshRateProfile);
RefreshRateProfile getRefreshRateProfile() const;
QStringList getRefreshRateProfileNames() const;
int getActiveRefreshRate() const;
RefreshRateManager::UXMode getUXMode() const;
RefreshRateManager::RefreshRateRegime getRefreshRateRegime() const;
private:
static std::once_flag registry_flag;
};

View file

@ -19,24 +19,24 @@ RenderScriptingInterface* RenderScriptingInterface::getInstance() {
}
RenderScriptingInterface::RenderScriptingInterface() {
setRenderMethod((render::Args::RenderMethod)_renderMethodSetting.get() == render::Args::RenderMethod::DEFERRED ? DEFERRED : FORWARD);
setRenderMethod((RenderMethod)_renderMethodSetting.get() == RenderMethod::DEFERRED ? RenderMethod::DEFERRED : RenderMethod::FORWARD);
setShadowsEnabled(_shadowsEnabledSetting.get());
setAmbientOcclusionEnabled(_ambientOcclusionEnabledSetting.get());
setAntialiasingEnabled(_antialiasingEnabledSetting.get());
}
QString RenderScriptingInterface::getRenderMethod() {
return (render::Args::RenderMethod)_renderMethodSetting.get() == render::Args::RenderMethod::DEFERRED ? DEFERRED : FORWARD;
RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod() {
return (RenderMethod)_renderMethodSetting.get() == RenderMethod::DEFERRED ? RenderMethod::DEFERRED : RenderMethod::FORWARD;
}
void RenderScriptingInterface::setRenderMethod(const QString& renderMethod) {
render::Args::RenderMethod newMethod = renderMethod == FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED;
void RenderScriptingInterface::setRenderMethod(RenderScriptingInterface::RenderMethod renderMethod) {
RenderMethod newMethod = renderMethod == RenderMethod::FORWARD ? RenderMethod::FORWARD : RenderMethod::DEFERRED;
if (_renderMethodSetting.get() == newMethod) {
return;
}
if (QThread::currentThread() != thread()) {
QMetaObject::invokeMethod(this, "setRenderMethod", Q_ARG(const QString&, renderMethod));
QMetaObject::invokeMethod(this, "setRenderMethod", Q_ARG(RenderScriptingInterface::RenderMethod, renderMethod));
return;
}
@ -48,6 +48,11 @@ void RenderScriptingInterface::setRenderMethod(const QString& renderMethod) {
}
}
QStringList RenderScriptingInterface::getRenderMethodNames() const {
static const QStringList refrenderMethodNames = { "Deferred", "Forward" };
return refrenderMethodNames;
}
bool RenderScriptingInterface::getShadowsEnabled() {
return _shadowsEnabledSetting.get();
}
@ -119,4 +124,4 @@ void RenderScriptingInterface::setAntialiasingEnabled(bool enabled) {
mainViewAntialiasingConfig->setDebugFXAA(true);
}
}
}
}

View file

@ -25,7 +25,7 @@
*/
class RenderScriptingInterface : public QObject {
Q_OBJECT
Q_PROPERTY(QString renderMethod READ getRenderMethod WRITE setRenderMethod)
Q_PROPERTY(RenderMethod renderMethod READ getRenderMethod WRITE setRenderMethod)
Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled)
Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled)
Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled)
@ -35,6 +35,13 @@ public:
static RenderScriptingInterface* getInstance();
// RenderMethod enum type
enum RenderMethod {
DEFERRED = render::Args::RenderMethod::DEFERRED,
FORWARD = render::Args::RenderMethod::FORWARD,
};
Q_ENUM(RenderMethod);
public slots:
/**jsdoc
* Get a config for a job by name
@ -50,16 +57,24 @@ public slots:
/**jsdoc
* Gets the current render method
* @function Render.getRenderMethod
* @returns {string} <code>"deferred"</code> or <code>"forward"</code>
* @returns {number} <code>"DEFERRED"</code> or <code>"FORWARD"</code>
*/
QString getRenderMethod();
RenderMethod getRenderMethod();
/**jsdoc
* Sets the current render method
* @function Render.setRenderMethod
* @param {string} renderMethod - <code>"deferred"</code> or <code>"forward"</code>
* @param {number} renderMethod - <code>"DEFERRED"</code> or <code>"FORWARD"</code>
*/
void setRenderMethod(const QString& renderMethod);
void setRenderMethod(RenderMethod renderMethod);
/**jsdoc
* Gets the possible enum names of the RenderMethod type
* @function Render.getRenderMethodNames
* @returns [string] [ <code>"DEFERRED"</code>, <code>"FORWARD"</code> ]
*/
QStringList getRenderMethodNames() const;
/**jsdoc
* Whether or not shadows are enabled
@ -103,11 +118,26 @@ public slots:
*/
void setAntialiasingEnabled(bool enabled);
/**jsdoc
* Gets the current viewport resolution scale
* @function Render.getViewportResolutionScale
* @returns {number}
*/
// float getViewportResolutionScale();
/**jsdoc
* Sets the current viewport resolution scale
* @function Render.setViewportResolutionScale
* @param {number} resolutionScale - between epsilon and 1.0
*/
// void setViewportResolutionScale(float resolutionScale);
private:
Setting::Handle<int> _renderMethodSetting { "renderMethod", RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
Setting::Handle<bool> _shadowsEnabledSetting { "shadowsEnabled", true };
Setting::Handle<bool> _ambientOcclusionEnabledSetting { "ambientOcclusionEnabled", false };
Setting::Handle<bool> _antialiasingEnabledSetting { "antialiasingEnabled", true };
Setting::Handle<float> _viewportResolutionScaleSetting{ "viewportResolutionScale", 1.0f };
};
#endif // hifi_RenderScriptingInterface_h

View file

@ -744,7 +744,7 @@ bool RenderableModelEntityItem::shouldBePhysical() const {
return false;
}
}
return !isDead() && shapeType != SHAPE_TYPE_NONE && QUrl(_modelURL).isValid();
return !isDead() && shapeType != SHAPE_TYPE_NONE && !isLocalEntity() && QUrl(_modelURL).isValid();
}
int RenderableModelEntityItem::getJointParent(int index) const {

View file

@ -324,7 +324,7 @@ public:
bool getDynamic() const;
void setDynamic(bool value);
virtual bool shouldBePhysical() const { return !isDead() && getShapeType() != SHAPE_TYPE_NONE; }
virtual bool shouldBePhysical() const { return !isDead() && getShapeType() != SHAPE_TYPE_NONE && !isLocalEntity(); }
bool isVisuallyReady() const { return _visuallyReady; }
bool getLocked() const;

View file

@ -460,6 +460,8 @@ void PhysicalEntitySimulation::buildPhysicsTransaction(PhysicsEngine::Transactio
void PhysicalEntitySimulation::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) {
// things on objectsToRemove are ready for delete
for (auto object : transaction.objectsToRemove) {
EntityMotionState* entityState = static_cast<EntityMotionState*>(object);
removeOwnershipData(entityState);
_physicalObjects.remove(object);
delete object;
}

View file

@ -0,0 +1,43 @@
//
// Performance Settings.qml
//
// Created by Sam Gateau on 5/28/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../lib/prop" as Prop
Column {
anchors.left: parent.left
anchors.right: parent.right
Prop.PropString {
label: "Platform Tier"
//object: Performance
valueVarSetter: function (v) {}
valueVarGetter: function () {
return PlatformInfo.getPlatformTierNames()[PlatformInfo.getTierProfiled()]; }
}
Prop.PropEnum {
label: "Performance Preset"
//object: Performance
valueVarSetter: Performance.setPerformancePreset
valueVarGetter: Performance.getPerformancePreset
enums: Performance.getPerformancePresetNames()
}
Prop.PropEnum {
label: "Refresh Rate Profile"
//object: Performance
valueVarSetter: Performance.setRefreshRateProfile
valueVarGetter: Performance.getRefreshRateProfile
enums: Performance.getRefreshRateProfileNames()
}
}

View file

@ -0,0 +1,67 @@
//
// platform.qml
//
// Created by Sam Gateau on 5/25/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import controlsUit 1.0 as HifiControls
import "../../lib/prop" as Prop
Column {
width: parent.width
Prop.PropGroup {
id: computer
label: "Computer"
isUnfold: true
Component.onCompleted: {
computer.populateFromObjectProps(JSON.parse(PlatformInfo.getComputer()))
}
}
Prop.PropGroup {
id: cpu
label: "CPU"
isUnfold: true
Component.onCompleted: {
cpu.populateFromObjectProps(JSON.parse(PlatformInfo.getCPU(0)))
}
}
Prop.PropGroup {
id: memory
label: "Memory"
isUnfold: true
Component.onCompleted: {
memory.populateFromObjectProps(JSON.parse(PlatformInfo.getMemory()))
}
}
Prop.PropGroup {
id: gpu
label: "GPU"
isUnfold: true
Component.onCompleted: {
gpu.populateFromObjectProps(JSON.parse(PlatformInfo.getGPU(0)))
}
}
Prop.PropGroup {
id: display
label: "Display"
isUnfold: true
Component.onCompleted: {
display.populateFromObjectProps(JSON.parse(PlatformInfo.getDisplay(0)))
}
}
}

View file

@ -0,0 +1,34 @@
//
// Render Settings.qml
//
// Created by Sam Gateau on 5/28/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import "../../lib/prop" as Prop
Column {
anchors.left: parent.left
anchors.right: parent.right
Prop.PropEnum {
label: "Render Method"
object: Render
property: "renderMethod"
enums: Render.getRenderMethodNames()
}
Prop.PropBool {
label: "Shadows"
object: Render
property: "shadowsEnabled"
}
}

View file

@ -4,4 +4,8 @@ ToneMapping 1.0 ToneMapping.qml
BoundingBoxes 1.0 BoundingBoxes.qml
Framebuffer 1.0 Framebuffer.qml
Antialiasing 1.0 Antialiasing.qml
Culling 1.0 Culling.qml
Culling 1.0 Culling.qml
Platform 1.0 Platform.qml
RenderSettings 1.0 RenderSettings.qml
PerformanceSettings 1.0 PerformanceSettings.qml

View file

@ -0,0 +1,6 @@
var window = Desktop.createWindow(Script.resolvePath('./performanceSetup.qml'), {
title: "Performance Setup",
presentationMode: Desktop.PresentationMode.NATIVE,
size: {x: 350, y: 700}
});

View file

@ -0,0 +1,56 @@
//
// platformSetupInspector.qml
//
// Created by Sam Gateau on 5/30/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.7
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import controlsUit 1.0 as HifiControls
import "../lib/prop" as Prop
import "luci"
Rectangle {
anchors.fill: parent
id: platform;
Prop.Global { id: global;}
color: global.colorBack
ScrollView {
anchors.fill: parent
clip: true
Column {
anchors.left: parent.left
anchors.right: parent.right
Prop.PropFolderPanel {
label: "Performance Settings"
isUnfold: true
panelFrameData: Component {
PerformanceSettings {}
}
}
Prop.PropFolderPanel {
label: "Render Settings"
isUnfold: true
panelFrameData: Component {
RenderSettings {}
}
}
Prop.PropFolderPanel {
label: "Platform"
panelFrameData: Component {
Platform {}
}
}
}
}
}

View file

@ -10,7 +10,7 @@ PlatformInfo.getNumGPUs()
PlatformInfo.getGPU(0)
// {"driver":"25.21.14.1967","model":"NVIDIA GeForce GTX 1080","vendor":"NVIDIA GeForce GTX 1080","videoMemory":8079}
var window = Desktop.createWindow(Script.resolvePath('./platform.qml'), {
var window = Desktop.createWindow(Script.resolvePath('./luci/Platform.qml'), {
title: "Platform",
presentationMode: Desktop.PresentationMode.NATIVE,
size: {x: 350, y: 700}

View file

@ -1,75 +0,0 @@
//
// platform.qml
//
// Created by Sam Gateau on 5/25/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import controlsUit 1.0 as HifiControls
import "../lib/prop" as Prop
Rectangle {
anchors.fill: parent
id: platform;
Prop.Global { id: global;}
color: global.colorBack
Column {
width: parent.width
Prop.PropGroup {
id: computer
label: "Computer"
isUnfold: true
Component.onCompleted: {
computer.populateFromObjectProps(JSON.parse(PlatformInfo.getComputer()))
}
}
Prop.PropGroup {
id: cpu
label: "CPU"
isUnfold: true
Component.onCompleted: {
cpu.populateFromObjectProps(JSON.parse(PlatformInfo.getCPU(0)))
}
}
Prop.PropGroup {
id: memory
label: "Memory"
isUnfold: true
Component.onCompleted: {
memory.populateFromObjectProps(JSON.parse(PlatformInfo.getMemory()))
}
}
Prop.PropGroup {
id: gpu
label: "GPU"
isUnfold: true
Component.onCompleted: {
gpu.populateFromObjectProps(JSON.parse(PlatformInfo.getGPU(0)))
}
}
Prop.PropGroup {
id: display
label: "Display"
isUnfold: true
Component.onCompleted: {
display.populateFromObjectProps(JSON.parse(PlatformInfo.getDisplay(0)))
}
}
}
}

View file

@ -0,0 +1,7 @@
// Test key commands
var window = Desktop.createWindow(Script.resolvePath('./luci/RenderSettings.qml'), {
title: "Render Settings",
presentationMode: Desktop.PresentationMode.NATIVE,
size: {x: 350, y: 700}
});

View file

@ -163,10 +163,14 @@ local unsourced_packet_types = {
local fragments = {}
local RFC_5389_MAGIC_COOKIE = 0x2112A442
function p_hfudt.dissector(buf, pinfo, tree)
-- make sure this isn't a STUN packet - those don't follow HFUDT format
if pinfo.dst == Address.ip("stun.highfidelity.io") then return end
-- make sure this isn't a STUN packet - those don't follow HFUDT format
if buf:len() >= 8 and buf(4, 4):uint() == RFC_5389_MAGIC_COOKIE then
return 0
end
-- validate that the packet length is at least the minimum control packet size
if buf:len() < 4 then return end

View file

@ -1,235 +1,243 @@
# General
This document describes the process to build Qt 5.12.3.
Note that there are two patches. The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this.
Note that there are two patches. The first (to qfloat16.h) is needed to compile QT 5.12.3 on Visual Studio 2017 due to a bug in Visual Studio (*bitset* will not compile. Note that there is a change in CMakeLists.txt to support this.
The second patch is to OpenSL ES audio.
## Requirements
### Windows
1. Visual Studio 2017
If you dont have Community or Professional edition of Visual Studio 2017, download [Visual Studio Community 2017](https://www.visualstudio.com/downloads/).
Install with defaults
1. Visual Studio 2017
If you dont have Community or Professional edition of Visual Studio 2017, download [Visual Studio Community 2017](https://www.visualstudio.com/downloads/).
Install with C++ support.
1. python 2.7.16
Check if needed running `python --version` - should return python 2.7.x
Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi
Check if needed running `python --version` - should return python 2.7.x
Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi
Add path to python executable to PATH.
NOTE: REMOVE python 3 from PATH. Our regular build uses python 3. This will still work, because HIFI_PYTHON_EXEC points to the python 3 executable.
Verify that python runs python 2.7 (run “python --version”)
1. git >= 1.6
Check if needed `git --version`
Download from https://git-scm.com/download/win
Verify by entering `git --version`
1. perl >= 5.14
Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\
Verify by running `perl --version`
1. flex and bison
Download from https://sourceforge.net/projects/winflexbison/files/latest/download
Uncompress in C:\flex_bison
Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe
Add C:\flex_bison to PATH
Verify by running `flex --version`
Verify by running `bison --version`
1. gperf
Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php
Add C:\Program Files (x86)\GnuWin32\bin to PATH
Verify by running `gperf --version`
1. 7-zip
Download from https://www.7-zip.org/download.html
1. Bash shell
From *Settings* select *Update & Security*
Select *For Developers*
Enable *Developer mode*
Restart PC
Open Control Panel and select *Programs and Features*
Select *Turn Windows features on or off*
Check *Windows Subsystem for Linux*
Click *Restart now*
Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version
[First run will take a few minutes]
Enter a user name - all small letters (this is used for *sudo* commands)
Verify that python runs python 2.7 (run “python --version”)
1. git >= 1.6
Check if needed `git --version`
Download from https://git-scm.com/download/win
Verify by entering `git --version`
1. perl >= 5.14
Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\
Verify by running `perl --version`
1. flex and bison
Download from https://sourceforge.net/projects/winflexbison/files/latest/download
Uncompress in C:\flex_bison
Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe
Add C:\flex_bison to PATH
Verify by running `flex --version`
Verify by running `bison --version`
1. gperf
Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php
Add C:\Program Files (x86)\GnuWin32\bin to PATH
Verify by running `gperf --version`
1. 7-zip
Download from https://www.7-zip.org/download.html
1. Bash shell
From *Settings* select *Update & Security*
Select *For Developers*
Enable *Developer mode*
Restart PC
Open Control Panel and select *Programs and Features*
Select *Turn Windows features on or off*
Check *Windows Subsystem for Linux*
Click *Restart now*
Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version
[First run will take a few minutes]
Enter a user name - all small letters (this is used for *sudo* commands)
Choose a password
1. Jom
jom is a clone of nmake to support the execution of multiple independent commands in parallel.
https://wiki.qt.io/Jom
### Linux
Tested on Ubuntu 16.04 and 18.04.
Tested on Ubuntu 16.04 and 18.04.
**16.04 NEEDED FOR JENKINS~~ **
1. qt5 requirements
edit /etc/apt/sources.list (edit as root)
replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`)
`sudo apt-get update -y`
`sudo apt-get upgrade -y`
`sudo apt-get build-dep qt5-default -y`
1. git >= 1.6
Check if needed `git --version`
`sudo apt-get install git -y`
Verify again
1. python
Check if needed `python --version` - should return python 2.7.x
`sudo apt-get install python -y` (not python 3!)
Verify again
1. gperf
Check if needed `gperf --version`
`sudo apt-get install gperf -y`
Verify again
1. bison and flex
Check if needed `flex --version` and `bison --version`
`sudo apt-get install flex bison -y`
Verify again
1. pkg-config (needed for qtwebengine)
Check if needed `pkg-config --version`
`sudo apt-get install pkg-config -y`
Verify again
1. OpenGL
Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"`
`sudo apt-get install libgl1-mesa-dev -y`
`sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0`
Verify again
1. make
Check if needed `make --version`
`sudo apt-get install make -y`
Verify again
1. g++
Check if needed
`g++ --version`
`sudo apt-get install g++ -y`
Verify again
1. dbus-1 (needed for qtwebengine)
`sudo apt-get install libdbus-glib-1-dev -y`
1. nss (needed for qtwebengine)
`sudo apt-get install libnss3-dev -y`
1. qt5 requirements
edit /etc/apt/sources.list (edit as root)
replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`)
`sudo apt-get update -y`
`sudo apt-get upgrade -y`
`sudo apt-get build-dep qt5-default -y`
1. git >= 1.6
Check if needed `git --version`
`sudo apt-get install git -y`
Verify again
1. python
Check if needed `python --version` - should return python 2.7.x
`sudo apt-get install python -y` (not python 3!)
Verify again
1. gperf
Check if needed `gperf --version`
`sudo apt-get install gperf -y`
Verify again
1. bison and flex
Check if needed `flex --version` and `bison --version`
`sudo apt-get install flex bison -y`
Verify again
1. pkg-config (needed for qtwebengine)
Check if needed `pkg-config --version`
`sudo apt-get install pkg-config -y`
Verify again
1. OpenGL
Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"`
`sudo apt-get install libgl1-mesa-dev -y`
`sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.346.35 /usr/lib/x86_64-linux-gnu/libGL.so.1.2.0`
Verify again
1. make
Check if needed `make --version`
`sudo apt-get install make -y`
Verify again
1. g++
Check if needed
`g++ --version`
`sudo apt-get install g++ -y`
Verify again
1. dbus-1 (needed for qtwebengine)
`sudo apt-get install libdbus-glib-1-dev -y`
1. nss (needed for qtwebengine)
`sudo apt-get install libnss3-dev -y`
### Mac
1. git >= 1.6
Check if needed `git --version`
Install from https://git-scm.com/download/mac
Verify again
1. pkg-config
brew fontconfig dbus-glib stall pkg-config
1. dbus-1
brew install dbus-glib
1. git >= 1.6
Check if needed `git --version`
Install from https://git-scm.com/download/mac
Verify again
1. pkg-config
brew fontconfig dbus-glib stall pkg-config
1. dbus-1
brew install dbus-glib
## Build Process
### General
qt is cloned to the qt5 folder.
The build is performed in the qt5-build folder.
Build products are installed to the qt5-install folder.
Before running configure, make sure that the qt5-build folder is empty.
qt is cloned to the qt5 folder.
The build is performed in the qt5-build folder.
Build products are installed to the qt5-install folder.
Before running configure, make sure that the qt5-build folder is empty.
**Only run the git patches once!!!**
**Only run the git patches once!!!**
### Windows
Before building, verify that **HIFI_VCPKG_BASE_VERSION** points to a *vcpkg* folder containing *packages\openssl-windows_x64-windows*.
Before building, verify that **HIFI_VCPKG_BASE_VERSION** points to a *vcpkg* folder containing *packages\openssl-windows_x64-windows*.
If not, follow https://github.com/highfidelity/vcpkg to install *vcpkg* and then *openssl*.
Also, make sure the directory that you are using to build qt is not deeply nested. It is quite possible to run into the windows MAX_PATH limit when building chromium. For example: `c:\msys64\home\ajt\code\hifi\tools\qt-builder\qt5-build` is too long. `c:\q\qt5-build\` is a better choice.
#### Preparing source files
`git clone --recursive https://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch`
`git clone --recursive https://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch`
* Copy the **patches** folder to qt5
* Copy the **qt5vars.bat** file to qt5
* Apply the two patches to Qt
* Copy the **patches** folder to qt5
* Copy the **qt5vars.bat** file to qt5
* Apply the two patches to Qt
`cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
`cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
run `..\qt5\qt5vars.bat`
`cd ..\..\qt5-build`
run `..\qt5\qt5vars.bat`
`cd ..\..\qt5-build`
`..\qt5\configure -force-debug-info -opensource -confirm-license -opengl desktop -platform win32-msvc -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\include -L %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\lib -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ..\qt5-install`
`..\qt5\configure -force-debug-info -opensource -confirm-license -opengl desktop -platform win32-msvc -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\include -L %HIFI_VCPKG_BASE_VERSION%\packages\openssl-windows_x64-windows\lib -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ..\qt5-install`
#### Make
`nmake`
`nmake install`
`jom`
`jom install`
#### Fixing
The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
1. Open a bash terminal
1. `cd` to the *qt5-install* folder (e.g. `cd /mnt/d/qt5-install/`)
1. Run the following command
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin*
The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
1. Open a bash terminal
1. `cd` to the *qt5-install* folder (e.g. `cd /mnt/d/qt5-install/`)
1. Run the following command
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading
Create a tar file called qt5-install.tar from the qt5-install folder (e.g. using 7-zip)
Create a gzip file called qt5-install.tar.gz from the qt5-install.tar file just created (e.g. using 7-zip)
Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Windows/
Create a tar file called qt5-install-5.12.3-windows.tar.gz from the qt5-install folder
Upload qt5-install-5.12.3-windows.tar.gz to our Amazon S3 hifi-public bucket, under the dependencies/vckpg directory
Update hifi_vcpkg.py to use this new URL. Additionally, you should make a small change to any file in the hifi/cmake/ports directory to force the re-download of the qt-install.tar.gz during the build process for hifi.
#### Preparing Symbols
Run `python3 prepare-windows-symbols-for-backtrace.py qt5-install` to scan the qt5-install directory for any dlls and pdbs. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dlls and pdbs are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload
### Linux
#### Preparing source files
`git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch`
* Copy the **patches** folder to qt5
* Apply one patch to Qt
`cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch`
* Copy the **patches** folder to qt5
* Apply one patch to Qt
`cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
*Ubuntu 16.04*
`../qt5/configure -opensource -confirm-license -platform linux-g++-64 -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install`
*Ubuntu 16.04*
`../qt5/configure -opensource -confirm-license -platform linux-g++-64 -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -no-egl -no-icu -prefix ../qt5-install`
*Ubuntu 18.04*
`../qt5/configure -force-debug-info -release -opensource -confirm-license -gdb-index -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -c++std c++14 -prefix ../qt5-install`
*Ubuntu 18.04*
`../qt5/configure -force-debug-info -release -opensource -confirm-license -gdb-index -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -c++std c++14 -prefix ../qt5-install`
???`../qt5/configure -opensource -confirm-license -gdb-index -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install`
#### Make
`make`
???`../qt5/configure -opensource -confirm-license -gdb-index -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install`
#### Make
`make`
????*Ubuntu 18.04 only*
????`make module-qtwebengine`
????`make module-qtscript`
????*Ubuntu 18.04 only*
????`make module-qtwebengine`
????`make module-qtscript`
*Both*
`make install`
*Both*
`make install`
#### Fixing
1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
`cd ../qt5-install`
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading
*Ubuntu 16.04*
1. Return to the home folder
`cd ..`
1. Open a python 3 shell
`python3`
1. Run the following snippet:
`import os`
`import tarfile`
`filename=tarfile.open("qt5-install.tar.gz", "w:gz")`
`filename.add("qt5-install", os.path.basename("qt5-install"))`
`exit()`
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/16.04
1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
`cd ../qt5-install`
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading
*Ubuntu 16.04*
1. Return to the home folder
`cd ..`
1. Open a python 3 shell
`python3`
1. Run the following snippet:
`import os`
`import tarfile`
`filename=tarfile.open("qt5-install.tar.gz", "w:gz")`
`filename.add("qt5-install", os.path.basename("qt5-install"))`
`exit()`
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/16.04
*Ubuntu 18.04*
``tar -zcvf qt5-install.tar.gz qt5-install`
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/18.04
*Ubuntu 18.04*
``tar -zcvf qt5-install.tar.gz qt5-install`
1. Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Ubuntu/18.04
1. ### Mac
#### Preparing source files
git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch
* Copy the **patches** folder to qt5
* Apply one patch to Qt
`cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
### Mac
#### Preparing source files
git clone --recursive git://code.qt.io/qt/qt5.git -b 5.12.3 --single-branch
* Copy the **patches** folder to qt5
* Apply one patch to Qt
`cd qt5`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd ../qt5-build`
`mkdir qt5-install`
`mkdir qt5-build`
`cd ../qt5-build`
`../qt5/configure -force-debug-info -opensource -confirm-license -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install`
`../qt5/configure -force-debug-info -opensource -confirm-license -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtspeech -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -no-warnings-are-errors -no-pch -prefix ../qt5-install`
#### Make
`make`
`make install`
`make`
`make install`
#### Fixing
1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
`cd ../qt5-install`
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
`cd ..`
1. The *.prl* files have an absolute path that needs to be removed (see http://www.linuxfromscratch.org/blfs/view/stable-systemd/x/qtwebengine.html)
`cd ../qt5-install`
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
`cd ..`
1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading
`tar -zcvf qt5-install.tar.gz qt5-install`
Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Mac/
`tar -zcvf qt5-install-5.13.2-macos.tar.gz qt5-install`
Upload qt5-install-5.13.2-macos.tar.gz to our Amazon S3 hifi-public bucket, under the dependencies/vckpg directory
#### Creating symbols
Run `python3 prepare-mac-symbols-for-backtrace.py qt5-install` to scan the qt5-build directory for any dylibs and execute dsymutil to create dSYM bundles. After running this command the backtrace directory will be created. Zip this directory up, but make sure that all dylibs and dSYM fiels are in the root of the zip file, not under a sub-directory. This file can then be uploaded to backtrace here: https://highfidelity.sp.backtrace.io/p/Interface/settings/symbol/upload
## Problems
*configure* errors, if any, may be viewed in **config.log** and **config.summary**

View file

@ -0,0 +1,193 @@
# Scans the Mac qt-install directory for all known qt dylibs used by high fidelity.
# Then copies any DWARF symbols into a coorespoding dSYM file.
#
# usage
# python prepare-mac-symbols-for-backtace.py QT_BUILD_DIR
#
# QT_BUILD_DIR should be the directory where qt was built, because
# it requires that the temporary .o files associated with the dylibs
# are present. See hifi/tools/qt-builder/README.md for more info
#
import sys
# python 3 script
if (not sys.version_info > (3, 5)):
print("ERROR: REQUIRES Python 3")
quit()
import pathlib
import shutil
import os
import tarfile
import subprocess
import re
def cp(a, b):
print("cp {} {}".format(a, b))
shutil.copyfile(a, b)
# list of all qt dylibs used by hifi
# generarted by installing hifi and running these commands
# > find interface.app -exec file {} \; > files.txt
# > awk '$2 == "Mach-O"' files.txt > dylibs.txt
# then removing any non-qt dylibs from the list.
hifi_dylibs = [
"Contents/PlugIns/mediaservice/libqavfmediaplayer.dylib",
"Contents/PlugIns/mediaservice/libqtmedia_audioengine.dylib",
"Contents/PlugIns/mediaservice/libqavfcamera.dylib",
"Contents/PlugIns/quick/libdeclarative_multimedia.dylib",
"Contents/PlugIns/quick/libqtquickextrasflatplugin.dylib",
"Contents/PlugIns/quick/libqmlxmllistmodelplugin.dylib",
"Contents/PlugIns/quick/libqtgraphicaleffectsprivate.dylib",
"Contents/PlugIns/quick/libqtgraphicaleffectsplugin.dylib",
"Contents/PlugIns/quick/libdeclarative_webchannel.dylib",
"Contents/PlugIns/quick/libqtqmlremoteobjects.dylib",
"Contents/PlugIns/quick/libmodelsplugin.dylib",
"Contents/PlugIns/quick/libqtwebengineplugin.dylib",
"Contents/PlugIns/quick/libqtquickextrasplugin.dylib",
"Contents/PlugIns/quick/libqmlfolderlistmodelplugin.dylib",
"Contents/PlugIns/quick/libqquicklayoutsplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2materialstyleplugin.dylib",
"Contents/PlugIns/quick/libqtquick2plugin.dylib",
"Contents/PlugIns/quick/libwindowplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2imaginestyleplugin.dylib",
"Contents/PlugIns/quick/libdialogplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrolsplugin.dylib",
"Contents/PlugIns/quick/libwidgetsplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2universalstyleplugin.dylib",
"Contents/PlugIns/quick/libdialogsprivateplugin.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2fusionstyleplugin.dylib",
"Contents/PlugIns/quick/libqtquicktemplates2plugin.dylib",
"Contents/PlugIns/quick/libqmlsettingsplugin.dylib",
"Contents/PlugIns/quick/libqtqmlstatemachine.dylib",
"Contents/PlugIns/quick/libqtquickcontrols2plugin.dylib",
"Contents/PlugIns/styles/libqmacstyle.dylib",
"Contents/PlugIns/audio/libqtaudio_coreaudio.dylib",
"Contents/PlugIns/bearer/libqgenericbearer.dylib",
"Contents/PlugIns/iconengines/libqsvgicon.dylib",
"Contents/PlugIns/imageformats/libqgif.dylib",
"Contents/PlugIns/imageformats/libqwbmp.dylib",
"Contents/PlugIns/imageformats/libqwebp.dylib",
"Contents/PlugIns/imageformats/libqico.dylib",
"Contents/PlugIns/imageformats/libqmacheif.dylib",
"Contents/PlugIns/imageformats/libqjpeg.dylib",
"Contents/PlugIns/imageformats/libqtiff.dylib",
"Contents/PlugIns/imageformats/libqsvg.dylib",
"Contents/PlugIns/imageformats/libqicns.dylib",
"Contents/PlugIns/imageformats/libqtga.dylib",
"Contents/PlugIns/imageformats/libqmacjp2.dylib",
"Contents/Frameworks/QtGui.framework/Versions/5/QtGui",
"Contents/Frameworks/QtGui.framework/QtGui",
"Contents/Frameworks/QtDBus.framework/Versions/5/QtDBus",
"Contents/Frameworks/QtDBus.framework/QtDBus",
"Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork",
"Contents/Frameworks/QtNetwork.framework/QtNetwork",
"Contents/Frameworks/QtMultimedia.framework/Versions/5/QtMultimedia",
"Contents/Frameworks/QtMultimedia.framework/QtMultimedia",
"Contents/Frameworks/QtQml.framework/QtQml",
"Contents/Frameworks/QtQml.framework/Versions/5/QtQml",
"Contents/Frameworks/QtXml.framework/Versions/5/QtXml",
"Contents/Frameworks/QtXml.framework/QtXml",
"Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets",
"Contents/Frameworks/QtWidgets.framework/QtWidgets",
"Contents/Frameworks/QtMultimediaQuick.framework/Versions/5/QtMultimediaQuick",
"Contents/Frameworks/QtMultimediaQuick.framework/QtMultimediaQuick",
"Contents/Frameworks/QtWebChannel.framework/Versions/5/QtWebChannel",
"Contents/Frameworks/QtWebChannel.framework/QtWebChannel",
"Contents/Frameworks/QtScriptTools.framework/Versions/5/QtScriptTools",
"Contents/Frameworks/QtScriptTools.framework/QtScriptTools",
"Contents/Frameworks/libPolyVoxCore.dylib",
"Contents/Frameworks/QtWebSockets.framework/QtWebSockets",
"Contents/Frameworks/QtWebSockets.framework/Versions/5/QtWebSockets",
"Contents/Frameworks/QtQuickTemplates2.framework/QtQuickTemplates2",
"Contents/Frameworks/QtQuickTemplates2.framework/Versions/5/QtQuickTemplates2",
"Contents/Frameworks/QtCore.framework/Versions/5/QtCore",
"Contents/Frameworks/QtCore.framework/QtCore",
"Contents/Frameworks/QtWebEngine.framework/Versions/5/QtWebEngine",
"Contents/Frameworks/QtWebEngine.framework/QtWebEngine",
"Contents/Frameworks/QtOpenGL.framework/QtOpenGL",
"Contents/Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL",
"Contents/Frameworks/QtMultimediaWidgets.framework/Versions/5/QtMultimediaWidgets",
"Contents/Frameworks/QtMultimediaWidgets.framework/QtMultimediaWidgets",
"Contents/Frameworks/QtQuickControls2.framework/Versions/5/QtQuickControls2",
"Contents/Frameworks/QtQuickControls2.framework/QtQuickControls2",
"Contents/Frameworks/QtRemoteObjects.framework/QtRemoteObjects",
"Contents/Frameworks/QtRemoteObjects.framework/Versions/5/QtRemoteObjects",
"Contents/Frameworks/QtConcurrent.framework/Versions/5/QtConcurrent",
"Contents/Frameworks/QtConcurrent.framework/QtConcurrent",
"Contents/Frameworks/QtScript.framework/QtScript",
"Contents/Frameworks/QtScript.framework/Versions/5/QtScript",
"Contents/Frameworks/QtQuick.framework/Versions/5/QtQuick",
"Contents/Frameworks/QtQuick.framework/QtQuick",
"Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport",
"Contents/Frameworks/QtPrintSupport.framework/QtPrintSupport",
"Contents/Frameworks/QtSvg.framework/Versions/5/QtSvg",
"Contents/Frameworks/QtSvg.framework/QtSvg",
"Contents/Frameworks/QtWebEngineCore.framework/Versions/5/QtWebEngineCore",
"Contents/Frameworks/QtWebEngineCore.framework/Versions/5/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess",
"Contents/Frameworks/QtWebEngineCore.framework/QtWebEngineCore",
"Contents/Frameworks/QtXmlPatterns.framework/Versions/5/QtXmlPatterns",
"Contents/Frameworks/QtXmlPatterns.framework/QtXmlPatterns",
"Contents/Resources/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.dylib",
"Contents/Resources/qml/QtGraphicalEffects/private/libqtgraphicaleffectsprivate.dylib",
"Contents/Resources/qml/QtQml/StateMachine/libqtqmlstatemachine.dylib",
"Contents/Resources/qml/QtQml/Models.2/libmodelsplugin.dylib",
"Contents/Resources/qml/QtQml/RemoteObjects/libqtqmlremoteobjects.dylib",
"Contents/Resources/qml/Qt/labs/settings/libqmlsettingsplugin.dylib",
"Contents/Resources/qml/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.dylib",
"Contents/Resources/qml/QtQuick.2/libqtquick2plugin.dylib",
"Contents/Resources/qml/QtWebEngine/libqtwebengineplugin.dylib",
"Contents/Resources/qml/QtWebChannel/libdeclarative_webchannel.dylib",
"Contents/Resources/qml/QtMultimedia/libdeclarative_multimedia.dylib",
"Contents/Resources/qml/QtQuick/Extras/libqtquickextrasplugin.dylib",
"Contents/Resources/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.dylib",
"Contents/Resources/qml/QtQuick/PrivateWidgets/libwidgetsplugin.dylib",
"Contents/Resources/qml/QtQuick/Layouts/libqquicklayoutsplugin.dylib",
"Contents/Resources/qml/QtQuick/Window.2/libwindowplugin.dylib",
"Contents/Resources/qml/QtQuick/Dialogs/Private/libdialogsprivateplugin.dylib",
"Contents/Resources/qml/QtQuick/Dialogs/libdialogplugin.dylib",
"Contents/Resources/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Material/libqtquickcontrols2materialstyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Universal/libqtquickcontrols2universalstyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Imagine/libqtquickcontrols2imaginestyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/Fusion/libqtquickcontrols2fusionstyleplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.dylib",
"Contents/Resources/qml/QtQuick/Controls/Styles/Flat/libqtquickextrasflatplugin.dylib",
"Contents/Resources/qml/QtQuick/Controls/libqtquickcontrolsplugin.dylib",
]
# strip off the path
desired_dylibs = [pathlib.PurePath(i).name for i in hifi_dylibs]
QT_BUILD_DIRECTORY = sys.argv[1]
# all files in the qt build directory
found_files = pathlib.Path(QT_BUILD_DIRECTORY).glob('**/*')
# create temp directory
TEMP_DIR_NAME = "backtrace"
if os.path.exists(TEMP_DIR_NAME):
shutil.rmtree(TEMP_DIR_NAME)
os.mkdir(TEMP_DIR_NAME)
# for each file in the build directory (this might take a while)
for f in found_files:
# if this file is desired
if f.name in desired_dylibs:
# run the file command on this file to determine what kind of file it is.
result = subprocess.run(['file', f], stdout=subprocess.PIPE)
# if this file is a dylib
if re.match(".*Mach-O 64-bit dynamically linked shared library x86_64", str(result.stdout)):
dst_dylib = pathlib.PurePath(TEMP_DIR_NAME, f.name)
dst_dsym = pathlib.PurePath(TEMP_DIR_NAME, f.stem + ".dSYM")
# generate a dSYM file for this dylib in the temp folder
subprocess.run(['dsymutil', f, '-o', dst_dsym])
# copy dylib into the temp folder
cp(f, dst_dylib)

View file

@ -0,0 +1,132 @@
# Scans the Windows qt-install directory for all known qt dlls used by high fidelity.
# Then copies all matching dlls and pdbs into folder named backtrace.
#
# usage
# python prepare-windows-symbols-for-backrace.py QT_INSTALL_DIR
#
# QT_BUILD_DIR should be the directory where qt is installed after running `jom install` or `nmake install`
# see hifi/tools/qt-builder/README.md for more info
#
import sys
# python 3 script
if (not sys.version_info > (3, 2)):
print("ERROR: REQUIRES Python 3")
quit()
import pathlib
import shutil
import os
import tarfile
def cp(a, b):
print("cp {} {}".format(a, b))
shutil.copyfile(a, b)
# list of all qt dlls used in hifi
hifi_dlls = [
"audioWin7/audio/qtaudio_windows.dll",
"audioWin8/audio/qtaudio_wasapi.dll",
"bearer/qgenericbearer.dll",
"iconengines/qsvgicon.dll",
"imageformats/qgif.dll",
"imageformats/qicns.dll",
"imageformats/qico.dll",
"imageformats/qjpeg.dll",
"imageformats/qsvg.dll",
"imageformats/qtga.dll",
"imageformats/qtiff.dll",
"imageformats/qwbmp.dll",
"imageformats/qwebp.dll",
"mediaservice/dsengine.dll",
"mediaservice/qtmedia_audioengine.dll",
"mediaservice/wmfengine.dll",
"platforminputcontexts/qtvirtualkeyboardplugin.dll",
"platforms/qwindows.dll",
"playlistformats/qtmultimedia_m3u.dll",
"position/qtposition_geoclue.dll",
"position/qtposition_positionpoll.dll",
"position/qtposition_serialnmea.dll",
"qmltooling/qmldbg_debugger.dll",
"qmltooling/qmldbg_inspector.dll",
"qmltooling/qmldbg_local.dll",
"qmltooling/qmldbg_messages.dll",
"qmltooling/qmldbg_native.dll",
"qmltooling/qmldbg_nativedebugger.dll",
"qmltooling/qmldbg_preview.dll",
"qmltooling/qmldbg_profiler.dll",
"qmltooling/qmldbg_quickprofiler.dll",
"qmltooling/qmldbg_server.dll",
"qmltooling/qmldbg_tcp.dll",
"Qt/labs/folderlistmodel/qmlfolderlistmodelplugin.dll",
"Qt/labs/settings/qmlsettingsplugin.dll",
"Qt5Core.dll",
"Qt5Gui.dll",
"Qt5Multimedia.dll",
"Qt5MultimediaQuick.dll",
"Qt5Network.dll",
"Qt5Positioning.dll",
"Qt5Qml.dll",
"Qt5Quick.dll",
"Qt5QuickControls2.dll",
"Qt5QuickTemplates2.dll",
"Qt5RemoteObjects.dll",
"Qt5Script.dll",
"Qt5ScriptTools.dll",
"Qt5SerialPort.dll",
"Qt5Svg.dll",
"Qt5WebChannel.dll",
"Qt5WebEngine.dll",
"Qt5WebEngineCore.dll",
"Qt5WebSockets.dll",
"Qt5Widgets.dll",
"Qt5XmlPatterns.dll",
"QtGraphicalEffects/private/qtgraphicaleffectsprivate.dll",
"QtGraphicalEffects/qtgraphicaleffectsplugin.dll",
"QtMultimedia/declarative_multimedia.dll",
"QtQml/Models.2/modelsplugin.dll",
"QtQml/RemoteObjects/qtqmlremoteobjects.dll",
"QtQml/StateMachine/qtqmlstatemachine.dll",
"QtQuick/Controls/qtquickcontrolsplugin.dll",
"QtQuick/Controls/Styles/Flat/qtquickextrasflatplugin.dll",
"QtQuick/Controls.2/Fusion/qtquickcontrols2fusionstyleplugin.dll",
"QtQuick/Controls.2/Imagine/qtquickcontrols2imaginestyleplugin.dll",
"QtQuick/Controls.2/Material/qtquickcontrols2materialstyleplugin.dll",
"QtQuick/Controls.2/qtquickcontrols2plugin.dll",
"QtQuick/Controls.2/Universal/qtquickcontrols2universalstyleplugin.dll",
"QtQuick/Dialogs/dialogplugin.dll",
"QtQuick/Dialogs/Private/dialogsprivateplugin.dll",
"QtQuick/Extras/qtquickextrasplugin.dll",
"QtQuick/Layouts/qquicklayoutsplugin.dll",
"QtQuick/PrivateWidgets/widgetsplugin.dll",
"QtQuick/Templates.2/qtquicktemplates2plugin.dll",
"QtQuick/Window.2/windowplugin.dll",
"QtQuick/XmlListModel/qmlxmllistmodelplugin.dll",
"QtQuick.2/qtquick2plugin.dll",
"QtWebChannel/declarative_webchannel.dll",
"QtWebEngine/qtwebengineplugin.dll",
"scenegraph/qsgd3d12backend.dll",
"styles/qwindowsvistastyle.dll",
]
# list of desired pdbs, created from hifi_dlls
desired_pdbs = [pathlib.PurePath(i).stem + ".pdb" for i in hifi_dlls]
QT_INSTALL_DIRECTORY = sys.argv[1]
# find all pdb files in the qt build directory
found_pdbs = pathlib.Path(QT_INSTALL_DIRECTORY).glob('**/*.pdb')
# create temp directory
TEMP_DIR_NAME = "backtrace"
if os.path.exists(TEMP_DIR_NAME):
shutil.rmtree(TEMP_DIR_NAME)
os.mkdir(TEMP_DIR_NAME)
# copy all found dlls and pdbs into the temp directory
for pdb in found_pdbs:
if pdb.name in desired_pdbs:
dll = pathlib.PurePath(pdb.parent, pdb.stem + ".dll")
cp(pdb, pathlib.PurePath(TEMP_DIR_NAME, pdb.name))
cp(dll, pathlib.PurePath(TEMP_DIR_NAME, dll.name))