mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into commandLineParametersForAutotester
This commit is contained in:
commit
97152ef9c1
5 changed files with 201 additions and 9 deletions
3
cmake/externals/quazip/CMakeLists.txt
vendored
3
cmake/externals/quazip/CMakeLists.txt
vendored
|
@ -41,6 +41,9 @@ if (APPLE)
|
|||
elseif (WIN32)
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/quazip5.lib CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/quazip5d.lib CACHE FILEPATH "Location of QuaZip release library")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5d.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
else ()
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
set(${EXTERNAL_NAME_UPPER}_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libquazip5.so CACHE FILEPATH "Location of QuaZip release library")
|
||||
|
|
|
@ -124,6 +124,14 @@ Rectangle {
|
|||
root.numUpdatesAvailable = result.data.updates.length;
|
||||
}
|
||||
}
|
||||
|
||||
onAppInstalled: {
|
||||
root.installedApps = Commerce.getInstalledApps();
|
||||
}
|
||||
|
||||
onAppUninstalled: {
|
||||
root.installedApps = Commerce.getInstalledApps();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
@ -249,6 +257,145 @@ Rectangle {
|
|||
Commerce.getWalletStatus();
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: installedAppsContainer;
|
||||
z: 998;
|
||||
visible: false;
|
||||
anchors.top: titleBarContainer.bottom;
|
||||
anchors.topMargin: -titleBarContainer.additionalDropdownHeight;
|
||||
anchors.left: parent.left;
|
||||
anchors.bottom: parent.bottom;
|
||||
width: parent.width;
|
||||
|
||||
RalewayRegular {
|
||||
id: installedAppsHeader;
|
||||
anchors.top: parent.top;
|
||||
anchors.topMargin: 10;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 12;
|
||||
height: 80;
|
||||
width: paintedWidth;
|
||||
text: "All Installed Marketplace Apps";
|
||||
color: hifi.colors.black;
|
||||
size: 22;
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: installedAppsList;
|
||||
clip: true;
|
||||
model: installedAppsModel;
|
||||
snapMode: ListView.SnapToItem;
|
||||
// Anchors
|
||||
anchors.top: installedAppsHeader.bottom;
|
||||
anchors.left: parent.left;
|
||||
anchors.bottom: sideloadAppButton.top;
|
||||
width: parent.width;
|
||||
delegate: Item {
|
||||
width: parent.width;
|
||||
height: 40;
|
||||
|
||||
RalewayRegular {
|
||||
text: model.appUrl;
|
||||
// Text size
|
||||
size: 16;
|
||||
// Anchors
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 12;
|
||||
height: parent.height;
|
||||
anchors.right: sideloadAppOpenButton.left;
|
||||
anchors.rightMargin: 8;
|
||||
elide: Text.ElideRight;
|
||||
// Style
|
||||
color: hifi.colors.black;
|
||||
// Alignment
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
onClicked: {
|
||||
Window.copyToClipboard((model.appUrl).slice(0, -9));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HifiControlsUit.Button {
|
||||
id: sideloadAppOpenButton;
|
||||
text: "OPEN";
|
||||
color: hifi.buttons.blue;
|
||||
colorScheme: hifi.colorSchemes.dark;
|
||||
anchors.top: parent.top;
|
||||
anchors.topMargin: 2;
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.bottomMargin: 2;
|
||||
anchors.right: uninstallGlyph.left;
|
||||
anchors.rightMargin: 8;
|
||||
width: 80;
|
||||
onClicked: {
|
||||
Commerce.openApp(model.appUrl);
|
||||
}
|
||||
}
|
||||
|
||||
HiFiGlyphs {
|
||||
id: uninstallGlyph;
|
||||
text: hifi.glyphs.close;
|
||||
color: hifi.colors.black;
|
||||
size: 22;
|
||||
anchors.top: parent.top;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 6;
|
||||
width: 35;
|
||||
height: parent.height;
|
||||
horizontalAlignment: Text.AlignHCenter;
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: true;
|
||||
onEntered: {
|
||||
parent.text = hifi.glyphs.closeInverted;
|
||||
}
|
||||
onExited: {
|
||||
parent.text = hifi.glyphs.close;
|
||||
}
|
||||
onClicked: {
|
||||
Commerce.uninstallApp(model.appUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
HifiControlsUit.Button {
|
||||
id: sideloadAppButton;
|
||||
color: hifi.buttons.blue;
|
||||
colorScheme: hifi.colorSchemes.dark;
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.bottomMargin: 8;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 8;
|
||||
anchors.right: closeAppListButton.left;
|
||||
anchors.rightMargin: 8;
|
||||
height: 40;
|
||||
text: "SIDELOAD APP FROM LOCAL DISK";
|
||||
onClicked: {
|
||||
Window.browseChanged.connect(onFileOpenChanged);
|
||||
Window.browseAsync("Locate your app's .app.json file", "", "*.app.json");
|
||||
}
|
||||
}
|
||||
HifiControlsUit.Button {
|
||||
id: closeAppListButton;
|
||||
color: hifi.buttons.white;
|
||||
colorScheme: hifi.colorSchemes.dark;
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.bottomMargin: 8;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 8;
|
||||
width: 100;
|
||||
height: 40;
|
||||
text: "BACK";
|
||||
onClicked: {
|
||||
installedAppsContainer.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HifiWallet.NeedsLogIn {
|
||||
id: needsLogIn;
|
||||
|
@ -317,7 +464,7 @@ Rectangle {
|
|||
//
|
||||
Item {
|
||||
id: purchasesContentsContainer;
|
||||
visible: root.activeView === "purchasesMain";
|
||||
visible: root.activeView === "purchasesMain" && !installedAppsList.visible;
|
||||
// Anchors
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
|
@ -959,6 +1106,39 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Keys.onPressed: {
|
||||
if ((event.key == Qt.Key_F) && (event.modifiers & Qt.ControlModifier)) {
|
||||
installedAppsContainer.visible = !installedAppsContainer.visible;
|
||||
console.log("User changed visibility of installedAppsContainer to " + installedAppsContainer.visible);
|
||||
}
|
||||
}
|
||||
function onFileOpenChanged(filename) {
|
||||
// disconnect the event, otherwise the requests will stack up
|
||||
try { // Not all calls to onFileOpenChanged() connect an event.
|
||||
Window.browseChanged.disconnect(onFileOpenChanged);
|
||||
} catch (e) {
|
||||
console.log('Purchases.qml ignoring', e);
|
||||
}
|
||||
if (filename) {
|
||||
Commerce.installApp(filename);
|
||||
}
|
||||
}
|
||||
ListModel {
|
||||
id: installedAppsModel;
|
||||
}
|
||||
onInstalledAppsChanged: {
|
||||
installedAppsModel.clear();
|
||||
var installedAppsArray = root.installedApps.split(",");
|
||||
var installedAppsObject = [];
|
||||
// "- 1" because the last app string ends with ","
|
||||
for (var i = 0; i < installedAppsArray.length - 1; i++) {
|
||||
installedAppsObject[i] = {
|
||||
"appUrl": installedAppsArray[i]
|
||||
}
|
||||
}
|
||||
installedAppsModel.append(installedAppsObject);
|
||||
}
|
||||
|
||||
//
|
||||
// Function Name: fromScript()
|
||||
//
|
||||
|
|
|
@ -390,17 +390,18 @@ public slots:
|
|||
/**jsdoc
|
||||
* Find all entities of a particular name that intersect a sphere defined by a center point and radius.
|
||||
* @function Entities.findEntitiesByName
|
||||
* @param {Entities.EntityType} entityName - The name of the entity to search for.
|
||||
* @param {string} entityName - The name of the entity to search for.
|
||||
* @param {Vec3} center - The point about which to search.
|
||||
* @param {number} radius - The radius within which to search.
|
||||
* @param {boolean} caseSensitiveSearch - Choose whether to to return case sensitive results back.
|
||||
* @returns {Uuid[]} An array of entity IDs of the specified type that intersect the search sphere. The array is empty if
|
||||
* no entities could be found.
|
||||
* @example <caption>Get back a list of entities</caption>
|
||||
* @param {boolean} [caseSensitive=false] - If <code>true</code> then the search is case-sensitive.
|
||||
* @returns {Uuid[]} An array of entity IDs that have the specified name and intersect the search sphere. The array is empty
|
||||
* if no entities could be found.
|
||||
* @example <caption>Report the number of entities with the name, "Light-Target".</caption>
|
||||
* var entityIDs = Entities.findEntitiesByName("Light-Target", MyAvatar.position, 10, false);
|
||||
* print("Number of Entities with the name Light-Target " + entityIDs.length);
|
||||
* print("Number of entities with the name "Light-Target": " + entityIDs.length);
|
||||
*/
|
||||
Q_INVOKABLE QVector<QUuid> findEntitiesByName(const QString entityName, const glm::vec3& center, float radius, bool caseSensitiveSearch = false ) const;
|
||||
Q_INVOKABLE QVector<QUuid> findEntitiesByName(const QString entityName, const glm::vec3& center, float radius,
|
||||
bool caseSensitiveSearch = false ) const;
|
||||
|
||||
/**jsdoc
|
||||
* Find the first entity intersected by a {@link PickRay}. <code>Light</code> and <code>Zone</code> entities are not
|
||||
|
|
|
@ -23,5 +23,9 @@ if (WIN32)
|
|||
add_dependency_external_projects(wasapi)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(${TARGET_NAME} atomic)
|
||||
endif()
|
||||
|
||||
package_libraries_for_deployment()
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -27,6 +27,10 @@ if (WIN32)
|
|||
add_dependency_external_projects(wasapi)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_link_libraries(${TARGET_NAME} atomic)
|
||||
endif()
|
||||
|
||||
package_libraries_for_deployment()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue