Skip to content

Align Windows dev tree with install layout for runtime resource discovery#261

Open
OlafRocket wants to merge 7 commits into
AcademySoftwareFoundation:developfrom
OlafRocket:resources-not-found-run-in-dev-tree
Open

Align Windows dev tree with install layout for runtime resource discovery#261
OlafRocket wants to merge 7 commits into
AcademySoftwareFoundation:developfrom
OlafRocket:resources-not-found-run-in-dev-tree

Conversation

@OlafRocket

@OlafRocket OlafRocket commented May 27, 2026

Copy link
Copy Markdown
Contributor

[ Align Windows dev tree with install layout for runtime resource discovery ]

Linked issues

None.

Summarize your change.

Aligns the Windows build tree with the install layout for all resources
that xstudio looks up via xstudio_root() — fonts, OCIO configs,
snippets, plugin DLLs, third-party QML modules, and Python plugins.
Adds vcpkg's bin/ to the dev launcher's PATH so plugin DLL dependencies
resolve.

Describe the reason for the change.

Running build\run_xstudio.bat from a fresh build on Windows crashes
with exit code 0xC0000005 after FreeType fails to load a font, preceded
by six "module could not be found" warnings from the plugin loader.

Root causes:

  1. xstudio_root() on Windows derives <exe-grandparent>/share/xstudio,
    matching the install layout. The 1.2.0 build-system changes migrated
    plugin DLLs and preferences to that layout in the build tree, but
    fonts, OCIO configs, snippets, third-party QML modules, and Python
    plugins were left at build/bin/..., where the runtime no longer
    looks.

  2. Plugin DLLs link against vcpkg-built deps (avcodec, OpenColorIO,
    OpenImageIO, libtiff). At install time vcpkg's applocal pass copies
    these into <prefix>/bin/. At build time nothing does — build/bin/
    has only xstudio's own outputs.

This PR completes the migration started by the 1.2.0 build-system
changes and points the dev launcher at vcpkg's bin/ so plugin deps
resolve at load time.

Describe what you have tested and on which operating system.

Tested on Windows 10 Pro x64 with Visual Studio 2022 (MSVC v14.44.x),
Qt 6.5.3 (msvc2019_64), vcpkg, Ninja generator (preset
WinNinjaReleaseLocal):

  • Clean rebuild from empty build/: cmake configure + ninja build succeed.
  • build\run_xstudio.bat launches xstudio fully; main window opens.
  • No LoadLibrary "module could not be found" warnings in the log.
  • No ERROR::FREETYPE: Failed to load font crash.
  • cmake --build build --target package succeeds; the staged install
    tree at _CPack_Packages/.../xSTUDIO-1.2.0-win64/ and the generated
    installer .exe contain the same files at the same paths as before
    this PR.

macOS and Linux: not retested as those code paths are unchanged. All
new branches are guarded with if(WIN32) (or are inside existing
if(WIN32) blocks). The macOS bundle assembly and Linux build/bin/
layouts are byte-identical to current develop.

Add a list of changes, and note any that might need special attention during the review.

  1. cmake/macros.cmake:

    • add_resource: Windows branch copies to share/xstudio/${resource_type}/.
    • add_font: Windows branch copies to share/xstudio/fonts/.
    • default_plugin_options: Windows uses RUNTIME_OUTPUT_DIRECTORY
      for the plugin .dll, landing it directly at
      share/xstudio/plugin/. The previous POST_BUILD copy in
      create_plugin_with_alias is now redundant and removed.
    • add_python_plugin: Windows branch copies plugin dir to
      share/xstudio/plugin-python/.
  2. extern/quickfuture/CMakeLists.txt: Windows branches for the .dll
    RUNTIME_OUTPUT_DIRECTORY and the QML_DEST_DIR, both targeting
    share/xstudio/plugin/qml/QuickFuture/. (QuickFuture's qmldir
    declares plugin quickfuture, so the .dll must co-locate with
    qmldir.)

  3. extern/quickpromise/CMakeLists.txt: Windows branch for
    QML_DEST_DIR to share/xstudio/plugin/qml/QuickPromise/. The
    .dll location is left as-is — qmldir is pure-QML with no plugin
    directive.

  4. share/snippets/CMakeLists.txt: add_snip macro chooses
    share/xstudio/snippets/ on Windows.

  5. src/launch/xstudio/src/run_xstudio.bat.in: vcpkg's bin/ prepended
    to PATH (between Qt's bin and %~dp0bin).

  6. src/launch/xstudio/src/CMakeLists.txt: expose _vcpkg_bin_dir to
    configure_file for use in the launcher bat.

  7. src/plugin_manager/test/CMakeLists.txt: drive-by cleanup — removed
    a stranded set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ...) where ${name} was undefined in
    this file (silent no-op, copy-paste leftover).

  • Every change is inside an if(WIN32) block or an elseif(WIN32) branch.
  • macOS/Linux behavior is byte-identical to develop.
  • The install(...) rules are also unchanged on every platform, so the packaged installer is byte-identical to before (verified via --target package diff).

MrFruitDude and others added 6 commits May 20, 2026 18:48
…ySoftwareFoundation#244)

The annotations exporter accessed the playhead via
session.viewed_container.playhead, which assumes the viewed container
is always a Playlist. When media is loaded by a Python plugin (e.g.
rdo_browser) that sets the viewer to a Subset, this crashes with
"'Subset' object has no attribute 'playhead'" because the Subset
class does not expose a playhead property.

Replace all 5 call sites with self.current_playhead(), which is
provided by PluginBase and returns the active playhead regardless
of the viewed container type.
…tion#247)

Signed-off-by: Ken McGaugh <ken@mcgaugh.co.uk>
Signed-off-by: Ken McGaugh <ken@wetafx.co.nz>
New self-contained viewport overlay plugin that displays annotations from
neighboring frames as semi-transparent, color-tinted overlays on the
current frame. Enables reviewers and animators to see annotation
progression across frames without scrubbing.

Architecture:
- HUDPluginBase subclass with configurable frames before/after, opacity
  falloff, and separate past/future tint colours
- Opacity and tint baked directly into copied Canvas items (strokes,
  captions, shapes), rendered via standard render_canvas() path
- Stack order 1.5 (below current annotations at 2.0, above image)
- Plugin-local bookmark cache built from frame.bookmarks() during
  playback — zero core data structure changes
- Canvas accessed via public AnnotationBase::user_data() API, no
  dependency on annotations plugin internals

Also adds set_opacity()/set_colour() setters to Stroke, matching the
pattern already established by Caption.

Signed-off-by: Julien Hery <jhery@rodeofx.com>
Co-Authored-By: Nicolas Felix <nfelix@rodeofx.com>
* Add numpy to pip installed packages

Signed-off-by: Ted Waine <ted.waine@gmail.com>
Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Tweak for set video range action

Signed-off-by: Ted Waine <ted.waine@gmail.com>
Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Handle missing Decklink hardware when drivers are installed (AcademySoftwareFoundation#238)

Signed-off-by: xShirae <xshiraayuki@gmail.com>
Signed-off-by: Ted Waine <ted.waine@gmail.com>
Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Initial checkin of filesystem_plugin prior to refactor.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* A ffmpeg constant changed, I believe the older one FF_PROFILE_UNKOWN has been obsolete for a while.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Cleanup GUI
Better filtering, got progress bar working, and version and date filtering.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Adding fileseq for the python libraries for the FileSystem Browser.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Got the progress bar to work correctly.
Also added a separate timing test where you can specify an output directory, not really for unit testing, but good for testing against real directories.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Fix for color scheme for right click menu.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Add readme.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Adding copyright/license info.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Adding (c).

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Dont be quite so agressive updating the UI, only do it every 5 secs or so.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Swapped file-browser with a history view.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Updated readme.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Fixing QML issue.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Demo of widget as a floating window.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Filtering fixes.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Switched to a tree-view with some "smart" collapsing of directories.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Fixed the file-loading issue, it was trying to load a relative path.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Double clicking on a directory changes the overall search window path.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Make the search case insensitive.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Adding different types of tree view. and recursion depths.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Minor tweak to prune empty folders if we are filtering.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Adding a directory view.

The directory view allows a more obvious browsing of the tree. For the very top of the directory tree we dont auto-scan for media, once you get down to 4 levels it will start scanning.
We have also made a config.json file to store configurations of things like the auto_scan_threashold, along with adding a list of folders that need to be ignored.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Filtering all the time.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* GUI update:
   * Fixed auto-complete
   * Tree view opens to node when path is entered in path dialog.
   * Added a refresh button
   * Tree view now persistent, with a nicer sidebar label.
   * Smart scan button now visible.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Added a preview mode, so when you click on a clip, it will automatically load it into the player
   * double click will load it into your target
   * Cursor keys will allow you to move through the results loading as you go (left right for icon view, up down for list view)
   * Enter will do the same as double click.
   * Preview playlist will be deleted on Enter.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Updated to have a common style, and synced style with xstudio.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* More style fixes, and also making menu options consistent between icon and list view:
* Adding Append menu option
* Adding copy path menu option
* Add compare menu option

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Adding a show-in-finder menu option.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* MInor bug fixes, cleaning threading.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Some code refactoring to simplify it, in particular the dispatch table.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Setup a interface class, so that if you want to change the back end you have a centralized area to do that.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Removed some debug output and removed an un-necesary header.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Fixed a padding issue.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

* Added ability to set the directory root.

Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>

---------

Signed-off-by: Ted Waine <ted.waine@gmail.com>
Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org>
Signed-off-by: xShirae <xshiraayuki@gmail.com>
Signed-off-by: tedwaine <59868698+tedwaine@users.noreply.github.com>
Co-authored-by: Ted Waine <ted.waine@gmail.com>
Co-authored-by: xShirae <83482842+xShirae@users.noreply.github.com>
Co-authored-by: tedwaine <59868698+tedwaine@users.noreply.github.com>
…s, cross-platform docs (AcademySoftwareFoundation#246)

* Build system improvements: OTIO vcpkg migration, Windows fixes, cross-platform docs

Core build system
-----------------
- Migrate OpenTimelineIO from git submodule to vcpkg overlay port
  (cmake/vcpkg_overlay_ports/opentimelineio/). Removes extern/otio,
  .gitmodules, cmake/otio_patch.diff, and the OTIO_SUBMODULE option.
- OTIO portfile: on Windows, move .dll files from lib/ to bin/ (vcpkg
  convention for applocal.ps1 discovery) and rewrite generated
  Targets-*.cmake files so IMPORTED_LOCATION resolves correctly.
- Pin python3 to 3.11.11 in vcpkg.json.
- Lower CMake minimum from 3.28 to 3.26 for broader distro compatibility.
- Work around Qt 6.5/6.8 FindWrapOpenGL.cmake AGL bug on macOS by
  pre-creating WrapOpenGL::WrapOpenGL so Qt's find-module early-returns.
  Fixed upstream in Qt 6.9+; workaround can be removed once minimum
  supported Qt >= 6.9.

CMakePresets
------------
- Remove hardcoded Qt6_DIR from the default preset. Users now supply it
  via the Qt6_DIR environment variable, a CMakeUserPresets.json, or a
  one-off -D flag (documented in each build guide).
- Add VCPKG_OVERLAY_PORTS path so the new OTIO overlay is picked up.
- Add Ninja generator presets for macOS (arm / intel) and Linux — Release,
  RelWithDebInfo and Debug variants. Aligns with existing Windows Ninja
  presets.
- Un-hide WinDebug preset.
- Add VCPKG_OVERLAY_TRIPLETS to the Linux base preset.

Windows build fixes
-------------------
- Fix scripts/qt_install to use install(SCRIPT) + configure_file instead
  of install(CODE), so ${CMAKE_INSTALL_PREFIX} resolves at install time.
  Previously the configure-time prefix was baked in, which broke the
  CPack package target because CPack uses a different (staging) prefix.
- Remove the redundant early windeployqt call in src/launch/xstudio/src.
  The late call in scripts/qt_install now covers everything and runs
  after all other install rules have populated the install tree.
- In cmake/macros.cmake (default_options_qt), add RUNTIME_OUTPUT_DIRECTORY
  alongside LIBRARY_OUTPUT_DIRECTORY so *_qml.dll files land in build/bin
  on Windows (Windows uses RUNTIME for .dll, not LIBRARY).
- Fix Windows python install path mismatch in python/CMakeLists.txt:
  the build produces lib/python3.11/site-packages (Unix layout, because
  vcpkg's Python uses that layout on Windows), not Lib/site-packages.

Dev workflow
------------
- Generate build/run_xstudio.bat — a dev launcher that puts Qt's bin
  directory on PATH and forwards arguments to xstudio.exe, so xstudio
  can be run straight from the build tree without a windeployqt pass.

Documentation
-------------
- downloading_qt.md: add aqtinstall instructions (command-line, no Qt
  account required) as a recommended alternative to the GUI installer.
  Covers Linux, macOS and Windows.
- index.rst: add "Choosing a guide" section explaining the split between
  vcpkg-based guides (recommended) and distro-native guides (advanced).
- linux_generic.md: restructured around the new Qt6_DIR / user-preset
  workflow, removed submodule instructions, added optional Ninja section.
- macos.md: minor updates to reflect current dependency list and Qt
  workaround now handled in CMakeLists.txt.
- windows.md: full rewrite — unified "Set up the build environment"
  section using Enter-VsDevShell with -SkipAutomaticLocation, separate
  build sections for Visual Studio and Ninja generators, corrected Qt
  path example (C:/Qt not C:/Qt6), user-preset examples for both
  generators, note on run_xstudio.bat dev launcher.

Signed-off-by: Olaf Razzoli <olaf.razzoli@gmail.com>

* docs: simplify build guides and pin vcpkg

- Require Ninja as the CMake generator on all platforms; remove the
  "Faster builds with Ninja (optional)" sections and the Visual Studio
  generator option on Windows.
- Pin vcpkg to commit c2aeddd80357b17592e59ad965d2adf65a19b22f in all
  three guides for reproducible dependency builds.
- Document CMakeUserPresets.json as the single way to point CMake at
  the local Qt 6.5.3 install; drop the Qt6_DIR env-var and one-off
  -DQt6_DIR command-line paths.
- Note that --target package on Windows is slow and recommend a plain
  cmake --build build for dev iteration.
- Remove docs/reference/build_guides/developer_tips.md and the link
  to it from windows.md.

Signed-off-by: Olaf Razzoli <olaf.razzoli@gmail.com>

---------

Signed-off-by: Olaf Razzoli <olaf.razzoli@gmail.com>
@OlafRocket OlafRocket changed the base branch from main to develop May 27, 2026 17:36
Plugin DLLs, fonts, OCIO configs, snippets, Python plugins, and the
QuickFuture/QuickPromise QML modules now land in build/share/xstudio/...
on Windows, matching the install layout that xstudio_root() expects.
Fixes the FreeType crash and the "module could not be found" plugin
load failures when running build/run_xstudio.bat from a fresh build.

- cmake/macros.cmake: Windows branches in add_resource, add_font, and
  add_python_plugin. default_plugin_options uses RUNTIME_OUTPUT_DIRECTORY
  on Windows so plugin .dlls link directly into share/xstudio/plugin/
  (no POST_BUILD copy; .pdb stays next to the .dll for debuggers).
- extern/quickfuture, extern/quickpromise: Windows .dll and QML output
  routed to share/xstudio/plugin/qml/...
- share/snippets/CMakeLists.txt: add_snip targets share/xstudio/snippets/
  on Windows.
- src/launch/xstudio/src/run_xstudio.bat.in: prepend vcpkg's bin/ to PATH
  so plugin transitive dependencies (avcodec, OpenColorIO, etc.) load.
- src/plugin_manager/test/CMakeLists.txt: remove dead
  set_target_properties block (the ${name} variable was undefined;
  silent no-op).

macOS and Linux branches untouched. install() rules unchanged.

Signed-off-by: Olaf Razzoli <olaf.razzoli@gmail.com>
@OlafRocket OlafRocket force-pushed the resources-not-found-run-in-dev-tree branch from b7a6f44 to bcaea97 Compare May 27, 2026 17:41
@OlafRocket OlafRocket changed the title [ Align Windows dev tree with install layout for runtime resource discovery ] Align Windows dev tree with install layout for runtime resource discovery May 27, 2026
@tedwaine tedwaine force-pushed the develop branch 2 times, most recently from 80fa446 to e0c88d1 Compare June 22, 2026 13:48
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.

5 participants