]> git.lyx.org Git - lyx.git/blobdiff - development/LyX-Mac-binary-release.sh
Do not wrap forceTLR in \L with babel and unicode engines
[lyx.git] / development / LyX-Mac-binary-release.sh
index 017a61072cc6aef34db03366e778f4794ba423ee..f2683fec4497d69203f557745a82efbde89b5488 100644 (file)
@@ -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
                ;;
        --*)
@@ -300,7 +299,7 @@ while [ $# -gt 0 ]; do
 done
 
 if [ "${configure_qt_frameworks}" != "yes" ]; then
-       QtInstallDir=${QTDIR:-"/opt/qt4"}
+       QtInstallDir=${QTDIR}
 fi
 
 ARCH_LIST=${ARCH_LIST:-"ppc i386"}
@@ -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
        # -------------------------------------
@@ -1000,15 +1012,18 @@ 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
+       (
+               cd "${LyxSourceDir}"/development/MacOSX
+               test -x ${INKSCAPE} && ${INKSCAPE} --export-type=png -w 560 -o dmg-background.png dmg-background.svgz
+               test -x ${INKSCAPE} && ${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}"
 
+       test -f "${DmgBackground}" || make_image
        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 }')