#12157 Replace old with new banner in DMG background image

This commit is contained in:
Stephan Witt 2022-01-10 07:48:54 +01:00
parent 678ab325c0
commit 28a1744dcd
5 changed files with 12 additions and 3 deletions

View File

@ -332,7 +332,7 @@ QtBuildDir=${QtBuildDir:-"${LyxBuildDir}"/${QtBuildSubDir:-"qt-build"}}
DictionarySourceDir=${DICTIONARYDIR:-$(dirname "${LyxSourceDir}")/dictionaries} DictionarySourceDir=${DICTIONARYDIR:-$(dirname "${LyxSourceDir}")/dictionaries}
DocumentationDir=$(dirname "${LyxSourceDir}")/Documents DocumentationDir=$(dirname "${LyxSourceDir}")/Documents
DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.png DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.tiff
if [ -z "${LyXVersion}" ]; then if [ -z "${LyXVersion}" ]; then
LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " []()") LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " []()")
@ -959,7 +959,7 @@ set_bundle_display_options() {
X_BOUNDS=$2 X_BOUNDS=$2
Y_BOUNDS=$3 Y_BOUNDS=$3
Y_POSITION=$((Y_BOUNDS - 65)) Y_POSITION=$((Y_BOUNDS - 65))
Y_BOUNDS=$((Y_BOUNDS + 20)) Y_BOUNDS=$((Y_BOUNDS + 50))
LYX_X_POSITION=$((X_BOUNDS / 4)) LYX_X_POSITION=$((X_BOUNDS / 4))
LYX_Y_POSITION=$Y_POSITION LYX_Y_POSITION=$Y_POSITION
APP_X_POSITION=$((3 * X_BOUNDS / 4)) APP_X_POSITION=$((3 * X_BOUNDS / 4))
@ -997,10 +997,19 @@ set_bundle_display_options() {
EOF 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() { make_dmg() {
cd "${1}" 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_W=$(echo ${BGSIZE} | awk '{print $1 }')
BG_H=$(echo ${BGSIZE} | awk '{print $2 }') BG_H=$(echo ${BGSIZE} | awk '{print $2 }')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB