diff --git a/.docker/third-party.bake.Dockerfile b/.docker/third-party.bake.Dockerfile deleted file mode 100644 index 45b3648804..0000000000 --- a/.docker/third-party.bake.Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM ubuntu:18.04 AS third-party-builder - - # Prevent interactive prompts - ENV DEBIAN_FRONTEND=noninteractive - - # Install build dependencies for 18.04 - # Note: python-is-python3 doesn't exist here, so we link it manually - RUN apt-get update && apt-get install -y \ - build-essential \ - wget \ - tar \ - curl \ - python3 \ - python3-pip \ - pkg-config \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ - libgl1-mesa-dev \ - libxcb1-dev \ - libdbus-1-dev \ - libicu-dev \ - libfreetype6-dev \ - libfontconfig1-dev \ - libharfbuzz-dev \ - #libxkbcommon-dev \ - #libxkbcommon-x11-dev \ - libxcb-xinput-dev \ - libsm-dev \ - libatspi2.0-dev \ - libglib2.0-dev \ - libxi-dev \ - libasound2-dev \ - libpulse-dev \ - #libssl-dev \ - #libssl1.0-dev \ - libcups2-dev \ - libgtk-3-dev \ - libxcomposite-dev \ - && ln -s /usr/bin/python3 /usr/bin/python \ - && rm -rf /var/lib/apt/lists/* - - RUN apt-get update && apt-get install -y \ - wget build-essential libssl-dev zlib1g-dev libbz2-dev \ - libreadline-dev libsqlite3-dev libffi-dev liblzma-dev \ - libncursesw5-dev xz-utils && \ - wget -q https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz && \ - tar xzf Python-3.10.13.tgz && \ - cd Python-3.10.13 && \ - ./configure --prefix=/usr/local && \ - make -j"$(nproc)" && \ - make altinstall && \ - cd .. && rm -rf Python-3.10.13* && \ - python3.10 --version - - COPY /core/Common/3dParty /3dParty - - - RUN --mount=type=secret,id=nextcloud_user \ - --mount=type=secret,id=nextcloud_pass \ - export NEXTCLOUD_USER="$(cat /run/secrets/nextcloud_user)" && \ - export NEXTCLOUD_PASS="$(cat /run/secrets/nextcloud_pass)" && \ - python3.10 /3dParty/build_3rdparty.py \ - --only=qt \ - /third_party/work \ - /third_party/install - - \ No newline at end of file diff --git a/Common/3dParty/build_3rdparty.py b/Common/3dParty/build_3rdparty.py index 787941ce5d..799126e606 100644 --- a/Common/3dParty/build_3rdparty.py +++ b/Common/3dParty/build_3rdparty.py @@ -26,7 +26,6 @@ 'socketio', 'hunspell', 'v8', - 'icu-desktop', 'cef', 'qt' ] diff --git a/Common/3dParty/cef/portfile.cmake b/Common/3dParty/cef/portfile.cmake index 1b1dfda6f5..88086474b3 100644 --- a/Common/3dParty/cef/portfile.cmake +++ b/Common/3dParty/cef/portfile.cmake @@ -1,4 +1,4 @@ -include("${CMAKE_CURRENT_LIST_DIR}/../../../common.cmake") +set(VCPKG_BINARY_REMOTE "https://cloud.nextcloud.com/public.php/dav/files/n9KYBcFYyLLCgEw") # 1. Setup hashes for each architecture (Vcpkg requires these) set(CEF_HASH "NOTFOUND") diff --git a/Common/3dParty/icu/nc-build-cygwin.sh b/Common/3dParty/icu/nc-build-cygwin.sh index 09c93b0215..4588e52482 100644 --- a/Common/3dParty/icu/nc-build-cygwin.sh +++ b/Common/3dParty/icu/nc-build-cygwin.sh @@ -1,8 +1,6 @@ #!/bin/bash install_dir="$1" - -# If the install dir comes from wsl, convert that to cygwin path if [[ $install_dir == /mnt/* ]]; then install_dir="/cygdrive/${install_dir#/mnt/}" fi @@ -10,9 +8,20 @@ fi export PATH="$PATH:/usr/bin" export PYTHON=/usr/bin/python3 +# --- logging: write a clean UTF-8 log straight from bash --------------------- +# Done before any heavy work so the real output never passes through the +# parent's (mis-decoding) pipe. fd 3 keeps a handle to the original stderr so +# we can still surface a short "see log" line to the console/parent. +mkdir -p "$install_dir" || { echo "Failed to create install dir" >&2; exit 1; } +LOG="${install_dir%/}/icu-build.log" +exec 3>&2 +exec >"$LOG" 2>&1 +# ----------------------------------------------------------------------------- + abort_op() { - echo "ICU-CygWin aborted: $1" >&2 + echo "ICU-CygWin aborted: $1" >&2 # full context in the log + echo "ICU-CygWin aborted: $1 (see $LOG)" >&3 # short line to the console exit 1 } @@ -21,15 +30,11 @@ then abort_op "This script has to be run from the icu/source directory (cannot find runConfigureICU)" fi -if [ ! -d "$install_dir" ] -then - mkdir -p "$install_dir" || abort_op "Failed to create install dir" -fi - "./runConfigureICU" Cygwin/MSVC \ --prefix="$install_dir" \ --enable-shared \ - --disable-static || abort_op "Configuration failed" + --disable-static \ + --disable-renaming || abort_op "Configuration failed" # Build and install make -j$(nproc) || abort_op "Build failed" @@ -55,4 +60,33 @@ done < <(find "$install_dir" -type l -print0) remaining=$(find "$install_dir" -type l | wc -l) [ "$remaining" -eq 0 ] || abort_op "Symlinks still present in install dir after dereferencing" -echo "Install tree contains no symlinks — safe for native Windows consumers." \ No newline at end of file +echo "Install tree contains no symlinks — safe for native Windows consumers." + + +# --------------------------------------------------------------------------- +# Emit unversioned ICU DLL aliases for Qt 6.10 (loads icuuc.dll by name). +# On Cygwin/MSVC the DLLs land in lib/ next to the import libs, not bin/, so +# locate each versioned DLL wherever it is rather than assuming a directory. +# [0-9] matches only versioned files (never the unversioned target → idempotent); +# -ef skips any same-file copy. +# --------------------------------------------------------------------------- +for base in icuuc icuin icudt; do + src=$(find "$install_dir/bin" "$install_dir/lib" -maxdepth 1 \ + -name "${base}[0-9]*.dll" 2>/dev/null | sort | tail -n1) + [ -n "$src" ] || abort_op "No versioned ${base}NN.dll under $install_dir (bin/ or lib/)" + dst="$(dirname "$src")/${base}.dll" + [ "$src" -ef "$dst" ] && continue + cp -f "$src" "$dst" || abort_op "Cannot alias $src -> $dst" + echo "Aliased $(basename "$src") -> ${base}.dll in $(dirname "$src")" +done +echo "Created unversioned ICU DLL aliases (icuuc.dll, icuin.dll, icudt.dll)." + + +# Persist renaming-off for downstream consumers: ICU built itself with +# -DU_DISABLE_RENAMING=1, but doesn't bake it into the installed headers, so +# consumers default to renaming-ON and emit _74 symbols. Force it in uconfig.h. +uconfig="$install_dir/include/unicode/uconfig.h" +if ! grep -q "define U_DISABLE_RENAMING 1" "$uconfig"; then + sed -i 's/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/' "$uconfig" +fi +grep "U_DISABLE_RENAMING" "$uconfig" # verify it now reads 1 \ No newline at end of file diff --git a/Common/3dParty/qt/nc-build.py b/Common/3dParty/qt/nc-build.py index b155866c49..9a4ac6f911 100644 --- a/Common/3dParty/qt/nc-build.py +++ b/Common/3dParty/qt/nc-build.py @@ -1,18 +1,33 @@ #!/usr/bin/env python3 import sys -import shutil import os -import urllib.request -import zipfile +import platform from pathlib import Path -script_path = Path(sys.argv[0]).resolve() +script_path = Path( sys.argv[0] ).resolve() script_dir = script_path.parent -qt_major = "5.9" -qt_version = "5.9.9" -qt_src_name = f"qt-everywhere-opensource-src-{qt_version}" -qt_url_base = f"https://download.qt.io/archive/qt/{qt_major}/{qt_version}/single" +# --------------------------------------------------------------------------- +# What to install. +# +# Set qt_version to whatever the project targets. Discover what's actually +# available for a given platform with: +# python -m aqt list-qt windows desktop # list versions +# python -m aqt list-qt windows desktop --arch 6.11.1 # list archs +# +# NOTE on 6.11.x: download.qt.io changed its directory layout at 6.11.0, so a +# stale aqt can fail to resolve it. The fetch phase upgrades aqt for this +# reason. +# --------------------------------------------------------------------------- +qt_version = "6.10.1" + +# Add-on modules that are NOT part of the base desktop package. +# Core, Gui, Widgets, PrintSupport, Svg and the Linguist tools +# (lrelease/lupdate/lconvert + the Qt6LinguistTools CMake package) all ship in +# the base package, so only Multimedia (which also provides MultimediaWidgets) +# has to be requested explicitly. List everything available with: +# python -m aqt list-qt desktop --modules +qt_modules = [ "qtmultimedia" ] # , "debug_info" third_party_root = ( script_dir / ".." ).resolve() if str( third_party_root ) not in sys.path: @@ -28,61 +43,55 @@ ) -def long_path( path ): - # Extended-length path prefix so extraction of the deeply nested Qt - # source tree does not hit the 260 char MAX_PATH limit on Windows +def detect_host_and_arch(): + """Map the running platform to the (aqt host, aqt arch) pair. + + Qt only ships MSVC binaries for Windows-on-ARM, and Linux desktop arm64 + binaries exist from Qt 6.7.0 onward. + """ + machine = platform.machine().lower() + is_arm = machine in ( "arm64", "aarch64" ) + if nc.is_windows(): - return "\\\\?\\" + str( Path( path ).resolve() ) - return str( path ) + if is_arm: + return "windows_arm64", "win64_msvc2022_arm64" + return "windows", "win64_msvc2022_64" + + if nc.is_linux(): + if is_arm: + return "linux_arm64", "linux_gcc_arm64" + return "linux", "linux_gcc_64" + + nc.abort_op( f"Unsupported platform: {sys.platform} / {machine}" ) + + +def find_qt_prefix(): + """Locate the directory aqt extracted into, without hard-coding the + folder-name transform (it varies across hosts and Qt versions). + + A valid desktop Qt prefix always has both bin/ and lib/cmake/Qt6/. + """ + version_dir = nc.install_dir / qt_version + if not version_dir.is_dir(): + return None + + for child in sorted( version_dir.iterdir() ): + if child.is_dir() \ + and ( child / "bin" ).is_dir() \ + and ( child / "lib" / "cmake" / "Qt6" ).is_dir(): + return child + return None def fetch_and_patch(): + # "Fetch" phase: ensure the downloader (aqt) is present and current. nc.create_workdir() - if nc.is_linux(): - tarball = nc.work_dir / f"qt_source_{qt_version}.tar.xz" - - nc.run_command( - [ "wget", f"{qt_url_base}/{qt_src_name}.tar.xz", "-O", str( tarball ) ], - "Download Qt source", - nc.work_dir - ) - - nc.run_command( - [ "tar", "-xf", str( tarball ) ], - "Extract Qt source", - nc.work_dir - ) - - try: - tarball.unlink() - except FileNotFoundError: - pass - - elif nc.is_windows(): - # Qt provides a .zip source package with CRLF line endings for Windows - zip_path = nc.work_dir / f"qt_source_{qt_version}.zip" - - print( "Downloading Qt source (zip)..." ) - try: - urllib.request.urlretrieve( f"{qt_url_base}/{qt_src_name}.zip", zip_path ) - except Exception as e: - nc.abort_op( f"Download failed: {e}" ) - - print( "Extracting Qt source..." ) - try: - with zipfile.ZipFile( zip_path ) as zf: - zf.extractall( long_path( nc.work_dir ) ) - except Exception as e: - nc.abort_op( f"Extraction failed: {e}" ) - - try: - zip_path.unlink() - except FileNotFoundError: - pass - - else: - nc.abort_op( f"Unknown target platform: {sys.platform}" ) + nc.run_command( + [ sys.executable, "-m", "pip", "install", "--upgrade", "aqtinstall" ], + "Install/upgrade aqtinstall", + nc.work_dir + ) nc.create_work_dir_ok_marker() print( "Fetch & patch completed" ) @@ -90,107 +99,37 @@ def fetch_and_patch(): def build_and_install(): nc.create_install_dir() - - qt_source_dir = nc.work_dir / qt_src_name - - # Flags shared between platforms - common_flags = [ - "-opensource", - "-confirm-license", - "-release", - "-shared", - "-accessibility", - "-qt-zlib", - "-qt-libpng", - "-qt-libjpeg", - "-qt-pcre", - "-no-sql-sqlite", - "-no-qml-debug", - "-nomake", "examples", - "-nomake", "tests", - "-skip", "qtenginio", - "-skip", "qtlocation", - "-skip", "qtserialport", - "-skip", "qtsensors", - "-skip", "qtxmlpatterns", - "-skip", "qt3d", - "-skip", "qtwebview", - "-skip", "qtwebengine", - "-skip", "qtscript", + host, arch = detect_host_and_arch() + print(f"Installing Qt {qt_version} for host '{host}', arch '{arch}'") + + # 1. Real Qt install: full base package (Core/Gui/Widgets/PrintSupport/Svg/ + # Linguist tools) + add-on modules. NO --archives, so Svg etc. come in. + cmd = [ + sys.executable, "-m", "aqt", "install-qt", + host, "desktop", qt_version, arch, + "--outputdir", str(nc.install_dir), ] - - if nc.is_linux(): - # Keep the same install layout as the previous docker build - qt_prefix = nc.install_dir / f"qt" - - nc.run_command( - [ "./configure" ] + common_flags + [ - "-prefix", str( qt_prefix ), - "-qt-xcb", - "-gstreamer", "1.0", - # flags to match target build after comparison to onlyoffice build - "-dbus-linked", - "-icu", - "-no-iconv", - "-fontconfig", - "-system-freetype", - "-system-harfbuzz", - "-alsa", - "-pulseaudio", - # "-openssl-linked", - "-cups", - "-gtk" - ], - "Configure", - qt_source_dir - ) - - nc.run_command( - [ "make", f"-j{os.cpu_count()}" ], - "Build", - qt_source_dir - ) - - nc.run_command( - [ "make", "install" ], - "Install", - qt_source_dir - ) - - elif nc.is_windows(): - qt_prefix = nc.install_dir / f"Qt-{qt_version}" / "msvc_64" - - # The bat file sets up the MSVC environment (vcvarsall) and then - # runs configure.bat / nmake. Windows-only configure flags are - # appended after the common ones. - windows_flags = [ - "-prefix", str( qt_prefix ), - "-platform", "win32-msvc", - "-opengl", "desktop", - "-mp", - "-no-icu", - "-no-iconv" + real_modules = [m for m in qt_modules if m != "debug_info"] + if real_modules: + cmd += ["-m"] + real_modules + nc.run_command(cmd, "Download Qt binaries (aqt)", nc.install_dir) + + # 2. Debug symbols: separate call, qtbase archive only, same prefix. + # --archives qtbase here is correct. We only want Core/Gui/Widgets/ + # qwindows PDBs, not the whole multi-GB debug set. + if nc.is_windows() and "debug_info" in qt_modules: + dbg = [ + sys.executable, "-m", "aqt", "install-qt", + host, "desktop", qt_version, arch, + "--outputdir", str(nc.install_dir), + "-m", "debug_info", + "--archives", "qtbase", ] + nc.run_command(dbg, "Download Qt debug symbols (aqt)", nc.install_dir) - bat_path = script_dir / "nc-build-qt.bat" - - nc.run_command( - [ "cmd.exe", - "/c", - "call", - str( bat_path ), - str( qt_source_dir ) - ] + common_flags + windows_flags, - "MSVC build", - qt_source_dir - ) - - else: - nc.abort_op( f"Unknown target platform: {sys.platform}" ) + prefix = find_qt_prefix() nc.create_install_dir_ok_marker() - nc.fix_terminal_encoding() - print( "Build and install completed" ) def build_all(): diff --git a/DesktopEditor/agg-2.4/include/agg_basics.h b/DesktopEditor/agg-2.4/include/agg_basics.h index 16692bd81f..b8cfec7455 100644 --- a/DesktopEditor/agg-2.4/include/agg_basics.h +++ b/DesktopEditor/agg-2.4/include/agg_basics.h @@ -207,7 +207,7 @@ namespace agg { AGG_INLINE static unsigned mul(unsigned a, unsigned b) { - register unsigned q = a * b + (1 << (Shift-1)); + unsigned q = a * b + (1 << (Shift-1)); return (q + (q >> Shift)) >> Shift; } }; diff --git a/DesktopEditor/agg-2.4/include/agg_image_accessors.h b/DesktopEditor/agg-2.4/include/agg_image_accessors.h index fca40b62aa..4e7ec6fd32 100644 --- a/DesktopEditor/agg-2.4/include/agg_image_accessors.h +++ b/DesktopEditor/agg-2.4/include/agg_image_accessors.h @@ -174,8 +174,8 @@ namespace agg private: AGG_INLINE const int8u* pixel() const { - register int x = m_x; - register int y = m_y; + int x = m_x; + int y = m_y; if(x < 0) x = 0; if(y < 0) y = 0; if(x >= (int)m_pixf->width()) x = m_pixf->width() - 1; diff --git a/DesktopEditor/agg-2.4/include/agg_trans_affine.h b/DesktopEditor/agg-2.4/include/agg_trans_affine.h index b357671363..6978a133d3 100644 --- a/DesktopEditor/agg-2.4/include/agg_trans_affine.h +++ b/DesktopEditor/agg-2.4/include/agg_trans_affine.h @@ -292,7 +292,7 @@ namespace agg //------------------------------------------------------------------------ inline void trans_affine::transform(double* x, double* y) const { - register double tmp = *x; + double tmp = *x; *x = tmp * sx + *y * shx + tx; *y = tmp * shy + *y * sy + ty; } @@ -300,7 +300,7 @@ namespace agg //------------------------------------------------------------------------ inline void trans_affine::transform_2x2(double* x, double* y) const { - register double tmp = *x; + double tmp = *x; *x = tmp * sx + *y * shx; *y = tmp * shy + *y * sy; } @@ -308,9 +308,9 @@ namespace agg //------------------------------------------------------------------------ inline void trans_affine::inverse_transform(double* x, double* y) const { - register double d = determinant_reciprocal(); - register double a = (*x - tx) * d; - register double b = (*y - ty) * d; + double d = determinant_reciprocal(); + double a = (*x - tx) * d; + double b = (*y - ty) * d; *x = a * sy - b * shx; *y = b * sx - a * shy; } diff --git a/DesktopEditor/agg-2.4/src/platform/win32/agg_platform_support.cpp b/DesktopEditor/agg-2.4/src/platform/win32/agg_platform_support.cpp index 86d3f2b351..44cba190d6 100644 --- a/DesktopEditor/agg-2.4/src/platform/win32/agg_platform_support.cpp +++ b/DesktopEditor/agg-2.4/src/platform/win32/agg_platform_support.cpp @@ -1298,7 +1298,7 @@ namespace agg tok.len = 0; if(m_src_string == 0 || m_start == -1) return tok; - register const char *pstr = m_src_string + m_start; + const char *pstr = m_src_string + m_start; if(*pstr == 0) { diff --git a/DesktopEditor/raster/Metafile/test/DisplayingXML/CCustomView.cpp b/DesktopEditor/raster/Metafile/test/DisplayingXML/CCustomView.cpp index e5fcb2b414..b0570ce696 100644 --- a/DesktopEditor/raster/Metafile/test/DisplayingXML/CCustomView.cpp +++ b/DesktopEditor/raster/Metafile/test/DisplayingXML/CCustomView.cpp @@ -70,7 +70,7 @@ void CCustomView::Clear() void CCustomView::wheelEvent(QWheelEvent *event) { - double delta = event->delta(); + double delta = event->angleDelta().y(); double sf = 1.0 + delta / 1000; scale(sf, sf); } diff --git a/MsBinaryFile/DocFile/OpenXmlPackage.h b/MsBinaryFile/DocFile/OpenXmlPackage.h index fae9794952..b5f95ed75d 100644 --- a/MsBinaryFile/DocFile/OpenXmlPackage.h +++ b/MsBinaryFile/DocFile/OpenXmlPackage.h @@ -1,4 +1,4 @@ -/* +/* * (c) Copyright Ascensio System SIA 2010-2023 * * This program is a free software product. You can redistribute it and/or @@ -60,12 +60,12 @@ namespace DocFileFormat } RelationshipsFile( const std::wstring& fileName ): - RelID(0), FileName( fileName ) + FileName( fileName ), RelID(0) { } RelationshipsFile( int relID, const std::wstring& fileName, const std::vector& relationships ): - RelID(relID), FileName( fileName ), Relationships( relationships ) + FileName( fileName ), Relationships( relationships ), RelID(relID) { } }; diff --git a/common.cmake b/common.cmake index 6a96c02cd8..66a5a9fb2a 100644 --- a/common.cmake +++ b/common.cmake @@ -96,7 +96,7 @@ else() if(NOT THIRD_PARTY_PREPARED) if(NOT BUILD_DESKTOP) - set(NO_DESKTOP_EXCLUDE ",cef,qt,icu-desktop") + set(NO_DESKTOP_EXCLUDE ",cef,qt") endif() cmake_path( APPEND BUILDER_PATH "${CMAKE_CURRENT_LIST_DIR}" "Common" "3dParty" "build_3rdparty.py" ) @@ -129,29 +129,44 @@ else() endif() if(BUILD_DESKTOP) - # Setup icu desktop - # These version numbers don't affect what build_3rdparty.py builds. They just have to match. - set(ICU_DESKTOP_MAJOR_VER "60") - set(ICU_DESKTOP_MINOR_VER "3") - set(ICU_DESKTOP_INSTALL_DIR "${EO_CORE_3RD_PARTY_INSTALL_DIR}/icu-desktop") - get_filename_component(ICU_DESKTOP_INSTALL_DIR_ABS "${ICU_DESKTOP_INSTALL_DIR}" ABSOLUTE) - if( MSVC ) - set(LIBICUUC_DESKTOP "${ICU_DESKTOP_INSTALL_DIR_ABS}/lib/icuuc.lib") - set(LIBICUDATA_DESKTOP "${ICU_DESKTOP_INSTALL_DIR_ABS}/lib/icudt.lib") - set(LIBICUI_DESKTOP "${ICU_DESKTOP_INSTALL_DIR_ABS}/lib/icuin.lib") + # Setup qt + # Priority: explicit QT6_ROOT override > path recorded by the fetch script > + # glob of aqt's / layout. + if(DEFINED ENV{QT6_ROOT}) + set(QT_ROOT "$ENV{QT6_ROOT}") else() - set(LIBICUUC_DESKTOP "${ICU_DESKTOP_INSTALL_DIR_ABS}/lib/libicuuc.so.${ICU_DESKTOP_MAJOR_VER}") - set(LIBICUDATA_DESKTOP "${ICU_DESKTOP_INSTALL_DIR_ABS}/lib/libicudata.so.${ICU_DESKTOP_MAJOR_VER}") - set(LIBICUI_DESKTOP "${ICU_DESKTOP_INSTALL_DIR_ABS}/lib/libicui18n.so.${ICU_DESKTOP_MAJOR_VER}") + set(_qt_install "${EO_CORE_3RD_PARTY_INSTALL_DIR}/qt") + message(STATUS "Searching qt6 root") + if(EXISTS "${_qt_install}/qt6_root.txt") + file(READ "${_qt_install}/qt6_root.txt" QT_ROOT) + string(STRIP "${QT_ROOT}" QT_ROOT) + message(STATUS "Found qt6 root: " ${QT_ROOT}) + else() + # Fallback: find the prefix aqt extracted (arch folder varies by platform) + file(GLOB _qt6_cfg "${_qt_install}/*/*/lib/cmake/Qt6/Qt6Config.cmake") + if(_qt6_cfg) + list(GET _qt6_cfg 0 _qt6_cfg) + get_filename_component(_qt6_dir "${_qt6_cfg}" DIRECTORY) + get_filename_component(QT_ROOT "${_qt6_dir}/../../.." ABSOLUTE) + endif() + endif() endif() - # Setup qt - set(QT_ROOT "${EO_CORE_3RD_PARTY_INSTALL_DIR}/qt/qt") - set(QT_DIR "${QT_ROOT}/lib/cmake/Qt5") - set(Qt5_DIR "${QT_ROOT}/lib/cmake/Qt5") - set(QT_VERSION_MAJOR "5") - find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets PrintSupport Svg LinguistTools Multimedia MultimediaWidgets) - + if(NOT QT_ROOT OR NOT EXISTS "${QT_ROOT}/lib/cmake/Qt6") + message(STATUS "Qt6 root: " ${QT_ROOT}) + message(FATAL_ERROR "Qt6 not found. Run the fetch script or set QT6_ROOT.") + endif() + + file(TO_CMAKE_PATH "${QT_ROOT}" QT_ROOT) + + set(QT_VERSION_MAJOR 6) + set(QT_DIR "${QT_ROOT}/lib/cmake/Qt6") + set(Qt6_DIR "${QT_ROOT}/lib/cmake/Qt6") + + find_package(Qt6 REQUIRED COMPONENTS + Core Gui Widgets PrintSupport Svg LinguistTools Multimedia MultimediaWidgets + CorePrivate GuiPrivate PrintSupportPrivate) + # Setup cef set(CEF_ROOT "${EO_CORE_3RD_PARTY_INSTALL_DIR}/cef") list(APPEND CMAKE_MODULE_PATH "${CEF_ROOT}/cmake") @@ -169,9 +184,11 @@ else() if( MSVC ) set(LIBICUUC "${ICU_INSTALL_DIR_ABS}/lib/icuuc.lib") set(LIBICUDATA "${ICU_INSTALL_DIR_ABS}/lib/icudt.lib") + set(LIBICUI "${ICU_INSTALL_DIR_ABS}/lib/icuin.lib") else() set(LIBICUUC "${ICU_INSTALL_DIR_ABS}/lib/libicuuc.so.${ICU_MAJOR_VER}") set(LIBICUDATA "${ICU_INSTALL_DIR_ABS}/lib/libicudata.so.${ICU_MAJOR_VER}") + set(LIBICUI "${ICU_INSTALL_DIR_ABS}/lib/libicui18n.so.${ICU_MAJOR_VER}") endif() # Setup boost diff --git a/vcpkg.json b/vcpkg.json index 6874dd14b3..71681836d4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -10,6 +10,12 @@ "dependencies": [ "gtest" ] + }, + "desktop-editors": { + "description": "Dependencies for building the desktop editors", + "dependencies": [ + "vulkan" + ] } }, "overrides": [