merge master

This commit is contained in:
amerhifi 2019-05-24 11:00:30 -07:00
commit ee3e2f0dd7
38 changed files with 781 additions and 468 deletions

View file

@ -25,14 +25,13 @@ vcpkg_from_github(
HEAD_REF master HEAD_REF master
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
OPTIONS OPTIONS
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON
-DUSE_GLUT=0 -DUSE_GLUT=0
-DUSE_DX11=0 -DUSE_DX11=0
-DBUILD_DEMOS=OFF -DBUILD_DEMOS=OFF
-DBUILD_OPENGL3_DEMOS=OFF -DBUILD_OPENGL3_DEMOS=OFF
-DBUILD_BULLET3=OFF -DBUILD_BULLET3=OFF

View file

@ -258,18 +258,13 @@ endif()
url = 'NOT DEFINED' url = 'NOT DEFINED'
if platform.system() == 'Windows': if platform.system() == 'Windows':
# TODO: figure out how to download with versionId url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows2.tar.gz'
#url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows.tar.gz?versionId=Etx8novAe0.IxQ7AosLFtop7fZur.cx9'
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-windows.tar.gz'
elif platform.system() == 'Darwin': elif platform.system() == 'Darwin':
#url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-macos.tar.gz?versionId=QrGxwssB.WwU_z3QCyG7ghP1_VjTkQeK'
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-macos.tar.gz'
elif platform.system() == 'Linux': elif platform.system() == 'Linux':
if platform.linux_distribution()[1] == '16.04': 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?versionId=c9j7PW4uBDPLif7DKmgIhorh9WBMjZRB'
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-16.04.tar.gz'
elif platform.linux_distribution()[1] == '18.04': elif platform.linux_distribution()[1][:3] == '18.':
#url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz?versionId=Z3TojPFdb5pXdahF3oi85jjKocpL0xqw'
url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz' url = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/qt5-install-5.12.3-ubuntu-18.04.tar.gz'
else: else:
print('UNKNOWN LINUX VERSION!!!') print('UNKNOWN LINUX VERSION!!!')

View file

@ -58,7 +58,8 @@ Rectangle {
if (isLoggedIn) { if (isLoggedIn) {
Commerce.getWalletStatus(); Commerce.getWalletStatus();
} else { } else {
// Show some error to the user errorText.text = "There was a problem while retrieving your inventory. " +
"Please try closing and re-opening the Avatar app.\n\nLogin status result: " + isLoggedIn;
} }
} }
@ -66,11 +67,19 @@ Rectangle {
if (walletStatus === 5) { if (walletStatus === 5) {
getInventory(); getInventory();
} else { } else {
// Show some error to the user errorText.text = "There was a problem while retrieving your inventory. " +
"Please try closing and re-opening the Avatar app.\n\nWallet status result: " + walletStatus;
} }
} }
onInventoryResult: { onInventoryResult: {
if (result.status !== "success") {
errorText.text = "There was a problem while retrieving your inventory. " +
"Please try closing and re-opening the Avatar app.\n\nInventory status: " + result.status + "\nMessage: " + result.message;
} else if (result.data && result.data.assets && result.data.assets.length === 0) {
errorText.text = "You have not created any avatars yet! Create an avatar with the Avatar Creator, then close and re-open the Avatar App."
}
avatarAppInventoryModel.handlePage(result.status !== "success" && result.message, result); avatarAppInventoryModel.handlePage(result.status !== "success" && result.message, result);
root.updatePreviewUrl(); root.updatePreviewUrl();
} }
@ -172,7 +181,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
AnimatedImage { AnimatedImage {
visible: !inventoryContentsList.visible visible: !inventoryContentsList.visible && !errorText.visible
anchors.centerIn: parent anchors.centerIn: parent
width: 72 width: 72
height: width height: width
@ -181,7 +190,7 @@ Rectangle {
ListView { ListView {
id: inventoryContentsList id: inventoryContentsList
visible: avatarAppInventoryModel.count !== 0 visible: avatarAppInventoryModel.count !== 0 && !errorText.visible
interactive: contentItem.height > height interactive: contentItem.height > height
clip: true clip: true
model: avatarAppInventoryModel model: avatarAppInventoryModel
@ -196,6 +205,18 @@ Rectangle {
standaloneIncompatible: model.standalone_incompatible standaloneIncompatible: model.standalone_incompatible
} }
} }
HifiStylesUit.GraphikRegular {
id: errorText
text: ""
visible: text !== ""
anchors.fill: parent
size: 22
color: simplifiedUI.colors.text.white
wrapMode: Text.Wrap
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
}
} }

View file

@ -60,7 +60,7 @@ Flickable {
HifiStylesUit.GraphikRegular { HifiStylesUit.GraphikRegular {
id: volumeControlsTitle id: volumeControlsTitle
text: "Volume Controls" text: "Volume Controls"
Layout.maximumWidth: parent.width Layout.preferredWidth: parent.width
height: paintedHeight height: paintedHeight
size: 22 size: 22
color: simplifiedUI.colors.text.white color: simplifiedUI.colors.text.white
@ -68,57 +68,82 @@ Flickable {
SimplifiedControls.Slider { SimplifiedControls.Slider {
id: peopleVolume id: peopleVolume
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
height: 30 height: 30
labelText: "People Volume" labelText: "People Volume"
from: -60 from: simplifiedUI.numericConstants.mutedValue
to: 10 to: 20.0
defaultValue: 0.0 defaultValue: 0.0
value: AudioScriptingInterface.getAvatarGain() stepSize: 5.0
value: AudioScriptingInterface.avatarGain
live: true live: true
function updatePeopleGain(sliderValue) {
if (AudioScriptingInterface.avatarGain !== sliderValue) {
AudioScriptingInterface.avatarGain = sliderValue;
}
}
onValueChanged: { onValueChanged: {
if (AudioScriptingInterface.getAvatarGain() != peopleVolume.value) { updatePeopleGain(value);
AudioScriptingInterface.setAvatarGain(peopleVolume.value); }
onPressedChanged: {
if (!pressed) {
updatePeopleGain(value);
} }
} }
} }
SimplifiedControls.Slider { SimplifiedControls.Slider {
id: environmentVolume id: environmentVolume
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: 2 Layout.topMargin: 2
height: 30 height: 30
labelText: "Environment Volume" labelText: "Environment Volume"
from: -60 from: simplifiedUI.numericConstants.mutedValue
to: 10 to: 20.0
defaultValue: 0.0 defaultValue: 0.0
value: AudioScriptingInterface.getInjectorGain() stepSize: 5.0
value: AudioScriptingInterface.serverInjectorGain
live: true live: true
function updateEnvironmentGain(sliderValue) {
if (AudioScriptingInterface.serverInjectorGain !== sliderValue) {
AudioScriptingInterface.serverInjectorGain = sliderValue;
AudioScriptingInterface.localInjectorGain = sliderValue;
}
}
onValueChanged: { onValueChanged: {
if (AudioScriptingInterface.getInjectorGain() != environmentVolume.value) { updateEnvironmentGain(value);
AudioScriptingInterface.setInjectorGain(environmentVolume.value); }
onPressedChanged: {
if (!pressed) {
updateEnvironmentGain(value);
} }
} }
} }
SimplifiedControls.Slider { SimplifiedControls.Slider {
id: systemSoundVolume id: systemSoundVolume
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: 2 Layout.topMargin: 2
height: 30 height: 30
labelText: "System Sound Volume" labelText: "System Sound Volume"
from: -60 from: simplifiedUI.numericConstants.mutedValue
to: 10 to: 20.0
defaultValue: 0.0 defaultValue: 0.0
value: AudioScriptingInterface.getSystemInjectorGain() stepSize: 5.0
value: AudioScriptingInterface.systemInjectorGain
live: true live: true
function updateSystemGain(sliderValue) {
if (AudioScriptingInterface.systemInjectorGain !== sliderValue) {
AudioScriptingInterface.systemInjectorGain = sliderValue;
}
}
onValueChanged: { onValueChanged: {
if (AudioScriptingInterface.getSystemInjectorGain() != systemSoundVolume.value) { updateSystemGain(value);
AudioScriptingInterface.setSystemInjectorGain(systemSoundVolume.value); }
onPressedChanged: {
if (!pressed) {
updateSystemGain(value);
} }
} }
} }
@ -184,8 +209,7 @@ Flickable {
ListView { ListView {
id: inputDeviceListView id: inputDeviceListView
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
interactive: false interactive: false
height: contentItem.height height: contentItem.height
@ -200,7 +224,7 @@ Flickable {
id: inputDeviceCheckbox id: inputDeviceCheckbox
anchors.left: parent.left anchors.left: parent.left
width: parent.width - inputLevel.width width: parent.width - inputLevel.width
height: paintedHeight height: 16
wrapLabel: false wrapLabel: false
checked: selectedDesktop checked: selectedDesktop
text: model.devicename text: model.devicename
@ -223,6 +247,7 @@ Flickable {
} }
SimplifiedControls.Button { SimplifiedControls.Button {
id: audioLoopbackButton
property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho() property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho()
function startAudioLoopback() { function startAudioLoopback() {
@ -238,29 +263,23 @@ Flickable {
} }
} }
Timer { Component.onDestruction: stopAudioLoopback();
id: loopbackTimer
interval: 8000 onVisibleChanged: {
running: false if (!visible) {
repeat: false
onTriggered: {
stopAudioLoopback(); stopAudioLoopback();
} }
} }
id: testYourMicButton
enabled: !HMD.active enabled: !HMD.active
anchors.left: parent.left
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
width: 160 width: 160
height: 32 height: 32
text: audioLoopedBack ? "STOP TESTING" : "TEST YOUR MIC" text: audioLoopedBack ? "STOP TESTING" : "TEST YOUR MIC"
onClicked: { onClicked: {
if (audioLoopedBack) { if (audioLoopedBack) {
loopbackTimer.stop();
stopAudioLoopback(); stopAudioLoopback();
} else { } else {
loopbackTimer.restart();
startAudioLoopback(); startAudioLoopback();
} }
} }
@ -285,8 +304,7 @@ Flickable {
ListView { ListView {
id: outputDeviceListView id: outputDeviceListView
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
interactive: false interactive: false
height: contentItem.height height: contentItem.height
@ -301,7 +319,7 @@ Flickable {
id: outputDeviceCheckbox id: outputDeviceCheckbox
anchors.left: parent.left anchors.left: parent.left
width: parent.width width: parent.width
height: paintedHeight height: 16
checked: selectedDesktop checked: selectedDesktop
text: model.devicename text: model.devicename
wrapLabel: false wrapLabel: false
@ -353,7 +371,6 @@ Flickable {
id: testYourSoundButton id: testYourSoundButton
enabled: !HMD.active enabled: !HMD.active
anchors.left: parent.left
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
width: 160 width: 160
height: 32 height: 32

View file

@ -198,8 +198,7 @@ Flickable {
ListView { ListView {
id: inputDeviceListView id: inputDeviceListView
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
interactive: false interactive: false
height: contentItem.height height: contentItem.height
@ -214,8 +213,10 @@ Flickable {
id: inputDeviceCheckbox id: inputDeviceCheckbox
anchors.left: parent.left anchors.left: parent.left
width: parent.width - inputLevel.width width: parent.width - inputLevel.width
height: 16
checked: selectedHMD checked: selectedHMD
text: model.devicename text: model.devicename
wrapLabel: false
ButtonGroup.group: inputDeviceButtonGroup ButtonGroup.group: inputDeviceButtonGroup
onClicked: { onClicked: {
AudioScriptingInterface.setStereoInput(false); // the next selected audio device might not support stereo AudioScriptingInterface.setStereoInput(false); // the next selected audio device might not support stereo
@ -235,6 +236,7 @@ Flickable {
} }
SimplifiedControls.Button { SimplifiedControls.Button {
id: audioLoopbackButton
property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho() property bool audioLoopedBack: AudioScriptingInterface.getLocalEcho()
function startAudioLoopback() { function startAudioLoopback() {
@ -250,29 +252,23 @@ Flickable {
} }
} }
Timer { Component.onDestruction: stopAudioLoopback();
id: loopbackTimer
interval: 8000 onVisibleChanged: {
running: false if (!visible) {
repeat: false
onTriggered: {
stopAudioLoopback(); stopAudioLoopback();
} }
} }
id: testYourMicButton
enabled: HMD.active enabled: HMD.active
anchors.left: parent.left
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
width: 160 width: 160
height: 32 height: 32
text: audioLoopedBack ? "STOP TESTING" : "TEST YOUR MIC" text: audioLoopedBack ? "STOP TESTING" : "TEST YOUR MIC"
onClicked: { onClicked: {
if (audioLoopedBack) { if (audioLoopedBack) {
loopbackTimer.stop();
stopAudioLoopback(); stopAudioLoopback();
} else { } else {
loopbackTimer.restart();
startAudioLoopback(); startAudioLoopback();
} }
} }
@ -297,8 +293,7 @@ Flickable {
ListView { ListView {
id: outputDeviceListView id: outputDeviceListView
anchors.left: parent.left Layout.preferredWidth: parent.width
anchors.right: parent.right
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
interactive: false interactive: false
height: contentItem.height height: contentItem.height
@ -313,11 +308,13 @@ Flickable {
id: outputDeviceCheckbox id: outputDeviceCheckbox
anchors.left: parent.left anchors.left: parent.left
width: parent.width width: parent.width
checked: selectedDesktop height: 16
checked: selectedHMD
text: model.devicename text: model.devicename
wrapLabel: false
ButtonGroup.group: outputDeviceButtonGroup ButtonGroup.group: outputDeviceButtonGroup
onClicked: { onClicked: {
AudioScriptingInterface.setOutputDevice(model.info, true); // `false` argument for Desktop mode setting AudioScriptingInterface.setOutputDevice(model.info, true); // `true` argument for VR mode setting
} }
} }
} }
@ -363,7 +360,6 @@ Flickable {
id: testYourSoundButton id: testYourSoundButton
enabled: HMD.active enabled: HMD.active
anchors.left: parent.left
Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin Layout.topMargin: simplifiedUI.margins.settings.settingsGroupTopMargin
width: 160 width: 160
height: 32 height: 32

View file

@ -221,4 +221,8 @@ QtObject {
} }
} }
} }
readonly property QtObject numericConstants: QtObject {
readonly property real mutedValue: -60.0
}
} }

View file

@ -30,6 +30,7 @@ Item {
property alias live: sliderControl.live property alias live: sliderControl.live
property alias stepSize: sliderControl.stepSize property alias stepSize: sliderControl.stepSize
property alias snapMode: sliderControl.snapMode property alias snapMode: sliderControl.snapMode
property alias pressed: sliderControl.pressed
property real defaultValue: 0.0 property real defaultValue: 0.0
HifiStylesUit.GraphikRegular { HifiStylesUit.GraphikRegular {

View file

@ -203,7 +203,10 @@ Rectangle {
Image { Image {
id: outputDeviceButton id: outputDeviceButton
property bool outputMuted: false property bool outputMuted: AudioScriptingInterface.avatarGain === simplifiedUI.numericConstants.mutedValue &&
AudioScriptingInterface.serverInjectorGain === simplifiedUI.numericConstants.mutedValue &&
AudioScriptingInterface.localInjectorGain === simplifiedUI.numericConstants.mutedValue &&
AudioScriptingInterface.systemInjectorGain === simplifiedUI.numericConstants.mutedValue
source: outputDeviceButton.outputMuted ? "./images/outputDeviceMuted.svg" : "./images/outputDeviceLoud.svg" source: outputDeviceButton.outputMuted ? "./images/outputDeviceMuted.svg" : "./images/outputDeviceLoud.svg"
anchors.centerIn: parent anchors.centerIn: parent
width: 20 width: 20
@ -228,9 +231,8 @@ Rectangle {
} }
onClicked: { onClicked: {
Tablet.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
outputDeviceButton.outputMuted = !outputDeviceButton.outputMuted;
if (outputDeviceButton.outputMuted && !AudioScriptingInterface.muted) { if (!outputDeviceButton.outputMuted && !AudioScriptingInterface.muted) {
AudioScriptingInterface.muted = true; AudioScriptingInterface.muted = true;
} }
@ -238,7 +240,7 @@ Rectangle {
"source": "SimplifiedTopBar.qml", "source": "SimplifiedTopBar.qml",
"method": "setOutputMuted", "method": "setOutputMuted",
"data": { "data": {
"outputMuted": outputDeviceButton.outputMuted "outputMuted": !outputDeviceButton.outputMuted
} }
}); });
} }
@ -454,10 +456,6 @@ Rectangle {
} }
break; break;
case "updateOutputMuted":
outputDeviceButton.outputMuted = message.data.outputMuted;
break;
case "updateStatusButton": case "updateStatusButton":
statusButton.currentStatus = message.data.currentStatus; statusButton.currentStatus = message.data.currentStatus;
break; break;

View file

@ -3800,10 +3800,14 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
// If this is a first run we short-circuit the address passed in // If this is a first run we short-circuit the address passed in
if (_firstRun.get()) { if (_firstRun.get()) {
DependencyManager::get<AddressManager>()->goToEntry(); if (!_overrideEntry) {
sentTo = SENT_TO_ENTRY; DependencyManager::get<AddressManager>()->goToEntry();
_firstRun.set(false); sentTo = SENT_TO_ENTRY;
} else {
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
sentTo = SENT_TO_PREVIOUS_LOCATION;
}
_firstRun.set(false);
} else { } else {
QString goingTo = ""; QString goingTo = "";
if (addressLookupString.isEmpty()) { if (addressLookupString.isEmpty()) {
@ -3819,7 +3823,7 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString); DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
sentTo = SENT_TO_PREVIOUS_LOCATION; sentTo = SENT_TO_PREVIOUS_LOCATION;
} }
UserActivityLogger::getInstance().logAction("startup_sent_to", { UserActivityLogger::getInstance().logAction("startup_sent_to", {
{ "sent_to", sentTo }, { "sent_to", sentTo },
{ "sandbox_is_running", sandboxIsRunning }, { "sandbox_is_running", sandboxIsRunning },
@ -9354,6 +9358,19 @@ void Application::showUrlHandler(const QUrl& url) {
} }
}); });
} }
void Application::overrideEntry(){
_overrideEntry = true;
}
void Application::forceDisplayName(const QString& displayName) {
getMyAvatar()->setDisplayName(displayName);
}
void Application::forceLoginWithTokens(const QString& tokens) {
DependencyManager::get<AccountManager>()->setAccessTokens(tokens);
Setting::Handle<bool>(KEEP_ME_LOGGED_IN_SETTING_NAME, true).set(true);
}
void Application::setConfigFileURL(const QString& fileUrl) {
DependencyManager::get<AccountManager>()->setConfigFileURL(fileUrl);
}
#if defined(Q_OS_ANDROID) #if defined(Q_OS_ANDROID)
void Application::beforeEnterBackground() { void Application::beforeEnterBackground() {

View file

@ -356,6 +356,11 @@ public:
void openDirectory(const QString& path); void openDirectory(const QString& path);
void overrideEntry();
void forceDisplayName(const QString& displayName);
void forceLoginWithTokens(const QString& tokens);
void setConfigFileURL(const QString& fileUrl);
signals: signals:
void svoImportRequested(const QString& url); void svoImportRequested(const QString& url);
@ -828,5 +833,6 @@ private:
bool _resumeAfterLoginDialogActionTaken_WasPostponed { false }; bool _resumeAfterLoginDialogActionTaken_WasPostponed { false };
bool _resumeAfterLoginDialogActionTaken_SafeToRun { false }; bool _resumeAfterLoginDialogActionTaken_SafeToRun { false };
bool _startUpFinished { false }; bool _startUpFinished { false };
bool _overrideEntry { false };
}; };
#endif // hifi_Application_h #endif // hifi_Application_h

View file

@ -521,6 +521,7 @@ void AvatarManager::buildPhysicsTransaction(PhysicsEngine::Transaction& transact
} }
} }
} }
_otherAvatarsToChangeInPhysics.clear();
} }
void AvatarManager::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) { void AvatarManager::handleProcessedPhysicsTransaction(PhysicsEngine::Transaction& transaction) {
@ -645,7 +646,7 @@ void AvatarManager::clearOtherAvatars() {
} }
void AvatarManager::deleteAllAvatars() { void AvatarManager::deleteAllAvatars() {
assert(_otherAvatarsToChangeInPhysics.empty()); _otherAvatarsToChangeInPhysics.clear();
QReadLocker locker(&_hashLock); QReadLocker locker(&_hashLock);
AvatarHash::iterator avatarIterator = _avatarHash.begin(); AvatarHash::iterator avatarIterator = _avatarHash.begin();
while (avatarIterator != _avatarHash.end()) { while (avatarIterator != _avatarHash.end()) {

View file

@ -83,6 +83,8 @@ int main(int argc, const char* argv[]) {
QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run"); QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run");
QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir"); QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir");
QCommandLineOption overrideScriptsPathOption(SCRIPTS_SWITCH, "set scripts <path>", "path"); QCommandLineOption overrideScriptsPathOption(SCRIPTS_SWITCH, "set scripts <path>", "path");
QCommandLineOption responseTokensOption("tokens", "set response tokens <json>", "json");
QCommandLineOption displayNameOption("displayName", "set user display name <string>", "string");
parser.addOption(urlOption); parser.addOption(urlOption);
parser.addOption(noLauncherOption); parser.addOption(noLauncherOption);
@ -93,6 +95,8 @@ int main(int argc, const char* argv[]) {
parser.addOption(overrideAppLocalDataPathOption); parser.addOption(overrideAppLocalDataPathOption);
parser.addOption(overrideScriptsPathOption); parser.addOption(overrideScriptsPathOption);
parser.addOption(allowMultipleInstancesOption); parser.addOption(allowMultipleInstancesOption);
parser.addOption(responseTokensOption);
parser.addOption(displayNameOption);
if (!parser.parse(arguments)) { if (!parser.parse(arguments)) {
std::cout << parser.errorText().toStdString() << std::endl; // Avoid Qt log spam std::cout << parser.errorText().toStdString() << std::endl; // Avoid Qt log spam
@ -120,8 +124,10 @@ int main(int argc, const char* argv[]) {
static const QString APPLICATION_CONFIG_FILENAME = "config.json"; static const QString APPLICATION_CONFIG_FILENAME = "config.json";
QDir applicationDir(applicationPath); QDir applicationDir(applicationPath);
QFile configFile(applicationDir.filePath(APPLICATION_CONFIG_FILENAME)); QString configFileName = applicationDir.filePath(APPLICATION_CONFIG_FILENAME);
QFile configFile(configFileName);
QString launcherPath;
if (configFile.exists()) { if (configFile.exists()) {
if (!configFile.open(QIODevice::ReadOnly)) { if (!configFile.open(QIODevice::ReadOnly)) {
qWarning() << "Found application config, but could not open it"; qWarning() << "Found application config, but could not open it";
@ -134,7 +140,7 @@ int main(int argc, const char* argv[]) {
qWarning() << "Found application config, but could not parse it: " << error.errorString(); qWarning() << "Found application config, but could not parse it: " << error.errorString();
} else { } else {
static const QString LAUNCHER_PATH_KEY = "launcherPath"; static const QString LAUNCHER_PATH_KEY = "launcherPath";
QString launcherPath = doc.object()[LAUNCHER_PATH_KEY].toString(); launcherPath = doc.object()[LAUNCHER_PATH_KEY].toString();
if (!launcherPath.isEmpty()) { if (!launcherPath.isEmpty()) {
if (!parser.isSet(noLauncherOption)) { if (!parser.isSet(noLauncherOption)) {
qDebug() << "Found a launcherPath in application config. Starting launcher."; qDebug() << "Found a launcherPath in application config. Starting launcher.";
@ -146,6 +152,7 @@ int main(int argc, const char* argv[]) {
qDebug() << "Found a launcherPath in application config, but the launcher" qDebug() << "Found a launcherPath in application config, but the launcher"
" has been suppressed. Continuing normal execution."; " has been suppressed. Continuing normal execution.";
} }
configFile.close();
} }
} }
} }
@ -398,6 +405,24 @@ int main(int argc, const char* argv[]) {
printSystemInformation(); printSystemInformation();
auto appPointer = dynamic_cast<Application*>(&app);
if (appPointer) {
if (parser.isSet(urlOption)) {
appPointer->overrideEntry();
}
if (parser.isSet(displayNameOption)) {
QString displayName = QString(parser.value(displayNameOption));
appPointer->forceDisplayName(displayName);
}
if (!launcherPath.isEmpty()) {
appPointer->setConfigFileURL(configFileName);
}
if (parser.isSet(responseTokensOption)) {
QString tokens = QString(parser.value(responseTokensOption));
appPointer->forceLoginWithTokens(tokens);
}
}
QTranslator translator; QTranslator translator;
translator.load("i18n/interface_en"); translator.load("i18n/interface_en");
app.installTranslator(&translator); app.installTranslator(&translator);

View file

@ -400,10 +400,19 @@ void Audio::setReverbOptions(const AudioEffectOptions* options) {
} }
void Audio::setAvatarGain(float gain) { void Audio::setAvatarGain(float gain) {
bool changed = false;
if (getAvatarGain() != gain) {
changed = true;
}
withWriteLock([&] { withWriteLock([&] {
// ask the NodeList to set the master avatar gain // ask the NodeList to set the master avatar gain
DependencyManager::get<NodeList>()->setAvatarGain(QUuid(), gain); DependencyManager::get<NodeList>()->setAvatarGain(QUuid(), gain);
}); });
if (changed) {
emit avatarGainChanged(gain);
}
} }
float Audio::getAvatarGain() { float Audio::getAvatarGain() {
@ -413,10 +422,19 @@ float Audio::getAvatarGain() {
} }
void Audio::setInjectorGain(float gain) { void Audio::setInjectorGain(float gain) {
bool changed = false;
if (getInjectorGain() != gain) {
changed = true;
}
withWriteLock([&] { withWriteLock([&] {
// ask the NodeList to set the audio injector gain // ask the NodeList to set the audio injector gain
DependencyManager::get<NodeList>()->setInjectorGain(gain); DependencyManager::get<NodeList>()->setInjectorGain(gain);
}); });
if (changed) {
emit serverInjectorGainChanged(gain);
}
} }
float Audio::getInjectorGain() { float Audio::getInjectorGain() {
@ -426,6 +444,11 @@ float Audio::getInjectorGain() {
} }
void Audio::setLocalInjectorGain(float gain) { void Audio::setLocalInjectorGain(float gain) {
bool changed = false;
if (getLocalInjectorGain() != gain) {
changed = true;
}
withWriteLock([&] { withWriteLock([&] {
if (_localInjectorGain != gain) { if (_localInjectorGain != gain) {
_localInjectorGain = gain; _localInjectorGain = gain;
@ -436,6 +459,11 @@ void Audio::setLocalInjectorGain(float gain) {
DependencyManager::get<AudioClient>()->setLocalInjectorGain(gain); DependencyManager::get<AudioClient>()->setLocalInjectorGain(gain);
} }
}); });
if (changed) {
emit localInjectorGainChanged(gain);
}
} }
float Audio::getLocalInjectorGain() { float Audio::getLocalInjectorGain() {
@ -445,6 +473,11 @@ float Audio::getLocalInjectorGain() {
} }
void Audio::setSystemInjectorGain(float gain) { void Audio::setSystemInjectorGain(float gain) {
bool changed = false;
if (getSystemInjectorGain() != gain) {
changed = true;
}
withWriteLock([&] { withWriteLock([&] {
if (_systemInjectorGain != gain) { if (_systemInjectorGain != gain) {
_systemInjectorGain = gain; _systemInjectorGain = gain;
@ -455,6 +488,10 @@ void Audio::setSystemInjectorGain(float gain) {
DependencyManager::get<AudioClient>()->setSystemInjectorGain(gain); DependencyManager::get<AudioClient>()->setSystemInjectorGain(gain);
} }
}); });
if (changed) {
emit systemInjectorGainChanged(gain);
}
} }
float Audio::getSystemInjectorGain() { float Audio::getSystemInjectorGain() {

View file

@ -66,6 +66,10 @@ class Audio : public AudioScriptingInterface, protected ReadWriteLockable {
* @property {boolean} pushToTalkHMD - <code>true</code> if HMD push-to-talk is enabled, otherwise <code>false</code>. * @property {boolean} pushToTalkHMD - <code>true</code> if HMD push-to-talk is enabled, otherwise <code>false</code>.
* @property {boolean} pushingToTalk - <code>true</code> if the user is currently pushing-to-talk, otherwise * @property {boolean} pushingToTalk - <code>true</code> if the user is currently pushing-to-talk, otherwise
* <code>false</code>. * <code>false</code>.
* @property {float} avatarGain - The gain (relative volume) that avatars' voices are played at. This gain is used at the server.
* @property {float} localInjectorGain - The gain (relative volume) that local injectors (local environment sounds) are played at.
* @property {float} serverInjectorGain - The gain (relative volume) that server injectors (server environment sounds) are played at. This gain is used at the server.
* @property {float} systemInjectorGain - The gain (relative volume) that system sounds are played at.
* *
* @comment The following properties are from AudioScriptingInterface.h. * @comment The following properties are from AudioScriptingInterface.h.
* @property {boolean} isStereoInput - <code>true</code> if the input audio is being used in stereo, otherwise * @property {boolean} isStereoInput - <code>true</code> if the input audio is being used in stereo, otherwise
@ -90,6 +94,10 @@ class Audio : public AudioScriptingInterface, protected ReadWriteLockable {
Q_PROPERTY(bool pushToTalkDesktop READ getPTTDesktop WRITE setPTTDesktop NOTIFY pushToTalkDesktopChanged) Q_PROPERTY(bool pushToTalkDesktop READ getPTTDesktop WRITE setPTTDesktop NOTIFY pushToTalkDesktopChanged)
Q_PROPERTY(bool pushToTalkHMD READ getPTTHMD WRITE setPTTHMD NOTIFY pushToTalkHMDChanged) Q_PROPERTY(bool pushToTalkHMD READ getPTTHMD WRITE setPTTHMD NOTIFY pushToTalkHMDChanged)
Q_PROPERTY(bool pushingToTalk READ getPushingToTalk WRITE setPushingToTalk NOTIFY pushingToTalkChanged) Q_PROPERTY(bool pushingToTalk READ getPushingToTalk WRITE setPushingToTalk NOTIFY pushingToTalkChanged)
Q_PROPERTY(float avatarGain READ getAvatarGain WRITE setAvatarGain NOTIFY avatarGainChanged)
Q_PROPERTY(float localInjectorGain READ getLocalInjectorGain WRITE setLocalInjectorGain NOTIFY localInjectorGainChanged)
Q_PROPERTY(float serverInjectorGain READ getInjectorGain WRITE setInjectorGain NOTIFY serverInjectorGainChanged)
Q_PROPERTY(float systemInjectorGain READ getSystemInjectorGain WRITE setSystemInjectorGain NOTIFY systemInjectorGainChanged)
public: public:
static QString AUDIO; static QString AUDIO;
@ -412,6 +420,38 @@ signals:
*/ */
void pushingToTalkChanged(bool talking); void pushingToTalkChanged(bool talking);
/**jsdoc
* Triggered when the avatar gain changes.
* @function Audio.avatarGainChanged
* @param {float} gain - The new avatar gain value.
* @returns {Signal}
*/
void avatarGainChanged(float gain);
/**jsdoc
* Triggered when the local injector gain changes.
* @function Audio.localInjectorGainChanged
* @param {float} gain - The new local injector gain value.
* @returns {Signal}
*/
void localInjectorGainChanged(float gain);
/**jsdoc
* Triggered when the server injector gain changes.
* @function Audio.serverInjectorGainChanged
* @param {float} gain - The new server injector gain value.
* @returns {Signal}
*/
void serverInjectorGainChanged(float gain);
/**jsdoc
* Triggered when the system injector gain changes.
* @function Audio.systemInjectorGainChanged
* @param {float} gain - The new system injector gain value.
* @returns {Signal}
*/
void systemInjectorGainChanged(float gain);
public slots: public slots:
/**jsdoc /**jsdoc

View file

@ -44,13 +44,14 @@ SelectionScriptingInterface::SelectionScriptingInterface() {
} }
/**jsdoc /**jsdoc
* The type of a specific item in a selection list.
* <table> * <table>
* <thead> * <thead>
* <tr><th>Value</th><th>Description</th></tr> * <tr><th>Value</th><th>Description</th></tr>
* </thead> * </thead>
* <tbody> * <tbody>
* <tr><td><code>"avatar"</code></td><td></td></tr> * <tr><td><code>"avatar"</code></td><td>The item is an avatar.</td></tr>
* <tr><td><code>"entity"</code></td><td></td></tr> * <tr><td><code>"entity"</code></td><td>The item is an entity.</td></tr>
* </tbody> * </tbody>
* </table> * </table>
* @typedef {string} Selection.ItemType * @typedef {string} Selection.ItemType
@ -245,9 +246,10 @@ void SelectionScriptingInterface::printList(const QString& listName) {
} }
/**jsdoc /**jsdoc
* A selection list.
* @typedef {object} Selection.SelectedItemsList * @typedef {object} Selection.SelectedItemsList
* @property {Uuid[]} avatars - The IDs of the avatars in the selection. * @property {Uuid[]} avatars - The IDs of the avatars in the selection list.
* @property {Uuid[]} entities - The IDs of the entities in the selection. * @property {Uuid[]} entities - The IDs of the entities in the selection list.
*/ */
QVariantMap SelectionScriptingInterface::getSelectedItemsList(const QString& listName) const { QVariantMap SelectionScriptingInterface::getSelectedItemsList(const QString& listName) const {
QReadLocker lock(&_selectionListsLock); QReadLocker lock(&_selectionListsLock);
@ -438,18 +440,19 @@ bool SelectionHighlightStyle::fromVariantMap(const QVariantMap& properties) {
} }
/**jsdoc /**jsdoc
* The highlighting style of a selection list.
* @typedef {object} Selection.HighlightStyle * @typedef {object} Selection.HighlightStyle
* @property {Color} outlineUnoccludedColor - Color of the specified highlight region. * @property {Color} outlineUnoccludedColor=255,178,51 - Unoccluded outline color.
* @property {Color} outlineOccludedColor - "" * @property {Color} outlineOccludedColor=255,178,51 - Occluded outline color.
* @property {Color} fillUnoccludedColor- "" * @property {Color} fillUnoccludedColor=51,178,255 - Unoccluded fill color.
* @property {Color} fillOccludedColor- "" * @property {Color} fillOccludedColor=51,178,255 - Occluded fill color.
* @property {number} outlineUnoccludedAlpha - Alpha value ranging from <code>0.0</code> (not visible) to <code>1.0</code> * @property {number} outlineUnoccludedAlpha=0.9 - Unoccluded outline alpha, range <code>0.0</code> &ndash; <code>1.0</code>.
* (fully opaque) for the specified highlight region. * @property {number} outlineOccludedAlpha=0.9 - Occluded outline alpha, range <code>0.0</code> &ndash; <code>1.0</code>.
* @property {number} outlineOccludedAlpha - "" * @property {number} fillUnoccludedAlpha=0.0 - Unoccluded fill alpha, range <code>0.0</code> &ndash; <code>1.0</code>.
* @property {number} fillUnoccludedAlpha - "" * @property {number} fillOccludedAlpha=0.0 - Occluded fill alpha, range <code>0.0</code> &ndash; <code>1.0</code>.
* @property {number} fillOccludedAlpha - "" * @property {number} outlineWidth=2 - Width of the outline, in pixels.
* @property {number} outlineWidth - Width of the outline, in pixels. * @property {boolean} isOutlineSmooth=false - <code>true</code> to fade the outside edge of the outline, <code>false</code>
* @property {boolean} isOutlineSmooth - <code>true</code> to enable outline smooth fall-off. * to have a sharp edge.
*/ */
QVariantMap SelectionHighlightStyle::toVariantMap() const { QVariantMap SelectionHighlightStyle::toVariantMap() const {
QVariantMap properties; QVariantMap properties;

View file

@ -77,47 +77,45 @@ protected:
}; };
/**jsdoc /**jsdoc
* The <code>Selection</code> API provides a means of grouping together avatars and entities in named lists. * The <code>Selection</code> API provides a means of grouping together and highlighting avatars and entities in named lists.
*
* @namespace Selection * @namespace Selection
* *
* @hifi-interface * @hifi-interface
* @hifi-client-entity * @hifi-client-entity
* @hifi-avatar * @hifi-avatar
* *
* @example <caption>Outline an entity when it is grabbed by a controller.</caption> * @example <caption>Outline an entity when it is grabbed by the mouse or a controller.</caption>
* // Create a box and copy the following text into the entity's "Script URL" field. * // Create an entity and copy the following script into the entity's "Script URL" field.
* // Move the entity behind another entity to see the occluded outline.
* (function () { * (function () {
* print("Starting highlight script..............."); * var LIST_NAME = "SelectionExample",
* var _this = this; * ITEM_TYPE = "entity",
* var prevID = 0; * HIGHLIGHT_STYLE = {
* var listName = "contextOverlayHighlightList"; * outlineUnoccludedColor: { red: 0, green: 180, blue: 239 },
* var listType = "entity"; * outlineUnoccludedAlpha: 0.5,
* * outlineOccludedColor: { red: 239, green: 180, blue: 0 },
* _this.startNearGrab = function(entityID){ * outlineOccludedAlpha: 0.5,
* if (prevID !== entityID) { * outlineWidth: 4
* Selection.addToSelectedItemsList(listName, listType, entityID); * };
* prevID = entityID; *
* } * Selection.enableListHighlight(LIST_NAME, HIGHLIGHT_STYLE);
*
* this.startNearGrab = function (entityID) {
* Selection.addToSelectedItemsList(LIST_NAME, ITEM_TYPE, entityID);
* }; * };
* *
* _this.releaseGrab = function(entityID){ * this.startDistanceGrab = function (entityID) {
* if (prevID !== 0) { * Selection.addToSelectedItemsList(LIST_NAME, ITEM_TYPE, entityID);
* Selection.removeFromSelectedItemsList("contextOverlayHighlightList", listType, prevID);
* prevID = 0;
* }
* }; * };
* *
* var cleanup = function(){ * this.releaseGrab = function (entityID) {
* Entities.findEntities(MyAvatar.position, 1000).forEach(function(entity) { * Selection.removeFromSelectedItemsList(LIST_NAME, ITEM_TYPE, entityID);
* try {
* Selection.removeListFromMap(listName);
* } catch (e) {
* print("Error cleaning up.");
* }
* });
* }; * };
* *
* Script.scriptEnding.connect(cleanup); * Script.scriptEnding.connect(function () {
* Selection.removeListFromMap(LIST_NAME);
* });
* }); * });
*/ */
class SelectionScriptingInterface : public QObject, public Dependency { class SelectionScriptingInterface : public QObject, public Dependency {
@ -127,121 +125,119 @@ public:
SelectionScriptingInterface(); SelectionScriptingInterface();
/**jsdoc /**jsdoc
* Get the names of all the selection lists. * Gets the names of all current selection lists.
* @function Selection.getListNames * @function Selection.getListNames
* @returns {list[]} An array of names of all the selection lists. * @returns {string[]} The names of all current selection lists.
*/ * @example <caption>List all the current selection lists.</caption>
* print("Selection lists: " + Selection.getListNames());
*/
Q_INVOKABLE QStringList getListNames() const; Q_INVOKABLE QStringList getListNames() const;
/**jsdoc /**jsdoc
* Delete a named selection list. * Deletes a selection list.
* @function Selection.removeListFromMap * @function Selection.removeListFromMap
* @param {string} listName - The name of the selection list. * @param {string} listName - The name of the selection list to delete.
* @returns {boolean} <code>true</code> if the selection existed and was successfully removed, otherwise <code>false</code>. * @returns {boolean} <code>true</code> if the selection existed and was successfully removed, otherwise <code>false</code>.
*/ */
Q_INVOKABLE bool removeListFromMap(const QString& listName); Q_INVOKABLE bool removeListFromMap(const QString& listName);
/**jsdoc /**jsdoc
* Add an item to a selection list. * Adds an item to a selection list. The list is created if it doesn't exist.
* @function Selection.addToSelectedItemsList * @function Selection.addToSelectedItemsList
* @param {string} listName - The name of the selection list to add the item to. * @param {string} listName - The name of the selection list to add the item to.
* @param {Selection.ItemType} itemType - The type of the item being added. * @param {Selection.ItemType} itemType - The type of item being added.
* @param {Uuid} id - The ID of the item to add to the selection. * @param {Uuid} itemID - The ID of the item to add.
* @returns {boolean} <code>true</code> if the item was successfully added, otherwise <code>false</code>. * @returns {boolean} <code>true</code> if the item was successfully added or already existed in the list, otherwise
*/ * <code>false</code>.
*/
Q_INVOKABLE bool addToSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); Q_INVOKABLE bool addToSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id);
/**jsdoc /**jsdoc
* Remove an item from a selection list. * Removes an item from a selection list.
* @function Selection.removeFromSelectedItemsList * @function Selection.removeFromSelectedItemsList
* @param {string} listName - The name of the selection list to remove the item from. * @param {string} listName - The name of the selection list to remove the item from.
* @param {Selection.ItemType} itemType - The type of the item being removed. * @param {Selection.ItemType} itemType - The type of item being removed.
* @param {Uuid} id - The ID of the item to remove. * @param {Uuid} itemID - The ID of the item to remove.
* @returns {boolean} <code>true</code> if the item was successfully removed, otherwise <code>false</code>. * @returns {boolean} <code>true</code> if the item was successfully removed or was not in the list, otherwise
* <codefalse</code> is returned if the list doesn't contain any data. * <code>false</code>.
*/ */
Q_INVOKABLE bool removeFromSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); Q_INVOKABLE bool removeFromSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id);
/**jsdoc /**jsdoc
* Remove all items from a selection. * Removes all items from a selection list.
* @function Selection.clearSelectedItemsList * @function Selection.clearSelectedItemsList
* @param {string} listName - The name of the selection list. * @param {string} listName - The name of the selection list.
* @returns {boolean} <code>true</code> if the item was successfully cleared, otherwise <code>false</code>. * @returns {boolean} <code>true</code> always.
*/ */
Q_INVOKABLE bool clearSelectedItemsList(const QString& listName); Q_INVOKABLE bool clearSelectedItemsList(const QString& listName);
/**jsdoc /**jsdoc
* Print out the list of avatars and entities in a selection to the <em>debug log</em> (not the script log). * Prints the list of avatars and entities in a selection to the program log (but not the Script Log window).
* @function Selection.printList * @function Selection.printList
* @param {string} listName - The name of the selection list. * @param {string} listName - The name of the selection list.
*/ */
Q_INVOKABLE void printList(const QString& listName); Q_INVOKABLE void printList(const QString& listName);
/**jsdoc /**jsdoc
* Get the list of avatars and entities stored in a selection list. * Gets the list of avatars and entities in a selection list.
* @function Selection.getSelectedItemsList * @function Selection.getSelectedItemsList
* @param {string} listName - The name of the selection list. * @param {string} listName - The name of the selection list.
* @returns {Selection.SelectedItemsList} The content of a selection list. If the list name doesn't exist, the function * @returns {Selection.SelectedItemsList} The content of the selection list if the list exists, otherwise an empty object.
* returns an empty object with no properties. */
*/
Q_INVOKABLE QVariantMap getSelectedItemsList(const QString& listName) const; Q_INVOKABLE QVariantMap getSelectedItemsList(const QString& listName) const;
/**jsdoc /**jsdoc
* Get the names of the highlighted selection lists. * Gets the names of all current selection lists that have highlighting enabled.
* @function Selection.getHighlightedListNames * @function Selection.getHighlightedListNames
* @returns {string[]} An array of names of the selection list currently highlight enabled. * @returns {string[]} The names of the selection lists that currently have highlighting enabled.
*/ */
Q_INVOKABLE QStringList getHighlightedListNames() const; Q_INVOKABLE QStringList getHighlightedListNames() const;
/**jsdoc /**jsdoc
* Enable highlighting for a selection list. * Enables highlighting for a selection list. All items in or subsequently added to the list are displayed with the
* If the selection list doesn't exist, it will be created. * highlight effect specified. The method can be called multiple times with different values in the style to modify the
* All objects in the list will be displayed with the highlight effect specified. * highlighting.
* The function can be called several times with different values in the style to modify it.<br /> * <p>Note: This function implicitly calls {@link Selection.enableListToScene|enableListToScene}.</p>
* Note: This function implicitly calls {@link Selection.enableListToScene}. * @function Selection.enableListHighlight
* @function Selection.enableListHighlight * @param {string} listName - The name of the selection list.
* @param {string} listName - The name of the selection list. * @param {Selection.HighlightStyle} highlightStyle - The highlight style.
* @param {Selection.HighlightStyle} highlightStyle - The highlight style. * @returns {boolean} <code>true</code> always.
* @returns {boolean} true if the selection was successfully enabled for highlight. */
*/
Q_INVOKABLE bool enableListHighlight(const QString& listName, const QVariantMap& highlightStyle); Q_INVOKABLE bool enableListHighlight(const QString& listName, const QVariantMap& highlightStyle);
/**jsdoc /**jsdoc
* Disable highlighting for the selection list. * Disables highlighting for a selection list.
* If the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and <code>false</code> is * <p>Note: This function implicitly calls {@link Selection.disableListToScene|disableListToScene}.</p>
* returned.<br /> * @function Selection.disableListHighlight
* Note: This function implicitly calls {@link Selection.disableListToScene}. * @param {string} listName - The name of the selection list.
* @function Selection.disableListHighlight * @returns {boolean} <code>true</code> always.
* @param {string} listName - The name of the selection list. */
* @returns {boolean} <code>true</code> if the selection was successfully disabled for highlight, otherwise
* <code>false</code>.
*/
Q_INVOKABLE bool disableListHighlight(const QString& listName); Q_INVOKABLE bool disableListHighlight(const QString& listName);
/**jsdoc /**jsdoc
* Enable scene selection for the selection list. * Enables scene selection for a selection list. All items in or subsequently added to the list are sent to a scene
* If the Selection doesn't exist, it will be created. * selection in the rendering engine for debugging purposes.
* All objects in the list will be sent to a scene selection. * @function Selection.enableListToScene
* @function Selection.enableListToScene * @param {string} listName - The name of the selection list.
* @param {string} listName - The name of the selection list. * @returns {boolean} <code>true</code> always.
* @returns {boolean} <code>true</code> if the selection was successfully enabled on the scene, otherwise <code>false</code>. */
*/
Q_INVOKABLE bool enableListToScene(const QString& listName); Q_INVOKABLE bool enableListToScene(const QString& listName);
/**jsdoc /**jsdoc
* Disable scene selection for the named selection. * Disables scene selection for a selection list.
* If the selection list doesn't exist or wasn't enabled on the scene then nothing happens and <code>false</code> is * @function Selection.disableListToScene
* returned. * @param {string} listName - The name of the selection list.
* @function Selection.disableListToScene * @returns {boolean} <code>true</code> always.
* @param {string} listName - The name of the selection list. */
* @returns {boolean} true if the selection was successfully disabled on the scene, false otherwise.
*/
Q_INVOKABLE bool disableListToScene(const QString& listName); Q_INVOKABLE bool disableListToScene(const QString& listName);
/**jsdoc /**jsdoc
* Get the highlight style values for the a selection list. * Gets the current highlighting style for a selection list.
* If the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned. * @function Selection.getListHighlightStyle
* @function Selection.getListHighlightStyle * @param {string} listName - The name of the selection list.
* @param {string} listName - The name of the selection list. * @returns {Selection.HighlightStyle} The highlight style of the selection list if the list exists and highlighting is
* @returns {Selection.HighlightStyle} highlight style * enabled, otherwise an empty object.
*/ */
Q_INVOKABLE QVariantMap getListHighlightStyle(const QString& listName) const; Q_INVOKABLE QVariantMap getListHighlightStyle(const QString& listName) const;
@ -253,7 +249,7 @@ public:
signals: signals:
/**jsdoc /**jsdoc
* Triggered when a list's content changes. * Triggered when a selection list's content changes or the list is deleted.
* @function Selection.selectedItemsListChanged * @function Selection.selectedItemsListChanged
* @param {string} listName - The name of the selection list that changed. * @param {string} listName - The name of the selection list that changed.
* @returns {Signal} * @returns {Signal}
@ -276,7 +272,6 @@ private:
void setupHandler(const QString& selectionName); void setupHandler(const QString& selectionName);
void removeHandler(const QString& selectionName); void removeHandler(const QString& selectionName);
}; };
#endif // hifi_SelectionScriptingInterface_h #endif // hifi_SelectionScriptingInterface_h

View file

@ -2162,6 +2162,8 @@ qint64 AudioClient::AudioOutputIODevice::readData(char * data, qint64 maxSize) {
} }
bytesWritten = framesPopped * AudioConstants::SAMPLE_SIZE * deviceChannelCount; bytesWritten = framesPopped * AudioConstants::SAMPLE_SIZE * deviceChannelCount;
assert(bytesWritten <= maxSize);
} else { } else {
// nothing on network, don't grab anything from injectors, and just return 0s // nothing on network, don't grab anything from injectors, and just return 0s
memset(data, 0, maxSize); memset(data, 0, maxSize);
@ -2174,7 +2176,6 @@ qint64 AudioClient::AudioOutputIODevice::readData(char * data, qint64 maxSize) {
_audio->_audioFileWav.addRawAudioChunk(reinterpret_cast<char*>(scratchBuffer), bytesWritten); _audio->_audioFileWav.addRawAudioChunk(reinterpret_cast<char*>(scratchBuffer), bytesWritten);
} }
int bytesAudioOutputUnplayed = _audio->_audioOutput->bufferSize() - _audio->_audioOutput->bytesFree(); int bytesAudioOutputUnplayed = _audio->_audioOutput->bufferSize() - _audio->_audioOutput->bytesFree();
float msecsAudioOutputUnplayed = bytesAudioOutputUnplayed / (float)_audio->_outputFormat.bytesForDuration(USECS_PER_MSEC); float msecsAudioOutputUnplayed = bytesAudioOutputUnplayed / (float)_audio->_outputFormat.bytesForDuration(USECS_PER_MSEC);
_audio->_stats.updateOutputMsUnplayed(msecsAudioOutputUnplayed); _audio->_stats.updateOutputMsUnplayed(msecsAudioOutputUnplayed);

View file

@ -364,10 +364,19 @@ int InboundAudioStream::popSamples(int maxSamples, bool allOrNothing) {
// buffer calculations. // buffer calculations.
setToStarved(); setToStarved();
_consecutiveNotMixedCount++; _consecutiveNotMixedCount++;
//Kick PLC to generate a filler frame, reducing 'click'
lostAudioData(allOrNothing ? (maxSamples - samplesAvailable) / _ringBuffer.getNumFrameSamples() : 1); // use PLC to generate extrapolated audio data, to reduce clicking
samplesPopped = _ringBuffer.samplesAvailable(); if (allOrNothing) {
if (samplesPopped) { int samplesNeeded = maxSamples - samplesAvailable;
int packetsNeeded = (samplesNeeded + _ringBuffer.getNumFrameSamples() - 1) / _ringBuffer.getNumFrameSamples();
lostAudioData(packetsNeeded);
} else {
lostAudioData(1);
}
samplesAvailable = _ringBuffer.samplesAvailable();
if (samplesAvailable > 0) {
samplesPopped = std::min(samplesAvailable, maxSamples);
popSamplesNoCheck(samplesPopped); popSamplesNoCheck(samplesPopped);
} else { } else {
// No samples available means a packet is currently being // No samples available means a packet is currently being

View file

@ -42,8 +42,8 @@ void CalculateBlendshapeTangentsTask::run(const baker::BakeContextPointer& conte
continue; continue;
} }
// Check if we can and should calculate tangents (we need normals to calculate the tangents) // Check if we can calculate tangents (we need normals and texcoords to calculate the tangents)
if (normals.empty()) { if (normals.empty() || normals.size() != (size_t)mesh.texCoords.size()) {
continue; continue;
} }
tangentsOut.resize(normals.size()); tangentsOut.resize(normals.size());

View file

@ -27,10 +27,10 @@ void CalculateMeshTangentsTask::run(const baker::BakeContextPointer& context, co
auto& tangentsOut = tangentsPerMeshOut[tangentsPerMeshOut.size()-1]; auto& tangentsOut = tangentsPerMeshOut[tangentsPerMeshOut.size()-1];
// Check if we already have tangents and therefore do not need to do any calculation // Check if we already have tangents and therefore do not need to do any calculation
// Otherwise confirm if we have the normals needed, and need to calculate the tangents // Otherwise confirm if we have the normals and texcoords needed
if (!tangentsIn.empty()) { if (!tangentsIn.empty()) {
tangentsOut = tangentsIn.toStdVector(); tangentsOut = tangentsIn.toStdVector();
} else if (!normals.empty()) { } else if (!normals.empty() && mesh.vertices.size() == mesh.texCoords.size()) {
tangentsOut.resize(normals.size()); tangentsOut.resize(normals.size());
baker::calculateTangents(mesh, baker::calculateTangents(mesh,
[&mesh, &normals, &tangentsOut](int firstIndex, int secondIndex, glm::vec3* outVertices, glm::vec2* outTexCoords, glm::vec3& outNormal) { [&mesh, &normals, &tangentsOut](int firstIndex, int secondIndex, glm::vec3* outVertices, glm::vec2* outTexCoords, glm::vec3& outNormal) {

View file

@ -97,6 +97,7 @@ void AccountManager::logout() {
// remove this account from the account settings file // remove this account from the account settings file
removeAccountFromFile(); removeAccountFromFile();
saveLoginStatus(false);
emit logoutComplete(); emit logoutComplete();
// the username has changed to blank // the username has changed to blank
@ -650,6 +651,39 @@ void AccountManager::refreshAccessToken() {
} }
} }
void AccountManager::setAccessTokens(const QString& response) {
QJsonDocument jsonResponse = QJsonDocument::fromJson(response.toUtf8());
const QJsonObject& rootObject = jsonResponse.object();
if (!rootObject.contains("error")) {
// construct an OAuthAccessToken from the json object
if (!rootObject.contains("access_token") || !rootObject.contains("expires_in")
|| !rootObject.contains("token_type")) {
// TODO: error handling - malformed token response
qCDebug(networking) << "Received a response for password grant that is missing one or more expected values.";
} else {
// clear the path from the response URL so we have the right root URL for this access token
QUrl rootURL = rootObject.contains("url") ? rootObject["url"].toString() : _authURL;
rootURL.setPath("");
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
_accountInfo = DataServerAccountInfo();
_accountInfo.setAccessTokenFromJSON(rootObject);
emit loginComplete(rootURL);
persistAccountToFile();
saveLoginStatus(true);
requestProfile();
}
} else {
// TODO: error handling
qCDebug(networking) << "Error in response for password grant -" << rootObject["error_description"].toString();
emit loginFailed();
}
}
void AccountManager::requestAccessTokenFinished() { void AccountManager::requestAccessTokenFinished() {
QNetworkReply* requestReply = reinterpret_cast<QNetworkReply*>(sender()); QNetworkReply* requestReply = reinterpret_cast<QNetworkReply*>(sender());
@ -895,3 +929,34 @@ void AccountManager::handleKeypairGenerationError() {
void AccountManager::setLimitedCommerce(bool isLimited) { void AccountManager::setLimitedCommerce(bool isLimited) {
_limitedCommerce = isLimited; _limitedCommerce = isLimited;
} }
void AccountManager::saveLoginStatus(bool isLoggedIn) {
if (!_configFileURL.isEmpty()) {
QFile configFile(_configFileURL);
configFile.open(QIODevice::ReadOnly | QIODevice::Text);
QJsonParseError error;
QJsonDocument jsonDocument = QJsonDocument::fromJson(configFile.readAll(), &error);
configFile.close();
QString launcherPath;
if (error.error == QJsonParseError::NoError) {
QJsonObject rootObject = jsonDocument.object();
if (rootObject.contains("launcherPath")) {
launcherPath = rootObject["launcherPath"].toString();
}
if (rootObject.contains("loggedIn")) {
rootObject["loggedIn"] = isLoggedIn;
}
jsonDocument = QJsonDocument(rootObject);
}
configFile.open(QFile::WriteOnly | QFile::Text | QFile::Truncate);
configFile.write(jsonDocument.toJson());
configFile.close();
if (!isLoggedIn && !launcherPath.isEmpty()) {
QProcess launcher;
launcher.setProgram(launcherPath);
launcher.startDetached();
qApp->quit();
}
}
}

View file

@ -102,6 +102,10 @@ public:
bool getLimitedCommerce() { return _limitedCommerce; } bool getLimitedCommerce() { return _limitedCommerce; }
void setLimitedCommerce(bool isLimited); void setLimitedCommerce(bool isLimited);
void setAccessTokens(const QString& response);
void setConfigFileURL(const QString& fileURL) { _configFileURL = fileURL; }
void saveLoginStatus(bool isLoggedIn);
public slots: public slots:
void requestAccessToken(const QString& login, const QString& password); void requestAccessToken(const QString& login, const QString& password);
void requestAccessTokenWithSteam(QByteArray authSessionTicket); void requestAccessTokenWithSteam(QByteArray authSessionTicket);
@ -162,6 +166,7 @@ private:
QUuid _sessionID { QUuid::createUuid() }; QUuid _sessionID { QUuid::createUuid() };
bool _limitedCommerce { false }; bool _limitedCommerce { false };
QString _configFileURL;
}; };
#endif // hifi_AccountManager_h #endif // hifi_AccountManager_h

View file

@ -91,10 +91,10 @@ NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort)
connect(accountManager.data(), &AccountManager::newKeypair, this, &NodeList::sendDomainServerCheckIn); connect(accountManager.data(), &AccountManager::newKeypair, this, &NodeList::sendDomainServerCheckIn);
// clear out NodeList when login is finished and we know our new username // clear out NodeList when login is finished and we know our new username
connect(accountManager.data(), SIGNAL(usernameChanged(QString)) , this, SLOT(reset())); connect(accountManager.data(), &AccountManager::usernameChanged , this, [this]{ reset("Username changed"); });
// clear our NodeList when logout is requested // clear our NodeList when logout is requested
connect(accountManager.data(), SIGNAL(logoutComplete()) , this, SLOT(reset())); connect(accountManager.data(), &AccountManager::logoutComplete , this, [this]{ reset("Logged out"); });
// anytime we get a new node we will want to attempt to punch to it // anytime we get a new node we will want to attempt to punch to it
connect(this, &LimitedNodeList::nodeAdded, this, &NodeList::startNodeHolePunch); connect(this, &LimitedNodeList::nodeAdded, this, &NodeList::startNodeHolePunch);

View file

@ -0,0 +1,41 @@
"use strict";
/* jslint vars: true, plusplus: true */
//
// defaultScripts.js
//
// Authors: Zach Fox
// Created: 2019-05-23
// 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
//
var DEFAULT_SCRIPTS_PATH_PREFIX = ScriptDiscoveryService.defaultScriptsPath + "/";
var DEFAULT_SCRIPTS_SEPARATE = [
DEFAULT_SCRIPTS_PATH_PREFIX + "system/controllers/controllerScripts.js",
Script.resolvePath("simplifiedUI.js")
];
function loadSeparateDefaults() {
for (var i in DEFAULT_SCRIPTS_SEPARATE) {
Script.load(DEFAULT_SCRIPTS_SEPARATE[i]);
}
}
var DEFAULT_SCRIPTS_COMBINED = [
DEFAULT_SCRIPTS_PATH_PREFIX + "system/request-service.js",
DEFAULT_SCRIPTS_PATH_PREFIX + "system/progress.js",
DEFAULT_SCRIPTS_PATH_PREFIX + "system/away.js"
];
function runDefaultsTogether() {
for (var i in DEFAULT_SCRIPTS_COMBINED) {
Script.include(DEFAULT_SCRIPTS_COMBINED[i]);
}
loadSeparateDefaults();
}
runDefaultsTogether();

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -5,7 +5,7 @@
// simplifiedUI.js // simplifiedUI.js
// //
// Authors: Wayne Chen & Zach Fox // Authors: Wayne Chen & Zach Fox
// Created on: 5/1/2019 // Created: 2019-05-01
// Copyright 2019 High Fidelity, Inc. // Copyright 2019 High Fidelity, Inc.
// //
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
@ -103,6 +103,8 @@ var AVATAR_APP_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
var AVATAR_APP_WIDTH_PX = 480; var AVATAR_APP_WIDTH_PX = 480;
var AVATAR_APP_HEIGHT_PX = 615; var AVATAR_APP_HEIGHT_PX = 615;
var avatarAppWindow = false; var avatarAppWindow = false;
var POPOUT_SAFE_MARGIN_X = 30;
var POPOUT_SAFE_MARGIN_Y = 30;
function toggleAvatarApp() { function toggleAvatarApp() {
if (avatarAppWindow) { if (avatarAppWindow) {
avatarAppWindow.close(); avatarAppWindow.close();
@ -119,6 +121,10 @@ function toggleAvatarApp() {
size: { size: {
x: AVATAR_APP_WIDTH_PX, x: AVATAR_APP_WIDTH_PX,
y: AVATAR_APP_HEIGHT_PX y: AVATAR_APP_HEIGHT_PX
},
position: {
x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - AVATAR_APP_WIDTH_PX / 2),
y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - AVATAR_APP_HEIGHT_PX / 2)
} }
}); });
@ -181,6 +187,10 @@ function toggleSettingsApp() {
size: { size: {
x: SETTINGS_APP_WIDTH_PX, x: SETTINGS_APP_WIDTH_PX,
y: SETTINGS_APP_HEIGHT_PX y: SETTINGS_APP_HEIGHT_PX
},
position: {
x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - SETTINGS_APP_WIDTH_PX / 2),
y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - SETTINGS_APP_HEIGHT_PX / 2)
} }
}); });
@ -238,40 +248,39 @@ function updateOutputDeviceMutedOverlay(isMuted) {
} }
var savedAvatarGain = Audio.getAvatarGain(); var savedAvatarGain = Audio.avatarGain;
var savedInjectorGain = Audio.getInjectorGain(); var savedServerInjectorGain = Audio.serverInjectorGain;
var savedLocalInjectorGain = Audio.getLocalInjectorGain(); var savedLocalInjectorGain = Audio.localInjectorGain;
var savedSystemInjectorGain = Audio.getSystemInjectorGain(); var savedSystemInjectorGain = Audio.systemInjectorGain;
var MUTED_VALUE_DB = -60; // This should always match `SimplifiedConstants.qml` -> numericConstants -> mutedValue!
function setOutputMuted(outputMuted) { function setOutputMuted(outputMuted) {
updateOutputDeviceMutedOverlay(outputMuted);
if (outputMuted) { if (outputMuted) {
savedAvatarGain = Audio.getAvatarGain(); savedAvatarGain = Audio.avatarGain;
savedInjectorGain = Audio.getInjectorGain(); savedServerInjectorGain = Audio.serverInjectorGain;
savedLocalInjectorGain = Audio.getLocalInjectorGain(); savedLocalInjectorGain = Audio.localInjectorGain;
savedSystemInjectorGain = Audio.getSystemInjectorGain(); savedSystemInjectorGain = Audio.systemInjectorGain;
Audio.setAvatarGain(-60); Audio.avatarGain = MUTED_VALUE_DB;
Audio.setInjectorGain(-60); Audio.serverInjectorGain = MUTED_VALUE_DB;
Audio.setLocalInjectorGain(-60); Audio.localInjectorGain = MUTED_VALUE_DB;
Audio.setSystemInjectorGain(-60); Audio.systemInjectorGain = MUTED_VALUE_DB;
} else { } else {
if (savedAvatarGain === -60) { if (savedAvatarGain === MUTED_VALUE_DB) {
savedAvatarGain = 0; savedAvatarGain = 0;
} }
Audio.setAvatarGain(savedAvatarGain); Audio.avatarGain = savedAvatarGain;
if (savedInjectorGain === -60) { if (savedServerInjectorGain === MUTED_VALUE_DB) {
savedInjectorGain = 0; savedServerInjectorGain = 0;
} }
Audio.setInjectorGain(savedInjectorGain); Audio.serverInjectorGain = savedServerInjectorGain;
if (savedLocalInjectorGain === -60) { if (savedLocalInjectorGain === MUTED_VALUE_DB) {
savedLocalInjectorGain = 0; savedLocalInjectorGain = 0;
} }
Audio.setLocalInjectorGain(savedLocalInjectorGain); Audio.localInjectorGain = savedLocalInjectorGain;
if (savedSystemInjectorGain === -60) { if (savedSystemInjectorGain === MUTED_VALUE_DB) {
savedSystemInjectorGain = 0; savedSystemInjectorGain = 0;
} }
Audio.setSystemInjectorGain(savedSystemInjectorGain); Audio.systemInjectorGain = savedSystemInjectorGain;
} }
} }
@ -334,7 +343,10 @@ function onTopBarClosed() {
function isOutputMuted() { function isOutputMuted() {
return Audio.getAvatarGain() === -60 && Audio.getInjectorGain() === -60 && Audio.getLocalInjectorGain() === -60 && Audio.getSystemInjectorGain() === -60; return Audio.avatarGain === MUTED_VALUE_DB &&
Audio.serverInjectorGain === MUTED_VALUE_DB &&
Audio.localInjectorGain === MUTED_VALUE_DB &&
Audio.systemInjectorGain === MUTED_VALUE_DB;
} }
@ -370,15 +382,7 @@ function loadSimplifiedTopBar() {
// The eventbridge takes a nonzero time to initialize, so we have to wait a bit // The eventbridge takes a nonzero time to initialize, so we have to wait a bit
// for the QML to load and for that to happen before updating the UI. // for the QML to load and for that to happen before updating the UI.
Script.setTimeout(function() { Script.setTimeout(function() {
topBarWindow.sendToQml({
"source": "simplifiedUI.js",
"method": "updateOutputMuted",
"data": {
"outputMuted": isOutputMuted()
}
});
sendLocalStatusToQml(); sendLocalStatusToQml();
}, WAIT_FOR_TOP_BAR_MS); }, WAIT_FOR_TOP_BAR_MS);
} }
@ -469,6 +473,11 @@ function onStatusChanged() {
} }
function maybeUpdateOutputDeviceMutedOverlay() {
updateOutputDeviceMutedOverlay(isOutputMuted());
}
var simplifiedNametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now()); var simplifiedNametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now());
var SimplifiedStatusIndicator = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now()); var SimplifiedStatusIndicator = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now());
var si; var si;
@ -501,6 +510,10 @@ function startup() {
Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged); Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged);
Window.geometryChanged.connect(onGeometryChanged); Window.geometryChanged.connect(onGeometryChanged);
HMD.displayModeChanged.connect(ensureFirstPersonCameraInHMD); HMD.displayModeChanged.connect(ensureFirstPersonCameraInHMD);
Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
Audio.localInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
Audio.serverInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
Audio.systemInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay);
oldShowAudioTools = AvatarInputs.showAudioTools; oldShowAudioTools = AvatarInputs.showAudioTools;
AvatarInputs.showAudioTools = false; AvatarInputs.showAudioTools = false;
@ -551,6 +564,10 @@ function shutdown() {
Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged); Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged);
Window.geometryChanged.disconnect(onGeometryChanged); Window.geometryChanged.disconnect(onGeometryChanged);
HMD.displayModeChanged.disconnect(ensureFirstPersonCameraInHMD); HMD.displayModeChanged.disconnect(ensureFirstPersonCameraInHMD);
Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
Audio.localInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
Audio.serverInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
Audio.systemInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);
AvatarInputs.showAudioTools = oldShowAudioTools; AvatarInputs.showAudioTools = oldShowAudioTools;
AvatarInputs.showBubbleTools = oldShowBubbleTools; AvatarInputs.showBubbleTools = oldShowBubbleTools;

View file

@ -0,0 +1,20 @@
# Post build script
import os
import sys
SOURCE_PATH = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..', '..'))
BUILD_PATH = os.path.join(SOURCE_PATH, 'build')
# FIXME move the helper python modules somewher other than the root of the repo
sys.path.append(SOURCE_PATH)
import hifi_utils
#for var in sys.argv:
# print("{}".format(var))
#for var in os.environ:
# print("{} = {}".format(var, os.environ[var]))
print("Create ZIP version of installer archive")
hifi_utils.executeSubprocess(['cpack', '-G', 'ZIP'], folder=BUILD_PATH)

View file

@ -1,235 +1,235 @@
# General # General
This document describes the process to build Qt 5.12.3. 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. The second patch is to OpenSL ES audio.
## Requirements ## Requirements
### Windows ### Windows
1. Visual Studio 2017 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/). 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 Install with defaults
1. python 2.7.16 1. python 2.7.16
Check if needed running `python --version` - should return python 2.7.x 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 Install from https://www.python.org/ftp/python/2.7.16/python-2.7.16.amd64.msi
Add path to python executable to PATH. 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. 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”) Verify that python runs python 2.7 (run “python --version”)
1. git >= 1.6 1. git >= 1.6
Check if needed `git --version` Check if needed `git --version`
Download from https://git-scm.com/download/win Download from https://git-scm.com/download/win
Verify by entering `git --version` Verify by entering `git --version`
1. perl >= 5.14 1. perl >= 5.14
Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\ Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\
Verify by running `perl --version` Verify by running `perl --version`
1. flex and bison 1. flex and bison
Download from https://sourceforge.net/projects/winflexbison/files/latest/download Download from https://sourceforge.net/projects/winflexbison/files/latest/download
Uncompress in C:\flex_bison Uncompress in C:\flex_bison
Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe
Add C:\flex_bison to PATH Add C:\flex_bison to PATH
Verify by running `flex --version` Verify by running `flex --version`
Verify by running `bison --version` Verify by running `bison --version`
1. gperf 1. gperf
Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php
Add C:\Program Files (x86)\GnuWin32\bin to PATH Add C:\Program Files (x86)\GnuWin32\bin to PATH
Verify by running `gperf --version` Verify by running `gperf --version`
1. 7-zip 1. 7-zip
Download from https://www.7-zip.org/download.html Download from https://www.7-zip.org/download.html
1. Bash shell 1. Bash shell
From *Settings* select *Update & Security* From *Settings* select *Update & Security*
Select *For Developers* Select *For Developers*
Enable *Developer mode* Enable *Developer mode*
Restart PC Restart PC
Open Control Panel and select *Programs and Features* Open Control Panel and select *Programs and Features*
Select *Turn Windows features on or off* Select *Turn Windows features on or off*
Check *Windows Subsystem for Linux* Check *Windows Subsystem for Linux*
Click *Restart now* Click *Restart now*
Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version
[First run will take a few minutes] [First run will take a few minutes]
Enter a user name - all small letters (this is used for *sudo* commands) Enter a user name - all small letters (this is used for *sudo* commands)
Choose a password Choose a password
### Linux ### Linux
Tested on Ubuntu 16.04 and 18.04. Tested on Ubuntu 16.04 and 18.04.
**16.04 NEEDED FOR JENKINS~~ ** **16.04 NEEDED FOR JENKINS~~ **
1. qt5 requirements 1. qt5 requirements
edit /etc/apt/sources.list (edit as root) edit /etc/apt/sources.list (edit as root)
replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`) replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`)
`sudo apt-get update -y` `sudo apt-get update -y`
`sudo apt-get upgrade -y` `sudo apt-get upgrade -y`
`sudo apt-get build-dep qt5-default -y` `sudo apt-get build-dep qt5-default -y`
1. git >= 1.6 1. git >= 1.6
Check if needed `git --version` Check if needed `git --version`
`sudo apt-get install git -y` `sudo apt-get install git -y`
Verify again Verify again
1. python 1. python
Check if needed `python --version` - should return python 2.7.x Check if needed `python --version` - should return python 2.7.x
`sudo apt-get install python -y` (not python 3!) `sudo apt-get install python -y` (not python 3!)
Verify again Verify again
1. gperf 1. gperf
Check if needed `gperf --version` Check if needed `gperf --version`
`sudo apt-get install gperf -y` `sudo apt-get install gperf -y`
Verify again Verify again
1. bison and flex 1. bison and flex
Check if needed `flex --version` and `bison --version` Check if needed `flex --version` and `bison --version`
`sudo apt-get install flex bison -y` `sudo apt-get install flex bison -y`
Verify again Verify again
1. pkg-config (needed for qtwebengine) 1. pkg-config (needed for qtwebengine)
Check if needed `pkg-config --version` Check if needed `pkg-config --version`
`sudo apt-get install pkg-config -y` `sudo apt-get install pkg-config -y`
Verify again Verify again
1. OpenGL 1. OpenGL
Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"` 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 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` `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 Verify again
1. make 1. make
Check if needed `make --version` Check if needed `make --version`
`sudo apt-get install make -y` `sudo apt-get install make -y`
Verify again Verify again
1. g++ 1. g++
Check if needed Check if needed
`g++ --version` `g++ --version`
`sudo apt-get install g++ -y` `sudo apt-get install g++ -y`
Verify again Verify again
1. dbus-1 (needed for qtwebengine) 1. dbus-1 (needed for qtwebengine)
`sudo apt-get install libdbus-glib-1-dev -y` `sudo apt-get install libdbus-glib-1-dev -y`
1. nss (needed for qtwebengine) 1. nss (needed for qtwebengine)
`sudo apt-get install libnss3-dev -y` `sudo apt-get install libnss3-dev -y`
### Mac ### Mac
1. git >= 1.6 1. git >= 1.6
Check if needed `git --version` Check if needed `git --version`
Install from https://git-scm.com/download/mac Install from https://git-scm.com/download/mac
Verify again Verify again
1. pkg-config 1. pkg-config
brew fontconfig dbus-glib stall pkg-config brew fontconfig dbus-glib stall pkg-config
1. dbus-1 1. dbus-1
brew install dbus-glib brew install dbus-glib
## Build Process ## Build Process
### General ### General
qt is cloned to the qt5 folder. qt is cloned to the qt5 folder.
The build is performed in the qt5-build folder. The build is performed in the qt5-build folder.
Build products are installed to the qt5-install folder. Build products are installed to the qt5-install folder.
Before running configure, make sure that the qt5-build folder is empty. 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 ### 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*. If not, follow https://github.com/highfidelity/vcpkg to install *vcpkg* and then *openssl*.
#### Preparing source files #### 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
`cd qt5` * Copy the **patches** folder to qt5
`git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch` * Copy the **qt5vars.bat** file to qt5
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch` * Apply the two patches to Qt
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
run `..\qt5\qt5vars.bat` `cd qt5`
`cd ..\..\qt5-build` `git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`..\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`
#### 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*
#### 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/
### 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`
`cd ..` `cd ..`
#### Configuring #### Configuring
`mkdir qt5-install` `mkdir qt5-install`
`mkdir qt5-build` `mkdir qt5-build`
`cd qt5-build` `cd qt5-build`
*Ubuntu 16.04* run `..\qt5\qt5vars.bat`
`../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` `cd ..\..\qt5-build`
*Ubuntu 18.04* `..\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 -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`
????*Ubuntu 18.04 only*
????`make module-qtwebengine`
????`make module-qtscript`
*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
*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 ..`
#### Configuring
`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`
#### Make #### Make
`make` `nmake`
`make install` `nmake install`
#### Fixing #### 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) 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` 1. Open a bash terminal
`find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;` 1. `cd` to the *qt5-install* folder (e.g. `cd /mnt/d/qt5-install/`)
`cd ..` 1. Run the following command
1. Copy *qt.conf* to *qt5-install\bin* `find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;`
1. Copy *qt.conf* to *qt5-install\bin*
#### Uploading #### Uploading
`tar -zcvf qt5-install.tar.gz qt5-install` Create a tar file called qt5-install.tar from the qt5-install folder (e.g. using 7-zip)
Upload qt5-install.tar.gz to https://hifi-qa.s3.amazonaws.com/qt5/Mac/ 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/
### 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`
`cd ..`
#### Configuring
`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 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`
????*Ubuntu 18.04 only*
????`make module-qtwebengine`
????`make module-qtscript`
*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
*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 ..`
#### Configuring
`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`
#### Make
`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. 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/
## Problems ## Problems
*configure* errors, if any, may be viewed in **config.log** and **config.summary** *configure* errors, if any, may be viewed in **config.log** and **config.summary**

View file

@ -1,6 +1,6 @@
@echo off @echo off
REM Set up \Microsoft Visual Studio 2015, where <arch> is \c amd64, \c x86, etc. REM Set up \Microsoft Visual Studio 2017, where <arch> is \c amd64, \c x86, etc.
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
REM Edit this location to point to the source code of Qt REM Edit this location to point to the source code of Qt