mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into moreScreenshareBugs
This commit is contained in:
commit
90605b5338
13 changed files with 163 additions and 28 deletions
15
cmake/macros/TargetAristo.cmake
Normal file
15
cmake/macros/TargetAristo.cmake
Normal file
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# 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
|
||||
#
|
||||
macro(TARGET_ARISTO)
|
||||
|
||||
if (WIN32)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${VCPKG_INSTALL_ROOT}/include")
|
||||
find_library(ARISTO_LIBRARY NAMES aristo_interface PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
target_link_libraries(${TARGET_NAME} ${ARISTO_LIBRARY})
|
||||
endif()
|
||||
|
||||
endmacro()
|
18
cmake/macros/TargetSRanipalEye.cmake
Normal file
18
cmake/macros/TargetSRanipalEye.cmake
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# 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
|
||||
#
|
||||
macro(TARGET_SRANIPAL)
|
||||
|
||||
if (WIN32)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${VCPKG_INSTALL_ROOT}/include")
|
||||
find_library(SRANIPAL_LIBRARY NAMES SRanipal PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
target_link_libraries(${TARGET_NAME} ${SRANIPAL_LIBRARY})
|
||||
|
||||
find_library(SRANIPAL_LIBRARY NAMES SRanipal PATHS ${VCPKG_INSTALL_ROOT}/lib/ NO_DEFAULT_PATH)
|
||||
target_link_libraries(${TARGET_NAME} ${SRANIPAL_LIBRARY})
|
||||
endif()
|
||||
|
||||
endmacro()
|
3
cmake/ports/aristo/CONTROL
Normal file
3
cmake/ports/aristo/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: aristo
|
||||
Version: 0.8.1
|
||||
Description: Aristo
|
20
cmake/ports/aristo/portfile.cmake
Normal file
20
cmake/ports/aristo/portfile.cmake
Normal file
|
@ -0,0 +1,20 @@
|
|||
include(vcpkg_common_functions)
|
||||
set(ARISTO_VERSION 0.8.1)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
||||
|
||||
if (WIN32)
|
||||
vcpkg_download_distfile(
|
||||
ARISTO_SOURCE_ARCHIVE
|
||||
URLS https://hifi-public.s3.amazonaws.com/seth/aristo-0.8.1-windows.zip
|
||||
SHA512 05179c63b72a1c9f5be8a7a2b7389025da683400dbf819e5a6199dd6473c56774d2885182dc5a11cb6324058d228a4ead832222e8b3e1bebaa4c61982e85f0a8
|
||||
FILENAME aristo-0.8.1-windows.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${ARISTO_SOURCE_ARCHIVE})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/debug DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/aristo/share DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
endif ()
|
|
@ -1,4 +1,4 @@
|
|||
Source: hifi-client-deps
|
||||
Version: 0.1
|
||||
Description: Collected dependencies for High Fidelity applications
|
||||
Build-Depends: hifi-deps, glslang, nlohmann-json, openvr (windows), quazip (!android), sdl2 (!android), spirv-cross (!android), spirv-tools (!android), vulkanmemoryallocator, liblo (windows)
|
||||
Build-Depends: hifi-deps, aristo (windows), glslang, liblo (windows), nlohmann-json, openvr (windows), quazip (!android), sdl2 (!android), spirv-cross (!android), spirv-tools (!android), sranipal (windows), vulkanmemoryallocator
|
||||
|
|
3
cmake/ports/sranipal/CONTROL
Normal file
3
cmake/ports/sranipal/CONTROL
Normal file
|
@ -0,0 +1,3 @@
|
|||
Source: sranipal
|
||||
Version: 1.1.0.1
|
||||
Description: SRanipal
|
20
cmake/ports/sranipal/portfile.cmake
Normal file
20
cmake/ports/sranipal/portfile.cmake
Normal file
|
@ -0,0 +1,20 @@
|
|||
include(vcpkg_common_functions)
|
||||
set(SRANIPAL_VERSION 1.1.0.1)
|
||||
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
|
||||
|
||||
if (WIN32)
|
||||
vcpkg_download_distfile(
|
||||
SRANIPAL_SOURCE_ARCHIVE
|
||||
URLS https://hifi-public.s3.amazonaws.com/seth/sranipal-1.1.0.1-windows.zip
|
||||
SHA512 b09ce012abe4e3c71e8e69626bdd7823ff6576601a821ab365275f2764406a3e5f7b65fcf2eb1d0962eff31eb5958a148b00901f67c229dc6ace56eb5e6c9e1b
|
||||
FILENAME sranipal-1.1.0.1-windows.zip
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${SRANIPAL_SOURCE_ARCHIVE})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/include DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/lib DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/debug DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/bin DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
file(COPY ${MASTER_COPY_SOURCE_PATH}/sranipal/share DESTINATION ${CURRENT_PACKAGES_DIR})
|
||||
|
||||
endif ()
|
|
@ -1,3 +1,4 @@
|
|||
Source: zlib
|
||||
Version: 1.2.11-3
|
||||
Version: 1.2.11-5
|
||||
Homepage: https://www.zlib.net/
|
||||
Description: A compression library
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/zlib-1.2.11)
|
||||
|
||||
set(VERSION 1.2.11)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URLS "http://www.zlib.net/zlib-1.2.11.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz"
|
||||
URLS "http://www.zlib.net/zlib-${VERSION}.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION}/zlib-${VERSION}.tar.gz"
|
||||
FILENAME "zlib1211.tar.gz"
|
||||
SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE_FILE}
|
||||
REF ${VERSION}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch
|
||||
"cmake_dont_build_more_than_needed.patch"
|
||||
)
|
||||
|
||||
# This is generated during the cmake build
|
||||
|
@ -44,4 +47,4 @@ vcpkg_copy_pdbs()
|
|||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
|
||||
#vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE)
|
||||
vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE)
|
||||
|
|
|
@ -82,9 +82,8 @@ endif()
|
|||
self.vcpkgUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-win32-client.zip?versionId=tSFzbw01VkkVFeRQ6YuAY4dro2HxJR9U'
|
||||
self.vcpkgHash = 'a650db47a63ccdc9904b68ddd16af74772e7e78170b513ea8de5a3b47d032751a3b73dcc7526d88bcb500753ea3dd9880639ca842bb176e2bddb1710f9a58cd3'
|
||||
self.hostTriplet = 'x64-windows'
|
||||
# Don't use prebuilt on windows, because it is out of date with the inclusion of liblo.
|
||||
# if ('CI_BUILD' in os.environ) and os.environ["CI_BUILD"] == "Github" and (not self.noClean):
|
||||
# self.prebuiltArchive = "https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-win32.zip?versionId=LtGKnBydCxteY3Ub1W_UNBN5sH.Ccp5g"
|
||||
if ('CI_BUILD' in os.environ) and os.environ["CI_BUILD"] == "Github" and (not self.noClean):
|
||||
self.prebuiltArchive = "https://hifi-public.s3.amazonaws.com/dependencies/vcpkg/builds/vcpkg-win32.zip?versionId=3SF3mDC8dkQH1JP041m88xnYmWNzZflx"
|
||||
elif 'Darwin' == system:
|
||||
self.exe = os.path.join(self.path, 'vcpkg')
|
||||
self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh'), '--allowAppleClang' ]
|
||||
|
|
13
launchers/qt/BUILD.md
Normal file
13
launchers/qt/BUILD.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Dependencies
|
||||
- [cmake](https://cmake.org/download/): 3.9
|
||||
|
||||
# Windows
|
||||
* Download `Visual Studio 2019`
|
||||
`cmake -G "Visual Studio 16 2019" ..`
|
||||
|
||||
# MacOS
|
||||
* Install `Xcode`
|
||||
`cmake -G Xcode ..`
|
||||
|
||||
|
||||
If you wish to not use the compiled qml files, pass the `-DLAUNCHER_SOURCE_TREE_RESOURCES=On` argument to cmake.
|
34
launchers/qt/readme.md
Normal file
34
launchers/qt/readme.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# HQ Launcher
|
||||
Behavior of the HQ Launcher is as follows:
|
||||
* Update the HQ Launcher to the latest version
|
||||
* Sign up or sign in if is the user is not already signed in
|
||||
* Download the latest Interface client
|
||||
* Launch the user in the current HQ domain
|
||||
|
||||
# directory structure
|
||||
|
||||
## src/ - contains the c++ and objective-c.
|
||||
* `BuildsRequest` - getting / parsing the build info from thunder api
|
||||
* `CommandlineOptions` - parses and stores commandline arguments
|
||||
* `Helper` - helper functions
|
||||
* `Helper_darwin` - objective-c implemention of helper funcions
|
||||
* `Helper_windows` - helper function that depend on windows api
|
||||
* `Launcher` - initialized the Launcher Application and resources
|
||||
* `LauncherInstaller_windows` - logic of how to install/uninstall HQ Launcher on windows
|
||||
* `LauncherState` - hold majority of the logic of the launcher (signin, config file, updating, running launcher)
|
||||
* config files hold the following saved data
|
||||
* logged in
|
||||
* home location
|
||||
* `LauncherWindows` - wrapper for `QQuickWindow` that implements drag feature
|
||||
* `LoginRequest` - checks the login credentials the user typed in.
|
||||
* `NSTask+NSTaskExecveAdditions` - Extension of NSTask for replacing Launcher process with interface client process
|
||||
* `PathUtils` - Helper class for getting relative paths for HQ Launcher
|
||||
* `SignupRequest` - Determines if the users request to signup for a new account succeeded based on the entered credentials
|
||||
* `Unzipper` - helper class for extracting zip files
|
||||
* `UserSettingsRequest` - getting the users setting (home location) from metaverse
|
||||
|
||||
## resources/
|
||||
* `images/`- Holds the images and icon that are used by the launcher
|
||||
* `qml/`
|
||||
* UI elements
|
||||
* `QML_FILE_FOR_UI_STATE` variable in `LauncherState` defines what QML files are used by the Launcher.
|
|
@ -138,23 +138,28 @@ bool KeyboardMouseDevice::isWheelByTouchPad(QWheelEvent* event) {
|
|||
QPoint delta = event->angleDelta();
|
||||
int deltaValueX = abs(delta.x());
|
||||
int deltaValueY = abs(delta.y());
|
||||
const int MAX_WHEEL_DELTA_REPEAT = 20;
|
||||
const int COMMON_WHEEL_DELTA_VALUE = 120;
|
||||
if (deltaValueX != 0) {
|
||||
if (abs(_lastWheelDelta.x()) == deltaValueX) {
|
||||
_wheelDeltaRepeatCount.setX(_wheelDeltaRepeatCount.x() + 1);
|
||||
} else {
|
||||
_wheelDeltaRepeatCount.setX(0);
|
||||
// If deltaValueX or deltaValueY are multiple of 120 they are triggered by a mouse wheel
|
||||
bool isMouseWheel = (deltaValueX + deltaValueY) % COMMON_WHEEL_DELTA_VALUE == 0;
|
||||
if (!isMouseWheel) {
|
||||
// We track repetition in wheel values to detect non-standard mouse wheels
|
||||
const int MAX_WHEEL_DELTA_REPEAT = 10;
|
||||
if (deltaValueX != 0) {
|
||||
if (abs(_lastWheelDelta.x()) == deltaValueX) {
|
||||
_wheelDeltaRepeatCount.setX(_wheelDeltaRepeatCount.x() + 1);
|
||||
} else {
|
||||
_wheelDeltaRepeatCount.setX(0);
|
||||
}
|
||||
return _wheelDeltaRepeatCount.x() < MAX_WHEEL_DELTA_REPEAT;
|
||||
}
|
||||
return deltaValueX != COMMON_WHEEL_DELTA_VALUE && _wheelDeltaRepeatCount.x() < MAX_WHEEL_DELTA_REPEAT;
|
||||
}
|
||||
if (deltaValueY != 0) {
|
||||
if (abs(_lastWheelDelta.y()) == deltaValueY) {
|
||||
_wheelDeltaRepeatCount.setY(_wheelDeltaRepeatCount.y() + 1);
|
||||
} else {
|
||||
_wheelDeltaRepeatCount.setY(0);
|
||||
if (deltaValueY != 0) {
|
||||
if (abs(_lastWheelDelta.y()) == deltaValueY) {
|
||||
_wheelDeltaRepeatCount.setY(_wheelDeltaRepeatCount.y() + 1);
|
||||
} else {
|
||||
_wheelDeltaRepeatCount.setY(0);
|
||||
}
|
||||
return _wheelDeltaRepeatCount.y() < MAX_WHEEL_DELTA_REPEAT;
|
||||
}
|
||||
return deltaValueY != COMMON_WHEEL_DELTA_VALUE && _wheelDeltaRepeatCount.y() < MAX_WHEEL_DELTA_REPEAT;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -166,8 +171,9 @@ void KeyboardMouseDevice::wheelEvent(QWheelEvent* event) {
|
|||
QPoint delta = event->angleDelta();
|
||||
float deltaX = (float)delta.x();
|
||||
float deltaY = (float)delta.y();
|
||||
_inputDevice->_axisStateMap[_inputDevice->makeInput(TOUCH_AXIS_X_POS).getChannel()].value = (deltaX > 0 ? deltaX : 0.0f);
|
||||
_inputDevice->_axisStateMap[_inputDevice->makeInput(TOUCH_AXIS_X_NEG).getChannel()].value = (deltaX < 0 ? -deltaX : 0.0f);
|
||||
const float WHEEL_X_ATTENUATION = 0.3f;
|
||||
_inputDevice->_axisStateMap[_inputDevice->makeInput(TOUCH_AXIS_X_POS).getChannel()].value = (deltaX > 0 ? WHEEL_X_ATTENUATION * deltaX : 0.0f);
|
||||
_inputDevice->_axisStateMap[_inputDevice->makeInput(TOUCH_AXIS_X_NEG).getChannel()].value = (deltaX < 0 ? -WHEEL_X_ATTENUATION * deltaX : 0.0f);
|
||||
// Y mouse is inverted positive is pointing up the screen
|
||||
const float WHEEL_Y_ATTENUATION = 0.02f;
|
||||
_inputDevice->_axisStateMap[_inputDevice->makeInput(TOUCH_AXIS_Y_POS).getChannel()].value = (deltaY < 0 ? -WHEEL_Y_ATTENUATION * deltaY : 0.0f);
|
||||
|
|
Loading…
Reference in a new issue