Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
100 lines (65 sloc) 2.37 KB
#!/bin/sh
set -e
#--------------------------------------------------------------------------------------------------
# Settings
#--------------------------------------------------------------------------------------------------
Sky="../../Sky"
SkyComponents="$Sky/src/SkyComponents"
#--------------------------------------------------------------------------------------------------
content="../content"
#--------------------------------------------------------------------------------------------------
# Syntax
#--------------------------------------------------------------------------------------------------
if [ $# != 2 -a $# != 3 ] \
|| \
[ $1 != "qt4" -a $1 != "qt5" -a $1 != "clean" ] \
|| \
[ $2 != "win32" -a $2 != "osx" -a $2 != "linux" ] \
|| \
[ $# = 3 -a "$3" != "deploy" ]; then
echo "Usage: qrc <qt4 | qt5 | clean> <win32 | osx | linux> [deploy]"
exit 1
fi
#--------------------------------------------------------------------------------------------------
# Clean
#--------------------------------------------------------------------------------------------------
if [ $1 = "clean" ] || [ "$3" = "deploy" ]; then
echo "CLEANING"
rm -f qrc/*.qml
rm -rf qrc/pictures
rm -rf qrc/text
if [ $1 = "clean" ]; then
exit 0
fi
echo ""
fi
#--------------------------------------------------------------------------------------------------
# QML
#--------------------------------------------------------------------------------------------------
echo "COPYING QML"
cp "$SkyComponents"/*.qml qrc
cp "$content"/*.qml qrc
#--------------------------------------------------------------------------------------------------
# Content
#--------------------------------------------------------------------------------------------------
if [ "$3" = "deploy" ]; then
echo "COPYING pictures"
cp -r "$SkyComponents"/pictures qrc
cp -r "$content"/pictures qrc
echo "COPYING text"
cp -r "$content"/text qrc
fi
echo ""
#--------------------------------------------------------------------------------------------------
# Deployer
#--------------------------------------------------------------------------------------------------
if [ $1 = "qt5" ]; then
if [ $2 = "win32" ]; then
version=2.11
else
version=2.7
fi
else
version=1.1
fi
"$Sky"/deploy/deployer qrc $version MotionBox.qrc