From 8ab7f4599c9bb478719f193a8d65e177566f36f2 Mon Sep 17 00:00:00 2001 From: OlafRocket Date: Fri, 24 Apr 2026 21:09:54 +0100 Subject: [PATCH 1/2] Build system improvements: OTIO vcpkg migration, Windows fixes, cross-platform docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .gitignore | 4 +- .gitmodules | 3 - CMakeLists.txt | 26 +++-- CMakePresets.json | 92 +++++++++++++++++- cmake/macros.cmake | 1 + cmake/otio_patch.diff | 14 --- .../0001-disable-src-deps-subdir.patch | 12 +++ .../opentimelineio/portfile.cmake | 81 ++++++++++++++++ .../opentimelineio/vcpkg.json | 18 ++++ docs/reference/build_guides/downloading_qt.md | 29 +++++- docs/reference/build_guides/index.rst | 9 +- docs/reference/build_guides/linux_generic.md | 74 ++++++++++++--- docs/reference/build_guides/macos.md | 62 ++++++++---- docs/reference/build_guides/windows.md | 94 ++++++++++++++----- extern/otio/CMakeLists.txt | 27 ------ extern/otio/OpenTimelineIO | 1 - python/CMakeLists.txt | 2 +- scripts/qt_install/CMakeLists.txt | 10 +- scripts/qt_install/qt_install.cmake.in | 3 + src/launch/xstudio/src/CMakeLists.txt | 14 ++- src/launch/xstudio/src/run_xstudio.bat.in | 7 ++ src/launch/xstudio/src/windeploy.cmake.in | 3 - vcpkg.json | 9 ++ 23 files changed, 467 insertions(+), 128 deletions(-) delete mode 100644 .gitmodules delete mode 100644 cmake/otio_patch.diff create mode 100644 cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch create mode 100644 cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake create mode 100644 cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json delete mode 100644 extern/otio/CMakeLists.txt delete mode 160000 extern/otio/OpenTimelineIO create mode 100644 scripts/qt_install/qt_install.cmake.in create mode 100644 src/launch/xstudio/src/run_xstudio.bat.in delete mode 100644 src/launch/xstudio/src/windeploy.cmake.in diff --git a/.gitignore b/.gitignore index 08f9bce53..f906b7286 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,7 @@ python/src/xstudio/version.py /build/ xstudio_install/ **/qml/*_qml_export.h -<<<<<<< HEAD CMakeUserPresets.json -======= __build __build_debug ->>>>>>> c808bb352 (WIP) +aqtinstall.log diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 387c71ac9..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "extern/otio/OpenTimelineIO"] - path = extern/otio/OpenTimelineIO - url = https://github.com/AcademySoftwareFoundation/OpenTimelineIO diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ed59875e..f19f43812 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ -cmake_minimum_required(VERSION 3.28 FATAL_ERROR) -cmake_policy(VERSION 3.28) +cmake_minimum_required(VERSION 3.26 FATAL_ERROR) +cmake_policy(VERSION 3.26) +#cmake_minimum_required(VERSION 3.28 FATAL_ERROR) +#cmake_policy(VERSION 3.28) set(XSTUDIO_GLOBAL_VERSION "1.2.0" CACHE STRING "Version string") set(XSTUDIO_GLOBAL_NAME xStudio) @@ -8,6 +10,17 @@ set(XSTUDIO_GLOBAL_NAME xStudio) project(${XSTUDIO_GLOBAL_NAME} VERSION ${XSTUDIO_GLOBAL_VERSION} LANGUAGES CXX) +# Work around Qt bug: FindWrapOpenGL.cmake links -framework AGL, which was +# removed from the macOS SDK in 10.14. Fixed upstream in Qt 6.9+ but not +# backported to 6.5/6.8 LTS (see https://codereview.qt-project.org/c/qt/qtbase/+/652022). +# Pre-create the target so Qt's FindWrapOpenGL early-returns and never hits the +# broken AGL block. Can be removed once the minimum supported Qt is >= 6.9. +if(APPLE AND NOT TARGET WrapOpenGL::WrapOpenGL) + find_package(OpenGL REQUIRED) + add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED) + target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL) +endif() + option(BUILD_TESTING "Build tests" OFF) option(INSTALL_PYTHON_MODULE "Install python module" ON) option(INSTALL_XSTUDIO "Install xstudio" ON) @@ -16,7 +29,6 @@ option(ENABLE_CLANG_TIDY "Enable clang-tidy, ninja clang-tidy." OFF) option(ENABLE_CLANG_FORMAT "Enable clang format, ninja clangformat." OFF) option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE) option(OPTIMIZE_FOR_NATIVE "Build with -march=native" OFF) -option(OTIO_SUBMODULE "Automatically build OpenTimelineIO as a submodule" OFF) option(USE_VCPKG "Use Vcpkg for package management" OFF) option(BUILD_PYSIDE_WIDGETS "Build xstudio player as PySide widget" OFF) option(OPENIMAGEIO_PLUGIN "Include the OpenImageIO PLugin" ON) @@ -188,10 +200,6 @@ endif() if (USE_VCPKG) - # When building with VCPKG, we will use OTIO submodule - set(OTIO_SUBMODULE true) - add_subdirectory("extern/otio") - set(VCPKG_INTEGRATION ON) # Install pip and sphinx @@ -218,14 +226,12 @@ if (USE_VCPKG) else() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") - if(${OTIO_SUBMODULE}) - add_subdirectory("extern/otio") - endif() find_package(PkgConfig REQUIRED) endif() # Add the necessary libraries from Vcpkg if Vcpkg integration is enabled +find_package(OpenTimelineIO CONFIG REQUIRED) find_package(nlohmann_json CONFIG REQUIRED) include(CTest) diff --git a/CMakePresets.json b/CMakePresets.json index b57636bb1..c16a5f9e3 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -7,13 +7,13 @@ "binaryDir": "${sourceDir}/build", "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake", - "Qt6_DIR": "/Users/tedwaine/Qt6/6.5.3/macos/lib/cmake/Qt6", "CMAKE_INSTALL_PREFIX": "xstudio_install", "X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON", "BUILD_DOCS": "OFF", "USE_VCPKG": "ON", "STUDIO_PLUGINS": "", - "BMD_DECKLINK_PLUGIN": "OFF" + "BMD_DECKLINK_PLUGIN": "OFF", + "VCPKG_OVERLAY_PORTS": "${sourceDir}/cmake/vcpkg_overlay_ports" } }, { @@ -44,7 +44,6 @@ }, { "name": "WinDebug", - "hidden": true, "inherits": ["windows-base"], "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug", @@ -151,10 +150,67 @@ "USE_SANITIZER": "address" } }, - { + { + "name": "macos-ninja-base-arm", + "inherits": "macos-base-arm", + "generator": "Ninja" + }, + { + "name": "macos-ninja-base-intel", + "inherits": "macos-base-intel", + "generator": "Ninja" + }, + { + "name": "MacOSNinjaRelease", + "inherits": ["macos-ninja-base-arm"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "MacOSNinjaRelWithDebInfo", + "inherits": ["macos-ninja-base-arm"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "USE_SANITIZER": "address" + } + }, + { + "name": "MacOSNinjaDebug", + "inherits": ["macos-ninja-base-arm"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_SANITIZER": "address" + } + }, + { + "name": "MacOSIntelNinjaRelease", + "inherits": ["macos-ninja-base-intel"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "MacOSIntelNinjaRelWithDebInfo", + "inherits": ["macos-ninja-base-intel"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "USE_SANITIZER": "address" + } + }, + { + "name": "MacOSIntelNinjaDebug", + "inherits": ["macos-ninja-base-intel"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_SANITIZER": "address" + } + }, + { "name": "linux-base", "inherits": "default", "cacheVariables": { + "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/vcpkg_triplets", "VCPKG_TARGET_TRIPLET": "x64-xstudio-linux" } }, @@ -180,6 +236,34 @@ "CMAKE_BUILD_TYPE": "Debug", "USE_SANITIZER": "address" } + }, + { + "name": "linux-ninja-base", + "inherits": "linux-base", + "generator": "Ninja" + }, + { + "name": "LinuxNinjaRelease", + "inherits": ["linux-ninja-base"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "LinuxNinjaRelWithDebInfo", + "inherits": ["linux-ninja-base"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "USE_SANITIZER": "address" + } + }, + { + "name": "LinuxNinjaDebug", + "inherits": ["linux-ninja-base"], + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "USE_SANITIZER": "address" + } } ] } diff --git a/cmake/macros.cmake b/cmake/macros.cmake index 767a988a4..e3cd1bafa 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -308,6 +308,7 @@ macro(default_options_qt name) set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" ) install(TARGETS ${name} EXPORT xstudio LIBRARY DESTINATION share/xstudio/lib) diff --git a/cmake/otio_patch.diff b/cmake/otio_patch.diff deleted file mode 100644 index 176f41105..000000000 --- a/cmake/otio_patch.diff +++ /dev/null @@ -1,14 +0,0 @@ -Submodule extern/otio/OpenTimelineIO contains modified content -diff --git a/extern/otio/OpenTimelineIO/CMakeLists.txt b/extern/otio/OpenTimelineIO/CMakeLists.txt -index 825ad9d..7598b5e 100644 ---- a/extern/otio/OpenTimelineIO/CMakeLists.txt -+++ b/extern/otio/OpenTimelineIO/CMakeLists.txt -@@ -245,7 +245,7 @@ else() - endif() - - # set up the internally hosted dependencies --add_subdirectory(src/deps) -+# add_subdirectory(src/deps) - - set (OTIO_IMATH_TARGETS - # For OpenEXR/Imath 3.x: diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch b/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch new file mode 100644 index 000000000..4a8d49954 --- /dev/null +++ b/cmake/vcpkg_overlay_ports/opentimelineio/0001-disable-src-deps-subdir.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -245,7 +245,7 @@ + endif() + + # set up the internally hosted dependencies +-add_subdirectory(src/deps) ++# add_subdirectory(src/deps) + + set (OTIO_IMATH_TARGETS + # For OpenEXR/Imath 3.x: diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake b/cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake new file mode 100644 index 000000000..fd9fa9389 --- /dev/null +++ b/cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake @@ -0,0 +1,81 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AcademySoftwareFoundation/OpenTimelineIO + REF v${VERSION} + SHA512 305d63730446c3b4c368cadd9d7a66de96dafee2168d589ae88a0320319f40cde4a739c9939eb088b635185cb1aabd051360ed432fde3ce11ef145e18c25dd21 + HEAD_REF main + PATCHES + 0001-disable-src-deps-subdir.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH RAPIDJSON_SOURCE_PATH + REPO Tencent/rapidjson + REF 06d58b9e848c650114556a23294d0b6440078c61 + SHA512 f0a7df46234e5b3244a801ddf1daefd26aac7ae5b2c470b8c3898f65c65591f6c9cabac0421800588826da9d3bcccba1f98e1c0c8c15184b3843cf6f3ffbdcad + HEAD_REF master +) + +file(COPY "${RAPIDJSON_SOURCE_PATH}/include" + DESTINATION "${SOURCE_PATH}/src/deps/rapidjson") + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OTIO_SHARED) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DOTIO_SHARED_LIBS=${OTIO_SHARED} + -DOTIO_PYTHON_INSTALL=OFF + -DOTIO_DEPENDENCIES_INSTALL=OFF + -DOTIO_FIND_IMATH=ON + -DOTIO_CXX_INSTALL=ON + -DOTIO_AUTOMATIC_SUBMODULES=OFF + -DOTIO_INSTALL_COMMANDLINE_TOOLS=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup( + PACKAGE_NAME opentimelineio + CONFIG_PATH share/opentimelineio +) +vcpkg_cmake_config_fixup( + PACKAGE_NAME opentime + CONFIG_PATH share/opentime +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# OTIO's upstream CMake installs shared libraries (.dll) into lib/ on Windows, +# but vcpkg's convention (and applocal.ps1's search path) expects DLLs in bin/. +# Move them so they get picked up by dependency deployment, and fix up the +# generated CMake targets files so IMPORTED_LOCATION still resolves. +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(GLOB _otio_release_dlls "${CURRENT_PACKAGES_DIR}/lib/*.dll") + foreach(_dll ${_otio_release_dlls}) + get_filename_component(_name "${_dll}" NAME) + file(RENAME "${_dll}" "${CURRENT_PACKAGES_DIR}/bin/${_name}") + endforeach() + file(GLOB _otio_debug_dlls "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + foreach(_dll ${_otio_debug_dlls}) + get_filename_component(_name "${_dll}" NAME) + file(RENAME "${_dll}" "${CURRENT_PACKAGES_DIR}/debug/bin/${_name}") + endforeach() + + # Rewrite the generated Targets-*.cmake files to reference the new DLL + # locations. Only the .dll paths are changed; .lib (import library) paths + # stay in lib/ where they belong. + file(GLOB _otio_targets_files + "${CURRENT_PACKAGES_DIR}/share/opentime/OpenTimeTargets-*.cmake" + "${CURRENT_PACKAGES_DIR}/share/opentimelineio/OpenTimelineIOTargets-*.cmake" + ) + foreach(_file ${_otio_targets_files}) + file(READ "${_file}" _content) + string(REGEX REPLACE "/lib/([^/\"]*\\.dll)" "/bin/\\1" _content "${_content}") + file(WRITE "${_file}" "${_content}") + endforeach() +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json b/cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json new file mode 100644 index 000000000..82d6bd0df --- /dev/null +++ b/cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "opentimelineio", + "version": "0.17.0", + "description": "A file format and API for describing editorial timelines", + "homepage": "https://opentimeline.io", + "license": "Apache-2.0", + "dependencies": [ + "imath", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/docs/reference/build_guides/downloading_qt.md b/docs/reference/build_guides/downloading_qt.md index f5832be31..002526bb8 100644 --- a/docs/reference/build_guides/downloading_qt.md +++ b/docs/reference/build_guides/downloading_qt.md @@ -2,7 +2,32 @@ xSTUDIO's UI is built with the Qt cross-platform GUI development libraries. The Qt SDK is a major dependency that is required to build xSTUDIO but fortunately it is freely available for public use under the GPL license. -### Running the Qt installer +There are two ways to install it: the official Qt installer (GUI, requires a Qt account), or `aqtinstall` (command-line, scriptable, no account). Either produces the same result and both are documented below — pick whichever you prefer. + +### Option A: Using `aqtinstall` (command-line, recommended) + +[`aqtinstall`](https://github.com/miurahr/aqtinstall) is a small open-source Python tool that downloads the same official Qt prebuilt binaries as the GUI installer, directly from Qt's CDN. It requires no Qt account, is fully scriptable, and installs exactly the version and modules you ask for. + +First, make sure you have Python 3 and `pip` available, then install `aqtinstall`: + + pip install aqtinstall + +Then download Qt 6.5.3 for your platform. Choose the command that matches your OS: + + # Linux (gcc x86_64) + aqt install-qt linux desktop 6.5.3 gcc_64 -O ~/Qt -m qtimageformats + + # macOS (universal: ARM + Intel) + aqt install-qt mac desktop 6.5.3 clang_64 -O ~/Qt -m qtimageformats + + # Windows (MSVC 2019 64-bit, in PowerShell) + aqt install-qt windows desktop 6.5.3 win64_msvc2019_64 -O C:\Qt -m qtimageformats + +The `-m qtimageformats` flag installs the extra 'Qt Image Formats' module that xSTUDIO requires. The `-O` flag specifies the output directory — feel free to change it, but make a note of the path as you will need it later when setting `Qt6_DIR` in your build environment. + +After the command finishe, you will have a Qt installation layout identical to what the GUI installer produces, e.g. `~/Qt/6.5.3/gcc_64/` on Linux, `~/Qt/6.5.3/macos/` on macOS, or `C:\Qt\6.5.3\msvc2019_64\` on Windows. + +### Option B: Running the Qt installer (GUI) First you need to download the [Qt Installer](https://www.qt.io/download-qt-installer). @@ -10,7 +35,7 @@ Run the installer app. Before you can proceed you must register with Qt if you a ![Qt Installer](qt_inst1.jpg) -### Select Qt 6.5.3 components +#### Select Qt 6.5.3 components (Option B only) Now you must select the correct version of Qt to download. The required version is **6.5.3**. Epand the 'Qt' item in the list, then expand the Qt 6.5.3 below that. You only need to check the following option within the list under 6.5.3, depending on your platform: diff --git a/docs/reference/build_guides/index.rst b/docs/reference/build_guides/index.rst index 0d28b364c..7e37eec2c 100644 --- a/docs/reference/build_guides/index.rst +++ b/docs/reference/build_guides/index.rst @@ -18,9 +18,16 @@ Individual Users If you have any **questions** reach out on the ASWF Slack in the `#ori-xstudio-discussion `_ . +Choosing a guide +^^^^^^^^^^^^^^^^ + +The **macOS**, **Windows** and **Linux Generic** guides all use the same approach: xSTUDIO's dependencies are built and managed automatically by `vcpkg `_, so the only things you need to install by hand are a compiler toolchain, CMake, git and the Qt SDK. These are the **recommended** paths — they work on any reasonably recent distro and require the least manual setup. + +The **Rocky Linux 9.1**, **Ubuntu 22.04** and **CentOS 7** guides take a different, more advanced approach: instead of using vcpkg, they resolve xSTUDIO's dependencies from each distro's native package manager (and build a handful of libraries from source when no suitable package exists). This gives a tighter integration with the host system but is significantly more work and more fragile — package names and versions drift over time, and any mismatch against the VFX Reference Platform requires manual intervention. These guides are intended for users who specifically want a native-package build, or whose target distro matches one of the three and who are comfortable troubleshooting package issues. If you just want xSTUDIO to build on a Linux machine, prefer **Linux Generic**. + .. toctree:: :maxdepth: 1 - + macos windows linux_generic diff --git a/docs/reference/build_guides/linux_generic.md b/docs/reference/build_guides/linux_generic.md index 0287f7e89..d72fbb028 100644 --- a/docs/reference/build_guides/linux_generic.md +++ b/docs/reference/build_guides/linux_generic.md @@ -12,11 +12,10 @@ Follow [these instructions](downloading_qt.md) - ensuring that you download the ### Download the VCPKG repo -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo, run the bootstrap script and then switch to a specific git commit before we build xstudio. Run these commands in the Powershell: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in the Powershell: git clone https://github.com/microsoft/vcpkg.git ./vcpkg/bootstrap-vcpkg.sh - git checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ### Download the xSTUDIO repo @@ -26,33 +25,84 @@ Download from github in the usual manner. Enter the root folder of the repo and cd xstudio git checkout develop -You must run these commands to add the OpenTimelineIO submodule to the tree +### Tell CMake where Qt is installed - git submodule init - git submodule update - git apply cmake/otio_patch.diff +CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your shell, before launching the build comman. For example, if user Mary Jane downloaded Qt into her home folder: -### Modify the CMakePresets.json file + export Qt6_DIR=/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6 -Open the CMakePresets.json file (which is in the root of the xstudio repo) in a text editor. You must look for the entry "Qt6_DIR" and modify the value that follows it to point to your installation of the Qt SDK. Specifically, you need to point to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, if user Mary Jane downloaded Qt into her home folder the entry should look like this: +Optionally, add this to your `~/.bashrc` (or `~/.zshrc`) so it's set in every new shell. - "Qt6_DIR": "/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6", +If you prefer not to use an environment variable, alternative options are: + +- **Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example: + + { + "version": 3, + "configurePresets": [ + { + "name": "LinuxReleaseLocal", + "inherits": "LinuxRelease", + "cacheVariables": { + "Qt6_DIR": "/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6" + } + } + ] + } + + See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. + +- **One-off command-line override**: pass `-DQt6_DIR=/path/to/Qt6` directly to the `cmake` command below. ### Build xSTUDIO First, we configure for building. Note that this cmake command ***may take several hours to complete*** the first time it is run, though subsequently it will take a few seconds. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. - + +- If you are using an environment variable to specify the Qt installation run: + cmake -B build --preset LinuxRelease +- If you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead: + + cmake -B build --preset LinuxReleaseLocal + +- Or, to pass the Qt path as a one-off command-line override: + + cmake -B build --preset LinuxRelease -DQt6_DIR=/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6 + When this has finished, you can build xSTUDIO with this command (in this case, the --parallel flag is set for a machine with 16 cores as an example). cmake --build build --parallel 16 +### Faster builds with Ninja (optional) + +To speed up the build, you can use Ninja instead of make. Ninja parallelises the build at the file level and is noticeably faster. Install it via your platform's package manager: + + # Rocky / RHEL / Fedora + sudo dnf install ninja-build + + # Ubuntu / Debian + sudo apt install ninja-build + + # macOS (Homebrew) + brew install ninja + +On Windows, Ninja is already bundled with Visual Studio's CMake tools, so no separate install is needed. + +Ninja-based presets are provided for Linux, macOS and Windows (Release, RelWithDebInfo and Debug variants for each). For example, to configure a Linux release build: + + cmake -B build --preset LinuxNinjaRelease + cmake --build build + +Ninja handles parallelism automatically so there is no need for the `--parallel` flag. See [CMakePresets.json](../../../CMakePresets.json) for the full list of available presets. + ### Running xSTUDIO in a dev environment -If the compilation is successfull you will find the xstudio app in ./build/bin/xstudio.bin. To enable the python API, you will need to modify your PYTHONPATH evnironment variable like this, or something similar: +If the compilation is successful you will find the xstudio app in `./build/bin/xstudio.bin`. To enable the Python API, add the built site-packages directory to your `PYTHONPATH`: + + export PYTHONPATH=$PYTHONPATH:$(pwd)/build/bin/python/lib/python3.11/site-packages - export PYTHONPATH=$PYTHONPATH:./build/bin/python/lib/python3.10/site-packages +Run this from the xstudio repository root. The `python3.11` segment tracks whichever Python version vcpkg built — if you change the `python3` pin in `vcpkg.json`, update this path to match. ### Installing xSTUDIO diff --git a/docs/reference/build_guides/macos.md b/docs/reference/build_guides/macos.md index 68750717d..dc873667f 100644 --- a/docs/reference/build_guides/macos.md +++ b/docs/reference/build_guides/macos.md @@ -12,7 +12,7 @@ Some of xSTUDIO's dependencies require 'homebrew', the MacOS open source softwar /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -We require 5 packages to be installed to proceed. Run these commands in a terminal: +We require 6 packages to be installed to proceed. Run these commands in a terminal: brew install cmake brew install pkg-config @@ -24,18 +24,12 @@ We require 5 packages to be installed to proceed. Run these commands in a termin Follow [these instructions](downloading_qt.md) -> **NOTE:** Since Xcode version 26.X our specified version of Qt (6.5.3) is not strictly compatible with MacOS and you may see an error when you run the first 'cmake' command below. There are two options to resolve this. You can download Qt version 6.8.3 and use this instead of 6.5.3. Alternatively, open the file 'FindWrapOpenGL.cmake' within the Qt installation (at 6.5.3/macos/lib/cmake) and comment out lines 48 and 49 so that they look like this: - - #target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_fw_path}) - #target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_agl_fw_path}) - ### Download the VCPKG repo -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo, run the bootstrap script and then switch to a specific git commit before we build xstudio. Run these commands in a terminal: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal: git clone https://github.com/microsoft/vcpkg.git ./vcpkg/bootstrap-vcpkg.sh - git checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ### Download the xSTUDIO repo @@ -45,32 +39,66 @@ Download from github in the usual manner. Enter the root folder of the repo and cd xstudio git checkout develop -You must run these commands to add the OpenTimelineIO submodule to the tree and apply a small patch +### Tell CMake where Qt is installed + +CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your shell, pointing to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on MacOS where user Mary Jane downloaded Qt into her home folder: + + export Qt6_DIR=/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6 - git submodule init - git submodule update - git apply cmake/otio_patch.diff +Add this to your `~/.zshrc` (or `~/.bash_profile`) so it's set in every new shell. -### Modify the CMakePresets.json file +Alternative options if you prefer not to use an environment variable: -Open the CMakePresets.json file (which is in the root of the xstudio repo) in a text editor. You must look for the entry "Qt6_DIR" and modify the value that follows it to point to your installation of the Qt SDK. Specifically, you need to point to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on MacOS where user Mary Jane downloaded Qt into her home folder the entry should look like this: +- **Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example: - "Qt6_DIR": "/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6", + { + "version": 3, + "configurePresets": [ + { + "name": "MacOSReleaseLocal", + "inherits": "MacOSRelease", + "cacheVariables": { + "Qt6_DIR": "/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6" + } + } + ] + } + + See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. + +- **One-off command-line override**: pass `-DQt6_DIR=/path/to/Qt6` directly to the `cmake` command below. ### Build xSTUDIO Run the appropriate command for your platform (whether you have an older Intel or a newer Apple Silicon machine) to set-up for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. **Apple Silicon (ARM) Machines:** - + cmake -B build --preset MacOSRelease **Intel Machines:** cmake -B build --preset MacOSIntelRelease +Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run the matching local preset instead, e.g.: + + cmake -B build --preset MacOSReleaseLocal + When this has finished, you can build xSTUDIO with this command. cmake --build build --parallel 16 --target install -If the build is successful, you should have an application bundle in the 'build' folder called 'xSTUDIO.app'. This can be drag & dropped into your applications folder, desktop and dock as for any other application. \ No newline at end of file +If the build is successful, you should have an application bundle in the 'build' folder called 'xSTUDIO.app'. This can be drag & dropped into your applications folder, desktop and dock as for any other application. + +### Faster builds with Ninja (optional) + +To speed up the build, you can use Ninja instead of make. Ninja parallelises the build at the file level and is noticeably faster. Install it via Homebrew: + + brew install ninja + +Ninja-based presets are provided for macOS (Release, RelWithDebInfo and Debug variants). For example, to configure a macOS release build: + + cmake -B build --preset MacOSNinjaRelease + cmake --build build --target install + +Ninja handles parallelism automatically so there is no need for the `--parallel` flag. See [CMakePresets.json](../../../CMakePresets.json) for the full list of available presets. \ No newline at end of file diff --git a/docs/reference/build_guides/windows.md b/docs/reference/build_guides/windows.md index f091804d4..4b7184005 100644 --- a/docs/reference/build_guides/windows.md +++ b/docs/reference/build_guides/windows.md @@ -29,11 +29,10 @@ Start a Windows Powershell to continue these instructions, where you must run a mkdir dev cd dev -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo, run the bootstrap script and then switch to a specific git commit before we build xstudio. Run these commands in the Powershell: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in the Powershell: git clone https://github.com/microsoft/vcpkg.git ./vcpkg/bootstrap-vcpkg.bat - git checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ### Download the xSTUDIO repo @@ -43,50 +42,99 @@ Download from github in the usual manner. Enter the root folder of the repo and cd xstudio git checkout develop -You must run these commands to add the OpenTimelineIO submodule to the tree and apply a small patch: +### Tell CMake where Qt is installed - git submodule init - git submodule update - git apply cmake/otio_patch.diff +CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your PowerShell session, pointing to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, if user Mary Jane downloaded Qt into the root of her C: drive: -### Modify the CMakePresets.json file + $env:Qt6_DIR = "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" -Open the CMakePresets.json file (which is in the root of the xstudio repo) in a text editor. You must look for the entry "Qt6_DIR" and modify the value that follows it to point to your installation of the Qt SDK. Specifically, you need to point to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on Windows where user Mary Jane downloaded Qt into the root of her C: drive the entry should look like this: +To make this persistent across PowerShell sessions, add the line above to your PowerShell profile (run `notepad $PROFILE` to edit it), or set it as a permanent user environment variable via `System Properties > Environment Variables`. - "Qt6_DIR": ""C:/Qt6/6.5.3/msvc2019_64/lib/cmake/Qt6", +Alternative options if you prefer not to use an environment variable: + +- **Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. Each user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. The example below defines a local preset for each generator you might use: + + { + "version": 3, + "configurePresets": [ + { + "name": "WinReleaseLocal", + "inherits": "WinRelease", + "cacheVariables": { + "Qt6_DIR": "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" + } + }, + { + "name": "WinNinjaReleaseLocal", + "inherits": "WinNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" + } + } + ] + } + + See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. + +- **One-off command-line override**: pass `-DQt6_DIR=C:/path/to/Qt6` directly to the `cmake` command below. + +### Set up the build environment + +The `cmake` and `ninja` tools, along with the MSVC compiler, are bundled with Visual Studio 2022's "CMake tools" component but are not on your `PATH` by default. The simplest way to make them available in your PowerShell session is to enter the Visual Studio Developer Shell: + + Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" + Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch amd64 -SkipAutomaticLocation + +After running those two commands, `cmake` and `ninja` will resolve directly from the command line for the rest of the session, and the build commands below work as shown. + +If you already have a separate CMake installation (e.g. from [cmake.org](https://cmake.org/download/)) on your `PATH`, you can skip `Enter-VsDevShell` for the Visual Studio generator build, since MSBuild will find its own toolchain from the generator name. The Ninja build still requires the Developer Shell so that `ninja` and the MSVC compiler are resolvable. ### Build xSTUDIO -Run the first cmake command to set-up for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. +Note that the first cmake command below ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. -First, you may need to find the path to the 'cmake.exe' tool that is part of the VisualStudio install. Substitute as appropriate into the following commands as appropriate. +You have two choices of generator: - 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe' -B build --preset WinRelease +- **Visual Studio generator** (MSBuild) — produces a solution that can also be opened in the Visual Studio IDE. +- **Ninja generator** — significantly faster builds because Ninja parallelises at the file level. -When this has finished, you can build xSTUDIO with this command. Note the value after --parallel: change this number to match the number of cores your machine has for best build times. +#### Option 1: Visual Studio generator - 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe' --build build --parallel 16 --target PACKAGE --config Release +Configure: -If the build is successful, you should have an exectuable in the 'build' folder called something like 'xSTUDIO-1.2.0-win64.exe'. This can be executed to start the xSTUDIO installer. + cmake -B build --preset WinRelease -### Alternative: Build with Ninja (faster builds) +Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead: -Ninja is significantly faster than MSBuild as it parallelises at the file level. Both Ninja and cmake are included with Visual Studio's CMake tools, so no separate install is needed. + cmake -B build --preset WinReleaseLocal -First, set up the Visual Studio build environment in your Powershell session. This puts the MSVC compiler, cmake and ninja on your PATH: +Build (change the `--parallel` value to match the number of cores on your machine for best build times): - Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" - Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch amd64 + cmake --build build --parallel 16 --target PACKAGE --config Release + +#### Option 2: Ninja generator -Run the cmake command to configure for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. +Configure: cmake -B build --preset WinNinjaRelease -When this has finished, you can build xSTUDIO with this command. Ninja handles parallelism automatically so there is no need for the `--parallel` flag. +Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead: + + cmake -B build --preset WinNinjaReleaseLocal + +Build (Ninja handles parallelism automatically, so no `--parallel` flag is needed): - cmake --build build --target PACKAGE + cmake --build build --target package + +--- If the build is successful, you should have an executable in the 'build' folder called something like 'xSTUDIO-1.2.0-win64.exe'. This can be executed to start the xSTUDIO installer. +### Running xSTUDIO from the build tree (dev workflow) + +For a quick dev run without going through the installer, the build generates a launcher at `build/run_xstudio.bat`. Arguments are forwarded to xstudio: + + .\build\run_xstudio.bat path\to\session.xst + For additional tips for **developers** follow [this link](developer_tips.md) diff --git a/extern/otio/CMakeLists.txt b/extern/otio/CMakeLists.txt deleted file mode 100644 index 0118ecc22..000000000 --- a/extern/otio/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -set(OTIO_PYTHON_INSTALL ON) -set(OTIO_DEPENDENCIES_INSTALL OFF) -set(OTIO_INSTALL_PYTHON_MODULES ON) -set(OTIO_INSTALL_COMMANDLINE_TOOLS OFF) -set(OTIO_FIND_IMATH ON) -set(OTIO_PYTHON_INSTALL_DIR python) - -if (APPLE) - #install directly into VCPKG pythin installation. This gets copied into xSTUDIO.app installation - set(CMAKE_INSTALL_PREFIX "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/${PYTHONVP}/site-packages") -else() - set(CMAKE_INSTALL_PREFIX "bin/python") -endif() - -# Build options -if (WIN32) - set(OTIO_SHARED_LIBS OFF) -else() - set(OTIO_SHARED_LIBS ON) -endif() - -set(OTIO_AUTOMATIC_SUBMODULES ON) - -find_package(Python COMPONENTS Interpreter Development) -find_package(pybind11 CONFIG) - -add_subdirectory("OpenTimelineIO") \ No newline at end of file diff --git a/extern/otio/OpenTimelineIO b/extern/otio/OpenTimelineIO deleted file mode 160000 index 4440afaa2..000000000 --- a/extern/otio/OpenTimelineIO +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4440afaa27b16f81cdf81215ce4d0b08e1424148 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 703487c5b..c358a307b 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -51,7 +51,7 @@ if(NOT APPLE) if(INSTALL_PYTHON_MODULE) if (WIN32) - install(DIRECTORY ${OUTPUT}/Lib/site-packages/xstudio + install(DIRECTORY ${OUTPUT}/lib/${PYTHONVP}/site-packages/xstudio DESTINATION bin/python3/Lib/site-packages) else() install(DIRECTORY ${OUTPUT}/lib/${PYTHONVP}/site-packages/xstudio diff --git a/scripts/qt_install/CMakeLists.txt b/scripts/qt_install/CMakeLists.txt index d97074dd6..7c59a03c3 100644 --- a/scripts/qt_install/CMakeLists.txt +++ b/scripts/qt_install/CMakeLists.txt @@ -1,2 +1,8 @@ -#After everything else is installed, windeployqt will scan the contents and package up Qt dependencies. -install(CODE "execute_process(COMMAND ${Qt6_DIR}/../../../bin/windeployqt.exe ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir ${CMAKE_SOURCE_DIR}/ui)" ) \ No newline at end of file +# After everything else is installed, windeployqt will scan the contents and package up Qt dependencies. + +get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) +get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) +find_program(windeployqt_exe windeployqt HINTS "${_qt_bin_dir}") + +configure_file(qt_install.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/qt_install.cmake @ONLY) +install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/qt_install.cmake) diff --git a/scripts/qt_install/qt_install.cmake.in b/scripts/qt_install/qt_install.cmake.in new file mode 100644 index 000000000..53aa5e9f8 --- /dev/null +++ b/scripts/qt_install/qt_install.cmake.in @@ -0,0 +1,3 @@ +message("Running windeployqt... with args: ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir @CMAKE_SOURCE_DIR@/ui") +execute_process(COMMAND "@windeployqt_exe@" "${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe" --qmldir "@CMAKE_SOURCE_DIR@/ui" + WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}") diff --git a/src/launch/xstudio/src/CMakeLists.txt b/src/launch/xstudio/src/CMakeLists.txt index f2166ca74..aa460f563 100644 --- a/src/launch/xstudio/src/CMakeLists.txt +++ b/src/launch/xstudio/src/CMakeLists.txt @@ -108,11 +108,15 @@ if(WIN32) file(GLOB FFMPEG_COMPONENTS ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/ffmpeg/*) install(FILES ${FFMPEG_COMPONENTS} DESTINATION bin) - get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) - get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) - find_program(windeployqt_exe windeployqt HINTS "${_qt_bin_dir}") - configure_file(windeploy.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/windeploy.cmake @ONLY) - install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/windeploy.cmake) + # Note: windeployqt for Windows is run from scripts/qt_install so it executes + # after all other install rules have populated the install tree. + + # Generate a dev-only launcher that puts Qt's bin dir on PATH, so xstudio + # can be run from the build tree without a windeployqt pass. + get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION) + get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) + file(TO_NATIVE_PATH "${_qt_bin_dir}" _qt_bin_dir) + configure_file(run_xstudio.bat.in ${CMAKE_BINARY_DIR}/run_xstudio.bat @ONLY) elseif(APPLE) diff --git a/src/launch/xstudio/src/run_xstudio.bat.in b/src/launch/xstudio/src/run_xstudio.bat.in new file mode 100644 index 000000000..c701e3e6f --- /dev/null +++ b/src/launch/xstudio/src/run_xstudio.bat.in @@ -0,0 +1,7 @@ +@echo off +REM Dev-only launcher for xstudio.exe from the build tree. +REM Adds Qt's bin directory to PATH so Qt DLLs resolve without needing +REM an install or windeployqt run. Generated by CMake; do not edit. + +set "PATH=@_qt_bin_dir@;%~dp0bin;%PATH%" +"%~dp0bin\xstudio.exe" %* diff --git a/src/launch/xstudio/src/windeploy.cmake.in b/src/launch/xstudio/src/windeploy.cmake.in deleted file mode 100644 index 96ec0940d..000000000 --- a/src/launch/xstudio/src/windeploy.cmake.in +++ /dev/null @@ -1,3 +0,0 @@ -message("Running windeployqt... with args: ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir @CMAKE_SOURCE_DIR@/ui") -execute_process(COMMAND "@windeployqt_exe@" ${CMAKE_INSTALL_PREFIX}/bin/xstudio.exe --qmldir @CMAKE_SOURCE_DIR@/ui - WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}") \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 568453ff8..91a44e8d4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -18,6 +18,7 @@ "openimageio", "openexr", "imath", + "opentimelineio", { "name": "ffmpeg", "features": [ @@ -76,6 +77,14 @@ { "name": "boost-modular-build-helper", "version": "1.84.0#3" + }, + { + "name": "opentimelineio", + "version": "0.17.0" + }, + { + "name": "python3", + "version": "3.11.11" } ] } From 21debc37f12884d5796da6db9820178ecfd825c6 Mon Sep 17 00:00:00 2001 From: Olaf Razzoli Date: Mon, 27 Apr 2026 17:42:21 +0100 Subject: [PATCH 2/2] 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. --- docs/reference/build_guides/developer_tips.md | 21 ----- docs/reference/build_guides/linux_generic.md | 83 ++++++------------- docs/reference/build_guides/macos.md | 69 +++++---------- docs/reference/build_guides/windows.md | 81 +++++------------- 4 files changed, 64 insertions(+), 190 deletions(-) delete mode 100644 docs/reference/build_guides/developer_tips.md diff --git a/docs/reference/build_guides/developer_tips.md b/docs/reference/build_guides/developer_tips.md deleted file mode 100644 index e37bbdc9e..000000000 --- a/docs/reference/build_guides/developer_tips.md +++ /dev/null @@ -1,21 +0,0 @@ -# Tips for Developers - -### A Faster Development Cycle on Windows - -If you are developing xSTUDIO on Windows the build times for both **package** and **install** targets are very long even if you need to test a single line code change. A solution to this problem is to do a full package build first and then copy the contents of the **bin** folder in the target package output folder into the regular **build/bin** folder in the build output folder. This will allow you to run xstudio directly from the **./build/bin** folder after subsequent builds without specifying package or install as the build target. Likewise if your build environment is MS Visual Studio you can set your debug target to **build/bin/xstudio.exe** for a much faster code-change / build / test cycles. The steps to do this in a PowerShell will look something like this: - -*Clear the bin and share build output folders (you only need to do this once):* - - rm -r -fo ./bin/build - rm -r -fo ./bin/share/xstudio - -*Copy the corresponding folders from the package output back into the build folder (again, you only need to do this once):* - - cp -r .\build\_CPack_Packages\win64\NSIS\xSTUDIO-1.2.0-win64\bin .\build\ - cp -r .\build\_CPack_Packages\win64\NSIS\xSTUDIO-1.2.0-win64\share\xstudio .\build\share\ - -*Now you can build and execute xstudio quickly without doing a full package/install build:* - - cmake --build build - ./bin/xstudio.exe - diff --git a/docs/reference/build_guides/linux_generic.md b/docs/reference/build_guides/linux_generic.md index d72fbb028..f34fa0688 100644 --- a/docs/reference/build_guides/linux_generic.md +++ b/docs/reference/build_guides/linux_generic.md @@ -4,7 +4,13 @@ xSTUDIO can be built in just a few steps on many Linux distros by employing Micr ### Base dependencies -We assume that you have some knowledge of development on Linux platforms and have git, gcc & cmake installed on your system. +We assume that you have some knowledge of development on Linux platforms and have git, gcc and cmake installed on your system. You also need Ninja, which xSTUDIO uses as its CMake generator on all platforms. Install it via your distro's package manager: + + # Rocky / RHEL / Fedora + sudo dnf install ninja-build + + # Ubuntu / Debian + sudo apt install ninja-build ### Download and install Qt 6.5.3 SDK @@ -12,9 +18,10 @@ Follow [these instructions](downloading_qt.md) - ensuring that you download the ### Download the VCPKG repo -To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in the Powershell: +To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal: git clone https://github.com/microsoft/vcpkg.git + git -C vcpkg checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ./vcpkg/bootstrap-vcpkg.sh ### Download the xSTUDIO repo @@ -27,74 +34,34 @@ Download from github in the usual manner. Enter the root folder of the repo and ### Tell CMake where Qt is installed -CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your shell, before launching the build comman. For example, if user Mary Jane downloaded Qt into her home folder: - - export Qt6_DIR=/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6 - -Optionally, add this to your `~/.bashrc` (or `~/.zshrc`) so it's set in every new shell. - -If you prefer not to use an environment variable, alternative options are: - -- **Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example: +CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into her home folder: + { + "version": 3, + "configurePresets": [ { - "version": 3, - "configurePresets": [ - { - "name": "LinuxReleaseLocal", - "inherits": "LinuxRelease", - "cacheVariables": { - "Qt6_DIR": "/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6" - } - } - ] + "name": "LinuxNinjaReleaseLocal", + "inherits": "LinuxNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6" + } } + ] + } - See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. - -- **One-off command-line override**: pass `-DQt6_DIR=/path/to/Qt6` directly to the `cmake` command below. +See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. ### Build xSTUDIO First, we configure for building. Note that this cmake command ***may take several hours to complete*** the first time it is run, though subsequently it will take a few seconds. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. -- If you are using an environment variable to specify the Qt installation run: - - cmake -B build --preset LinuxRelease - -- If you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead: - - cmake -B build --preset LinuxReleaseLocal - -- Or, to pass the Qt path as a one-off command-line override: - - cmake -B build --preset LinuxRelease -DQt6_DIR=/home/maryjane/Qt/6.5.3/gcc_64/lib/cmake/Qt6 - -When this has finished, you can build xSTUDIO with this command (in this case, the --parallel flag is set for a machine with 16 cores as an example). - - cmake --build build --parallel 16 - -### Faster builds with Ninja (optional) - -To speed up the build, you can use Ninja instead of make. Ninja parallelises the build at the file level and is noticeably faster. Install it via your platform's package manager: - - # Rocky / RHEL / Fedora - sudo dnf install ninja-build - - # Ubuntu / Debian - sudo apt install ninja-build - - # macOS (Homebrew) - brew install ninja - -On Windows, Ninja is already bundled with Visual Studio's CMake tools, so no separate install is needed. + cmake -B build --preset LinuxNinjaReleaseLocal -Ninja-based presets are provided for Linux, macOS and Windows (Release, RelWithDebInfo and Debug variants for each). For example, to configure a Linux release build: +When this has finished, you can build xSTUDIO with: - cmake -B build --preset LinuxNinjaRelease cmake --build build -Ninja handles parallelism automatically so there is no need for the `--parallel` flag. See [CMakePresets.json](../../../CMakePresets.json) for the full list of available presets. +RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list. ### Running xSTUDIO in a dev environment @@ -106,4 +73,4 @@ Run this from the xstudio repository root. The `python3.11` segment tracks which ### Installing xSTUDIO -Correct packaging and installation of xstudio and its dependencies across various Linux distros is a problem we are still working on! For now, it is up to individual developers to do an effective installation on their system. You can try running 'make install' from the 'build' folder. Use -DCMAKE_BUILD_PREFIX={path} to set a test installation location +Correct packaging and installation of xstudio and its dependencies across various Linux distros is a problem we are still working on! For now, it is up to individual developers to do an effective installation on their system. You can try running `cmake --install build` from the repository root. Use -DCMAKE_BUILD_PREFIX={path} to set a test installation location diff --git a/docs/reference/build_guides/macos.md b/docs/reference/build_guides/macos.md index dc873667f..17d1eb3f3 100644 --- a/docs/reference/build_guides/macos.md +++ b/docs/reference/build_guides/macos.md @@ -12,9 +12,10 @@ Some of xSTUDIO's dependencies require 'homebrew', the MacOS open source softwar /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -We require 6 packages to be installed to proceed. Run these commands in a terminal: +We require these packages to be installed to proceed. xSTUDIO uses Ninja as its CMake generator on all platforms, so install it here as well. Run these commands in a terminal: brew install cmake + brew install ninja brew install pkg-config brew install nasm brew install autoconf @@ -29,6 +30,7 @@ Follow [these instructions](downloading_qt.md) To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal: git clone https://github.com/microsoft/vcpkg.git + git -C vcpkg checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ./vcpkg/bootstrap-vcpkg.sh ### Download the xSTUDIO repo @@ -41,64 +43,33 @@ Download from github in the usual manner. Enter the root folder of the repo and ### Tell CMake where Qt is installed -CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your shell, pointing to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on MacOS where user Mary Jane downloaded Qt into her home folder: - - export Qt6_DIR=/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6 - -Add this to your `~/.zshrc` (or `~/.bash_profile`) so it's set in every new shell. - -Alternative options if you prefer not to use an environment variable: - -- **Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example: +CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into her home folder: + { + "version": 3, + "configurePresets": [ { - "version": 3, - "configurePresets": [ - { - "name": "MacOSReleaseLocal", - "inherits": "MacOSRelease", - "cacheVariables": { - "Qt6_DIR": "/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6" - } - } - ] + "name": "MacOSNinjaReleaseLocal", + "inherits": "MacOSNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "/Users/maryjane/Qt/6.5.3/macos/lib/cmake/Qt6" + } } + ] + } - See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. - -- **One-off command-line override**: pass `-DQt6_DIR=/path/to/Qt6` directly to the `cmake` command below. +For an Intel Mac, inherit from `MacOSIntelNinjaRelease` instead. See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. ### Build xSTUDIO -Run the appropriate command for your platform (whether you have an older Intel or a newer Apple Silicon machine) to set-up for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. - -**Apple Silicon (ARM) Machines:** - - cmake -B build --preset MacOSRelease - -**Intel Machines:** - - cmake -B build --preset MacOSIntelRelease +Run the configure command. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. -Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run the matching local preset instead, e.g.: + cmake -B build --preset MacOSNinjaReleaseLocal - cmake -B build --preset MacOSReleaseLocal +When this has finished, you can build xSTUDIO with: -When this has finished, you can build xSTUDIO with this command. + cmake --build build --target install - cmake --build build --parallel 16 --target install +RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list. If the build is successful, you should have an application bundle in the 'build' folder called 'xSTUDIO.app'. This can be drag & dropped into your applications folder, desktop and dock as for any other application. - -### Faster builds with Ninja (optional) - -To speed up the build, you can use Ninja instead of make. Ninja parallelises the build at the file level and is noticeably faster. Install it via Homebrew: - - brew install ninja - -Ninja-based presets are provided for macOS (Release, RelWithDebInfo and Debug variants). For example, to configure a macOS release build: - - cmake -B build --preset MacOSNinjaRelease - cmake --build build --target install - -Ninja handles parallelism automatically so there is no need for the `--parallel` flag. See [CMakePresets.json](../../../CMakePresets.json) for the full list of available presets. \ No newline at end of file diff --git a/docs/reference/build_guides/windows.md b/docs/reference/build_guides/windows.md index 4b7184005..e1a9cf197 100644 --- a/docs/reference/build_guides/windows.md +++ b/docs/reference/build_guides/windows.md @@ -12,6 +12,7 @@ Get it here: [Git Download](https://git-scm.com/download/win) Get it here: [Microsoft Visual Studio](https://visualstudio.microsoft.com/vs/) Ensure CMake tools for Windows is included on install. [CMake projects in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170#installation) +The "CMake tools" component bundles `cmake` and `ninja` (xSTUDIO's CMake generator) along with the MSVC compiler, so no separate install is needed. Restart your machine after Visual Studio finishes installing. ### Download and install Qt 6.5.3 SDK @@ -32,6 +33,7 @@ Start a Windows Powershell to continue these instructions, where you must run a To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in the Powershell: git clone https://github.com/microsoft/vcpkg.git + git -C vcpkg checkout c2aeddd80357b17592e59ad965d2adf65a19b22f ./vcpkg/bootstrap-vcpkg.bat ### Download the xSTUDIO repo @@ -44,89 +46,47 @@ Download from github in the usual manner. Enter the root folder of the repo and ### Tell CMake where Qt is installed -CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your PowerShell session, pointing to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, if user Mary Jane downloaded Qt into the root of her C: drive: - - $env:Qt6_DIR = "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" - -To make this persistent across PowerShell sessions, add the line above to your PowerShell profile (run `notepad $PROFILE` to edit it), or set it as a permanent user environment variable via `System Properties > Environment Variables`. - -Alternative options if you prefer not to use an environment variable: - -- **Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. Each user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. The example below defines a local preset for each generator you might use: +CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into the root of her C: drive: + { + "version": 3, + "configurePresets": [ { - "version": 3, - "configurePresets": [ - { - "name": "WinReleaseLocal", - "inherits": "WinRelease", - "cacheVariables": { - "Qt6_DIR": "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" - } - }, - { - "name": "WinNinjaReleaseLocal", - "inherits": "WinNinjaRelease", - "cacheVariables": { - "Qt6_DIR": "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" - } - } - ] + "name": "WinNinjaReleaseLocal", + "inherits": "WinNinjaRelease", + "cacheVariables": { + "Qt6_DIR": "C:/Qt/6.5.3/msvc2019_64/lib/cmake/Qt6" + } } + ] + } - See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. - -- **One-off command-line override**: pass `-DQt6_DIR=C:/path/to/Qt6` directly to the `cmake` command below. +See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference. ### Set up the build environment -The `cmake` and `ninja` tools, along with the MSVC compiler, are bundled with Visual Studio 2022's "CMake tools" component but are not on your `PATH` by default. The simplest way to make them available in your PowerShell session is to enter the Visual Studio Developer Shell: +The `cmake` and `ninja` tools, along with the MSVC compiler, are bundled with Visual Studio 2022's "CMake tools" component but are not on your `PATH` by default. Make them available in your PowerShell session by entering the Visual Studio Developer Shell: Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch amd64 -SkipAutomaticLocation After running those two commands, `cmake` and `ninja` will resolve directly from the command line for the rest of the session, and the build commands below work as shown. -If you already have a separate CMake installation (e.g. from [cmake.org](https://cmake.org/download/)) on your `PATH`, you can skip `Enter-VsDevShell` for the Visual Studio generator build, since MSBuild will find its own toolchain from the generator name. The Ninja build still requires the Developer Shell so that `ninja` and the MSVC compiler are resolvable. - ### Build xSTUDIO Note that the first cmake command below ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing. -You have two choices of generator: - -- **Visual Studio generator** (MSBuild) — produces a solution that can also be opened in the Visual Studio IDE. -- **Ninja generator** — significantly faster builds because Ninja parallelises at the file level. - -#### Option 1: Visual Studio generator - -Configure: - - cmake -B build --preset WinRelease - -Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead: - - cmake -B build --preset WinReleaseLocal - -Build (change the `--parallel` value to match the number of cores on your machine for best build times): - - cmake --build build --parallel 16 --target PACKAGE --config Release - -#### Option 2: Ninja generator - Configure: - cmake -B build --preset WinNinjaRelease - -Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead: - cmake -B build --preset WinNinjaReleaseLocal -Build (Ninja handles parallelism automatically, so no `--parallel` flag is needed): +Build: cmake --build build --target package ---- +> **Note:** `--target package` produces the NSIS installer and is significantly slower than a plain build. When iterating during development, drop the `--target package` flag and just run `cmake --build build`. + +RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list. If the build is successful, you should have an executable in the 'build' folder called something like 'xSTUDIO-1.2.0-win64.exe'. This can be executed to start the xSTUDIO installer. @@ -135,6 +95,3 @@ If the build is successful, you should have an executable in the 'build' folder For a quick dev run without going through the installer, the build generates a launcher at `build/run_xstudio.bat`. Arguments are forwarded to xstudio: .\build\run_xstudio.bat path\to\session.xst - -For additional tips for **developers** follow [this link](developer_tips.md) -