diff --git a/README.development b/README.development index c09b962de..81700237c 100644 --- a/README.development +++ b/README.development @@ -3,8 +3,8 @@ you need the binary pyuic4). To use the development version: -$ git clone git://ichi2.net/libanki -$ git clone git://ichi2.net/ankiqt +$ git clone https://github.com/dae/libanki.git +$ git clone https://github.com/dae/ankiqt.git $ cd ankiqt $ ./tools/build_ui.sh diff --git a/tools/build_ui.sh b/tools/build_ui.sh index 8a511de63..818d0bf43 100755 --- a/tools/build_ui.sh +++ b/tools/build_ui.sh @@ -11,35 +11,40 @@ fi mkdir -p ankiqt/forms -if [ xDarwin = x$(uname) ] -then - if [ -e /Library/Frameworks/Python.framework/Versions/2.5/bin/pyuic4 ] - then +pyuic=`which pyuic4` +pyrcc=`which pyrcc4` + +if [ $? != 0 ]; then + if [ xDarwin = x$(uname) ] + then + if [ -e /Library/Frameworks/Python.framework/Versions/2.5/bin/pyuic4 ] + then pyuic=/Library/Frameworks/Python.framework/Versions/2.5/bin/pyuic4 pyrcc=/Library/Frameworks/Python.framework/Versions/2.5/bin/pyrcc4 - elif [ -e /opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/pyuic4 ] - then + elif [ -e /opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/pyuic4 ] + then pyuic=/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/pyuic4 pyrcc=/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/pyrcc4 - elif [ -e /System/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 ] - then + elif [ -e /System/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 ] + then pyuic=/System/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 pyrcc=/System/Library/Frameworks/Python.framework/Versions/2.6/bin/pyrcc4 - elif [ -e /Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 ] - then + elif [ -e /Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 ] + then pyuic=/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 pyrcc=/Library/Frameworks/Python.framework/Versions/2.6/bin/pyrcc4 - elif [ -f /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 ] - then + elif [ -f /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 ] + then pyuic=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pyuic4 pyrcc=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pyrcc4 - else - echo 'Unable to find pyuic4. Try `port install py-pyqt4`?' - exit - fi -else - pyuic=pyuic4 - pyrcc=pyrcc4 + else + echo 'Unable to find pyuic4. If you use macpors try `port install py-pyqt4`. If you use homebrew try `brew install pyqt`.' + exit 1 + fi + else + echo "Unable to find pyuic4 on your path! Please install it and try this script again." + exit 1 + fi fi init=ankiqt/forms/__init__.py