Commit 9b31a791 authored by Felix Paul Kühne's avatar Felix Paul Kühne

extras/macosx: add script to create a disk-image for distribution as well as...

extras/macosx: add script to create a disk-image for distribution as well as an apple script to beautify the file icon layout
parent 5932cf6b
#!/bin/sh
set -e
info()
{
local green="\033[1;32m"
local normal="\033[0m"
echo "[${green}build${normal}] $1"
}
spushd()
{
pushd "$1" > /dev/null
}
spopd()
{
popd > /dev/null
}
out="/dev/null"
npapiroot=`dirname $0`/../..
UBROOT="${npapiroot}/VLC Plugin.plugin"
DMGFOLDERNAME="VLC Browser Plug-in for Mac"
DMGITEMNAME="VLC-webplugin-REPLACEWITHVERSION"
info "checking for distributable binary package"
spushd ${npapiroot}
if [ ! -e "${UBROOT}" ]; then
info "Universal Binary not found for distribution, creating..."
./extras/macosx/create-universal-binary.sh
fi
info "Collecting items"
mkdir -p "${DMGFOLDERNAME}"
cp -R "${UBROOT}" "${DMGFOLDERNAME}"
cp NEWS AUTHORS COPYING "${DMGFOLDERNAME}"
ln -s "/Library/Internet Plug-Ins" "${DMGFOLDERNAME}/Internet Plug-Ins"
rm -f ${DMGITEMNAME}-rw.dmg
info "Creating disk-image"
hdiutil create -srcfolder ${npapiroot}/"${DMGFOLDERNAME}" "${npapiroot}/${DMGITEMNAME}-rw.dmg" -scrub -format UDRW
mkdir -p ./mount
info "Moving file icons around"
hdiutil attach -readwrite -noverify -noautoopen -mountRoot ./mount ${DMGITEMNAME}-rw.dmg
osascript "${npapiroot}"/extras/macosx/dmg_setup.scpt "${DMGFOLDERNAME}"
hdiutil detach ./mount/"${DMGFOLDERNAME}"
info "Compressing disk-image"
rm -f ${DMGITEMNAME}.dmg
hdiutil convert "${npapiroot}/${DMGITEMNAME}-rw.dmg" -format UDBZ -o "${npapiroot}/${DMGITEMNAME}.dmg"
rm -f ${DMGITEMNAME}-rw.dmg
rm -rf "${DMGFOLDERNAME}"
spopd
info "Disk-image created"
......@@ -18,7 +18,7 @@ spopd()
popd > /dev/null
}
#out="/dev/null"
out="/dev/null"
npapiroot=`dirname $0`/../..
INTEL32ROOT="${npapiroot}/i686-build/VLC Plugin.plugin"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment