X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2FLyX-Mac-binary-release.sh;h=8bad69d6121d83e4e289ee2c29ae45f19ce67e7b;hb=9dc9fa68ce74964c8f59e608286e99822c268c6b;hp=25b1c7abee0846ea17ab16287f1614e140d850c7;hpb=53ed3dc0627d925500db20594af301052b785378;p=features.git diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 25b1c7abee..8bad69d612 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -284,9 +284,8 @@ while [ $# -gt 0 ]; do LyxOnlyPackage=$(echo ${1}|cut -d= -f2) shift ;; - --enable-cxx11) - LyXConfigureOptions="${LyXConfigureOptions} ${1}" - EnableCXX11="--enable-cxx11" + --enable-cxx11|--enable-cxx-mode=*) + EnableCXXMode="${1}" shift ;; --*) @@ -332,7 +331,7 @@ QtBuildDir=${QtBuildDir:-"${LyxBuildDir}"/${QtBuildSubDir:-"qt-build"}} DictionarySourceDir=${DICTIONARYDIR:-$(dirname "${LyxSourceDir}")/dictionaries} DocumentationDir=$(dirname "${LyxSourceDir}")/Documents -DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.png +DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.tiff if [ -z "${LyXVersion}" ]; then LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " []()") @@ -374,6 +373,12 @@ case "${QtVersion}" in 6*) QtLibraries=${QtLibraries:-"QtCore5Compat QtDBus QtSvg QtXml QtPrintSupport QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"} QtFrameworkVersion="A" + case "${EnableCXXMode}" in + --enable-cxx11|--enable-cxx-mode=11) + echo Warning: Adjust cxx standard "${EnableCXXMode}" for Qt 6. C++17 or better is required. + EnableCXXMode="--enable-cxx-mode=17" + ;; + esac ;; *) QtLibraries=${QtLibraries:-"QtSvg QtXml QtGui QtNetwork QtCore"} @@ -412,6 +417,21 @@ esac MYCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" MYLDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" +case "${EnableCXXMode}" in +--enable-cxx11|--enable-cxx-mode=11) + export CC=cc + export CXX="c++ -stdlib=libc++" + export CXXFLAGS=-std=c++11 + LyXConfigureOptions="${LyXConfigureOptions} --enable-cxx-mode=11" + ;; +--enable-cxx-mode=17) + export CC=cc + export CXX="c++ -stdlib=libc++" + export CXXFLAGS=-std=c++17 + LyXConfigureOptions="${LyXConfigureOptions} ${EnableCXXMode}" + ;; +esac + build_qt() { echo Build Qt library ${QtSourceDir} if [ "${QtInstallDir}" = "${QtBuildDir}" ]; then @@ -641,14 +661,6 @@ build_lyx() { rm -rf "${LyxAppPrefix}" fi - case "${EnableCXX11}" in - "--enable-cxx11") - export CC=cc - export CXX="c++ -stdlib=libc++" - export CXXFLAGS=-std=c++11 - ;; - esac - # ------------------------------------- # Automate configure check # ------------------------------------- @@ -959,7 +971,7 @@ set_bundle_display_options() { X_BOUNDS=$2 Y_BOUNDS=$3 Y_POSITION=$((Y_BOUNDS - 65)) - Y_BOUNDS=$((Y_BOUNDS + 20)) + Y_BOUNDS=$((Y_BOUNDS + 50)) LYX_X_POSITION=$((X_BOUNDS / 4)) LYX_Y_POSITION=$Y_POSITION APP_X_POSITION=$((3 * X_BOUNDS / 4)) @@ -997,10 +1009,19 @@ set_bundle_display_options() { EOF } +# The image was made with with inkscape and tiffutil from dmg-background.svgz +make_image() { + INKSCAPE=/Applications/Inkscape.app/Contents/MacOS/inkscape + cd "${LyxSourceDir}"/development/MacOSX + ${INKSCAPE} --export-type=png -w 560 -o dmg-background.png dmg-background.svgz + ${INKSCAPE} --export-type=png -w 1120 -o dmg-background@2x.png dmg-background.svgz + tiffutil -cathidpicheck dmg-background.png dmg-background@2x.png -out dmg-background.tiff +} + make_dmg() { cd "${1}" - BGSIZE=$(file "$DmgBackground" | awk -F , '/PNG/{print $2 }' | tr x ' ') + BGSIZE=$(file "$DmgBackground" | awk -F , '/TIFF/{ print $10 $4 ;}/PNG/{ print $2; }'|sed -e 's/width=//' -e 's/height=//' -e 's/x//') BG_W=$(echo ${BGSIZE} | awk '{print $1 }') BG_H=$(echo ${BGSIZE} | awk '{print $2 }')