owntone-server/osx/makedist.sh.templ
2006-07-26 07:48:06 +00:00

64 lines
1.7 KiB
Plaintext
Executable File

#!/bin/sh
if [ $# -eq 1 ]; then
# any argument leaves the server folder as-is
AR="Firefly Helper/Server/admin-root"
mkdir "Firefly Helper/Server/plugins"
mkdir "${AR}"
mkdir "${AR}/lib-js"
mkdir "${AR}/lib-js/script.aculo.us"
cp ../.build/ppc/mt-daapd FireflyHelper/Server/firefly
cp ../.build/ppc/*so FireflyHelper/Server/Plugins
cp ../.build/wavstreamer FireflyHelper/Server
cp ../.build/alac FireflyHelper/Server
cp ../admin-root/*\(html|xml|txt|jar|gif|js|png|jpg\) "${AR}"
cp ../admin-root/CREDITS "${AR}"
cp ../admin-root/lib-js/*js "${AR}/lib-js"
cp ../admin-root/lib-js/script.aculo.us/*js "${AR}/li-js/script.aculo.us"
fi
pushd "Firefly Helper"
xcodebuild
if [ "$?" -ne "0" ]; then
echo "Could not build Firefly Helper Project"
exit 1
fi
popd
rm -rf "FireflyPrefs/Firefly Helper.app"
mv "Firefly Helper/build/Release/Firefly Helper.app" FireflyPrefs
pushd "FireflyPrefs"
xcodebuild
if [ "$?" -ne "0" ]; then
echo "Could not build FireflyPrefs panel"
exit 2
fi
# Now, build the image
mkdir staging
cp Install/root_DS_Store staging/.DS_Store
mkdir staging/.background
cp Install/background.png staging/.background/background.png
cp Install/_background_DS_Store staging/.background/.DS_Store
if [ ! -x FireflyPrefs/build/Release/Firefly.prefPane ]; then
echo "Wait... I can't find the pref pane"
exit 1
fi
mv FireflyPrefs/build/Release/Firefly.prefPane staging
cp "Uninstall Firefly.app" staging
cp -r "Install/Read Me First!.rtfd" staging
hdiutil makehybrid -hfs -hfs-volume-name "Install Firefly" -hfs-openfolder staging staging -o tmp.dmg
hdiutil convert -format UDZO tmp.dmg -o Firefly.dmg
rm -rf staging
rm tmp.dmg