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