Merge branch 'master' of https://github.com/highfidelity/hifi into domain-tunnel

This commit is contained in:
Stephen Birarda 2014-10-02 10:47:54 -07:00
commit 9baf983d07
3 changed files with 36 additions and 15 deletions

View file

@ -1298,16 +1298,21 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
// create a file with the GUID of the assignment in the script host location
QFile scriptFile(newPath);
scriptFile.open(QIODevice::WriteOnly);
scriptFile.write(formData[0].second);
qDebug() << qPrintable(QString("Saved a script for assignment at %1%2")
.arg(newPath).arg(assignmentPool == emptyPool ? "" : " - pool is " + assignmentPool));
// add the script assigment to the assignment queue
SharedAssignmentPointer sharedScriptedAssignment(scriptAssignment);
_unfulfilledAssignments.enqueue(sharedScriptedAssignment);
_allAssignments.insert(sharedScriptedAssignment->getUUID(), sharedScriptedAssignment);
if (scriptFile.open(QIODevice::WriteOnly)) {
scriptFile.write(formData[0].second);
qDebug() << qPrintable(QString("Saved a script for assignment at %1%2")
.arg(newPath).arg(assignmentPool == emptyPool ? "" : " - pool is " + assignmentPool));
// add the script assigment to the assignment queue
SharedAssignmentPointer sharedScriptedAssignment(scriptAssignment);
_unfulfilledAssignments.enqueue(sharedScriptedAssignment);
_allAssignments.insert(sharedScriptedAssignment->getUUID(), sharedScriptedAssignment);
} else {
// unable to save script for assignment - we shouldn't be here but debug it out
qDebug() << "Unable to save a script for assignment at" << newPath;
qDebug() << "Script will not be added to queue";
}
}
// respond with a 200 code for successful upload

View file

@ -139,6 +139,8 @@ foreach(EXTERNAL ${OPTIONAL_EXTERNALS})
if (NOT APPLE OR NOT ${${EXTERNAL}_UPPERCASE} MATCHES "SIXENSE")
target_link_libraries(${TARGET_NAME} ${${${EXTERNAL}_UPPERCASE}_LIBRARIES})
elseif (APPLE)
add_definitions(-DSIXENSE_LIB_FILENAME=\"${${${EXTERNAL}_UPPERCASE}_LIBRARY_RELEASE}\")
endif ()
endif ()
endforeach()

View file

@ -96,15 +96,29 @@ void SixenseManager::initialize() {
#ifdef __APPLE__
if (!_sixenseLibrary) {
const QString SIXENSE_LIBRARY_NAME = "libsixense_x64.dylib";
_sixenseLibrary = new QLibrary(SIXENSE_LIBRARY_NAME);
#ifdef SIXENSE_LIB_FILENAME
_sixenseLibrary = new QLibrary(SIXENSE_LIB_FILENAME);
#else
const QString SIXENSE_LIBRARY_NAME = "libsixense_x64";
QFileInfo frameworkSixenseLibrary = QCoreApplication::applicationDirPath() + "../Frameworks/"
+ SIXENSE_LIBRARY_NAME;
_sixenseLibrary = new QLibrary(frameworkSixenseLibrary.fileName());
#endif
}
if (_sixenseLibrary->load()){
qDebug() << "Loaded sixense library for hydra support -" << _sixenseLibrary->fileName();
} else {
qDebug() << "Sixense library at" << _sixenseLibrary->fileName() << "failed to load."
<< "Continuing without hydra support.";
return;
}
qDebug() << "Initializing sixense library for hydra support - libsixense_x64.dylib load state is"
<< _sixenseLibrary->isLoaded();
SixenseBaseFunction sixenseInit = (SixenseBaseFunction) _sixenseLibrary->resolve("sixenseInit");
#endif
sixenseInit();
_isInitialized = true;