diff --git a/.github/workflows/linux_server_build.yml b/.github/workflows/linux_server_build.yml index 64f1529221d..084287c25be 100644 --- a/.github/workflows/linux_server_build.yml +++ b/.github/workflows/linux_server_build.yml @@ -82,16 +82,6 @@ jobs: arch: aarch64 runner: [self_hosted, type-cax41, image-arm-app-docker-ce] - - os: fedora-39 - image: docker.io/overte/overte-server-build:0.1.4-fedora-39-amd64 - arch: amd64 - runner: [self_hosted, type-cx52, image-x86-app-docker-ce] - - - os: fedora-39 - image: docker.io/overte/overte-server-build:0.1.4-fedora-39-aarch64 - arch: aarch64 - runner: [self_hosted, type-cax41, image-arm-app-docker-ce] - - os: fedora-40 image: docker.io/overte/overte-server-build:0.1.4-fedora-40-amd64 arch: amd64 @@ -224,10 +214,6 @@ jobs: else # RPM if [ "${{ matrix.os }}" == "rockylinux-9" ]; then echo "ARTIFACT_PATTERN=overte-server-$RPMVERSION-1.el9.$INSTALLER_EXT" >> $GITHUB_ENV - elif [ "${{ matrix.os }}" == "fedora-38" ]; then - echo "ARTIFACT_PATTERN=overte-server-$RPMVERSION-1.fc38.$INSTALLER_EXT" >> $GITHUB_ENV - elif [ "${{ matrix.os }}" == "fedora-39" ]; then - echo "ARTIFACT_PATTERN=overte-server-$RPMVERSION-1.fc39.$INSTALLER_EXT" >> $GITHUB_ENV elif [ "${{ matrix.os }}" == "fedora-40" ]; then echo "ARTIFACT_PATTERN=overte-server-$RPMVERSION-1.fc40.$INSTALLER_EXT" >> $GITHUB_ENV else @@ -266,7 +252,7 @@ jobs: - name: Archive cmake logs if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: cmake-logs-${{ matrix.os }}-${{ matrix.arch }}-${{ github.event.number }}.tar.xz path: cmake-logs-${{ matrix.os }}-${{ matrix.arch }}-${{ github.event.number }}.tar.xz diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 8754c086966..2704ea16d43 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -65,7 +65,7 @@ jobs: run: | echo "UPLOAD_PREFIX=build/overte/master" >> $GITHUB_ENV - echo ::set-output name=github_sha_short::`echo $GIT_COMMIT | cut -c1-7` + echo "{github_sha_short}={`echo $GIT_COMMIT | cut -c1-7`}" >> $GITHUB_OUTPUT echo "JOB_NAME=build (${{matrix.os}}, ${{matrix.build_type}})" >> $GITHUB_ENV echo "APP_TARGET_NAME=$APP_NAME" >> $GITHUB_ENV # Linux build variables @@ -82,7 +82,7 @@ jobs: echo "ZIP_ARGS=-r" >> $GITHUB_ENV echo "INSTALLER_EXT=dmg" >> $GITHUB_ENV echo "CMAKE_EXTRA=-DOVERTE_CPU_ARCHITECTURE= -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -G Xcode" >> $GITHUB_ENV - echo "::set-output name=symbols_archive::${BUILD_NUMBER}-${{ matrix.build_type }}-mac-symbols.zip" + echo "symbols_archive=${BUILD_NUMBER}-${{ matrix.build_type }}-mac-symbols.zip" >> $GITHUB_ENV echo "APP_TARGET_NAME=Overte" >> $GITHUB_ENV fi # Windows build variables diff --git a/.github/workflows/master_deploy_apidocs.yml b/.github/workflows/master_deploy_apidocs.yml index 79d4533b400..a4c501ac5a9 100644 --- a/.github/workflows/master_deploy_apidocs.yml +++ b/.github/workflows/master_deploy_apidocs.yml @@ -31,7 +31,7 @@ jobs: jsdoc root.js -r api-mainpage.md -c config.json -d output - name: Deploy API-docs - uses: SamKirkland/FTP-Deploy-Action@v4.3.4 + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 with: server: www531.your-server.de protocol: ftps diff --git a/.github/workflows/master_deploy_doxygen.yml b/.github/workflows/master_deploy_doxygen.yml index 9a12a165a85..d2caa15d18f 100644 --- a/.github/workflows/master_deploy_doxygen.yml +++ b/.github/workflows/master_deploy_doxygen.yml @@ -29,7 +29,7 @@ jobs: doxygen Doxyfile - name: Deploy Doxygen - uses: SamKirkland/FTP-Deploy-Action@v4.3.4 + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 with: server: www531.your-server.de protocol: ftps diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index f3671a0723e..c9d06d5663f 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -64,8 +64,8 @@ jobs: runner: [self_hosted, type-cx52, image-x86-app-docker-ce] arch: amd64 build_type: full - apt-dependencies: pkg-config libxext-dev libdouble-conversion-dev libpcre2-16-0 libpulse0 libharfbuzz-dev libnss3 libnspr4 libxdamage1 libasound2 vulkan-validationlayers libvulkan-dev libvulkan1 # add missing dependencies to docker image when convenient - image: docker.io/overte/overte-full-build:0.1.1-ubuntu-20.04-amd64 + # apt-dependencies: # add missing dependencies to docker image when convenient + image: docker.io/overte/overte-full-build:0.1.2-ubuntu-20.04-amd64 # Android builds are currently failing #- os: ubuntu-18.04 # build_type: android @@ -75,8 +75,7 @@ jobs: runner: [self_hosted, type-cax41, image-arm-app-docker-ce] arch: aarch64 build_type: full - apt-dependencies: vulkan-validationlayers libvulkan-dev libvulkan1 libqt5x11extras5-dev qtbase5-private-dev - image: docker.io/overte/overte-full-build:0.1.1-ubuntu-22.04-aarch64 + image: docker.io/overte/overte-full-build:0.1.2-ubuntu-22.04-aarch64 fail-fast: false runs-on: ${{matrix.runner}} container: ${{matrix.image}} @@ -245,7 +244,7 @@ jobs: - name: Archive cmake logs if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz path: ./cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index a6780536329..b72075017c8 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -56,7 +56,6 @@ jobs: echo "UPLOAD_PREFIX=build/overte/release/" >> $GITHUB_ENV fi - echo ::set-output name=github_sha_short::`echo $GIT_COMMIT | cut -c1-7` echo "JOB_NAME=${{matrix.os}}, ${{matrix.build_type}}" >> $GITHUB_ENV echo "APP_TARGET_NAME=$APP_NAME" >> $GITHUB_ENV diff --git a/.gitignore b/.gitignore index 90ff1870273..6c35659bf36 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ local.properties !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +.cache # Workspace *.code-workspace diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a63d638d3b0..27ca7a3b10b 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -970,6 +970,7 @@ const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true; const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false; const bool DEFAULT_PREFER_STYLUS_OVER_LASER = false; const bool DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS = false; +const bool DEFAULT_SHOW_GRAPHICS_ICON = true; const QString DEFAULT_CURSOR_NAME = "SYSTEM"; const bool DEFAULT_MINI_TABLET_ENABLED = false; const bool DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED = true; @@ -1011,6 +1012,7 @@ Application::Application( _hmdTabletBecomesToolbarSetting("hmdTabletBecomesToolbar", DEFAULT_HMD_TABLET_BECOMES_TOOLBAR), _preferStylusOverLaserSetting("preferStylusOverLaser", DEFAULT_PREFER_STYLUS_OVER_LASER), _preferAvatarFingerOverStylusSetting("preferAvatarFingerOverStylus", DEFAULT_PREFER_AVATAR_FINGER_OVER_STYLUS), + _showGraphicsIconSetting("showGraphicsIcon", DEFAULT_SHOW_GRAPHICS_ICON), _constrainToolbarPosition("toolbar/constrainToolbarToCenterX", true), _awayStateWhenFocusLostInVREnabled("awayStateWhenFocusLostInVREnabled", DEFAULT_AWAY_STATE_WHEN_FOCUS_LOST_IN_VR_ENABLED), _preferredCursor("preferredCursor", DEFAULT_CURSOR_NAME), @@ -3842,6 +3844,11 @@ void Application::setPreferAvatarFingerOverStylus(bool value) { _preferAvatarFingerOverStylusSetting.set(value); } +void Application::setShowGraphicsIcon(bool value) { + _showGraphicsIconSetting.set(value); + DependencyManager::get< MessagesClient >()->sendLocalMessage("Overte-ShowGraphicsIconChanged", ""); +} + void Application::setPreferredCursor(const QString& cursorName) { qCDebug(interfaceapp) << "setPreferredCursor" << cursorName; diff --git a/interface/src/Application.h b/interface/src/Application.h index f3cbd351eb2..ec575b384d1 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -263,6 +263,9 @@ class Application : public QApplication, bool getPreferAvatarFingerOverStylus() { return _preferAvatarFingerOverStylusSetting.get(); } void setPreferAvatarFingerOverStylus(bool value); + bool getShowGraphicsIcon() { return _showGraphicsIconSetting.get(); } + void setShowGraphicsIcon(bool value); + bool getMiniTabletEnabled() { return _miniTabletEnabledSetting.get(); } void setMiniTabletEnabled(bool enabled); @@ -723,6 +726,7 @@ private slots: Setting::Handle _hmdTabletBecomesToolbarSetting; Setting::Handle _preferStylusOverLaserSetting; Setting::Handle _preferAvatarFingerOverStylusSetting; + Setting::Handle _showGraphicsIconSetting; Setting::Handle _constrainToolbarPosition; Setting::Handle _awayStateWhenFocusLostInVREnabled; Setting::Handle _preferredCursor; diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index 65e4daa5e02..4c87f129989 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -225,6 +225,12 @@ void setupPreferences() { preferences->addPreference(delaySlider); } + { + auto getter = []() -> bool { return qApp->getShowGraphicsIcon(); }; + auto setter = [](bool value) { qApp->setShowGraphicsIcon(value); }; + preferences->addPreference(new CheckPreference(UI_CATEGORY, "Show Graphics icon on tablet and toolbar", getter, setter)); + } + static const QString VIEW_CATEGORY{ "View" }; { auto getter = [myAvatar]()->float { return myAvatar->getRealWorldFieldOfView(); }; diff --git a/libraries/entities/src/EntityItemPropertiesDocs.cpp b/libraries/entities/src/EntityItemPropertiesDocs.cpp index 8f8959165cb..8195161b776 100644 --- a/libraries/entities/src/EntityItemPropertiesDocs.cpp +++ b/libraries/entities/src/EntityItemPropertiesDocs.cpp @@ -935,7 +935,9 @@ * * @typedef {object} Entities.EntityProperties-Image * @property {Vec3} dimensions=0.1,0.1,0.01 - The dimensions of the entity. - * @property {string} imageURL="" - The URL of the image to use. + * @property {string} imageURL="" - The URL of the image to use. It can also contain a base64 encoded image, in the same format as glTF. + * For network transmitted entities there's about 1000-character limit for the length of this field. For base64 image + * the property string needs to begin with `data:image/png;base64,`, `data:image/jpeg;base64,` or `data:image/webp;base64,`. * @property {boolean} emissive=false - true if the image should be emissive (unlit), false if it * shouldn't. * @property {boolean} keepAspectRatio=true - true if the image should maintain its aspect ratio, diff --git a/libraries/material-networking/src/material-networking/TextureCache.cpp b/libraries/material-networking/src/material-networking/TextureCache.cpp index 840fa50a0a9..e2d48225431 100644 --- a/libraries/material-networking/src/material-networking/TextureCache.cpp +++ b/libraries/material-networking/src/material-networking/TextureCache.cpp @@ -254,6 +254,18 @@ NetworkTexturePointer TextureCache::getTexture(const QUrl& url, image::TextureUs if (url.scheme() == RESOURCE_SCHEME) { return getResourceTexture(url); } + + QString urlString = url.toString(); + if (content.isEmpty() && (urlString.startsWith("data:image/jpeg;base64,") + || urlString.startsWith("data:image/png;base64,") + || urlString.startsWith("data:image/webp;base64,"))) { + QString binaryUrl = urlString.split(",")[1]; + auto decodedContent = binaryUrl.isEmpty() ? QByteArray() : QByteArray::fromBase64(binaryUrl.toUtf8()); + if (!decodedContent.isEmpty()) { + return getTexture(url, type, decodedContent, maxNumPixels, sourceChannel); + } + } + QString decodedURL = QUrl::fromPercentEncoding(url.toEncoded()); if (decodedURL.startsWith("{")) { return getTextureByUUID(decodedURL); diff --git a/libraries/model-serializers/src/GLTFSerializer.cpp b/libraries/model-serializers/src/GLTFSerializer.cpp index 1440fb22d25..d4cee367d3c 100644 --- a/libraries/model-serializers/src/GLTFSerializer.cpp +++ b/libraries/model-serializers/src/GLTFSerializer.cpp @@ -1335,7 +1335,7 @@ HFMTexture GLTFSerializer::getHFMTexture(const cgltf_texture *texture) { hfmTex.filename = textureUrl.toEncoded().append(QString::number(imageIndex).toUtf8()); } - if (url.contains("data:image/jpeg;base64,") || url.contains("data:image/png;base64,") || url.contains("data:image/webp;base64,")) { + if (url.startsWith("data:image/jpeg;base64,") || url.startsWith("data:image/png;base64,") || url.startsWith("data:image/webp;base64,")) { hfmTex.content = requestEmbeddedData(url); } } diff --git a/scripts/system/graphicsSettings.js b/scripts/system/graphicsSettings.js index df556a91b1a..748eafca246 100644 --- a/scripts/system/graphicsSettings.js +++ b/scripts/system/graphicsSettings.js @@ -1,15 +1,20 @@ // // graphicsSettings.js // -// Created by Kalila L. on 8/5/2020 +// Created by Kalila L. on August 5th, 2020 // Copyright 2020 Vircadia contributors. +// Copyright 2024 Overte e.V. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // (function() { // BEGIN LOCAL_SCOPE - + var channelComm = "Overte-ShowGraphicsIconChanged"; + var appStatus = false; + var GRAPHICS_HIDE_AND_SHOW_SETTING_KEY = "showGraphicsIcon"; + var GRAPHICS_HIDE_AND_SHOW_DEFAULT_VALUE = true; + var AppUi = Script.require('appUi'); // cellphone-cog MDI @@ -49,22 +54,49 @@ } function startup() { - ui = new AppUi({ - buttonName: BUTTON_NAME, - sortOrder: 8, - normalButton: getIcon(), - activeButton: getIcon().replace('white', 'black'), - home: GRAPHICS_QML_SOURCE - }); + if (!appStatus) { + ui = new AppUi({ + buttonName: BUTTON_NAME, + sortOrder: 8, + normalButton: getIcon(), + activeButton: getIcon().replace('white', 'black'), + home: GRAPHICS_QML_SOURCE + }); + } + appStatus = true; } function shutdown() { + if (appStatus) { + ui.onScriptEnding(); + appStatus = false; + } + } + + function cleanup() { + Messages.messageReceived.disconnect(onMessageReceived); + Messages.unsubscribe(channelComm); + } + + function onMessageReceived(channel, message, sender, localOnly) { + if (channel === channelComm && localOnly) { + if (Settings.getValue(GRAPHICS_HIDE_AND_SHOW_SETTING_KEY, GRAPHICS_HIDE_AND_SHOW_DEFAULT_VALUE)) { + startup(); + } else { + shutdown(); + } + } } // // Run the functions. // - startup(); - Script.scriptEnding.connect(shutdown); + if (Settings.getValue(GRAPHICS_HIDE_AND_SHOW_SETTING_KEY, GRAPHICS_HIDE_AND_SHOW_DEFAULT_VALUE)) { + startup(); + } + Messages.subscribe(channelComm); + Messages.messageReceived.connect(onMessageReceived); + + Script.scriptEnding.connect(cleanup); }()); // END LOCAL_SCOPE diff --git a/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-20.04 b/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-20.04 index 12a56ced038..eb26d1b426d 100644 --- a/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-20.04 +++ b/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-20.04 @@ -1,8 +1,8 @@ -# Copyright 2022-2023 Overte e.V. +# Copyright 2022-2024 Overte e.V. # SPDX-License-Identifier: Apache-2.0 # Docker file for building Overte -# Example build: docker build -t overte/overte-full-build:0.1.1-ubuntu-20.04 -f Dockerfile_build_ubuntu-20.04 . +# Example build: docker build -t overte/overte-full-build:0.1.2-ubuntu-20.04 -f Dockerfile_build_ubuntu-20.04 . FROM ubuntu:20.04 LABEL maintainer="Julian Groß (julian.gro@overte.org)" LABEL description="Development image for full Overte builds" @@ -18,6 +18,8 @@ RUN apt-get update && apt-get -y install tzdata RUN apt-get -y install curl ninja-build git cmake g++ libssl-dev python3-distutils python3-distro mesa-common-dev libgl1-mesa-dev libsystemd-dev # Install server-console build dependencies RUN apt-get -y install npm +# Install Interface dependencies +RUN apt-get -y install pkg-config libxext-dev libdouble-conversion-dev libpcre2-16-0 libpulse0 libharfbuzz-dev libnss3 libnspr4 libxdamage1 libasound2 vulkan-validationlayers libvulkan-dev libvulkan1 # Install tools for package creation RUN apt-get -y install sudo chrpath binutils dh-make diff --git a/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 b/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 index a80207471e8..a4da419e87d 100644 --- a/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 +++ b/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 @@ -1,8 +1,8 @@ -# Copyright 2022-2023 Overte e.V. +# Copyright 2022-2024 Overte e.V. # SPDX-License-Identifier: Apache-2.0 # Docker file for building Overte -# Example build: docker build -t overte/overte-full-build:0.1.1-ubuntu-22.04 -f Dockerfile_build_ubuntu-22.04 . +# Example build: docker build -t overte/overte-full-build:0.1.2-ubuntu-22.04 -f Dockerfile_build_ubuntu-22.04 . FROM ubuntu:22.04 LABEL maintainer="Julian Groß (julian.gro@overte.org)" LABEL description="Development image for full Overte builds" @@ -19,7 +19,7 @@ RUN apt-get -y install curl ninja-build git cmake g++ libssl-dev libqt5websocket # Install Overte tools build dependencies RUN apt-get -y install libqt5webchannel5-dev qtwebengine5-dev libqt5xmlpatterns5-dev # Install Overte Interface build dependencies -RUN apt-get -y install libqt5svg5-dev qttools5-dev +RUN apt-get -y install libqt5svg5-dev qttools5-dev vulkan-validationlayers libvulkan-dev libvulkan1 libqt5x11extras5-dev qtbase5-private-dev # Install server-console build dependencies RUN apt-get -y install npm diff --git a/tools/ci-scripts/rpm_package/Dockerfile_build_fedora-39 b/tools/ci-scripts/rpm_package/Dockerfile_build_fedora-39 deleted file mode 100644 index ef5ef248194..00000000000 --- a/tools/ci-scripts/rpm_package/Dockerfile_build_fedora-39 +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2022-2024 Overte e.V. -# SPDX-License-Identifier: Apache-2.0 - -# Docker file for building Overte Server -# Example build: docker build -t overte/overte-server-build:0.1.4-fedora-39 -f Dockerfile_build_fedora-39 . -FROM fedora:39 -LABEL maintainer="Julian Groß (julian.gro@overte.org)" -LABEL description="Development image for Overte Domain server and assignment clients." - -# Install Overte domain-server and assignment-client build dependencies -RUN dnf -y install curl ninja-build git cmake gcc gcc-c++ openssl-devel qt5-qtwebsockets-devel qt5-qtmultimedia-devel unzip libXext-devel qt5-qtwebchannel-devel qt5-qtwebengine-devel qt5-qtxmlpatterns-devel systemd-devel python3.11 - -# Install additional build tools -RUN dnf -y install zip unzip - -# Install tools for package creation -RUN dnf -y install chrpath rpmdevtools - -# Install tools needed for our Github Actions Workflow -Run dnf -y install python3-boto3 python3-pygithub