1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-sigil

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Building_Qt6_From_Source_on_MacOSX.txt 5.4 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Kevin Hendricks Отправлено 14.02.2024 21:12 6121675
# Building_Qt6.6.2_From_Source_on_MacOSX
On Ventura you need XCode 14.3.1
# *** IMPORTANT ***
# We do highly recommend you use the same Qt versions as official Sigil builds on Mac OS X.
# which is now Qt 6.6.2
# These instructions will lead you through building from source
# FIRST: make sure you have XCode 14 or later installed and the Command Line Tools
# set the deployment target (this is minimum needed)
export MACOSX_DEPLOYMENT_TARGET=11.0 # now set to 11.0 - but that is absurd in macx.conf
# cd to a location to store your src tree then do
export MYQTSRC=`pwd`
# Build Prerequisites
# -------------------
1. Make sure you have installed Python 3.11.3 or later and then use pip3 install html5lib as these
are needed by QtWebEngine
2. Make sure you have installed the ninja build tool into /usr/local (or use MacPorts).
# Next build and install the following prerequisites for the build:
# cmake, libpng, libjpeg-turbo, openssl3, nodejs (see https://nodejs.org/en/download/),
# ninja build tool
# and install into /usr/local so that they can be found during qtwebengine's build
# Note: older versions of these prerequisites may work but have not been tested
# Download cmake 3.26.4 or later from https://cmake.org/download
tar -zxvf sources/cmake-3.26.4.tar.gz
cd cmake-3.26.4
./bootstrap --prefix=/usr/local -- -DCMAKE_BUILD_TYPE:STRING=Release
make -j4
sudo make install
# Download libpng 1.6.42 or later from png's sourceforge site: http://www.libpng.org/pub/png/libpng.html
export LDFLAGS="-Wl,-macosx_version_min,11.0"
export CFLAGS="-mmacosx-version-min=11.0 -Werror=partial-availability"
tar -zxvf sources/libpng-1.6.42.tar.gz
cd libpng-1.6.42
./configure --enable-static=yes --enable-shared=no --prefix=/usr/local
make -j4
sudo make install
unset CFLAGS
unset LDFLAGS
# if the "nasm" network assembler tool is not installed, you may
# want to install it before building libjpegturbo to spped up the jpeg
# library performance
# https://github.com/netwide-assembler/nasm
# get a stable release and configure with --prefix=/usr/local
# libjpeg-turbo 3.0.2 or later from libjpeg-turbo.org
# https://sourceforge.net/projects/libjpeg-turbo/files/
tar -zxvf sources/libjpeg-turbo-3.0.2.tar.gz
mkdir buildjt3
cd buildjt3
cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_SHARED=0 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_C_FLAGS_RELEASE="-O3 -mmacosx-version-min=11.0 -Werror=partial-availability" ../libjpeg-turbo-3.0.2/
make -j4
sudo make install
# Download openssl-3.0.13.tar.gz or later into sources from https://www.openssl.org/source
export MACOSX_DEPLOYMENT_TARGET=11.0
export LDFLAGS="-Wl,-macosx_version_min,11.0"
tar -zxvf sources/openssl-3.0.13.tar.gz
cd openssl-3.0.13
./config no-shared --prefix=/usr/local
make -j4
sudo make install
# Building Qt6.6.2 from source
# -----------------------------
# download qt-everywhere-src-6.6.2.tar.xz directly from Qt
# from: https://download.qt.io/archive/qt/
# for: PySide - https://download.qt.io/official_releases/QtForPython/
# alternatively use git to check out the source
# ---------------------------------------------
# git clone https://code.qt.io/qt/qt5.git qt6
# cd qt6
# git switch 6.6.2
# perl init-repository --branch
# without '--branch' specified, init-repository pulls a fixed set of shas
# determined at the time of branch first creation and not the current branch
# heads. This creates the potential to miss late cherry-picked bug fix
# commits made to the branch after first creation
export MACOSX_DEPLOYMENT_TARGET=11.0
export MYDEST=/Users/kbhend/devpython/libraries/Frameworks
export PATH=${MYDEST}/Python.framework/Versions/3.11/bin:${PATH}
tar -jxf qt-everywhere-src-6.6.2.tar.xz
cd qt-everywhere-src-6.6.2
# Apply an obvious fix for insertParagraph execcommand and h6 (see w3c spec)
# See https://bugreports.qt.io/browse/QTBUG-79778
patch -p0 < ../sources/qt650_fix_h6_insertParagraph.patch
# Apply the fix for poor qtreeview performance due to accessibility
patch -p0 < ../sources/qt662_fix_qtreeview_perf_issue_0b474e1.diff
# the remaining patches are ONLY important for Qt on macOS
# apply workaround to prevent missing macos application menu items
# See https://bugreports.qt.io/browse/QTBUG-80795
patch -p0 < ../sources/qt650_fix_missing_macos_menubar.patch
# The last patch is a generated cmake file fix and it must be used to fix the cmake
# file *AFTER* the Qt6 is built and installed
# Create a destination directory to house your complete Qt binary in your home directory
# to be similar to how stock Qt does it
cd ~/
mkdir Qt662
# Now return and create a shadow build inside a new directory to keep your Qt sources clean
cd ${MYQTSRC}
mkdir buildqt662
cd buildqt662
# Remember to include the -webengine-proprietary-codecs configure switch
# and add -feature-optimize_full to use -O3 (note _full not -full)
../qt-everywhere-src-6.6.2/configure --prefix=/Users/${USER}/Qt662 -webengine-proprietary-codecs -feature-optimize_full -- -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" -DCMAKE_BUILD_TYPE=Release
# note the build itself can take a couple of hours depending on memory available, disk and cpus used
cmake --build . --parallel
cmake --install .
# Now apply the final patch to the post installed cmake file
cd /Users/${USER}/Qt662
patch -p0 < ~/Desktop/qt650_post_install_macos_ignore_bad_cups_cmake_find_failure.patch
# After the install phase completes your newly built Qt should exist in ~/Qt662 ready to be used
# to build Sigil and PageEdit

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-sigil.git
git@api.gitlife.ru:oschina-mirror/mirrors-sigil.git
oschina-mirror
mirrors-sigil
mirrors-sigil
master