| 1 |
From: "Dr. Tobias Quathamer" <[email protected]> |
| 2 |
Date: Thu, 1 Mar 2012 23:44:06 +0100 |
| 3 |
Subject: Add lrelease to configuration step |
| 4 |
|
| 5 |
--- |
| 6 |
configure | 26 +++++++++++++++++++++++++- |
| 7 |
1 file changed, 25 insertions(+), 1 deletion(-) |
| 8 |
|
| 9 |
diff --git a/configure b/configure |
| 10 |
index 4e5d099..32bad2d 100755 |
| 11 |
--- a/configure |
| 12 |
+++ b/configure |
| 13 |
@@ -73,6 +73,10 @@ qmake_test() { |
| 14 |
if [ -x "$result" ] ; then |
| 15 |
QMAKE=$result |
| 16 |
fi |
| 17 |
+ result=$QTDIR/bin/lrelease |
| 18 |
+ if [ -x "$result" ] ; then |
| 19 |
+ LRELEASE=$result |
| 20 |
+ fi |
| 21 |
fi |
| 22 |
|
| 23 |
# check PATH |
| 24 |
@@ -81,6 +85,10 @@ qmake_test() { |
| 25 |
if [ -x "$result" ] ; then |
| 26 |
QMAKE=$result |
| 27 |
fi |
| 28 |
+ result=`which lrelease 2>/dev/null` |
| 29 |
+ if [ -x "$result" ] ; then |
| 30 |
+ LRELEASE=$result |
| 31 |
+ fi |
| 32 |
fi |
| 33 |
|
| 34 |
# check common rename |
| 35 |
@@ -89,6 +97,10 @@ qmake_test() { |
| 36 |
if [ -x "$result" ] ; then |
| 37 |
QMAKE=$result |
| 38 |
fi |
| 39 |
+ result=`which lrelease-q4 2>/dev/null` |
| 40 |
+ if [ -x "$result" ] ; then |
| 41 |
+ LRELEASE=$result |
| 42 |
+ fi |
| 43 |
fi |
| 44 |
|
| 45 |
# check pkg-config |
| 46 |
@@ -99,6 +111,10 @@ qmake_test() { |
| 47 |
if [ -x "$result" ] ; then |
| 48 |
QMAKE=$result |
| 49 |
fi |
| 50 |
+ result=$result/bin/lrelease |
| 51 |
+ if [ -x "$result" ] ; then |
| 52 |
+ LRELEASE=$result |
| 53 |
+ fi |
| 54 |
fi |
| 55 |
fi |
| 56 |
|
| 57 |
@@ -112,6 +128,7 @@ qmake_test() { |
| 58 |
|
| 59 |
echo "yes" |
| 60 |
echo "found qmake at $QMAKE" >> $LOGFILE |
| 61 |
+ echo "found lrelease at $LRELEASE" >> $LOGFILE |
| 62 |
} |
| 63 |
|
| 64 |
qtversion_test() { |
| 65 |
@@ -255,6 +272,7 @@ echo `date` >>$LOGFILE |
| 66 |
parse_options $@ |
| 67 |
|
| 68 |
QMAKE=${QMAKE:-} |
| 69 |
+LRELEASE=${LRELEASE:-} |
| 70 |
PREFIX=${PREFIX:-/usr/local} |
| 71 |
BINDIR=${BINDIR:-$PREFIX/bin} |
| 72 |
DATADIR=${DATADIR:-$PREFIX/share/$PACKAGE} |
| 73 |
@@ -296,6 +314,12 @@ if [ ! -z $QMAKESPEC ] ; then |
| 74 |
export QMAKESPEC |
| 75 |
fi |
| 76 |
|
| 77 |
+### create translation |
| 78 |
+ |
| 79 |
+echo "Creating translations" |
| 80 |
+ |
| 81 |
+$LRELEASE $PROFILE > /dev/null 2>> $LOGFILE |
| 82 |
+ |
| 83 |
### create Makefile |
| 84 |
|
| 85 |
echo "Creating Makefile" |
| 86 |
@@ -316,4 +340,4 @@ fi |
| 87 |
echo |
| 88 |
echo "$PACKAGE configured successfully" |
| 89 |
echo "Relax, don't worry, have a homebrew!" |
| 90 |
|
| 91 |
|
| 92 |
+echo |