From 0b97c81df1bc242880d945701d423b0ec14be8a8 Mon Sep 17 00:00:00 2001 From: Ben Mabey Date: Fri, 11 Mar 2011 09:41:15 -0700 Subject: [PATCH 1/3] updates git URLs in developer README --- README.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From da173c12369bfcd8792ee2ac2353f9c317155a7e Mon Sep 17 00:00:00 2001 From: Ben Mabey Date: Fri, 11 Mar 2011 09:46:24 -0700 Subject: [PATCH 2/3] provides people with homebrew command when trying to build_ui on mac --- tools/build_ui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_ui.sh b/tools/build_ui.sh index 8a511de63..913323667 100755 --- a/tools/build_ui.sh +++ b/tools/build_ui.sh @@ -34,7 +34,7 @@ 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`?' + echo 'Unable to find pyuic4. If you use macpors try `port install py-pyqt4`. If you use homebrew try `brew install pyqt`.' exit fi else From eac188170a45841d8bfda6cf72f19999cb5d0f1d Mon Sep 17 00:00:00 2001 From: Ben Mabey Date: Fri, 11 Mar 2011 10:07:51 -0700 Subject: [PATCH 3/3] makes the build_ui script more robust by allowing pyuic4 to be anywhere on the path --- tools/build_ui.sh | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/tools/build_ui.sh b/tools/build_ui.sh index 913323667..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 + else echo 'Unable to find pyuic4. If you use macpors try `port install py-pyqt4`. If you use homebrew try `brew install pyqt`.' - exit - fi -else - pyuic=pyuic4 - pyrcc=pyrcc4 + 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