Resolving more master differences

This commit is contained in:
Brad Davis 2019-02-14 12:55:28 -08:00
parent 0f4d1f073b
commit 292602afd7
9 changed files with 151 additions and 83 deletions

View file

@ -1,15 +1,29 @@
import de.undercouch.gradle.tasks.download.Download
import de.undercouch.gradle.tasks.download.Verify
import groovy.io.FileType
import groovy.json.JsonSlurper
import groovy.xml.XmlUtil
import org.apache.tools.ant.taskdefs.condition.Os
import java.util.regex.Matcher
import java.util.regex.Pattern
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
plugins {
id 'de.undercouch.download' version '3.3.0'
id "cz.malohlava" version "1.0.3"
id "io.github.http-builder-ng.http-plugin" version "0.1.1"
}
allprojects {
repositories {
google()
@ -18,6 +32,10 @@ allprojects {
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
RELEASE_NUMBER = project.hasProperty('RELEASE_NUMBER') ? project.getProperty('RELEASE_NUMBER') : '0'
VERSION_CODE = project.hasProperty('VERSION_CODE') ? project.getProperty('VERSION_CODE') : '0'
@ -126,6 +144,108 @@ task setupDependencies() {
task cleanDependencies(type: Delete) {
}
def runBreakpadDumpSyms = { buildType ->
gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS
def objDir = new File("${appDir}/build/intermediates/cmake/${buildType}/obj/arm64-v8a")
def stripDebugSymbol = "${appDir}/build/intermediates/transforms/stripDebugSymbol/${buildType}/0/lib/arm64-v8a/"
def outputDir = new File(breakpadDumpSymsDir, buildType)
if (!outputDir.exists()) {
outputDir.mkdirs()
}
objDir.eachFileRecurse (FileType.FILES) { file ->
if (file.name.endsWith('.so')) {
def output = file.name + ".sym"
def cmdArgs = [
file.toString(),
stripDebugSymbol
]
def result = exec {
workingDir HIFI_ANDROID_PRECOMPILED + '/breakpad/bin'
commandLine './dump_syms'
args cmdArgs
ignoreExitValue true
standardOutput = new BufferedOutputStream(new FileOutputStream(new File(outputDir, output)))
}
}
}
}
task runBreakpadDumpSymsDebug() {
doLast {
runBreakpadDumpSyms("debug");
}
}
task runBreakpadDumpSymsRelease() {
doLast {
runBreakpadDumpSyms("release");
}
}
task zipDumpSymsDebug(type: Zip, dependsOn: runBreakpadDumpSymsDebug) {
from (new File(breakpadDumpSymsDir, "debug").absolutePath)
archiveName "symbols-${RELEASE_NUMBER}-debug.zip"
destinationDir(new File("${appDir}/build/tmp/"))
}
task zipDumpSymsRelease(type: Zip, dependsOn: runBreakpadDumpSymsRelease) {
from (new File(breakpadDumpSymsDir, "release").absolutePath)
archiveName "symbols-${RELEASE_NUMBER}-release.zip"
destinationDir(new File("${appDir}/build/tmp/"))
}
task uploadBreakpadDumpSymsDebug(type:io.github.httpbuilderng.http.HttpTask, dependsOn: zipDumpSymsDebug) {
onlyIf {
System.getenv("CMAKE_BACKTRACE_URL") && System.getenv("CMAKE_BACKTRACE_SYMBOLS_TOKEN")
}
config {
request.uri = System.getenv("CMAKE_BACKTRACE_URL")
}
post {
request.uri.path = '/post'
request.uri.query = [format: 'symbols', token: System.getenv("CMAKE_BACKTRACE_SYMBOLS_TOKEN")]
request.body = new File("${appDir}/build/tmp/", "symbols-${RELEASE_NUMBER}-debug.zip").bytes
request.contentType = 'application/octet-stream'
response.success {
println ("${appDir}/build/tmp/symbols-${RELEASE_NUMBER}-debug.zip uploaded")
}
}
}
task uploadBreakpadDumpSymsRelease(type:io.github.httpbuilderng.http.HttpTask, dependsOn: zipDumpSymsRelease) {
onlyIf {
System.getenv("CMAKE_BACKTRACE_URL") && System.getenv("CMAKE_BACKTRACE_SYMBOLS_TOKEN")
}
config {
request.uri = System.getenv("CMAKE_BACKTRACE_URL")
}
post {
request.uri.path = '/post'
request.uri.query = [format: 'symbols', token: System.getenv("CMAKE_BACKTRACE_SYMBOLS_TOKEN")]
request.body = new File("${appDir}/build/tmp/", "symbols-${RELEASE_NUMBER}-release.zip").bytes
request.contentType = 'application/octet-stream'
response.success {
println ("${appDir}/build/tmp/symbols-${RELEASE_NUMBER}-release.zip uploaded")
}
}
}
task renameHifiACTaskDebug() {
doLast {
def sourceFile = new File("${appDir}/build/intermediates/cmake/debug/obj/arm64-v8a/","libhifiCodec.so")
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
}
}
task renameHifiACTaskRelease(type: Copy) {
doLast {
def sourceFile = new File("${appDir}/build/intermediates/cmake/release/obj/arm64-v8a/","libhifiCodec.so")
def destinationFile = new File("${appDir}/src/main/jniLibs/arm64-v8a", "libplugins_libhifiCodec.so")
copy { from sourceFile; into destinationFile.parent; rename(sourceFile.name, destinationFile.name) }
}
}
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
// See the comment on the qtBundle task above

View file

@ -12,8 +12,8 @@ project(':qt').projectDir = new File(settingsDir, 'libraries/qt')
// Applications
//
//include ':interface'
//project(':interface').projectDir = new File(settingsDir, 'apps/interface')
include ':interface'
project(':interface').projectDir = new File(settingsDir, 'apps/interface')
include ':questInterface'
project(':questInterface').projectDir = new File(settingsDir, 'apps/questInterface')
@ -22,8 +22,8 @@ project(':questInterface').projectDir = new File(settingsDir, 'apps/questInterfa
// Test projects
//
//include ':framePlayer'
//project(':framePlayer').projectDir = new File(settingsDir, 'apps/framePlayer')
include ':framePlayer'
project(':framePlayer').projectDir = new File(settingsDir, 'apps/framePlayer')
//include ':questFramePlayer'
//project(':questFramePlayer').projectDir = new File(settingsDir, 'apps/questFramePlayer')
include ':questFramePlayer'
project(':questFramePlayer').projectDir = new File(settingsDir, 'apps/questFramePlayer')

View file

@ -1,7 +1,7 @@
//
// Web3DOverlay.qml
//
// Created by Gabriel Calero & Cristian Duarte on Jun 22, 2018
// Created by David Rowe on 16 Dec 2016.
// Copyright 2016 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
@ -9,68 +9,23 @@
//
import QtQuick 2.5
import QtGraphicalEffects 1.0
Item {
import "controls" as Controls
property string url
RadialGradient {
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0.0; color: "#262626" }
GradientStop { position: 1.0; color: "#000000" }
Controls.WebView {
// This is for JS/QML communication, which is unused in a Web3DOverlay,
// but not having this here results in spurious warnings about a
// missing signal
signal sendToScript(var message);
function onWebEventReceived(event) {
if (event.slice(0, 17) === "CLARA.IO DOWNLOAD") {
ApplicationInterface.addAssetToWorldFromURL(event.slice(18));
}
}
function shortUrl(url) {
var hostBegin = url.indexOf("://");
if (hostBegin > -1) {
url = url.substring(hostBegin + 3);
}
var portBegin = url.indexOf(":");
if (portBegin > -1) {
url = url.substring(0, portBegin);
}
var pathBegin = url.indexOf("/");
if (pathBegin > -1) {
url = url.substring(0, pathBegin);
}
if (url.length > 45) {
url = url.substring(0, 45);
}
return url;
Component.onCompleted: {
eventBridge.webEventReceived.connect(onWebEventReceived);
}
Text {
id: urlText
text: shortUrl(url)
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
anchors.fill: parent
anchors.rightMargin: 10
anchors.leftMargin: 10
font.family: "Cairo"
font.weight: Font.DemiBold
font.pointSize: 48
fontSizeMode: Text.Fit
color: "#FFFFFF"
minimumPixelSize: 5
}
Image {
id: hand
source: "../../icons/hand.svg"
width: 300
height: 300
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.bottomMargin: 100
anchors.rightMargin: 100
}
}
}

View file

@ -3,6 +3,7 @@ import QtGraphicalEffects 1.0
import QtQuick.Controls 1.4
import QtQml 2.2
import "."
import stylesUit 1.0
import "../../controls"

View file

@ -734,7 +734,6 @@ void Keyboard::setLayerIndex(int layerIndex) {
}
void Keyboard::loadKeyboardFile(const QString& keyboardFile) {
return;
if (keyboardFile.isEmpty()) {
return;
}
@ -782,7 +781,7 @@ void Keyboard::loadKeyboardFile(const QString& keyboardFile) {
{ "isSolid", true },
{ "visible", false },
{ "grabbable", true },
{ "ignoreRayIntersection", false },
{ "ignorePickIntersection", false },
{ "dimensions", anchorObject["dimensions"].toVariant() },
{ "position", anchorObject["position"].toVariant() },
{ "orientation", anchorObject["rotation"].toVariant() }

View file

@ -865,6 +865,10 @@ const AnimPoseVec& AnimInverseKinematics::evaluate(const AnimVariantMap& animVar
//virtual
const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimVariantMap& triggersOut, const AnimPoseVec& underPoses) {
#ifdef Q_OS_ANDROID
// disable IK on android
return underPoses;
#endif
// allows solutionSource to be overridden by an animVar
auto solutionSource = animVars.lookup(_solutionSourceVar, (int)_solutionSource);

View file

@ -30,7 +30,6 @@ QList<QString> ConsoleScriptingInterface::_groupDetails = QList<QString>();
QScriptValue ConsoleScriptingInterface::info(QScriptContext* context, QScriptEngine* engine) {
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptInfoMessage(appendArguments(context));
qDebug()<<"SCRIPTING INFO: %s"<<appendArguments(context);
}
return QScriptValue::NullValue;
}
@ -40,7 +39,6 @@ QScriptValue ConsoleScriptingInterface::log(QScriptContext* context, QScriptEngi
if (_groupDetails.count() == 0) {
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptPrintedMessage(message);
qDebug()<<"SCRIPTING LOG: %s"<<message;
}
} else {
logGroupMessage(message, engine);
@ -51,8 +49,6 @@ QScriptValue ConsoleScriptingInterface::log(QScriptContext* context, QScriptEngi
QScriptValue ConsoleScriptingInterface::debug(QScriptContext* context, QScriptEngine* engine) {
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptPrintedMessage(appendArguments(context));
qDebug()<<"SCRIPTING DEBUG: %s"<<appendArguments(context);
}
return QScriptValue::NullValue;
}
@ -60,8 +56,6 @@ QScriptValue ConsoleScriptingInterface::debug(QScriptContext* context, QScriptEn
QScriptValue ConsoleScriptingInterface::warn(QScriptContext* context, QScriptEngine* engine) {
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptWarningMessage(appendArguments(context));
qDebug()<<"SCRIPTING WARN: %s"<<appendArguments(context);
}
return QScriptValue::NullValue;
}
@ -69,8 +63,6 @@ QScriptValue ConsoleScriptingInterface::warn(QScriptContext* context, QScriptEng
QScriptValue ConsoleScriptingInterface::error(QScriptContext* context, QScriptEngine* engine) {
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptErrorMessage(appendArguments(context));
qDebug()<<"SCRIPTING ERROR: %s"<<appendArguments(context);
}
return QScriptValue::NullValue;
}
@ -78,8 +70,6 @@ QScriptValue ConsoleScriptingInterface::error(QScriptContext* context, QScriptEn
QScriptValue ConsoleScriptingInterface::exception(QScriptContext* context, QScriptEngine* engine) {
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptErrorMessage(appendArguments(context));
qDebug()<<"SCRIPTING EXCEPTION: %s"<<appendArguments(context);
}
return QScriptValue::NullValue;
}
@ -135,8 +125,6 @@ QScriptValue ConsoleScriptingInterface::assertion(QScriptContext* context, QScri
}
if (ScriptEngine* scriptEngine = qobject_cast<ScriptEngine*>(engine)) {
scriptEngine->scriptErrorMessage(assertionResult);
qDebug()<<"SCRIPTING ASSERT: %s"<<assertionResult;
}
}
return QScriptValue::NullValue;

View file

@ -35,7 +35,7 @@ namespace shader {
static const Dialect DEFAULT_DIALECT = Dialect::glsl310es;
const std::vector<Dialect>& allDialects() {
static const std::vector<Dialect> ALL_DIALECTS{ Dialect::glsl310es };
static const std::vector<Dialect> ALL_DIALECTS{ { Dialect::glsl310es } };
return ALL_DIALECTS;
}

View file

@ -53,8 +53,9 @@ QScriptValue QmlFragmentClass::internal_constructor(QScriptContext* context, QSc
QScriptValue scriptObject = engine->newQObject(retVal);
_fragments[qml.toString()] = scriptObject;
return scriptObject;
#endif
#else
return QScriptValue();
#endif
}
void QmlFragmentClass::close() {