Skip to content

Allow plugin to load even with missing requirements#1421

Merged
Trouffman merged 39 commits into
masterfrom
plugin-load-rework
Apr 9, 2026
Merged

Allow plugin to load even with missing requirements#1421
Trouffman merged 39 commits into
masterfrom
plugin-load-rework

Conversation

@Trouffman

@Trouffman Trouffman commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a significant changes:

  • Output Settings dialog now list the requirements and their statu (met or not)

  • Each requirements is clickable to copy to clipboard for full version (especially useful for NDI library versionning

  • Add in-plugin troubleshooting with "auto-reinstall button" for DistroAV & NDI library (leverage winget for windows & brew for MacOS)

  • Split requirements in HARD & SOFT.

  • HARD requirements will stop plugin from loading & display an error.

  • SOFT requirements allow loading the plugin but will not register the features.

  • The error popup dialog shows up on start and open the DistroAV settings on OK (unless hard requirement not met)

  • Tested on Windows + mc

  • New pameters options for automated testing :

--distroav-check-ndilib-forcefail
--distroav-check-obs-forcefail
image
  • New pameters as fallback if the version detection is failign or NDI mess-up their versionning. It will skip the version comparison and continue as if nothing happenned
--distroav-check-ndilib-ignore
--distroav-check-obs-ignore
image

These improvements make it easier for users to verify their environment and resolve common setup issues.

##Details
Requirements Checking & UI Enhancements

  • Added a requirements status section to the Output Settings dialog, displaying checks for DistroAV, NDI Library, and OBS versions, with clear pass/fail indicators and copy-to-clipboard functionality for each item. (src/forms/output-settings.cpp, src/forms/output-settings.ui) [1] [2]
  • Updated UI text and layout for clarity, including new labels and buttons for requirements, install actions, and improved error messaging. (data/locale/en-US.ini, src/forms/output-settings.ui) [1] [2] [3] [4]

Automated Installation Actions

  • Added "Auto-(re)install" buttons for DistroAV and NDI Library, launching platform-appropriate install commands (using Homebrew on macOS and winget on Windows) via Terminal or PowerShell. (src/forms/output-settings.cpp, src/forms/output-settings.ui) [1] [2] [3]

Cross-Platform Build Improvements - should already be on master

  • Fixed macOS builds with Xcode 26+ by clearing deployment target environment variables for non-macOS platforms, preventing conflicting deployment target errors. (cmake/macos/xcode.cmake)
  • Improved CMake logic to clean up unwanted AGL framework references when linking Qt and OpenGL libraries on Apple platforms. (CMakeLists.txt)

Other Quality-of-Life Improvements

  • Enabled both Main and Preview Output settings only when the main output is supported, preventing user confusion. (src/forms/output-settings.cpp)

These changes collectively aim to improve the user experience, reliability, and maintainability of the DistroAV NDI plugin across platforms.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates DistroAV’s developer tooling and user-facing setup flow, aiming to support a “UI-only / degraded mode” when NDI requirements aren’t met and adding helper scripts for building/installing/running on macOS/Windows. It also includes macOS build fixes for newer Xcode/Qt link behavior.

Changes:

  • Make plugin feature registration conditional on NDI library availability/compatibility, while still loading the settings UI and running update checks.
  • Add/adjust Output Settings UI to show requirement status and provide “auto-(re)install” entry points for DistroAV and the NDI runtime.
  • Replace/remove several legacy tools/* scripts and add new macOS/Windows build/install/run helpers; add CMake/Xcode macOS build workaround.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
tools/UninstallOBS-NDI.sh Removed legacy uninstall helper.
tools/UninstallOBS-NDI.cmd Removed legacy uninstall helper.
tools/UninstallDistroAV.sh Removed legacy uninstall helper.
tools/test-build-macos.sh Added macOS test build/install/run wrapper script.
tools/sha256-check.sh Removed old OBS-NDI checksum line.
tools/RunOBS.sh Removed legacy OBS run helper.
tools/run-obs-debug-windows.cmd Updated Windows debug launch flags for DistroAV.
tools/run-obs-debug-macos.sh Added macOS debug launch helper for DistroAV.
tools/Package.sh Removed legacy packaging wrapper.
tools/InstallOBS-NDI.sh Removed legacy install helper.
tools/InstallDistroAV.sh Removed legacy install helper.
tools/install-windows.ps1 Added Windows file-copy installer helper for local builds.
tools/install-macos.sh Added macOS uninstall+copy installer helper for local builds.
tools/Format.sh Removed legacy formatting wrapper.
tools/Clean.sh Removed legacy clean wrapper.
tools/clean-builds-deps.sh Added new clean script for build artifacts (and intended deps cleanup).
tools/Build.sh Removed legacy build wrapper.
tools/build-install-run-windows.ps1 Added Windows build→install→run wrapper.
tools/build-helper-windows.ps1 Added Windows build helper that shells into CI build script.
tools/build-helper-macos.sh Added macOS build+package helper invoking CI scripts.
src/plugin-main.h Added version check declaration; updated NDI URL constants/comments.
src/plugin-main.cpp Implemented conditional feature registration + “UI-only” load behavior; improved message box behavior and NDI load cleanup.
src/ndi-finder.cpp Added guard to avoid crash when NDI lib isn’t loaded.
src/forms/update.cpp Avoided deref of ndiLib when building User-Agent.
src/forms/output-settings.ui Added requirements/status section + new buttons.
src/forms/output-settings.cpp Implemented requirement checks and auto-install actions (brew/winget) + NDI trademark link display.
src/config.cpp Reformatted ConfigTypeMap initialization.
README.md Updated install instructions; added Ubuntu section.
data/locale/en-US.ini Updated settings strings and plugin footer text.
CMakeLists.txt macOS Qt link workaround to strip AGL framework from propagated link props.
cmake/macos/xcode.cmake Cleared non-macOS deployment target attributes to avoid Xcode/clang conflicts.
Comments suppressed due to low confidence (1)

tools/run-obs-debug-windows.cmd:6

  • This command no longer forwards caller-provided arguments (%*). That makes the helper less flexible and breaks previous behavior (e.g., adding extra OBS flags when debugging). Consider appending %* to preserve pass-through while still adding the default debug/update flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread data/locale/en-US.ini Outdated
Comment thread src/plugin-main.cpp Outdated
Comment thread src/plugin-main.cpp
Comment thread src/plugin-main.cpp Outdated
Comment thread src/plugin-main.cpp Outdated
Comment thread tools/install-macos.sh
Comment thread tools/build-helper-macos.sh
Comment thread tools/run-obs-debug-macos.sh
Comment thread tools/clean-builds-deps.sh
Comment thread tools/install-windows.ps1 Outdated
@Trouffman
Trouffman requested a review from Copilot March 16, 2026 14:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the developer tooling and user experience around missing/unsupported NDI dependencies by allowing the plugin to load in a limited “UI-only” mode, adding requirements/install UX in Output Settings, and introducing new helper scripts for local build/install workflows (macOS/Windows).

Changes:

  • Make plugin feature registration conditional on NDI runtime load/initialize/version checks, while still loading UI and running update checks.
  • Add “Requirements” status UI plus one-click install/reinstall actions for DistroAV + NDI runtime in Output Settings, and update related i18n strings.
  • Add/adjust local build/install helper scripts for macOS and Windows, plus clean-up tooling and README install instructions.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tools/test-build-macos.sh Splits chained commands into separate lines for readability.
tools/run-obs-debug-macos.sh Adds shebang and adjusts default OBS debug flags for macOS runs.
tools/install-windows.ps1 Adds a Windows installer script to copy built plugin artifacts into OBS plugin directory.
tools/install-macos.sh Adds shebang to ensure consistent script execution.
tools/clean-builds-deps.sh Adds shebang/set -e, uses rm -rf, and cleans obs-deps.
tools/build-install-run-windows.ps1 Adds a Windows “build → install → run” convenience wrapper.
tools/build-helper-windows.ps1 Adds a Windows wrapper for the CI build script.
tools/build-helper-macos.sh Adds a macOS build/package helper script (Debug preset).
src/plugin-main.h Exposes is_version_supported() and updates NDI URL commentary/defines.
src/plugin-main.cpp Introduces conditional feature registration, new delayed critical message behavior, and tighter guards around output init when NDI features aren’t registered.
src/ndi-finder.cpp Adds a guard to avoid crashes when the NDI library isn’t loaded.
src/forms/update.cpp Makes update-check User-Agent resilient when ndiLib is unavailable.
src/forms/output-settings.ui Adds “Requirements” section and new install/get buttons; adjusts layout/alignment.
src/forms/output-settings.cpp Implements requirement checks UI, one-click install flows (macOS/Windows), and updates the trademark label to be linkable.
src/config.cpp Re-formats the config type map initializer.
README.md Updates macOS brew cask install command and adds Ubuntu apt install instructions/maintainer credits.
data/locale/zh-CN.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/uk-UA.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/sv-SE.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/ru-RU.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/ro-RO.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/pt-BR.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/nl-NL.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/ko-KR.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/hu-HU.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/fr-FR.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/es-ES.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/en-US.ini Updates Output Settings button text, adds new Output Settings keys, and adds one-click install error strings.
data/locale/de-DE.ini Updates “limited features” messaging and adds one-click install error strings.
data/locale/ca-ES.ini Updates “limited features” messaging and adds one-click install error strings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread tools/test-build-macos.sh Outdated
Comment thread tools/build-helper-windows.ps1
Comment thread src/plugin-main.cpp Outdated
Comment thread src/plugin-main.cpp
Comment thread src/plugin-main.cpp Outdated
Comment thread src/forms/output-settings.cpp
Comment thread src/forms/output-settings.cpp
Comment thread src/forms/output-settings.ui
Comment thread src/forms/output-settings.cpp
Comment thread README.md Outdated
@Trouffman Trouffman added this to the 6.2.0 milestone Mar 20, 2026
@Trouffman Trouffman linked an issue Mar 20, 2026 that may be closed by this pull request
2 tasks
@Trouffman
Trouffman marked this pull request as ready for review March 30, 2026 12:25
@Trouffman

Copy link
Copy Markdown
Collaborator Author

This is ready for review.

Added the command line parameters to forcefail the checks (t be used for QC / testing / Pre-release behavior) < this could be removed in the future if we do not need such test afterall..

Added command-line parameters to Ignore the version check.
This is this prevent one of the dependency to "mess-up" their versioning.

@BitRate27

BitRate27 commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

When NDI 5 Runtime is installed, this is what appears:
RuntimeNotFound
And then in the Output Settings:
GetLibrary
Two observations: 1) since the NDI 5 didn't load, we can't report the existing version, so the title is blank, 2) We refer to it as Runtime in the initial dialog, but call it Library in the Output Settings.
Suggestion: When required version of NDI library is not found, title should be "Required NDI library not found", and change NDI Runtime to NDI library in initial dialog and wherever else Runtime is used to be consistent.

Library or Runtime? It seems Runtime is used in the translations, but Library is used in the code (error messages). It is kind of minor.

@Trouffman
Trouffman merged commit a935ed5 into master Apr 9, 2026
9 checks passed
@Trouffman
Trouffman deleted the plugin-load-rework branch April 9, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFE]: Suggest "Quick Fix" for NDI Runtime/SDK Version

3 participants