diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 606209725b..8b4201f068 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -188,6 +188,16 @@ jobs: done } retry cmake --build . --config $BUILD_TYPE --target package $CMAKE_BUILD_EXTRA + # As of 05/17/21 GitHub Virtual Environments changed their "Ubuntu 18.04.5 LTS" image to include two versions of CMake for Android + # https://github.com/actions/virtual-environments/blob/ubuntu18/20210517.1/images/linux/Ubuntu1804-README.md + # Removing 3.18.1 version of CMake as its not compatible with our Android build. + # It will fall back to 3.10.2 which is already installed + - name: Nuke CMake 3.18.1-g262b901 + if: matrix.build_type == 'android' + shell: bash + working-directory: ${{runner.workspace}}/vircadia + run: | + /usr/local/lib/android/sdk/tools/bin/sdkmanager --uninstall 'cmake;3.18.1' - name: Build for Android + Quest if: matrix.build_type == 'android' shell: bash diff --git a/.grenrc.js b/.grenrc.js new file mode 100644 index 0000000000..0ac3acc842 --- /dev/null +++ b/.grenrc.js @@ -0,0 +1,43 @@ +// +// .grenrc.js +// +// Created by Kalila L. on May 25, 2021 +// Copyright 2021 Vircadia contributors. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +// This configuration is for generating a changelog with gren for a GitHub repository. +// https://github.com/github-tools/github-release-notes +// +// gren changelog -G +// + +module.exports = { + "dataSource": "prs", + "prefix": "", + "ignoreLabels": [ + "enhancement", + "bugfix", + "CR Approved", + "QA Approved", + "allow-build-upload", + "bug", + "confirmed", + "do not merge", + "duplicate", + "good first issue", + "help wanted", + "hifi migration", + "high risk", + "rebuild", + "merge right before snip" + ], + "onlyMilestones": true, + "groupBy": { + "Enhancements": ["enhancement"], + "Bug Fixes": ["bugfix"], + "Docs": ["docs"] + }, + "changelogFilename": "CHANGELOG.md" +} diff --git a/INSTALLER.md b/INSTALLER.md index 4132ef7298..8727c46c93 100644 --- a/INSTALLER.md +++ b/INSTALLER.md @@ -1,6 +1,6 @@ # Creating an Installer -*Last Updated on March 4, 2021* +*Last Updated on May 25, 2021* Follow the [build guide](BUILD.md) to figure out how to build Vircadia for your platform. @@ -85,19 +85,30 @@ For code signing to work, you will need to set the `HF_PFX_FILE` and `HF_PFX_PAS 1. **Cause:** The complete path (current directory + relative path) has to be < 260 characters to any of the relevant files. 1. **Solution:** Move your build and packaging folder as high up in the drive as possible to prevent an overage. -### OS X +### MacOS -1. [npm]() - Install version 12.16.3 LTS - -1. Perform a clean CMake. -1. Perform a Release build of ALL_BUILD -1. Perform a Release build of `packaged-server-console` +1. Ensure you have all the prerequisites fulfilled from the [MacOS Build Guide](BUILD_OSX.md). +2. Perform a clean CMake in your build folder. e.g. + ```bash + BUILD_GLOBAL_SERVICES=STABLE USE_STABLE_GLOBAL_SERVICES=1 RELEASE_BUILD=PRODUCTION BUILD_NUMBER="Insert Build Identifier here e.g. short hash of your last Git commit" RELEASE_NAME="Insert Release Name Here" STABLE_BUILD=1 PRODUCTION_BUILD=1 RELEASE_NUMBER="Insert Release Version Here e.g. 1.1.0" RELEASE_TYPE=PRODUCTION cmake -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCLIENT_ONLY=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 .. + ``` +3. Pick a method to build and package your release. + +#### Option A: Use Xcode GUI + +1. Perform a Release build of ALL_BUILD +2. Perform a Release build of `packaged-server-console` This will add a folder to `build\server-console\` - Sandbox-darwin-x64 -1. Perform a Release build of `package` - Installer is now available in `build/_CPack_Packages/Darwin/DragNDrop - +3. Perform a Release build of `package` + Installer is now available in `build/_CPack_Packages/Darwin/DragNDrop` + +#### Option B: Use Terminal + +1. Navigate to your build folder with your terminal. +2. `make -j4`, you can change the number to match the number of threads you would like to use. +3. `make package` to create the package. + ### Linux #### Server diff --git a/README.md b/README.md index 314777e3e2..58e3a501d4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@

Vircadia - Codename Athena

Website | Discord | Download

GitHub contributors GitHub stars GitHub forks Apache 2.0 Discord

+

Build Status

+

Master CI Build

### What is this? @@ -11,7 +13,7 @@ Vircadia™ is a 3D social software project seeking to incrementally bring about * Full-body avatars * FBX, glTF, and OBJ support * JavaScript scripting engine -* 16km^3 world space in a server +* 16km³ world space in a server * Fully self-hosted * Apache 2.0 @@ -64,7 +66,8 @@ Vircadia consists of many projects and codebases with its unifying structure's g #### Child Projects - [Vircadia Builder for Linux](https://github.com/vircadia/vircadia-builder/) -- [General Documentation](https://github.com/vircadia/vircadia-docs-sphinx/) +- [User Documentation](https://github.com/vircadia/vircadia-docs-sphinx/) +- [Developer Documentation](https://github.com/vircadia/vircadia-dev-docs/) ### Contribution diff --git a/cmake/ports/draco/portfile.cmake b/cmake/ports/draco/portfile.cmake index 853d45e862..cc6e9e5f8f 100644 --- a/cmake/ports/draco/portfile.cmake +++ b/cmake/ports/draco/portfile.cmake @@ -19,9 +19,9 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO google/draco - REF 1.3.3 - SHA512 80ed5a623046822f5bb26b2454c8ee8cc93ffe9eb3012e8461cefdfc577b26d69a92ea0f0c5e14f5f48c1ef99f9a7263b01710df376792e74358ae14e49c3897 + REPO vircadia/draco + REF 1.3.5-fixed + SHA512 68bb15de013093077946d431ab1f4080b84a66d45d20873f2c0dc44aa28034fb4ec1f6e24f9300fde563da53943b73d47163b9c6acf2667312128c50c6d075bd HEAD_REF master ) diff --git a/libraries/oculusMobilePlugin/src/OculusMobileControllerManager.cpp b/libraries/oculusMobilePlugin/src/OculusMobileControllerManager.cpp index ec744ce039..9566cf1b49 100644 --- a/libraries/oculusMobilePlugin/src/OculusMobileControllerManager.cpp +++ b/libraries/oculusMobilePlugin/src/OculusMobileControllerManager.cpp @@ -535,7 +535,7 @@ bool OculusMobileInputDevice::triggerHapticPulse(float strength, float duration, return success; } -/**jsdoc +/*@jsdoc *

The Controller.Hardware.OculusTouch object has properties representing Oculus Rift. The property values are * integer IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or * Controller.Standard items in a {@link RouteObject} mapping.

diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index 0ce0bfa217..417e6d94e5 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -36,8 +36,6 @@ #include #include -#include - #include #include #include @@ -327,96 +325,6 @@ void ScriptEngine::disconnectNonEssentialSignals() { } } -void ScriptEngine::runDebuggable() { - static QMenuBar* menuBar { nullptr }; - static QMenu* scriptDebugMenu { nullptr }; - static size_t scriptMenuCount { 0 }; - if (!scriptDebugMenu) { - for (auto window : qApp->topLevelWidgets()) { - auto mainWindow = qobject_cast(window); - if (mainWindow) { - menuBar = mainWindow->menuBar(); - break; - } - } - if (menuBar) { - scriptDebugMenu = menuBar->addMenu("Script Debug"); - } - } - - init(); - _isRunning = true; - _debuggable = true; - _debugger = new QScriptEngineDebugger(this); - _debugger->attachTo(this); - - QMenu* parentMenu = scriptDebugMenu; - QMenu* scriptMenu { nullptr }; - if (parentMenu) { - ++scriptMenuCount; - scriptMenu = parentMenu->addMenu(_fileNameString); - scriptMenu->addMenu(_debugger->createStandardMenu(qApp->activeWindow())); - } else { - qWarning() << "Unable to add script debug menu"; - } - - QScriptValue result = evaluate(_scriptContents, _fileNameString); - - _lastUpdate = usecTimestampNow(); - QTimer* timer = new QTimer(this); - connect(this, &ScriptEngine::finished, [this, timer, parentMenu, scriptMenu] { - if (scriptMenu) { - parentMenu->removeAction(scriptMenu->menuAction()); - --scriptMenuCount; - if (0 == scriptMenuCount) { - menuBar->removeAction(scriptDebugMenu->menuAction()); - scriptDebugMenu = nullptr; - } - } - disconnect(timer); - }); - - connect(timer, &QTimer::timeout, [this, timer] { - if (_isFinished) { - if (!_isRunning) { - return; - } - stopAllTimers(); // make sure all our timers are stopped if the script is ending - - emit scriptEnding(); - emit finished(_fileNameString, qSharedPointerCast(sharedFromThis())); - _isRunning = false; - - emit runningStateChanged(); - emit doneRunning(); - - timer->deleteLater(); - return; - } - - qint64 now = usecTimestampNow(); - // we check for 'now' in the past in case people set their clock back - if (_lastUpdate < now) { - float deltaTime = (float)(now - _lastUpdate) / (float)USECS_PER_SECOND; - if (!(_isFinished || _isStopping)) { - emit update(deltaTime); - } - } - _lastUpdate = now; - - // only clear exceptions if we are not in the middle of evaluating - if (!isEvaluating() && hasUncaughtException()) { - qCWarning(scriptengine) << __FUNCTION__ << "---------- UNCAUGHT EXCEPTION --------"; - qCWarning(scriptengine) << "runDebuggable" << uncaughtException().toString(); - logException(__FUNCTION__); - clearExceptions(); - } - }); - - timer->start(10); -} - - void ScriptEngine::runInThread() { Q_ASSERT_X(!_isThreaded, "ScriptEngine::runInThread()", "runInThread should not be called more than once"); @@ -588,12 +496,6 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { _scriptContents = scriptContents; - { - static const QString DEBUG_FLAG("#debug"); - if (QRegularExpression(DEBUG_FLAG).match(scriptContents).hasMatch()) { - _debuggable = true; - } - } emit scriptLoaded(url); }, reload, maxRetries); } diff --git a/libraries/script-engine/src/ScriptEngine.h b/libraries/script-engine/src/ScriptEngine.h index 1f7cc65d70..0855b0bd73 100644 --- a/libraries/script-engine/src/ScriptEngine.h +++ b/libraries/script-engine/src/ScriptEngine.h @@ -50,8 +50,6 @@ #include "SettingHandle.h" #include "Profile.h" -class QScriptEngineDebugger; - static const QString NO_SCRIPT(""); static const int SCRIPT_FPS = 60; @@ -167,8 +165,6 @@ public: /// services before calling this. void runInThread(); - void runDebuggable(); - /// run the script in the callers thread, exit when stop() is called. void run(); @@ -667,8 +663,6 @@ public: // this is used by code in ScriptEngines.cpp during the "reload all" operation bool isStopping() const { return _isStopping; } - bool isDebuggable() const { return _debuggable; } - void disconnectNonEssentialSignals(); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -982,8 +976,6 @@ protected: EntityScriptContentAvailableMap _contentAvailableQueue; bool _isThreaded { false }; - QScriptEngineDebugger* _debugger { nullptr }; - bool _debuggable { false }; qint64 _lastUpdate; QString _fileNameString; diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index aa9dc9ec9a..62c215c7df 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -26,7 +26,6 @@ #define __LOC__ __FILE__ "(" __STR1__(__LINE__) ") : Warning Msg: " static const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); -static const bool HIFI_SCRIPT_DEBUGGABLES { true }; static const QString SETTINGS_KEY { "RunningScripts" }; static const QUrl DEFAULT_SCRIPTS_LOCATION { "file:///~//defaultScripts.js" }; @@ -589,17 +588,7 @@ void ScriptEngines::launchScriptEngine(ScriptEnginePointer scriptEngine) { // register our application services and set it off on its own thread runScriptInitializers(scriptEngine); - - // FIXME disabling 'shift key' debugging for now. If you start up the application with - // the shift key held down, it triggers a deadlock because of script interfaces running - // on the main thread - auto const wantDebug = scriptEngine->isDebuggable(); // || (qApp->queryKeyboardModifiers() & Qt::ShiftModifier); - - if (HIFI_SCRIPT_DEBUGGABLES && wantDebug) { - scriptEngine->runDebuggable(); - } else { - scriptEngine->runInThread(); - } + scriptEngine->runInThread(); } void ScriptEngines::onScriptFinished(const QString& rawScriptURL, ScriptEnginePointer engine) { diff --git a/tools/doxygen/README.md b/tools/doxygen/README.md index 40f444ca07..658d8814ae 100644 --- a/tools/doxygen/README.md +++ b/tools/doxygen/README.md @@ -5,7 +5,7 @@ ## Prerequisites -**Doxygen** ≥ 3.9.1 - https://www.doxygen.nl/ +**Doxygen** ≥ 1.9.1 - https://www.doxygen.nl/ Make a `/build/doxygen/` directory. diff --git a/tools/jsdoc/config.json b/tools/jsdoc/config.json index 5074362225..36f827338c 100644 --- a/tools/jsdoc/config.json +++ b/tools/jsdoc/config.json @@ -2,16 +2,19 @@ "opts": { "template": "hifi-jsdoc-template" }, + "deploy": { + "root": "https://apidocs.vircadia.dev/" + }, "docdash": { - "meta": { - "title": "", - "description": "", - "keyword": "" + "meta": { + "title": "Vircadia API Docs", + "description": "API documentation for Vircadia.", + "keyword": "api, docs, vircadia, documentation" }, - "search": [true], - "collapse": [true], - "typedefs": [false] - }, + "search": [true], + "collapse": [true], + "typedefs": [false] + }, "templates": { "default": { "outputSourceFiles": false diff --git a/tools/jsdoc/hifi-jsdoc-template/publish.js b/tools/jsdoc/hifi-jsdoc-template/publish.js index 4ca4eb469e..80b985c8a1 100644 --- a/tools/jsdoc/hifi-jsdoc-template/publish.js +++ b/tools/jsdoc/hifi-jsdoc-template/publish.js @@ -380,8 +380,8 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) { itemsNav += ""; } - - + + itemsNav += ''; itemsSeen[item.longname] = true; } diff --git a/tools/jsdoc/hifi-jsdoc-template/static/CNAME b/tools/jsdoc/hifi-jsdoc-template/static/CNAME new file mode 100644 index 0000000000..540222fee1 --- /dev/null +++ b/tools/jsdoc/hifi-jsdoc-template/static/CNAME @@ -0,0 +1 @@ +apidocs.vircadia.dev \ No newline at end of file diff --git a/tools/jsdoc/hifi-jsdoc-template/tmpl/layout.tmpl b/tools/jsdoc/hifi-jsdoc-template/tmpl/layout.tmpl index 1ecd7fc7e0..49ab106347 100644 --- a/tools/jsdoc/hifi-jsdoc-template/tmpl/layout.tmpl +++ b/tools/jsdoc/hifi-jsdoc-template/tmpl/layout.tmpl @@ -3,7 +3,7 @@ - <?js= title ?> + <?js= title ?> - Vircadia API Docs @@ -13,6 +13,7 @@ + ' ?> @@ -42,7 +43,7 @@ } catch (e) { // nop } - + var defaultDarkDisabled = false; var darkDisabled = isLocalStorageSupported ? JSON.parse(localStorage.getItem('darkDisabled')) : defaultDarkDisabled; var nightSheet = document.querySelector('[href="styles/night.css"]'); @@ -53,7 +54,7 @@ } var defaultResponsiveDisabled = true; - var responsiveDisabled = + var responsiveDisabled = isLocalStorageSupported ? JSON.parse(localStorage.getItem('responsiveDisabled')) : defaultResponsiveDisabled; var responsiveSheet = document.querySelector('[href="styles/responsive.css"]'); if (responsiveDisabled === null) { @@ -78,7 +79,7 @@ -

Looking for Vircadia
Documentation?

+

Looking for Vircadia
Documentation?

Toggle mdi-theme-light-dark @@ -95,7 +96,7 @@

- +