Merge branch 'master' into proceduralMesh

This commit is contained in:
Sam Gondelman 2019-05-21 09:51:33 -07:00 committed by GitHub
commit a7842fe3ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 1009 additions and 365 deletions

View file

@ -6,26 +6,25 @@
* [BUILD_ANDROID.md](BUILD_ANDROID.md) - additional instructions for Android
### Dependencies
- [git](https://git-scm.com/downloads): >= 1.6
- [cmake](https://cmake.org/download/): 3.9
- [Qt](https://www.qt.io/download-open-source): 5.10.1
- [Python](https://www.python.org/downloads/): 3.6 or higher
### CMake External Project Dependencies
These dependencies need not be installed manually. They are automatically downloaded on the platforms where they are required.
- [Bullet Physics Engine](https://github.com/bulletphysics/bullet3/releases): 2.83
- [glm](https://glm.g-truc.net/0.9.8/index.html): 0.9.8
- [Oculus SDK](https://developer.oculus.com/downloads/): 1.11 (Win32) / 0.5 (Mac)
- [OpenVR](https://github.com/ValveSoftware/openvr): 1.0.6 (Win32 only)
- [Polyvox](http://www.volumesoffun.com/): 0.2.1
- [QuaZip](https://sourceforge.net/projects/quazip/files/quazip/): 0.7.3
- [SDL2](https://www.libsdl.org/download-2.0.php): 2.0.3
- [Intel Threading Building Blocks](https://www.threadingbuildingblocks.org/): 4.3
- [vcpkg](https://github.com/highfidelity/vcpkg):
- [VHACD](https://github.com/virneo/v-hacd)
- [zlib](http://www.zlib.net/): 1.28 (Win32 only)
- [nvtt](https://github.com/highfidelity/nvidia-texture-tools): 2.1.1 (customized)
- [Bullet Physics Engine](https://github.com/bulletphysics/bullet3/releases): 2.83
- [glm](https://glm.g-truc.net/0.9.8/index.html): 0.9.8
- [Oculus SDK](https://developer.oculus.com/downloads/): 1.11 (Win32) / 0.5 (Mac)
- [OpenVR](https://github.com/ValveSoftware/openvr): 1.0.6 (Win32 only)
- [Polyvox](http://www.volumesoffun.com/): 0.2.1
- [QuaZip](https://sourceforge.net/projects/quazip/files/quazip/): 0.7.3
- [SDL2](https://www.libsdl.org/download-2.0.php): 2.0.3
- [Intel Threading Building Blocks](https://www.threadingbuildingblocks.org/): 4.3
- [vcpkg](https://github.com/highfidelity/vcpkg):
- [VHACD](https://github.com/virneo/v-hacd)
- [zlib](http://www.zlib.net/): 1.28 (Win32 only)
- [nvtt](https://github.com/highfidelity/nvidia-texture-tools): 2.1.1 (customized)
The above dependencies will be downloaded, built, linked and included automatically by CMake where we require them. The CMakeLists files that handle grabbing each of the following external dependencies can be found in the [cmake/externals folder](cmake/externals). The resulting downloads, source files and binaries will be placed in the `build/ext` folder in each of the subfolders for each external project.
@ -36,16 +35,14 @@ These are not placed in your normal build tree when doing an out of source build
Hifi uses CMake to generate build files and project files for your platform.
#### Qt
CMake will download Qt 5.12.3 using vcpkg.
In order for CMake to find the Qt5 find modules, you will need to set a QT_CMAKE_PREFIX_PATH environment variable pointing to your Qt installation.
To override this (i.e. use an installed Qt configuration - you will need to set a QT_CMAKE_PREFIX_PATH environment variable pointing to your Qt **lib/cmake** folder.
This can either be entered directly into your shell session before you build or in your shell profile (e.g.: ~/.bash_profile, ~/.bashrc, ~/.zshrc - this depends on your shell and environment). The path it needs to be set to will depend on where and how Qt5 was installed. e.g.
This can either be entered directly into your shell session before you build or in your shell profile (e.g.: ~/.bash_profile, ~/.bashrc, ~/.zshrc - this depends on your shell and environment).
The path it needs to be set to will depend on where and how Qt5 was installed. e.g.
export QT_CMAKE_PREFIX_PATH=/usr/local/Qt5.10.1/5.10.1/gcc_64/lib/cmake
export QT_CMAKE_PREFIX_PATH=/usr/local/qt/5.10.1/clang_64/lib/cmake/
export QT_CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.10.1/lib/cmake
export QT_CMAKE_PREFIX_PATH=/usr/local/Qt5.12.3/gcc_64/lib/cmake
export QT_CMAKE_PREFIX_PATH=/usr/local/qt/5.12.3/clang_64/lib/cmake/
export QT_CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.12.3/lib/cmake
export QT_CMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake
#### Vcpkg
@ -68,15 +65,15 @@ Create a build directory in the root of your checkout and then run the CMake bui
cd build
cmake ..
If cmake gives you the same error message repeatedly after the build fails (e.g. you had a typo in the QT_CMAKE_PREFIX_PATH that you fixed but the `.cmake` files still cannot be found), try removing `CMakeCache.txt`.
If cmake gives you the same error message repeatedly after the build fails, try removing `CMakeCache.txt`.
#### Variables
Any variables that need to be set for CMake to find dependencies can be set as ENV variables in your shell profile, or passed directly to CMake with a `-D` flag appended to the `cmake ..` command.
For example, to pass the QT_CMAKE_PREFIX_PATH variable during build file generation:
For example, to pass the QT_CMAKE_PREFIX_PATH variable (if not using the vcpkg'ed version) during build file generation:
cmake .. -DQT_CMAKE_PREFIX_PATH=/usr/local/qt/5.10.1/lib/cmake
cmake .. -DQT_CMAKE_PREFIX_PATH=/usr/local/qt/5.12.3/lib/cmake
#### Finding Dependencies

View file

@ -2,56 +2,72 @@
Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only Linux specific instructions are found in this file.
## Qt5 Dependencies
Should you choose not to install Qt5 via a package manager that handles dependencies for you, you may be missing some Qt5 dependencies. On Ubuntu, for example, the following additional packages are required:
libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev
## Ubuntu 16.04/18.04 specific build guide
### Ubuntu 18.04 only
### Ubuntu 16.04 only
Add the following line to *.bash_profile*
`export QT_QPA_FONTDIR=/usr/share/fonts/truetype/dejavu/`
### Ubuntu 18.04 server only
Add the universe repository:
_(This is not enabled by default on the server edition)_
```bash
sudo add-apt-repository universe
sudo apt-get update
```
### Prepare environment
Install Qt 5.10.1:
#### Install build tools:
1. First update the repositiories:
```bash
wget http://debian.highfidelity.com/pool/h/hi/hifiqt5.10.1_5.10.1_amd64.deb
sudo dpkg -i hifiqt5.10.1_5.10.1_amd64.deb
sudo apt-get update -y
sudo apt-get upgrade -y
```
Install build dependencies:
1. git
```bash
sudo apt-get install libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev
sudo apt-get install git -y
```
To compile interface in a server you must install:
Verify by git --version
1. g++
```bash
sudo apt-get install g++ -y
```
Verify by g++ --version
1. *Ubuntu 18.04* cmake
```bash
sudo apt-get install cmake -y
```
Verify by git --version
1. *Ubuntu 16.04* cmake
```bash
wget https://cmake.org/files/v3.14/cmake-3.14.2-Linux-x86_64.sh
sudo sh cmake-3.14.2-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
```
#### Install build dependencies:
1. OpenSSL
```bash
sudo apt-get install libssl-dev
```
Verify with `openssl version`
1. OpenGL
Verify (first install mesa-utils - `sudo apt install mesa-utils -y`) by `glxinfo | grep "OpenGL version"`
```bash
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
```
#### To compile interface in a server you must install:
```bash
sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1
```
Install build tools:
1. Misc dependencies
```bash
# For Ubuntu 18.04
sudo apt-get install cmake
sudo apt-get install libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack0 libjack-dev libxrandr-dev libudev-dev libssl-dev zlib1g-dev
```
1. To compile interface in a server you must install:
```bash
# For Ubuntu 16.04
wget https://cmake.org/files/v3.9/cmake-3.9.5-Linux-x86_64.sh
sudo sh cmake-3.9.5-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
sudo apt-get -y install libpulse0 libnss3 libnspr4 libfontconfig1 libxcursor1 libxcomposite1 libxtst6 libxslt1.1
```
Install Python 3:
1. Install Python 3:
```bash
sudo apt-get install python3.6
```
Install node, required to build the jsdoc documentation
1. Install node, required to build the jsdoc documentation
```bash
sudo apt-get install nodejs
```
@ -84,9 +100,11 @@ cd hifi/build
Prepare makefiles:
```bash
cmake -DQT_CMAKE_PREFIX_PATH=/usr/local/Qt5.10.1/5.10.1/gcc_64/lib/cmake ..
cmake ..
```
* If cmake fails with a vcpkg error - delete /tmp/hifi/vcpkg.
Start compilation of the server and get a cup of coffee:
```bash
make domain-server assignment-client
@ -128,46 +146,34 @@ Go to localhost in the running interface.
In Ubuntu 18.04 there is a problem related with NVidia driver library version.
It can be workarounded following these steps:
It can be worked around following these steps:
Uninstall incompatible nvtt libraries:
```bash
sudo apt-get remove libnvtt2 libnvtt-dev
```
1. Uninstall incompatible nvtt libraries:
`sudo apt-get remove libnvtt2 libnvtt-dev`
Install libssl1.0-dev:
```bash
sudo apt-get -y install libssl1.0-dev
```
1. Install libssl1.0-dev:
`sudo apt-get -y install libssl1.0-dev`
Clone castano nvidia-texture-tools:
```
git clone https://github.com/castano/nvidia-texture-tools
cd nvidia-texture-tools/
```
1. Clone castano nvidia-texture-tools:
`git clone https://github.com/castano/nvidia-texture-tools`
`cd nvidia-texture-tools/`
Make these changes in repo:
* In file **VERSION** set `2.2.1`
* In file **configure**:
* set `build="release"`
* set `-DNVTT_SHARED=1`
1. Make these changes in repo:
* In file **VERSION** set `2.2.1`
* In file **configure**:
* set `build="release"`
* set `-DNVTT_SHARED=1`
Configure, build and install:
```
./configure
make
sudo make install
```
1. Configure, build and install:
`./configure`
`make`
`sudo make install`
Link compiled files:
```
sudo ln -s /usr/local/lib/libnvcore.so /usr/lib/libnvcore.so
sudo ln -s /usr/local/lib/libnvimage.so /usr/lib/libnvimage.so
sudo ln -s /usr/local/lib/libnvmath.so /usr/lib/libnvmath.so
sudo ln -s /usr/local/lib/libnvtt.so /usr/lib/libnvtt.so
```
1.. Link compiled files:
`sudo ln -s /usr/local/lib/libnvcore.so /usr/lib/libnvcore.so`
`sudo ln -s /usr/local/lib/libnvimage.so /usr/lib/libnvimage.so`
`sudo ln -s /usr/local/lib/libnvmath.so /usr/lib/libnvmath.so`
`sudo ln -s /usr/local/lib/libnvtt.so /usr/lib/libnvtt.so`
After running this steps you can run interface:
```
interface/interface
```
1. After running this steps you can run interface:
`interface/interface`

View file

@ -4,30 +4,21 @@ Please read the [general build guide](BUILD.md) for information on dependencies
[Homebrew](https://brew.sh/) is an excellent package manager for macOS. It makes install of some High Fidelity dependencies very simple.
brew install cmake openssl qt
brew install cmake openssl
### Python 3
Download an install Python 3.6.6 or higher from [here](https://www.python.org/downloads/). Execute the `Update Shell Profile.command` script that is provided with the installer.
Download an install Python 3.6.6 or higher from [here](https://www.python.org/downloads/).
Execute the `Update Shell Profile.command` script that is provided with the installer.
### OpenSSL
Assuming you've installed OpenSSL using the homebrew instructions above, you'll need to set OPENSSL_ROOT_DIR so CMake can find your installations.
Assuming you've installed OpenSSL using the homebrew instructions above, you'll need to set OPENSSL_ROOT_DIR so CMake can find your installations.
For OpenSSL installed via homebrew, set OPENSSL_ROOT_DIR:
export OPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2l
Note that this uses the version from the homebrew formula at the time of this writing, and the version in the path will likely change.
### Qt
Assuming you've installed Qt using the homebrew instructions above, you'll need to set QT_CMAKE_PREFIX_PATH so CMake can find your installations.
For Qt installed via homebrew, set QT_CMAKE_PREFIX_PATH:
export QT_CMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.10.1/lib/cmake
Note that this uses the version from the homebrew formula at the time of this writing, and the version in the path will likely change.
### Xcode
If Xcode is your editor of choice, you can ask CMake to generate Xcode project files instead of Unix Makefiles.

View file

@ -1,7 +1,7 @@
This is a stand-alone guide for creating your first High Fidelity build for Windows 64-bit.
This is a stand-alone guide for creating your first High Fidelity build for Windows 64-bit.
## Building High Fidelity
Note: We are now using Visual Studio 2017 and Qt 5.10.1. If you are upgrading from Visual Studio 2013 and Qt 5.6.2, do a clean uninstall of those versions before going through this guide.
Note: We are now using Visual Studio 2017 and Qt 5.12.3.
If you are upgrading from previous versions, do a clean uninstall of those versions before going through this guide.
Note: The prerequisites will require about 10 GB of space on your drive. You will also need a system with at least 8GB of main memory.
@ -9,7 +9,8 @@ Note: The prerequisites will require about 10 GB of space on your drive. You wil
If you dont have Community or Professional edition of Visual Studio 2017, download [Visual Studio Community 2017](https://www.visualstudio.com/downloads/).
When selecting components, check "Desktop development with C++". Also on the right on the Summary toolbar, check "Windows 8.1 SDK and UCRT SDK" and "VC++ 2015.3 v140 toolset (x86,x64)". If you do not already have a python development environment installed, also check "Python Development" in this screen.
Leave default components.
If you do not already have a python development environment installed, also check "Python Development" in this screen.
If you already have Visual Studio installed and need to add python, open the "Add or remove programs" control panel and find the "Microsoft Visual Studio Installer". Select it and click "Modify". In the installer, select "Modify" again, then check "Python Development" and allow the installer to apply the changes.
@ -22,28 +23,13 @@ If you do not wish to use the Python installation bundled with Visual Studio, yo
Download and install the latest version of CMake 3.9.
Download the file named win64-x64 Installer from the [CMake Website](https://cmake.org/download/). You can access the installer on this [3.9 Version page](https://cmake.org/files/v3.9/). During installation, make sure to check "Add CMake to system PATH for all users" when prompted.
### Step 3. Installing Qt
Download and install the [Qt Open Source Online Installer](https://www.qt.io/download-open-source/?hsCtaTracking=f977210e-de67-475f-a32b-65cec207fd03%7Cd62710cd-e1db-46aa-8d4d-2f1c1ffdacea). While installing, you only need to have the following components checked under Qt 5.10.1: "msvc2017 64-bit", "Qt WebEngine", and "Qt Script (Deprecated)".
Note: Installing the Sources is optional but recommended if you have room for them (~2GB).
### Step 4. Setting Qt Environment Variable
Go to `Control Panel > System > Advanced System Settings > Environment Variables > New...` (or search “Environment Variables” in Start Search).
* Set "Variable name": `QT_CMAKE_PREFIX_PATH`
* Set "Variable value": `C:\Qt\5.10.1\msvc2017_64\lib\cmake`
### Step 5. Running CMake to Generate Build Files
Run Command Prompt from Start and run the following commands:
```
cd "%HIFI_DIR%"
mkdir build
cd build
cmake .. -G "Visual Studio 15 Win64"
```
Run Command Prompt from Start and run the following commands:
`cd "%HIFI_DIR%"`
`mkdir build`
`cd build`
`cmake .. -G "Visual Studio 15 Win64"`
Where `%HIFI_DIR%` is the directory for the highfidelity repository.
@ -73,11 +59,11 @@ Note: You can also run Interface by launching it from command line or File Explo
## Troubleshooting
For any problems after Step #7, first try this:
* Delete your locally cloned copy of the highfidelity repository
* Restart your computer
* Redownload the [repository](https://github.com/highfidelity/hifi)
* Restart directions from Step #7
For any problems after Step #7, first try this:
* Delete your locally cloned copy of the highfidelity repository
* Restart your computer
* Redownload the [repository](https://github.com/highfidelity/hifi)
* Restart directions from Step #7
#### CMake gives you the same error message repeatedly after the build fails
@ -85,8 +71,4 @@ Remove `CMakeCache.txt` found in the `%HIFI_DIR%\build` directory.
#### CMake can't find OpenSSL
Remove `CMakeCache.txt` found in the `%HIFI_DIR%\build` directory. Verify that your VCPKG_ROOT environment variable is set and pointing to the correct location. Verify that the file `${VCPKG_ROOT}/installed/x64-windows/include/openssl/ssl.h` exists.
#### Qt is throwing an error
Make sure you have the correct version (5.10.1) installed and `QT_CMAKE_PREFIX_PATH` environment variable is set correctly.
Remove `CMakeCache.txt` found in the `%HIFI_DIR%\build` directory. Verify that your HIFI_VCPKG_BASE environment variable is set and pointing to the correct location. Verify that the file `${HIFI_VCPKG_BASE}/installed/x64-windows/include/openssl/ssl.h` exists.

View file

@ -17,14 +17,19 @@ if (APPLE)
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.9)
endif()
set(RELEASE_TYPE "$ENV{RELEASE_TYPE}")
if ((NOT "${RELEASE_TYPE}" STREQUAL "PRODUCTION") AND (NOT "${RELEASE_TYPE}" STREQUAL "PR"))
set(RELEASE_TYPE "DEV")
endif()
if (HIFI_ANDROID)
execute_process(
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --android ${HIFI_ANDROID_APP} --build-root ${CMAKE_BINARY_DIR}
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --release-type ${RELEASE_TYPE} --android ${HIFI_ANDROID_APP} --build-root ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
else()
execute_process(
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --build-root ${CMAKE_BINARY_DIR}
COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --release-type ${RELEASE_TYPE} --build-root ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
# squelch the Policy CMP0074 warning without requiring an update to cmake 3.12.
@ -36,8 +41,8 @@ endif()
if(NOT EXISTS "${CMAKE_BINARY_DIR}/vcpkg.cmake")
message(FATAL_ERROR "vcpkg configuration missing.")
endif()
include("${CMAKE_BINARY_DIR}/vcpkg.cmake")
project(hifi)
include("cmake/init.cmake")
include("cmake/compiler.cmake")
@ -93,9 +98,9 @@ if (ANDROID)
set(PLATFORM_QT_COMPONENTS AndroidExtras WebView)
add_definitions(-DHIFI_ANDROID_APP=\"${HIFI_ANDROID_APP}\")
if (
(${HIFI_ANDROID_APP} STREQUAL "questInterface") OR
(${HIFI_ANDROID_APP} STREQUAL "questInterface") OR
(${HIFI_ANDROID_APP} STREQUAL "questFramePlayer") OR
(${HIFI_ANDROID_APP} STREQUAL "framePlayer")
(${HIFI_ANDROID_APP} STREQUAL "framePlayer")
)
# We know the quest hardware has this extension, so we can force the use of instanced stereo
add_definitions(-DHAVE_EXT_clip_cull_distance)
@ -105,18 +110,18 @@ if (ANDROID)
# We can also use our own foveated textures
add_definitions(-DHAVE_QCOM_texture_foveated)
# if set, the application itself or some library it depends on MUST implement
# if set, the application itself or some library it depends on MUST implement
# `DisplayPluginList getDisplayPlugins()` and `InputPluginList getInputPlugins()`
add_definitions(-DCUSTOM_INPUT_PLUGINS)
add_definitions(-DCUSTOM_DISPLAY_PLUGINS)
add_definitions(-DCUSTOM_INPUT_PLUGINS)
add_definitions(-DCUSTOM_DISPLAY_PLUGINS)
set(PLATFORM_PLUGIN_LIBRARIES oculusMobile oculusMobilePlugin)
endif()
# Allow client code to use preprocessor macros to distinguish between quest and non-quest builds
if (${HIFI_ANDROID_APP} STREQUAL "questInterface")
add_definitions(-DANDROID_APP_QUEST_INTERFACE)
add_definitions(-DANDROID_APP_QUEST_INTERFACE)
elseif(${HIFI_ANDROID_APP} STREQUAL "interface")
add_definitions(-DANDROID_APP_INTERFACE)
add_definitions(-DANDROID_APP_INTERFACE)
endif()
else ()
set(PLATFORM_QT_COMPONENTS WebEngine Xml)
@ -194,6 +199,8 @@ GroupSources("scripts")
GroupSources("unpublishedScripts")
unset(JS_SRC)
set_packaging_parameters()
# Locate the required Qt build on the filesystem
setup_qt()
list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}")
@ -203,6 +210,12 @@ find_package( Threads )
add_definitions(-DGLM_FORCE_RADIANS)
add_definitions(-DGLM_ENABLE_EXPERIMENTAL)
add_definitions(-DGLM_FORCE_CTOR_INIT)
if (WIN32)
# Deal with fakakta Visual Studo 2017 bug
add_definitions(-DQT_NO_FLOAT16_OPERATORS)
endif()
if (HIFI_USE_OPTIMIZED_IK)
MESSAGE(STATUS "SET THE USE IK DEFINITION ")
add_definitions(-DHIFI_USE_OPTIMIZED_IK)
@ -215,8 +228,6 @@ setup_externals_binary_dir()
option(USE_NSIGHT "Attempt to find the nSight libraries" 1)
set_packaging_parameters()
# FIXME hack to work on the proper Android toolchain
if (ANDROID)
add_subdirectory(android/apps/${HIFI_ANDROID_APP})
@ -250,11 +261,11 @@ add_subdirectory(tools)
if (BUILD_TESTS)
# Turn on testing so that add_test works
# MUST be in the root cmake file for ctest to work
# MUST be in the root cmake file for ctest to work
include(CTest)
enable_testing()
add_subdirectory(tests)
if (BUILD_MANUAL_TESTS)
if (BUILD_MANUAL_TESTS)
add_subdirectory(tests-manual)
endif()
endif()

View file

@ -204,7 +204,10 @@ void AvatarMixerClientData::processSetTraitsMessage(ReceivedMessage& message,
if (traitType == AvatarTraits::SkeletonModelURL) {
// special handling for skeleton model URL, since we need to make sure it is in the whitelist
checkSkeletonURLAgainstWhitelist(slaveSharedData, sendingNode, packetTraitVersion);
#ifdef AVATAR_POP_CHECK
// Deferred for UX work. With no PoP check, no need to get the .fst.
_avatar->fetchAvatarFST();
#endif
}
anyTraitsChanged = true;

View file

@ -10,28 +10,32 @@
#
macro(fixup_interface)
if (APPLE)
if (APPLE)
string(REPLACE " " "\\ " ESCAPED_BUNDLE_NAME ${INTERFACE_BUNDLE_NAME})
string(REPLACE " " "\\ " ESCAPED_INSTALL_PATH ${INTERFACE_INSTALL_DIR})
set(_INTERFACE_INSTALL_PATH "${ESCAPED_INSTALL_PATH}/${ESCAPED_BUNDLE_NAME}.app")
string(REPLACE " " "\\ " ESCAPED_BUNDLE_NAME ${INTERFACE_BUNDLE_NAME})
string(REPLACE " " "\\ " ESCAPED_INSTALL_PATH ${INTERFACE_INSTALL_DIR})
set(_INTERFACE_INSTALL_PATH "${ESCAPED_INSTALL_PATH}/${ESCAPED_BUNDLE_NAME}.app")
find_program(MACDEPLOYQT_COMMAND macdeployqt PATHS "${QT_DIR}/bin" NO_DEFAULT_PATH)
find_program(MACDEPLOYQT_COMMAND macdeployqt PATHS "${QT_DIR}/bin" NO_DEFAULT_PATH)
if (NOT MACDEPLOYQT_COMMAND AND (PRODUCTION_BUILD OR PR_BUILD))
message(FATAL_ERROR "Could not find macdeployqt at ${QT_DIR}/bin.\
It is required to produce an relocatable interface application.\
Check that the variable QT_DIR points to your Qt installation.\
")
endif ()
if (NOT MACDEPLOYQT_COMMAND AND (PRODUCTION_BUILD OR PR_BUILD))
message(FATAL_ERROR "Could not find macdeployqt at ${QT_DIR}/bin.\
It is required to produce an relocatable interface application.\
Check that the environment variable QT_DIR points to your Qt installation.\
")
if (RELEASE_TYPE STREQUAL "DEV")
install(CODE "
execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\
\${CMAKE_INSTALL_PREFIX}/${_INTERFACE_INSTALL_PATH}/\
-verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/\
)"
COMPONENT ${CLIENT_COMPONENT}
)
else ()
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${MACDEPLOYQT_COMMAND} "$<TARGET_FILE_DIR:${TARGET_NAME}>/../.." -verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/
)
endif()
endif ()
install(CODE "
execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\
\${CMAKE_INSTALL_PREFIX}/${_INTERFACE_INSTALL_PATH}/\
-verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/\
)"
COMPONENT ${CLIENT_COMPONENT}
)
endif ()
endmacro()

View file

@ -10,27 +10,32 @@
#
macro(fixup_nitpick)
if (APPLE)
string(REPLACE " " "\\ " ESCAPED_BUNDLE_NAME ${NITPICK_BUNDLE_NAME})
string(REPLACE " " "\\ " ESCAPED_INSTALL_PATH ${NITPICK_INSTALL_DIR})
set(_NITPICK_INSTALL_PATH "${ESCAPED_INSTALL_PATH}/${ESCAPED_BUNDLE_NAME}.app")
if (APPLE)
string(REPLACE " " "\\ " ESCAPED_BUNDLE_NAME ${NITPICK_BUNDLE_NAME})
string(REPLACE " " "\\ " ESCAPED_INSTALL_PATH ${NITPICK_INSTALL_DIR})
set(_NITPICK_INSTALL_PATH "${ESCAPED_INSTALL_PATH}/${ESCAPED_BUNDLE_NAME}.app")
find_program(MACDEPLOYQT_COMMAND macdeployqt PATHS "${QT_DIR}/bin" NO_DEFAULT_PATH)
find_program(MACDEPLOYQT_COMMAND macdeployqt PATHS "${QT_DIR}/bin" NO_DEFAULT_PATH)
if (NOT MACDEPLOYQT_COMMAND AND (PRODUCTION_BUILD OR PR_BUILD))
message(FATAL_ERROR "Could not find macdeployqt at ${QT_DIR}/bin.\
It is required to produce a relocatable nitpick application.\
Check that the environment variable QT_DIR points to your Qt installation.\
")
if (NOT MACDEPLOYQT_COMMAND AND (PRODUCTION_BUILD OR PR_BUILD))
message(FATAL_ERROR "Could not find macdeployqt at ${QT_DIR}/bin.\
It is required to produce a relocatable nitpick application.\
Check that the variable QT_DIR points to your Qt installation.\
")
endif ()
if (RELEASE_TYPE STREQUAL "DEV")
install(CODE "
execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\
\${CMAKE_INSTALL_PREFIX}/${_NITPICK_INSTALL_PATH}/\
-verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/\
)"
COMPONENT ${CLIENT_COMPONENT}
)
else ()
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${MACDEPLOYQT_COMMAND} "$<TARGET_FILE_DIR:${TARGET_NAME}>/../.." -verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/
)
endif()
endif ()
install(CODE "
execute_process(COMMAND ${MACDEPLOYQT_COMMAND}\
\${CMAKE_INSTALL_PREFIX}/${_NITPICK_INSTALL_PATH}/\
-verbose=2 -qmldir=${CMAKE_SOURCE_DIR}/interface/resources/qml/\
)"
COMPONENT ${CLIENT_COMPONENT}
)
endif ()
endmacro()

View file

@ -39,7 +39,7 @@ macro(PACKAGE_LIBRARIES_FOR_DEPLOYMENT)
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND CMD /C "SET PATH=%PATH%;${QT_DIR}/bin && ${WINDEPLOYQT_COMMAND}\
COMMAND CMD /C "SET PATH=${QT_DIR}/bin;%PATH% && ${WINDEPLOYQT_COMMAND}\
${EXTRA_DEPLOY_OPTIONS} $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>,$<CONFIG:RelWithDebInfo>>:--release>\
--no-compiler-runtime --no-opengl-sw --no-angle -no-system-d3d-compiler \"$<TARGET_FILE:${TARGET_NAME}>\""
)

View file

@ -1,4 +1,3 @@
#
# Created by Bradley Austin Davis on 2017/09/02
# Copyright 2013-2017 High Fidelity, Inc.
#
@ -6,67 +5,91 @@
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
# Construct a default QT location from a root path, a version and an architecture
function(calculate_default_qt_dir _QT_VERSION _RESULT_NAME)
if (ANDROID)
set(QT_DEFAULT_ARCH "android_armv7")
elseif(UWP)
set(QT_DEFAULT_ARCH "winrt_x64_msvc2017")
elseif(APPLE)
set(QT_DEFAULT_ARCH "clang_64")
elseif(WIN32)
set(QT_DEFAULT_ARCH "msvc2017_64")
else()
set(QT_DEFAULT_ARCH "gcc_64")
function(get_sub_directories result curdir)
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
set(dirlist "")
foreach(child ${children})
if(IS_DIRECTORY ${curdir}/${child})
LIST(APPEND dirlist ${child})
endif()
endforeach()
set(${result} ${dirlist} PARENT_SCOPE)
endfunction()
if (WIN32 OR (ANDROID AND ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")))
set(QT_DEFAULT_ROOT "c:/Qt")
else()
set(QT_DEFAULT_ROOT "$ENV{HOME}/Qt")
function(calculate_qt5_version result _QT_DIR)
# All Qt5 packages have little "private" include directories named with the actual Qt version such as:
# .../include/QtCore/5.12.3/QtCore/private
# Sometimes we need to include these private headers for debug hackery.
# Hence we find one of these directories and pick apart its path to determine the actual QT_VERSION.
if (APPLE)
set(_QT_CORE_DIR "${_QT_DIR}/lib/QtCore.framework/Versions/5/Headers")
else()
set(_QT_CORE_DIR "${_QT_DIR}/include/QtCore")
endif()
if(NOT EXISTS "${_QT_CORE_DIR}")
message(FATAL_ERROR "Could not find 'include/QtCore' in '${_QT_DIR}'")
endif()
set(subdirs "")
get_sub_directories(subdirs ${_QT_CORE_DIR})
foreach(subdir ${subdirs})
string(REGEX MATCH "5.[0-9]+.[0-9]+$" _QT_VERSION ${subdir})
if (NOT "${_QT_VERSION}" STREQUAL "")
# found it!
set(${result} "${_QT_VERSION}" PARENT_SCOPE)
break()
endif()
set_from_env(QT_ROOT QT_ROOT ${QT_DEFAULT_ROOT})
set_from_env(QT_ARCH QT_ARCH ${QT_DEFAULT_ARCH})
set(${_RESULT_NAME} "${QT_ROOT}/${_QT_VERSION}/${QT_ARCH}" PARENT_SCOPE)
endforeach()
endfunction()
# Sets the QT_CMAKE_PREFIX_PATH and QT_DIR variables
# Also enables CMAKE_AUTOMOC and CMAKE_AUTORCC
macro(setup_qt)
set_from_env(QT_VERSION QT_VERSION "5.10.1")
# if QT_CMAKE_PREFIX_PATH was not specified before hand,
# try to use the environment variable
if (NOT QT_CMAKE_PREFIX_PATH)
set(QT_CMAKE_PREFIX_PATH "$ENV{QT_CMAKE_PREFIX_PATH}")
# if we are in a development build and QT_CMAKE_PREFIX_PATH is specified
# then use it,
# otherwise, use the vcpkg'ed version
if(NOT DEFINED VCPKG_QT_CMAKE_PREFIX_PATH)
message(FATAL_ERROR "VCPKG_QT_CMAKE_PREFIX_PATH should have been set by hifi_vcpkg.py")
endif()
if (("QT_CMAKE_PREFIX_PATH" STREQUAL "") OR (NOT EXISTS "${QT_CMAKE_PREFIX_PATH}"))
calculate_default_qt_dir(${QT_VERSION} QT_DIR)
set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/lib/cmake")
if (NOT DEV_BUILD)
if (APPLE)
# HACK: manually set the QT_CMAKE_PREFIX_PATH so that hard-coded paths find new QT libs where we'll put them
set(QT_CMAKE_PREFIX_PATH "/var/tmp/qt5-install/lib/cmake")
elseif (UNIX AND DEFINED ENV{QT_CMAKE_PREFIX_PATH})
# HACK: obey QT_CMAKE_PREFIX_PATH to allow UNIX to use older QT libs
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
else()
set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH})
endif()
else()
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
# DEV_BUILD
if (DEFINED ENV{QT_CMAKE_PREFIX_PATH})
set(QT_CMAKE_PREFIX_PATH $ENV{QT_CMAKE_PREFIX_PATH})
else()
set(QT_CMAKE_PREFIX_PATH ${VCPKG_QT_CMAKE_PREFIX_PATH})
endif()
endif()
if (WIN32)
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
set(QT_VERSION "unknown")
calculate_qt5_version(QT_VERSION "${QT_DIR}")
if (QT_VERSION STREQUAL "unknown")
message(FATAL_ERROR "Could not determine QT_VERSION")
endif()
if(WIN32)
# windows shell does not like backslashes expanded on the command line,
# so convert all backslashes in the QT path to forward slashes
string(REPLACE \\ / QT_CMAKE_PREFIX_PATH ${QT_CMAKE_PREFIX_PATH})
string(REPLACE \\ / QT_DIR ${QT_DIR})
endif()
# This check doesn't work on Mac
#if (NOT EXISTS "${QT_DIR}/include/QtCore/QtGlobal")
# message(FATAL_ERROR "Unable to locate Qt includes in ${QT_DIR}")
#endif()
if (NOT EXISTS "${QT_CMAKE_PREFIX_PATH}/Qt5Core/Qt5CoreConfig.cmake")
message(FATAL_ERROR "Unable to locate Qt cmake config in ${QT_CMAKE_PREFIX_PATH}")
if(NOT EXISTS "${QT_CMAKE_PREFIX_PATH}/Qt5Core/Qt5CoreConfig.cmake")
message(FATAL_ERROR "Unable to locate Qt5CoreConfig.cmake in '${QT_CMAKE_PREFIX_PATH}'")
endif()
message(STATUS "The Qt build in use is: \"${QT_DIR}\"")
message(STATUS "Using Qt build in : '${QT_DIR}' with version ${QT_VERSION}")
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

5
debian/changelog vendored Normal file
View file

@ -0,0 +1,5 @@
hifi-interface (84-1) unstable; urgency=medium
* Initial release
-- Seth Alves <seth.alves@gmail.com> Tue, 14 May 2019 19:45:31 -0700

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
11

15
debian/control vendored Normal file
View file

@ -0,0 +1,15 @@
Source: hifi-interface
Section: comm
Priority: optional
Maintainer: Seth Alves <seth.alves@gmail.com>
Build-Depends: debhelper (>= 11), cmake
Standards-Version: 4.1.3
Homepage: https://www.highfidelity.com/
Vcs-Browser: https://github.com/highfidelity/hifi
Vcs-Git: https://github.com/highfidelity/hifi.git
Package: hifi-interface
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt5quick5, libqt5quickcontrols2-5, libqt5quickwidgets5, qml-module-qtquick-controls, qml-module-qtquick-controls2, qml-module-qtquick-dialogs, libqt5webchannel5, qml-module-qtwebchannel, qml-module-qtwebengine, qml-module-qt-labs-folderlistmodel, qml-module-qt-labs-settings
Description: High Fidelity allows creation and sharing of VR experiences.
The High Fidelity metaverse provides built-in social features, including avatar interactions, spatialized audio and interactive physics. Additionally, you have the ability to import any 3D object into your virtual environment.

23
debian/copyright vendored Normal file
View file

@ -0,0 +1,23 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: hifi-interface
Source: https://github.com/highfidelity/hifi
Files: *
Copyright: 2013-2019, High Fidelity, Inc.
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".

2
debian/hifi-interface-docs.docs vendored Normal file
View file

@ -0,0 +1,2 @@
README.Debian
README.source

1
debian/hifi-interface.dirs vendored Normal file
View file

@ -0,0 +1 @@
opt/hifi/interface/

76
debian/patches/hifi_use_system_qt.diff vendored Normal file
View file

@ -0,0 +1,76 @@
Index: hifi-interface-84/cmake/macros/SetupQt.cmake
===================================================================
--- hifi-interface-84.orig/cmake/macros/SetupQt.cmake
+++ hifi-interface-84/cmake/macros/SetupQt.cmake
@@ -18,19 +18,19 @@ function(calculate_default_qt_dir _QT_VE
elseif(WIN32)
set(QT_DEFAULT_ARCH "msvc2017_64")
else()
- set(QT_DEFAULT_ARCH "gcc_64")
+ set(QT_DEFAULT_ARCH "x86_64-linux-gnu")
endif()
if (WIN32 OR (ANDROID AND ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")))
set(QT_DEFAULT_ROOT "c:/Qt")
else()
- set(QT_DEFAULT_ROOT "$ENV{HOME}/Qt")
+ set(QT_DEFAULT_ROOT "/usr/lib")
endif()
set_from_env(QT_ROOT QT_ROOT ${QT_DEFAULT_ROOT})
set_from_env(QT_ARCH QT_ARCH ${QT_DEFAULT_ARCH})
- set(${_RESULT_NAME} "${QT_ROOT}/${_QT_VERSION}/${QT_ARCH}" PARENT_SCOPE)
+ set(${_RESULT_NAME} "${QT_ROOT}/${QT_ARCH}" PARENT_SCOPE)
endfunction()
# Sets the QT_CMAKE_PREFIX_PATH and QT_DIR variables
@@ -44,7 +44,7 @@ macro(setup_qt)
endif()
if (("QT_CMAKE_PREFIX_PATH" STREQUAL "") OR (NOT EXISTS "${QT_CMAKE_PREFIX_PATH}"))
calculate_default_qt_dir(${QT_VERSION} QT_DIR)
- set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/lib/cmake")
+ set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/cmake")
else()
# figure out where the qt dir is
get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE)
Index: hifi-interface-84/interface/CMakeLists.txt
===================================================================
--- hifi-interface-84.orig/interface/CMakeLists.txt
+++ hifi-interface-84/interface/CMakeLists.txt
@@ -35,7 +35,7 @@ else ()
add_custom_command(
OUTPUT ${RESOURCES_RCC}
DEPENDS ${RESOURCES_QRC} ${GENERATE_QRC_DEPENDS}
- COMMAND "${QT_DIR}/bin/rcc"
+ COMMAND "rcc"
ARGS ${RESOURCES_QRC} -binary -o ${RESOURCES_RCC}
)
endif()
@@ -399,6 +399,13 @@ else()
optional_win_executable_signing()
endif()
+
+ install(
+ DIRECTORY "$<TARGET_FILE_DIR:${TARGET_NAME}>/"
+ DESTINATION ${INTERFACE_INSTALL_DIR}
+ COMPONENT ${CLIENT_COMPONENT}
+ )
+
endif()
if (SCRIPTS_INSTALL_DIR)
Index: hifi-interface-84/tools/nitpick/CMakeLists.txt
===================================================================
--- hifi-interface-84.orig/tools/nitpick/CMakeLists.txt
+++ hifi-interface-84/tools/nitpick/CMakeLists.txt
@@ -12,7 +12,7 @@ generate_qrc(OUTPUT ${RESOURCES_QRC} PAT
add_custom_command(
OUTPUT ${RESOURCES_RCC}
DEPENDS ${RESOURCES_QRC} ${GENERATE_QRC_DEPENDS}
- COMMAND "${QT_DIR}/bin/rcc"
+ COMMAND "rcc"
ARGS ${RESOURCES_QRC} -binary -o ${RESOURCES_RCC}
)

1
debian/patches/series vendored Normal file
View file

@ -0,0 +1 @@
hifi_use_system_qt.diff

24
debian/rules vendored Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_configure:
mkdir obj-$(DEB_TARGET_MULTIARCH)
(cd obj-$(DEB_TARGET_MULTIARCH) && cmake .. -DCMAKE_INSTALL_PREFIX=/opt/hifi -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCLIENT_ONLY=ON -DDOWNLOAD_SERVERLESS_CONTENT=ON -DCMAKE_CXX_COMPILER=/usr/lib/llvm-7/bin/clang\+\+ -DOpenGL_GL_PREFERENCE=GLVND)
override_dh_auto_build:
(cd obj-$(DEB_TARGET_MULTIARCH) && make -j4)
S=obj-$(DEB_TARGET_MULTIARCH)
I=debian/hifi-interface/opt/hifi/interface
override_dh_auto_install:
cp $(S)/interface/interface $(I)
cp $(S)/ext/makefiles/steamworks/project/src/steamworks/redistributable_bin/linux64/libsteam_api.so $(I)
cp $(S)/ext/makefiles/quazip/project/build/libquazip5.so.1 $(I)
cp $(S)/ext/makefiles/polyvox/project/build/library/PolyVoxCore/libPolyVoxCore.so.0 $(I)
cp $(S)/interface/resources.rcc $(I)
cp -r $(S)/interface/scripts $(I)/scripts
cp -r $(S)/interface/plugins $(I)/plugins

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (quilt)

6
debian/source/include-binaries vendored Normal file
View file

@ -0,0 +1,6 @@
interface/compiledResources/resources.rcc
tools/nitpick/compiledResources/resources.rcc
__pycache__/hifi_android.cpython-37.pyc
__pycache__/hifi_singleton.cpython-37.pyc
__pycache__/hifi_utils.cpython-37.pyc
__pycache__/hifi_vcpkg.cpython-37.pyc

View file

@ -15,10 +15,12 @@ print = functools.partial(print, flush=True)
# Encapsulates the vcpkg system
class VcpkgRepo:
CMAKE_TEMPLATE = """
# this file auto-generated by hifi_vcpkg.py
get_filename_component(CMAKE_TOOLCHAIN_FILE "{}" ABSOLUTE CACHE)
get_filename_component(CMAKE_TOOLCHAIN_FILE_UNCACHED "{}" ABSOLUTE)
set(VCPKG_INSTALL_ROOT "{}")
set(VCPKG_TOOLS_DIR "{}")
set(VCPKG_QT_CMAKE_PREFIX_PATH "{}")
"""
CMAKE_TEMPLATE_NON_ANDROID = """
@ -171,6 +173,11 @@ endif()
if not self.args.android:
print("Installing build dependencies")
self.run(['install', '--triplet', self.triplet, 'hifi-client-deps'])
# If not android, install our Qt build
if not self.args.android:
print("Installing Qt")
self.installQt()
def cleanBuilds(self):
# Remove temporary build artifacts
@ -206,22 +213,33 @@ endif()
with open(self.tagFile, 'w') as f:
f.write(self.tagContents)
def getQt5InstallPath(self):
qt5InstallPath = os.path.join(self.path, 'installed', 'qt5-install')
if platform.system() == "Darwin" and self.args.release_type != "DEV":
# HACK for MacOS Jenkins PRODUCTION and PR builds during Qt-5.12.3 transition
# we always supply /var/tmp/qt5-install for QT_CMAKE_PREFIX_PATH
qt5InstallPath = "/var/tmp/qt5-install"
elif self.args.android:
precompiled = os.path.realpath(self.androidPackagePath)
qt5InstallPath = os.path.realpath(os.path.join(precompiled, 'qt'))
return qt5InstallPath
def writeConfig(self):
print("Writing cmake config to {}".format(self.configFilePath))
# Write out the configuration for use by CMake
cmakeScript = os.path.join(self.path, 'scripts/buildsystems/vcpkg.cmake')
installPath = os.path.join(self.path, 'installed', self.triplet)
toolsPath = os.path.join(self.path, 'installed', self.hostTriplet, 'tools')
cmakeTemplate = VcpkgRepo.CMAKE_TEMPLATE
if not self.args.android:
cmakeTemplate += VcpkgRepo.CMAKE_TEMPLATE_NON_ANDROID
else:
precompiled = os.path.realpath(self.androidPackagePath)
qtCmakePrefix = os.path.realpath(os.path.join(precompiled, 'qt/lib/cmake'))
cmakeTemplate += 'set(HIFI_ANDROID_PRECOMPILED "{}")\n'.format(precompiled)
cmakeTemplate += 'set(QT_CMAKE_PREFIX_PATH "{}")\n'.format(qtCmakePrefix)
cmakeConfig = cmakeTemplate.format(cmakeScript, cmakeScript, installPath, toolsPath).replace('\\', '/')
cmakeTemplate = VcpkgRepo.CMAKE_TEMPLATE
if self.args.android:
precompiled = os.path.realpath(self.androidPackagePath)
cmakeTemplate += 'set(HIFI_ANDROID_PRECOMPILED "{}")\n'.format(precompiled)
else:
cmakeTemplate += VcpkgRepo.CMAKE_TEMPLATE_NON_ANDROID
qtCmakePrefixPath = os.path.join(self.getQt5InstallPath(), "lib/cmake")
cmakeConfig = cmakeTemplate.format(cmakeScript, cmakeScript, installPath, toolsPath, qtCmakePrefixPath).replace('\\', '/')
with open(self.configFilePath, 'w') as f:
f.write(cmakeConfig)
@ -232,3 +250,33 @@ endif()
print("Not implemented")
def installQt(self):
qt5InstallPath = self.getQt5InstallPath()
if not os.path.isdir(qt5InstallPath):
print ('Downloading Qt from AWS')
dest, tail = os.path.split(qt5InstallPath)
url = 'NOT DEFINED'
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-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':
#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'
elif platform.system() == 'Linux':
if platform.linux_distribution()[1] == '16.04':
#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'
elif platform.linux_distribution()[1] == '18.04':
#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'
else:
print('UNKNOWN LINUX VERSION!!!')
else:
print('UNKNOWN OPERATING SYSTEM!!!')
print('Extracting ' + url + ' to ' + dest)
hifi_utils.downloadAndExtract(url, dest)
else:
print ('Qt has already been downloaded')

View file

@ -334,11 +334,11 @@ if (APPLE)
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/resources/fonts"
"${RESOURCES_DEV_DIR}/fonts"
#copy serverless for android
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/resources/serverless"
"${RESOURCES_DEV_DIR}/serverless"
# add redirect json to macOS builds.
#copy serverless for android
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/resources/serverless"
"${RESOURCES_DEV_DIR}/serverless"
# add redirect json to macOS builds.
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${PROJECT_SOURCE_DIR}/resources/serverless/redirect.json"
"${RESOURCES_DEV_DIR}/serverless/redirect.json"
@ -401,6 +401,20 @@ else()
endif()
endif()
if (DEV_BUILD AND (APPLE OR UNIX))
# create a qt.conf file to override hard-coded search paths in Qt libs
set(QT_LIB_PATH "${QT_CMAKE_PREFIX_PATH}/../..")
if (APPLE)
set(QT_CONF_FILE "${RESOURCES_DEV_DIR}/../Resources/qt.conf")
else ()
set(QT_CONF_FILE "${INTERFACE_EXEC_DIR}/qt.conf")
endif ()
file(GENERATE
OUTPUT "${QT_CONF_FILE}"
CONTENT "[Paths]\nPrefix=${QT_LIB_PATH}\n"
)
endif()
if (SCRIPTS_INSTALL_DIR)
# setup install of scripts beside interface executable
install(

View file

@ -250,6 +250,7 @@ Rectangle {
anchors.rightMargin: 14
width: 32
height: width
visible: false
Image {
id: displayModeImage
@ -306,6 +307,17 @@ Rectangle {
}
}
}
Component.onCompleted: {
// Don't show VR button unless they have a VR headset.
var displayPluginCount = Window.getDisplayPluginCount();
for (var i = 0; i < displayPluginCount; i++) {
if (Window.isDisplayPluginHmd(i)) {
hmdButtonContainer.visible = true;
return;
}
}
}
}
}

View file

@ -1191,13 +1191,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
// setup a timer for domain-server check ins
QTimer* domainCheckInTimer = new QTimer(this);
QWeakPointer<NodeList> nodeListWeak = nodeList;
connect(domainCheckInTimer, &QTimer::timeout, [this, nodeListWeak] {
auto nodeList = nodeListWeak.lock();
if (!isServerlessMode() && nodeList) {
nodeList->sendDomainServerCheckIn();
}
});
connect(domainCheckInTimer, &QTimer::timeout, nodeList.data(), &NodeList::sendDomainServerCheckIn);
domainCheckInTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
connect(this, &QCoreApplication::aboutToQuit, [domainCheckInTimer] {
domainCheckInTimer->stop();
@ -3889,6 +3883,7 @@ void Application::setIsInterstitialMode(bool interstitialMode) {
}
void Application::setIsServerlessMode(bool serverlessDomain) {
DependencyManager::get<NodeList>()->setSendDomainServerCheckInEnabled(!serverlessDomain);
auto tree = getEntities()->getTree();
if (tree) {
tree->setIsServerlessMode(serverlessDomain);
@ -5442,9 +5437,7 @@ void Application::init() {
qCDebug(interfaceapp) << "Loaded settings";
// fire off an immediate domain-server check in now that settings are loaded
if (!isServerlessMode()) {
DependencyManager::get<NodeList>()->sendDomainServerCheckIn();
}
QMetaObject::invokeMethod(DependencyManager::get<NodeList>().data(), "sendDomainServerCheckIn");
// This allows collision to be set up properly for shape entities supported by GeometryCache.
// This is before entity setup to ensure that it's ready for whenever instance collision is initialized.

View file

@ -529,6 +529,12 @@ Menu::Menu() {
MeshPartPayload::enableMeshShaders = action->isChecked();
});
{
auto drawStatusConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<render::DrawStatus>("RenderMainView.DrawStatus");
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::HighlightTransitions, 0, false,
drawStatusConfig, SLOT(setShowFade(bool)));
}
// Developer > Assets >>>
// Menu item is not currently needed but code should be kept in case it proves useful again at some stage.
//#define WANT_ASSET_MIGRATION

View file

@ -228,8 +228,9 @@ namespace MenuOption {
const QString NotificationSoundsTablet = "play_notification_sounds_tablet";
const QString ForceCoarsePicking = "Force Coarse Picking";
const QString ComputeBlendshapes = "Compute Blendshapes";
const QString HighlightTransitions = "Highlight Transitions";
const QString MeshShaders = "Enable Procedural Materials on Meshes";
}
}
#endif // hifi_Menu_h

View file

@ -412,7 +412,7 @@ AvatarSharedPointer AvatarManager::newSharedAvatar(const QUuid& sessionUUID) {
auto otherAvatar = new OtherAvatar(qApp->thread());
otherAvatar->setSessionUUID(sessionUUID);
auto nodeList = DependencyManager::get<NodeList>();
if (!nodeList || !nodeList->isIgnoringNode(sessionUUID)) {
if (nodeList && !nodeList->isIgnoringNode(sessionUUID)) {
otherAvatar->createOrb();
}
return AvatarSharedPointer(otherAvatar, [](OtherAvatar* ptr) { ptr->deleteLater(); });

View file

@ -62,7 +62,7 @@ void OtherAvatar::removeOrb() {
}
void OtherAvatar::updateOrbPosition() {
if (_otherAvatarOrbMeshPlaceholderID.isNull()) {
if (!_otherAvatarOrbMeshPlaceholderID.isNull()) {
EntityItemProperties properties;
properties.setPosition(getHead()->getPosition());
DependencyManager::get<EntityScriptingInterface>()->editEntity(_otherAvatarOrbMeshPlaceholderID, properties);

View file

@ -559,39 +559,47 @@ public slots:
float domainLoadingProgress();
/**jsdoc
* Return the number of display plugins currently available
* Gets the number of display plugins currently available.
* @function Window.getDisplayPluginCount
* @returns {int} The number of currently available display plugins
* @returns {number} The number of display plugins currently available.
*/
int getDisplayPluginCount();
/**jsdoc
* Return the human readable name of a display plugin
* Gets the name of a display plugin.
* @function Window.getDisplayPluginName
* @param {int} index - The index of the display plugin. Must be less than the value returned by {@link Window.getDisplayPluginCount|getDisplayPluginCount}.
* @returns {string} The name of the specified display plugin
* @param {number} index - The index of the display plugin. Must be less than the value returned by
* {@link Window.getDisplayPluginCount|getDisplayPluginCount}. The first display plugin has an index of <code>0</code>.
* @returns {string} The name of the display plugin.
* @example <caption>Print the names of all available display plugins.</caption>
* for (var i = 0, length = Window.getDisplayPluginCount(); i < length; i++) {
* print(Window.getDisplayPluginName(i));
* }
*/
QString getDisplayPluginName(int index);
/**jsdoc
* Return whether a given display plugin is an HMD
* Checks whether a display plugin is an HMD.
* @function Window.isDisplayPluginHmd
* @param {int} index - The index of the display plugin. Must be less than the value returned by {@link Window.getDisplayPluginCount|getDisplayPluginCount}.
* @returns {bool} True if the specified display plugin is a HMD
* @param {number} index - The index of the display plugin. Must be less than the value returned by
* {@link Window.getDisplayPluginCount|getDisplayPluginCount}. The first display plugin has an index of <code>0</code>.
* @returns {boolean} <code>true</code> if the display plugin is a HMD, <code>false</code> if it isn't.
*/
bool isDisplayPluginHmd(int index);
/**jsdoc
* Return the currently active display plugin
* Gets the index of the currently active display plugin.
* @function Window.getActiveDisplayPlugin
* @returns {int} The index of the currently active display plugin
* @returns {number} The index of the currently active display plugin. The first display plugin has an index of
* <code>0</code>.
*/
int getActiveDisplayPlugin();
/**jsdoc
* Return the currently active display plugin
* Sets the currently active display plugin.
* @function Window.setActiveDisplayPlugin
* @param {int} index - The index of the display plugin. Must be less than the value returned by {@link Window.getDisplayPluginCount|getDisplayPluginCount}.
* @param {number} index - The index of the display plugin. Must be less than the value returned by
* {@link Window.getDisplayPluginCount|getDisplayPluginCount}. The first display plugin has an index of <code>0</code>.
*/
void setActiveDisplayPlugin(int index);

View file

@ -44,6 +44,7 @@ void AvatarCertifyBanner::show(const QUuid& avatarID) {
entityProperties.setParentJointIndex(CAMERA_MATRIX_INDEX);
entityProperties.setLocalPosition(position);
entityProperties.setDimensions(glm::vec3(1.0f, 1.0f, 0.3f) * scaleFactor);
entityProperties.setEmissive(true);
entityProperties.setRenderLayer(tabletShown ? RenderLayer::WORLD : RenderLayer::FRONT);
entityProperties.getGrab().setGrabbable(false);
QString scriptPath = QUrl(PathUtils::defaultScriptsLocation("")).toString() + AVATAR_THEFT_BANNER_SCRIPT;

View file

@ -1519,18 +1519,19 @@ void Avatar::scaleVectorRelativeToPosition(glm::vec3 &positionToScale) const {
}
void Avatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
AvatarData::setSkeletonModelURL(skeletonModelURL);
if (QThread::currentThread() == thread()) {
if (!isMyAvatar() && !DependencyManager::get<NodeList>()->isIgnoringNode(getSessionUUID())) {
createOrb();
}
_skeletonModel->setURL(_skeletonModelURL);
indicateLoadingStatus(LoadingStatus::LoadModel);
} else {
QMetaObject::invokeMethod(_skeletonModel.get(), "setURL", Qt::QueuedConnection, Q_ARG(QUrl, _skeletonModelURL));
if (QThread::currentThread() != thread()) {
QMetaObject::invokeMethod(this, "setSkeletonModelURL", Q_ARG(const QUrl&, skeletonModelURL));
return;
}
AvatarData::setSkeletonModelURL(skeletonModelURL);
if (!isMyAvatar() && !DependencyManager::get<NodeList>()->isIgnoringNode(getSessionUUID())) {
createOrb();
}
indicateLoadingStatus(LoadingStatus::LoadModel);
_skeletonModel->setURL(_skeletonModelURL);
}
void Avatar::setModelURLFinished(bool success) {

View file

@ -32,19 +32,6 @@
using namespace render;
using namespace render::entities;
// These or the icon "name" used by the render item status value, they correspond to the atlas texture used by the DrawItemStatus
// job in the current rendering pipeline defined as of now (11/2015) in render-utils/RenderDeferredTask.cpp.
enum class RenderItemStatusIcon {
ACTIVE_IN_BULLET = 0,
PACKET_SENT = 1,
PACKET_RECEIVED = 2,
SIMULATION_OWNER = 3,
HAS_ACTIONS = 4,
OTHER_SIMULATION_OWNER = 5,
ENTITY_HOST_TYPE = 6,
NONE = 255
};
void EntityRenderer::initEntityRenderers() {
REGISTER_ENTITY_TYPE_WITH_FACTORY(Model, RenderableModelEntityItem::factory)
REGISTER_ENTITY_TYPE_WITH_FACTORY(PolyVox, RenderablePolyVoxEntityItem::factory)
@ -67,7 +54,7 @@ void EntityRenderer::makeStatusGetters(const EntityItemPointer& entity, Item::St
return render::Item::Status::Value(1.0f - normalizedDelta, (normalizedDelta > 1.0f ?
render::Item::Status::Value::GREEN :
render::Item::Status::Value::RED),
(unsigned char)RenderItemStatusIcon::PACKET_RECEIVED);
(unsigned char)render::Item::Status::Icon::PACKET_RECEIVED);
});
statusGetters.push_back([entity] () -> render::Item::Status::Value {
@ -79,17 +66,17 @@ void EntityRenderer::makeStatusGetters(const EntityItemPointer& entity, Item::St
return render::Item::Status::Value(1.0f - normalizedDelta, (normalizedDelta > 1.0f ?
render::Item::Status::Value::MAGENTA :
render::Item::Status::Value::CYAN),
(unsigned char)RenderItemStatusIcon::PACKET_SENT);
(unsigned char)render::Item::Status::Icon::PACKET_SENT);
});
statusGetters.push_back([entity] () -> render::Item::Status::Value {
ObjectMotionState* motionState = static_cast<ObjectMotionState*>(entity->getPhysicsInfo());
if (motionState && motionState->isActive()) {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::BLUE,
(unsigned char)RenderItemStatusIcon::ACTIVE_IN_BULLET);
(unsigned char)render::Item::Status::Icon::ACTIVE_IN_BULLET);
}
return render::Item::Status::Value(0.0f, render::Item::Status::Value::BLUE,
(unsigned char)RenderItemStatusIcon::ACTIVE_IN_BULLET);
(unsigned char)render::Item::Status::Icon::ACTIVE_IN_BULLET);
});
statusGetters.push_back([entity, myNodeID] () -> render::Item::Status::Value {
@ -98,39 +85,39 @@ void EntityRenderer::makeStatusGetters(const EntityItemPointer& entity, Item::St
if (weOwnSimulation) {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::BLUE,
(unsigned char)RenderItemStatusIcon::SIMULATION_OWNER);
(unsigned char)render::Item::Status::Icon::SIMULATION_OWNER);
} else if (otherOwnSimulation) {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::RED,
(unsigned char)RenderItemStatusIcon::OTHER_SIMULATION_OWNER);
(unsigned char)render::Item::Status::Icon::OTHER_SIMULATION_OWNER);
}
return render::Item::Status::Value(0.0f, render::Item::Status::Value::BLUE,
(unsigned char)RenderItemStatusIcon::SIMULATION_OWNER);
(unsigned char)render::Item::Status::Icon::SIMULATION_OWNER);
});
statusGetters.push_back([entity] () -> render::Item::Status::Value {
if (entity->hasActions()) {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::GREEN,
(unsigned char)RenderItemStatusIcon::HAS_ACTIONS);
(unsigned char)render::Item::Status::Icon::HAS_ACTIONS);
}
return render::Item::Status::Value(0.0f, render::Item::Status::Value::GREEN,
(unsigned char)RenderItemStatusIcon::HAS_ACTIONS);
(unsigned char)render::Item::Status::Icon::HAS_ACTIONS);
});
statusGetters.push_back([entity, myNodeID] () -> render::Item::Status::Value {
if (entity->isAvatarEntity()) {
if (entity->getOwningAvatarID() == myNodeID) {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::GREEN,
(unsigned char)RenderItemStatusIcon::ENTITY_HOST_TYPE);
(unsigned char)render::Item::Status::Icon::ENTITY_HOST_TYPE);
} else {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::RED,
(unsigned char)RenderItemStatusIcon::ENTITY_HOST_TYPE);
(unsigned char)render::Item::Status::Icon::ENTITY_HOST_TYPE);
}
} else if (entity->isLocalEntity()) {
return render::Item::Status::Value(1.0f, render::Item::Status::Value::BLUE,
(unsigned char)RenderItemStatusIcon::ENTITY_HOST_TYPE);
(unsigned char)render::Item::Status::Icon::ENTITY_HOST_TYPE);
}
return render::Item::Status::Value(0.0f, render::Item::Status::Value::GREEN,
(unsigned char)RenderItemStatusIcon::ENTITY_HOST_TYPE);
(unsigned char)render::Item::Status::Icon::ENTITY_HOST_TYPE);
});
}

View file

@ -49,7 +49,7 @@
const int INVALID_PORT = -1;
const quint64 NODE_SILENCE_THRESHOLD_MSECS = 20 * 1000;
const quint64 NODE_SILENCE_THRESHOLD_MSECS = 10 * 1000;
static const size_t DEFAULT_MAX_CONNECTION_RATE { std::numeric_limits<size_t>::max() };

View file

@ -147,7 +147,7 @@ public:
/**jsdoc
* Subscribes the scripting environment &mdash; Interface, the entity script server, or assignment client instance &mdash;
* to receive messages on a specific channel.This means, for example, that if there are two Interface scripts that
* to receive messages on a specific channel. This means, for example, that if there are two Interface scripts that
* subscribe to different channels, both scripts will receive messages on both channels.
* @function Messages.subscribe
* @param {string} channel - The channel to subscribe to.

View file

@ -292,7 +292,8 @@ void NodeList::addSetOfNodeTypesToNodeInterestSet(const NodeSet& setOfNodeTypes)
void NodeList::sendDomainServerCheckIn() {
// This function is called by the server check-in timer thread
// On ThreadedAssignments (assignment clients), this function
// is called by the server check-in timer thread
// not the NodeList thread. Calling it on the NodeList thread
// resulted in starvation of the server check-in function.
// be VERY CAREFUL modifying this code as members of NodeList

View file

@ -1578,9 +1578,11 @@ void Model::applyMaterialMapping() {
priorityMapPerResource[shapeID] = ++_priorityMap[shapeID];
}
auto materialLoaded = [this, networkMaterialResource, shapeIDs, priorityMapPerResource, renderItemsKey, primitiveMode, useDualQuaternionSkinning,
modelMeshRenderItemIDs, modelMeshRenderItemShapes, shouldInvalidatePayloadShapeKeyMap]() {
if (networkMaterialResource->isFailed() || networkMaterialResource->parsedMaterials.names.size() == 0) {
std::weak_ptr<Model> weakSelf = shared_from_this();
auto materialLoaded = [networkMaterialResource, shapeIDs, priorityMapPerResource, renderItemsKey, primitiveMode, useDualQuaternionSkinning,
modelMeshRenderItemIDs, modelMeshRenderItemShapes, shouldInvalidatePayloadShapeKeyMap, weakSelf]() {
std::shared_ptr<Model> self = weakSelf.lock();
if (!self || networkMaterialResource->isFailed() || networkMaterialResource->parsedMaterials.names.size() == 0) {
return;
}
render::Transaction transaction;
@ -1608,8 +1610,8 @@ void Model::applyMaterialMapping() {
bool invalidatePayloadShapeKey = shouldInvalidatePayloadShapeKeyMap.at(meshIndex);
graphics::MaterialLayer material = graphics::MaterialLayer(networkMaterial, priorityMapPerResource.at(shapeID));
{
std::unique_lock<std::mutex> lock(_materialMappingMutex);
_materialMapping[shapeID].push_back(material);
std::unique_lock<std::mutex> lock(self->_materialMappingMutex);
self->_materialMapping[shapeID].push_back(material);
}
transaction.updateItem<ModelMeshPartPayload>(itemID, [material, renderItemsKey,
invalidatePayloadShapeKey, primitiveMode, useDualQuaternionSkinning](ModelMeshPartPayload& data) {

View file

@ -26,7 +26,7 @@
using namespace render;
void DrawStatusConfig::dirtyHelper() {
_isEnabled = showNetwork || showDisplay;
_isEnabled = showNetwork || showDisplay || showFade;
emit dirty();
}
@ -79,6 +79,7 @@ const gpu::TexturePointer DrawStatus::getStatusIconMap() const {
void DrawStatus::configure(const Config& config) {
_showDisplay = config.showDisplay;
_showNetwork = config.showNetwork;
_showFade = config.showFade;
}
void DrawStatus::run(const RenderContextPointer& renderContext, const Input& input) {
@ -96,40 +97,70 @@ void DrawStatus::run(const RenderContextPointer& renderContext, const Input& inp
int nbItems = 0;
render::ItemBounds itemBounds;
std::vector<std::pair<glm::ivec4, glm::ivec4>> itemStatus;
{
for (size_t i = 0; i < inItems.size(); ++i) {
const auto& item = inItems[i];
if (!item.bound.isInvalid()) {
if (!item.bound.isNull()) {
itemBounds.emplace_back(render::ItemBound(item.id, item.bound));
} else {
itemBounds.emplace_back(item.id, AABox(item.bound.getCorner(), 0.1f));
}
auto& itemScene = scene->getItem(item.id);
for (size_t i = 0; i < inItems.size(); ++i) {
const auto& item = inItems[i];
if (!item.bound.isInvalid()) {
if (!item.bound.isNull()) {
itemBounds.emplace_back(render::ItemBound(item.id, item.bound));
} else {
itemBounds.emplace_back(item.id, AABox(item.bound.getCorner(), 0.1f));
}
auto itemStatusPointer = itemScene.getStatus();
if (itemStatusPointer) {
itemStatus.push_back(std::pair<glm::ivec4, glm::ivec4>());
// Query the current status values, this is where the statusGetter lambda get called
auto&& currentStatusValues = itemStatusPointer->getCurrentValues();
int valueNum = 0;
for (int vec4Num = 0; vec4Num < NUM_STATUS_VEC4_PER_ITEM; vec4Num++) {
auto& value = (vec4Num ? itemStatus[nbItems].first : itemStatus[nbItems].second);
value = glm::ivec4(Item::Status::Value::INVALID.getPackedData());
for (int component = 0; component < VEC4_LENGTH; component++) {
valueNum = vec4Num * VEC4_LENGTH + component;
if (valueNum < (int)currentStatusValues.size()) {
value[component] = currentStatusValues[valueNum].getPackedData();
auto& itemScene = scene->getItem(item.id);
if (_showNetwork || _showFade) {
const static auto invalid = glm::ivec4(Item::Status::Value::INVALID.getPackedData());
itemStatus.emplace_back(invalid, invalid);
int vec4Num = 0;
int vec4Component = 0;
if (_showNetwork) {
auto itemStatusPointer = itemScene.getStatus();
if (itemStatusPointer) {
// Query the current status values, this is where the statusGetter lambda get called
auto&& currentStatusValues = itemStatusPointer->getCurrentValues();
for (const auto& statusValue : currentStatusValues) {
if (vec4Num == NUM_STATUS_VEC4_PER_ITEM) {
// Ran out of space
break;
}
auto& value = (vec4Num == 0 ? itemStatus[nbItems].first : itemStatus[nbItems].second);
value[vec4Component] = statusValue.getPackedData();
++vec4Component;
if (vec4Component == VEC4_LENGTH) {
vec4Component = 0;
++vec4Num;
}
}
}
} else {
auto invalid = glm::ivec4(Item::Status::Value::INVALID.getPackedData());
itemStatus.emplace_back(invalid, invalid);
}
nbItems++;
if (_showFade && vec4Num != NUM_STATUS_VEC4_PER_ITEM) {
auto& value = (vec4Num == 0 ? itemStatus[nbItems].first : itemStatus[nbItems].second);
Item::Status::Value status;
status.setColor(Item::Status::Value::CYAN);
status.setIcon((unsigned char)Item::Status::Icon::SIMULATION_OWNER);
if (itemScene.getTransitionId() != INVALID_INDEX) {
// We have a transition. Show this icon.
status.setScale(1.0f);
} else {
status.setScale(0.0f);
}
value[vec4Component] = status.getPackedData();
++vec4Component;
if (vec4Component == VEC4_LENGTH) {
vec4Component = 0;
++vec4Num;
}
}
}
nbItems++;
}
}
@ -169,7 +200,7 @@ void DrawStatus::run(const RenderContextPointer& renderContext, const Input& inp
batch.setPipeline(getDrawItemStatusPipeline());
if (_showNetwork) {
if (_showNetwork || _showFade) {
if (!_instanceBuffer) {
_instanceBuffer = std::make_shared<gpu::Buffer>();
}

View file

@ -27,10 +27,12 @@ namespace render {
bool showDisplay{ false };
bool showNetwork{ false };
bool showFade{ false };
public slots:
void setShowDisplay(bool enabled) { showDisplay = enabled; dirtyHelper(); }
void setShowNetwork(bool enabled) { showNetwork = enabled; dirtyHelper(); }
void setShowFade(bool enabled) { showFade = enabled; dirtyHelper(); }
signals:
void dirty();
@ -57,6 +59,7 @@ namespace render {
protected:
bool _showDisplay; // initialized by Config
bool _showNetwork; // initialized by Config
bool _showFade; // initialized by Config
gpu::Stream::FormatPointer _drawItemFormat;
gpu::PipelinePointer _drawItemBoundsPipeline;

View file

@ -354,6 +354,17 @@ public:
// This is Used for monitoring and dynamically adjust the quality
class Status {
public:
enum class Icon {
ACTIVE_IN_BULLET = 0,
PACKET_SENT = 1,
PACKET_RECEIVED = 2,
SIMULATION_OWNER = 3,
HAS_ACTIONS = 4,
OTHER_SIMULATION_OWNER = 5,
ENTITY_HOST_TYPE = 6,
NONE = 255
};
// Status::Value class is the data used to represent the transient information of a status as a square icon
// The "icon" is a square displayed in the 3D scene over the render::Item AABB center.

View file

@ -72,6 +72,11 @@ struct MenuCache {
}
flushCache(menu);
MenuWrapper* parentItem = menu->getMenu(path);
if (!parentItem) {
qWarning() << "Attempted to add item to non-existent path " << path;
return;
}
QAction* action = menu->addActionToQMenuAndActionHash(parentItem, name);
if (!groupName.isEmpty()) {
QActionGroup* group{ nullptr };

View file

@ -91,6 +91,7 @@ def parse_args():
parser.add_argument('--debug', action='store_true')
parser.add_argument('--force-bootstrap', action='store_true')
parser.add_argument('--force-build', action='store_true')
parser.add_argument('--release-type', type=str, default="DEV", help="DEV, PR, or PRODUCTION")
parser.add_argument('--vcpkg-root', type=str, help='The location of the vcpkg distribution')
parser.add_argument('--build-root', required=True, type=str, help='The location of the cmake build')
parser.add_argument('--ports-path', type=str, default=defaultPortsPath)

View file

@ -10,7 +10,6 @@
// Helps manage the list of avatars added to the nametag list
//
var ON = 'ON';
var OFF = 'OFF';
var DEBUG_ON = true;
@ -63,7 +62,7 @@ function maybeClearInterval() {
var Z_SIZE = 0.01;
var LINE_HEIGHT_SCALER = 0.99;
var DISTANCE_SCALER_ON = 0.35;
var DISTANCE_SCALER_ALWAYS_ON = 0.65;
var DISTANCE_SCALER_ALWAYS_ON = 0.45;
var distanceScaler = DISTANCE_SCALER_ON;
var userScaler = 1.0;
var DEFAULT_LINE_HEIGHT = entityProps.lineHeight;
@ -251,11 +250,11 @@ var RIGHT_MARGIN_SCALER = 0.10;
var TOP_MARGIN_SCALER = 0.07;
var BOTTOM_MARGIN_SCALER = 0.03;
var ABOVE_HEAD_OFFSET = 0.30;
var DISTANCE_SCALER_INTERPOLATION_OFFSET_ALWAYSON = 25;
var DISTANCE_SCALER_INTERPOLATION_OFFSET_ALWAYSON = 15;
var DISTANCE_SCALER_INTERPOLATION_OFFSET_ON = 10;
var maxDistance = MAX_RADIUS_IGNORE_METERS;
var onModeScalar = 0.60;
var alwaysOnModeScalar = -0.55;
var onModeScalar = 0.55;
var alwaysOnModeScalar = -0.75;
function makeNameTag(uuid) {
var avatar = _this.avatars[uuid];
var avatarInfo = avatar.avatarInfo;
@ -334,7 +333,7 @@ function makeNameTag(uuid) {
// Check to see if the display named changed or if the distance is big enough to need a redraw.
var MAX_RADIUS_IGNORE_METERS = 22;
var MAX_ON_MODE_DISTANCE = 30;
var MAX_ON_MODE_DISTANCE = 35;
var CHECK_AVATAR = true;
var MIN_DISTANCE = 0.2;
function maybeRedraw(uuid) {

View file

@ -8,7 +8,6 @@
//
// Click on someone to get a nametag for them
//
var PickRayController = Script.require('./resources/modules/pickRayController.js?' + Date.now());
var NameTagListManager = Script.require('./resources/modules/nameTagListManager.js?' + Date.now());
var pickRayController = new PickRayController();

View file

@ -45,7 +45,8 @@ function runNewDefaultsTogether() {
// Uncomment this out once the work is actually complete.
// Until then, users are required to access some functionality from the top menu bar.
//var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Settings", "Developer", "Help"];
var MENU_NAMES = ["File", "Edit", "View", "Navigate", "Help"];
var MENU_NAMES = ["File", "Edit", "Display", "View", "Navigate", "Help",
"Settings > General...", "Settings > Controls...", "Settings > Audio...", "Settings > Graphics...", "Settings > Security..."];
var keepMenusSetting = Settings.getValue("simplifiedUI/keepMenus", false);
function maybeRemoveDesktopMenu() {
if (!keepMenusSetting) {
@ -434,8 +435,7 @@ function ensureFirstPersonCameraInHMD(isHMDMode) {
}
}
var simplifiedNametag = Script.require("../simplifiedNametag/simplifiedNametag.js");
var simplifiedNametag = Script.require("./simplifiedNametag/simplifiedNametag.js");
var oldShowAudioTools;
var oldShowBubbleTools;
var keepExistingUIAndScriptsSetting = Settings.getValue("simplifiedUI/keepExistingUIAndScripts", false);

View file

@ -195,5 +195,7 @@ if (WIN32)
set(TARGET_INSTALL_DIR ${NITPICK_INSTALL_DIR})
set(TARGET_INSTALL_COMPONENT ${CLIENT_COMPONENT})
package_libraries_for_deployment()
elseif (APPLE)
package_libraries_for_deployment()
endif()

View file

@ -16,12 +16,16 @@
QString PythonInterface::getPythonCommand() {
#ifdef Q_OS_WIN
if (_pythonCommand.isNull()) {
QString pythonPath = PathUtils::getPathToExecutable("python.exe");
// Use the python launcher as we need python 3, and python 2 may be installed
// See https://www.python.org/dev/peps/pep-0397/
const QString pythonLauncherExecutable{ "py.exe" };
QString pythonPath = PathUtils::getPathToExecutable(pythonLauncherExecutable);
if (!pythonPath.isNull()) {
_pythonCommand = pythonPath + _pythonExe;
} else {
QMessageBox::critical(0, "python.exe not found",
"Please verify that pyton.exe is in the PATH");
}
else {
QMessageBox::critical(0, pythonLauncherExecutable + " not found",
"Please verify that py.exe is in the PATH");
exit(-1);
}
}
@ -35,4 +39,4 @@ QString PythonInterface::getPythonCommand() {
#endif
return _pythonCommand;
}
}

View file

@ -18,7 +18,7 @@ public:
private:
#ifdef Q_OS_WIN
const QString _pythonExe{ "python.exe" };
const QString _pythonExe{ "py.exe" };
#else
// Both Mac and Linux use "python"
const QString _pythonExe{ "python" };
@ -27,4 +27,4 @@ private:
QString _pythonCommand;
};
#endif // hifi_PythonInterface_h
#endif // hifi_PythonInterface_h

235
tools/qt-builder/README.md Normal file
View file

@ -0,0 +1,235 @@
# General
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.
The second patch is to OpenSL ES audio.
## Requirements
### Windows
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/).
Install with defaults
1. python 2.7.16
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
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.
Verify that python runs python 2.7 (run “python --version”)
1. git >= 1.6
Check if needed `git --version`
Download from https://git-scm.com/download/win
Verify by entering `git --version`
1. perl >= 5.14
Install from Strawberry Perl - http://strawberryperl.com/ - 5.28.1.1 64 bit to C:\Strawberry\
Verify by running `perl --version`
1. flex and bison
Download from https://sourceforge.net/projects/winflexbison/files/latest/download
Uncompress in C:\flex_bison
Rename win-bison.exe to bison.exe and win-flex.exe to flex.exe
Add C:\flex_bison to PATH
Verify by running `flex --version`
Verify by running `bison --version`
1. gperf
Install from http://gnuwin32.sourceforge.net/downlinks/gperf.php
Add C:\Program Files (x86)\GnuWin32\bin to PATH
Verify by running `gperf --version`
1. 7-zip
Download from https://www.7-zip.org/download.html
1. Bash shell
From *Settings* select *Update & Security*
Select *For Developers*
Enable *Developer mode*
Restart PC
Open Control Panel and select *Programs and Features*
Select *Turn Windows features on or off*
Check *Windows Subsystem for Linux*
Click *Restart now*
Download from the Microsoft Store - Search for *bash* and choose the latest Ubuntu version
[First run will take a few minutes]
Enter a user name - all small letters (this is used for *sudo* commands)
Choose a password
### Linux
Tested on Ubuntu 16.04 and 18.04.
**16.04 NEEDED FOR JENKINS~~ **
1. qt5 requirements
edit /etc/apt/sources.list (edit as root)
replace all *# deb-src* with *deb-src* (in vi `1,$s/# deb-src/deb-src/`)
`sudo apt-get update -y`
`sudo apt-get upgrade -y`
`sudo apt-get build-dep qt5-default -y`
1. git >= 1.6
Check if needed `git --version`
`sudo apt-get install git -y`
Verify again
1. python
Check if needed `python --version` - should return python 2.7.x
`sudo apt-get install python -y` (not python 3!)
Verify again
1. gperf
Check if needed `gperf --version`
`sudo apt-get install gperf -y`
Verify again
1. bison and flex
Check if needed `flex --version` and `bison --version`
`sudo apt-get install flex bison -y`
Verify again
1. pkg-config (needed for qtwebengine)
Check if needed `pkg-config --version`
`sudo apt-get install pkg-config -y`
Verify again
1. OpenGL
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 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
1. make
Check if needed `make --version`
`sudo apt-get install make -y`
Verify again
1. g++
Check if needed
`g++ --version`
`sudo apt-get install g++ -y`
Verify again
1. dbus-1 (needed for qtwebengine)
`sudo apt-get install libdbus-glib-1-dev -y`
1. nss (needed for qtwebengine)
`sudo apt-get install libnss3-dev -y`
### Mac
1. git >= 1.6
Check if needed `git --version`
Install from https://git-scm.com/download/mac
Verify again
1. pkg-config
brew fontconfig dbus-glib stall pkg-config
1. dbus-1
brew install dbus-glib
## Build Process
### General
qt is cloned to the qt5 folder.
The build is performed in the qt5-build folder.
Build products are installed to the qt5-install folder.
Before running configure, make sure that the qt5-build folder is empty.
**Only run the git patches once!!!**
### 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*.
#### Preparing source files
`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`
`git apply --ignore-space-change --ignore-whitespace patches/qfloat16.patch`
`git apply --ignore-space-change --ignore-whitespace patches/aec.patch`
`cd ..`
#### Configuring
`mkdir qt5-install`
`mkdir qt5-build`
`cd qt5-build`
run `..\qt5\qt5vars.bat`
`cd ..\..\qt5-build`
`..\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 ..`
#### 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
*configure* errors, if any, may be viewed in **config.log** and **config.summary**

View file

@ -0,0 +1,40 @@
diff --git a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp
index ad87cb0..54ed18a 100644
--- a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp
+++ b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.cpp
@@ -117,6 +117,8 @@ QOpenSLESAudioInput::QOpenSLESAudioInput(const QByteArray &device)
m_recorderPreset = SL_ANDROID_RECORDING_PRESET_CAMCORDER;
else if (qstrcmp(device, QT_ANDROID_PRESET_VOICE_RECOGNITION) == 0)
m_recorderPreset = SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION;
+ else if (qstrcmp(device, QT_ANDROID_PRESET_VOICE_COMMUNICATION) == 0)
+ m_recorderPreset = SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION;
else
m_recorderPreset = SL_ANDROID_RECORDING_PRESET_GENERIC;
#endif
diff --git a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h
index ad84db0..35cc379 100644
--- a/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h
+++ b/qtmultimedia/src/plugins/opensles/qopenslesaudioinput.h
@@ -50,6 +50,7 @@
#define QT_ANDROID_PRESET_MIC "mic"
#define QT_ANDROID_PRESET_CAMCORDER "camcorder"
#define QT_ANDROID_PRESET_VOICE_RECOGNITION "voicerecognition"
+#define QT_ANDROID_PRESET_VOICE_COMMUNICATION "voicecommunication"
#endif
diff --git a/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp b/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp
index 1a16cc2..2577fb3 100644
--- a/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp
+++ b/qtmultimedia/src/plugins/opensles/qopenslesengine.cpp
@@ -114,7 +114,8 @@ QList<QByteArray> QOpenSLESEngine::availableDevices(QAudio::Mode mode) const
#ifdef ANDROID
devices << QT_ANDROID_PRESET_MIC
<< QT_ANDROID_PRESET_CAMCORDER
- << QT_ANDROID_PRESET_VOICE_RECOGNITION;
+ << QT_ANDROID_PRESET_VOICE_RECOGNITION
+ << QT_ANDROID_PRESET_VOICE_COMMUNICATION;
#else
devices << "default";
#endif

View file

@ -0,0 +1,44 @@
diff --git a/qtbase/src/corelib/global/qfloat16.h b/qtbase/src/corelib/global/qfloat16.h
index 3e50ad8467..2453ff8847 100644
--- a/qtbase/src/corelib/global/qfloat16.h
+++ b/qtbase/src/corelib/global/qfloat16.h
@@ -83,7 +83,9 @@ private:
Q_CORE_EXPORT static const quint32 shifttable[];
friend bool qIsNull(qfloat16 f) Q_DECL_NOTHROW;
+#if ! defined(QT_NO_FLOAT16_OPERATORS)
friend qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW;
+#endif
};
Q_DECLARE_TYPEINFO(qfloat16, Q_PRIMITIVE_TYPE);
@@ -165,6 +167,7 @@ inline qfloat16::operator float() const Q_DECL_NOTHROW
}
#endif
+#if ! defined(QT_NO_FLOAT16_OPERATORS)
inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW
{
qfloat16 f;
@@ -206,11 +209,12 @@ QF16_MAKE_ARITH_OP_INT(-)
QF16_MAKE_ARITH_OP_INT(*)
QF16_MAKE_ARITH_OP_INT(/)
#undef QF16_MAKE_ARITH_OP_INT
-
+#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
+#if ! defined(QT_NO_FLOAT16_OPERATORS)
inline bool operator>(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast<float>(a) > static_cast<float>(b); }
inline bool operator<(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast<float>(a) < static_cast<float>(b); }
inline bool operator>=(qfloat16 a, qfloat16 b) Q_DECL_NOTHROW { return static_cast<float>(a) >= static_cast<float>(b); }
@@ -244,6 +248,7 @@ QF16_MAKE_BOOL_OP_INT(<=)
QF16_MAKE_BOOL_OP_INT(==)
QF16_MAKE_BOOL_OP_INT(!=)
#undef QF16_MAKE_BOOL_OP_INT
+#endif
QT_WARNING_POP

2
tools/qt-builder/qt.conf Normal file
View file

@ -0,0 +1,2 @@
[Paths]
Prefix=..

View file

@ -0,0 +1,17 @@
@echo off
REM Set up \Microsoft Visual Studio 2015, where <arch> is \c amd64, \c x86, etc.
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
SET _ROOT=..\qt5
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
REM Uncomment the below line when using a git checkout of the source repository
SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
SET _ROOT=
REM Keeps the command line open when this script is run.
cmd /k