X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2FLyX-Mac-binary-release.sh;h=80c1d7e786e5758f16dca4b88c728033f9586145;hb=9dd7ffff7bb42f45918522825976c9c75703ed77;hp=92c7f2f452e44893a53c68a0dce49f38d0115ea3;hpb=668d92ea23bf2ee22b29f2c0812fb1eaafa2adf0;p=lyx.git diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 92c7f2f452..80c1d7e786 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -394,6 +394,7 @@ case $SDKs in ;; esac MYCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" +MYLDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" build_qt() { echo Build Qt library ${QtSourceDir} @@ -456,7 +457,7 @@ if [ -d "${LibMagicSourceDir}" -a ! -f "${LibMagicInstallHdr}" ]; then for arch in ${ARCH_LIST} ; do CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"; export CPPFLAGS - LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"; export LDFLAGS + LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYLDFLAGS}"; export LDFLAGS "${LibMagicSourceDir}/configure"\ --prefix="${LibMagicInstallDir}"\ ${LibMagicConfigureOptions} @@ -518,7 +519,7 @@ if [ -d "${HunSpellSourceDir}" -a ! -f "${HunSpellInstallHdr}" ]; then for arch in ${ARCH_LIST} ; do make distclean CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"; export CPPFLAGS - LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"; export LDFLAGS + LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYLDFLAGS}"; export LDFLAGS "${HunSpellSourceDir}/configure"\ --prefix="${HunSpellInstallDir}"\ ${HunspellConfigureOptions} @@ -581,7 +582,7 @@ if [ -d "${ASpellSourceDir}" -a ! -f "${ASpellInstallHdr}" -a "yes" = "${aspell_ for arch in ${ARCH_LIST} ; do make distclean CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"; export CPPFLAGS - LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"; export LDFLAGS + LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYLDFLAGS}"; export LDFLAGS CXXFLAGS=-g "${ASpellSourceDir}/configure"\ --prefix="${ASpellInstallDir}"\ ${AspellConfigureOptions} @@ -622,7 +623,7 @@ framework_name() { echo "Frameworks/${1}.framework" } -LYX_FILE_LIST="lyx lyxclient tex2lyx" +LYX_FILE_LIST="lyx lyxclient tex2lyx lyxconvert" BUNDLE_PATH="Contents/MacOS" LYX_BUNDLE_PATH="${LyxAppPrefix}/${BUNDLE_PATH}" build_lyx() { @@ -677,7 +678,7 @@ build_lyx() { mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}" CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}" - LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}" + LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYLDFLAGS}" if [ "$configure_qt_frameworks" = "yes" ]; then export QT_CORE_CFLAGS="-FQtCore" @@ -704,7 +705,7 @@ build_lyx() { mv "${LYX_BUNDLE_PATH}/${file}"\ "${LYX_BUNDLE_PATH}/${file}-${arch}" else - echo ERROR: Cannot build and install LyX for ${arch}. + echo ERROR: Cannot build and install ${file} for ${arch}. exit 1 fi done @@ -720,7 +721,7 @@ content_directory() { installname() { echo install_name_tool "$@" - install_name_tool "$@" + install_name_tool "$@" || exit 1 } private_framework() { @@ -775,7 +776,7 @@ EOF # pattern match for: /path/to/qt/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, current version 4.6.2) case "${library}" in *@rpath/*"${libnm}"*"("*version*")"*) - echo rpath based name for ${libnm} is ok. + # echo rpath based name for ${libnm} is ok. ;; *"${libnm}"*"("*version*")"*) installname -change\ @@ -943,28 +944,27 @@ make_dmg() { test -d /Volumes/"${LyxBase}" && rmdir /Volumes/"${LyxBase}" # Mount the disk image - hdiutil attach "${DMGNAME}.sparseimage" + DEVICES=$(hdiutil attach "${DMGNAME}.sparseimage" | cut -f 1) # Obtain device information - DEVS=$(hdiutil attach "${DMGNAME}.sparseimage" | cut -f 1) - DEV=$(echo $DEVS | cut -f 1 -d ' ') - VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ') + DEVICE=$(echo $DEVICES | cut -f 1 -d ' ') + VOLUME=$(mount |grep ${DEVICE} | cut -f 3 -d ' ') # copy in the application bundle - cp -Rp "${LyxAppDir}.app" "${VOLUME}/${LyxName}.app" + ditto --hfsCompression "${LyxAppDir}.app" "${VOLUME}/${LyxName}.app" # copy in background image mkdir -p "${VOLUME}/Pictures" - cp "${DmgBackground}" "${VOLUME}/Pictures/background.png" + ditto --hfsCompression "${DmgBackground}" "${VOLUME}/Pictures/background.png" # symlink applications ln -s /Applications/ "${VOLUME}"/Applications - test -d "${DocumentationDir}" && cp -r "${DocumentationDir}" "${VOLUME}" + test -d "${DocumentationDir}" && ditto --hfsCompression "${DocumentationDir}" "${VOLUME}" set_bundle_display_options "${VOLUME}" ${BG_W} ${BG_H} ${XCODE_DEVELOPER}/Tools/SetFile -a C "${VOLUME}" mv "${VOLUME}/Pictures" "${VOLUME}/.Pictures" # Unmount the disk image - hdiutil detach ${DEV} + hdiutil detach ${DEVICE} # Convert the disk image to read-only hdiutil convert "${DMGNAME}.sparseimage" -format UDBZ -o "${DMGNAME}.dmg"