Make only binary distributions use laid-out DMGs.
This is done by adding an "ldmg" type for laid-out DMGs, and "dmg"
produces a plain container image as before.
(cherry picked from commit a2207e6f33
)
This commit is contained in:
parent
baa0e1268d
commit
72ea99a29a
|
@ -322,15 +322,15 @@ platforms_of_dist_type() {
|
|||
}
|
||||
installer_of_dist_type_platform() { # input: dtype-dplatform
|
||||
case "$1" in
|
||||
( "src-unix" ) echo "tgz" ;;
|
||||
( "src-mac" ) echo "dmg" ;;
|
||||
( "src-win" ) echo "zip" ;;
|
||||
( "bin-"*"-linux"* ) echo "sh" ;;
|
||||
( "bin-"*"-freebsd" ) echo "sh" ;;
|
||||
( "bin-"*"-solaris" ) echo "sh" ;;
|
||||
( "bin-"*"-darwin" ) echo "sh" ;;
|
||||
( "bin-"*"-osx-mac" ) echo "dmg" ;;
|
||||
( "bin-"*"-win32" ) echo "exe" ;;
|
||||
( "src-unix" ) echo "tgz" ;;
|
||||
( "src-mac" ) echo "dmg" ;;
|
||||
( "src-win" ) echo "zip" ;;
|
||||
( "bin-"*"-linux"* ) echo "sh" ;;
|
||||
( "bin-"*"-freebsd" ) echo "sh" ;;
|
||||
( "bin-"*"-solaris" ) echo "sh" ;;
|
||||
( "bin-"*"-darwin" ) echo "sh" ;;
|
||||
( "bin-"*"-osx-mac" ) echo "ldmg" ;;
|
||||
( "bin-"*"-win32" ) echo "exe" ;;
|
||||
( * ) exit_error "Unknown dist type+platform for" \
|
||||
"installer_of_dist_type_platform: \"$1\"" ;;
|
||||
esac
|
||||
|
@ -341,6 +341,8 @@ explanation_of_installer_type() {
|
|||
"\"gunzip <file> | tar xvf -\"." ;;
|
||||
( "dmg" ) echo "Mount this disk image and copy the Racket folder to" \
|
||||
"your disk." ;;
|
||||
( "ldmg" ) echo "Mount this disk image and copy the Racket folder to" \
|
||||
"the Applications folder on your disk." ;;
|
||||
( "zip" ) echo "Use unzip to extract the Racket folder to your disk." ;;
|
||||
( "sh" ) echo "Execute this file with \"sh <file>\"," \
|
||||
"and follow the instructions." ;;
|
||||
|
@ -1721,7 +1723,7 @@ make_dmg() { # inputs: dir, dmg, bg-image
|
|||
local src="$(basename "$srcdir")"
|
||||
local myself="$(id -nu):$(id -ng)"
|
||||
show "Making \"$tgtdmg\" from \"$srcdir\""
|
||||
_cp "$tmpbg" "$srcdir"
|
||||
if [[ "x$tmpbg" != "x-" ]]; then _cp "$tmpbg" "$srcdir"; fi
|
||||
_cd "$(dirname "$srcdir")"
|
||||
_run sudo rm -f "$tgtdmg" "$tmpdmg"
|
||||
# It should be possible to create dmgs normally, but they'd be created with
|
||||
|
@ -1739,7 +1741,9 @@ make_dmg() { # inputs: dir, dmg, bg-image
|
|||
# [2] remove the source tree
|
||||
_run sudo rm -rf "$src"
|
||||
# [3] do the expected dmg layout (see below)
|
||||
easy_dmg_layout "$tmpdmg" "$src" "$(basename "$tmpbg")"
|
||||
if [[ "x$tmpbg" != "x-" ]]; then
|
||||
easy_dmg_layout "$tmpdmg" "$src" "$(basename "$tmpbg")"
|
||||
fi
|
||||
# [4] create the compressed image from the uncompressed image
|
||||
_run sudo hdiutil convert -format UDZO -imagekey zlib-level=9 -ov \
|
||||
"$tmpdmg" -o "$tgtdmg"
|
||||
|
@ -1805,18 +1809,27 @@ do_tgz_to_dmg() {
|
|||
_cd "$savedpwd"
|
||||
_rm "$tmpdir/tgz-to-dmg-$$"
|
||||
}
|
||||
do_layout_bg="-"
|
||||
tgz_to_dmg() {
|
||||
local srctgz="$1" tgt="$2" pname="$3" ptype="$4" srcplatform="$5"; shift 5
|
||||
local tmptgz="$tmpdir/tgz2dmg.tgz"
|
||||
local tmpdmg="$tmpdir/tgz2dmg.dmg"
|
||||
local tmpbg="$tmpdir/bg.png"
|
||||
local tmpbg="-"
|
||||
_scp "$srctgz" "${dmgmachine}:$tmptgz"
|
||||
_scp "$PLTHOME/$dmgbackground" "${dmgmachine}:$tmpbg"
|
||||
if [[ "x$do_layout_bg" != "x-" ]]; then
|
||||
_scp "$do_layout_bg" "${dmgmachine}:$tmpbg"
|
||||
tmpbg="$tmpdir/bg.png"
|
||||
fi
|
||||
run_part "$dmgmachine" "do_tgz_to_dmg" \
|
||||
"$tmptgz" "$tmpdmg" "$tmpbg" \
|
||||
"$version" "$pname" "$ptype" "$srcplatform"
|
||||
_scp "${dmgmachine}:$tmpdmg" "$tgt.dmg"
|
||||
}
|
||||
tgz_to_ldmg() {
|
||||
do_layout_bg="$PLTHOME/$dmgbackground"
|
||||
tgz_to_dmg "$@"
|
||||
do_layout_bg="-"
|
||||
}
|
||||
#----------------------------------------
|
||||
do_tgz_to_exe() {
|
||||
local tmptgz="$1" tmpexe="$2" nsistgz="$3"
|
||||
|
|
Loading…
Reference in New Issue
Block a user