Skip to content

Commit

Permalink
Merge branch 'master' into feature/vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGro authored Dec 28, 2024
2 parents 5e430d3 + 1e40a6b commit 10799a0
Show file tree
Hide file tree
Showing 17 changed files with 93 additions and 63 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/linux_server_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/master_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master_deploy_apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
jsdoc root.js -r api-mainpage.md -c config.json -d output
- name: Deploy API-docs
uses: SamKirkland/[email protected].4
uses: SamKirkland/[email protected].5
with:
server: www531.your-server.de
protocol: ftps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master_deploy_doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
doxygen Doxyfile
- name: Deploy Doxygen
uses: SamKirkland/[email protected].4
uses: SamKirkland/[email protected].5
with:
server: www531.your-server.de
protocol: ftps
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}}
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ local.properties
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.cache
# Workspace
*.code-workspace

Expand Down
7 changes: 7 additions & 0 deletions interface/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions interface/src/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -723,6 +726,7 @@ private slots:
Setting::Handle<bool> _hmdTabletBecomesToolbarSetting;
Setting::Handle<bool> _preferStylusOverLaserSetting;
Setting::Handle<bool> _preferAvatarFingerOverStylusSetting;
Setting::Handle<bool> _showGraphicsIconSetting;
Setting::Handle<bool> _constrainToolbarPosition;
Setting::Handle<bool> _awayStateWhenFocusLostInVREnabled;
Setting::Handle<QString> _preferredCursor;
Expand Down
6 changes: 6 additions & 0 deletions interface/src/ui/PreferencesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); };
Expand Down
4 changes: 3 additions & 1 deletion libraries/entities/src/EntityItemPropertiesDocs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 - <code>true</code> if the image should be emissive (unlit), <code>false</code> if it
* shouldn't.
* @property {boolean} keepAspectRatio=true - <code>true</code> if the image should maintain its aspect ratio,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libraries/model-serializers/src/GLTFSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
54 changes: 43 additions & 11 deletions scripts/system/graphicsSettings.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
6 changes: 4 additions & 2 deletions tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-20.04
Original file line number Diff line number Diff line change
@@ -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ß ([email protected])"
LABEL description="Development image for full Overte builds"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04
Original file line number Diff line number Diff line change
@@ -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ß ([email protected])"
LABEL description="Development image for full Overte builds"
Expand All @@ -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

Expand Down
20 changes: 0 additions & 20 deletions tools/ci-scripts/rpm_package/Dockerfile_build_fedora-39

This file was deleted.

0 comments on commit 10799a0

Please sign in to comment.