From 94c409b9200aa69422a819e6015ae4cf01241730 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 30 Jun 2011 15:35:20 +0200 Subject: [PATCH 1/2] fixed install problem on linux. Added qt custom library --- release.linux.sh | 51 +++++++++++++++++++++++++++++++++++++++--- resources/linux/run.sh | 4 +--- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/release.linux.sh b/release.linux.sh index 4d5894c9..6c93e193 100644 --- a/release.linux.sh +++ b/release.linux.sh @@ -2,8 +2,23 @@ make clean rm -rf build/linux/release/ +rm -rf install -/usr/bin/qmake-qt4 +QT_PATH="/usr/local/Trolltech/Qt-4.7.0" +PLUGINS_PATH="$QT_PATH/plugins" +QMAKE_PATH="$QT_PATH/bin/qmake" + +if [ ! -e "$QMAKE_PATH" ]; then + echo "qmake command not found at $QMAKE_PATH" + exit 1 +fi + +if [ ! -e "$PLUGINS_PATH" ]; then + echo "plugins path not found at $PLUGINS_PATH" + exit 1 +fi + +$QMAKE_PATH -spec linux-g++ make -j 4 release-install @@ -25,7 +40,36 @@ chmod +x build/linux/release/product/run.sh cp -R resources/linux/qtlinux/* build/linux/release/product/ -cp -R /usr/lib/qt4/plugins build/linux/release/product/ +#copying plugins +cp -R $PLUGINS_PATH build/linux/release/product/ +#removing debug version +find build/linux/release/product/ -name *.debug -exec rm {} \; + +#copying custom qt library +QT_LIBRARY_DEST_PATH="build/linux/release/product/qtlib" +mkdir $QT_LIBRARY_DEST_PATH +QT_LIBRARY_SOURCE_PATH="$QT_PATH/lib" + +copyQtLibrary(){ + if [ ! -e "$QT_LIBRARY_SOURCE_PATH/$1.so.4" ]; then + echo "library not found: $QT_LIBRARY_SOURCE_PATH" + exit 1; + fi + cp "$QT_LIBRARY_SOURCE_PATH/$1.so.4" "$QT_LIBRARY_DEST_PATH/" + cp "$QT_LIBRARY_SOURCE_PATH/$1.so.4.7.0" "$QT_LIBRARY_DEST_PATH/" +} + +copyQtLibrary libQtWebKit +copyQtLibrary libphonon +copyQtLibrary libQtDBus +copyQtLibrary libQtScript +copyQtLibrary libQtSvg +copyQtLibrary libQtXmlPatterns +copyQtLibrary libQtNetwork +copyQtLibrary libQtXml +copyQtLibrary libQtGui +copyQtLibrary libQtCore + rm -rf install/linux mkdir -p install/linux @@ -35,4 +79,5 @@ cd build/linux/release # "Removing .svn directories ..." find . -name .svn -exec rm -rf {} \; 2> /dev/null -tar cvzf ../../../install/linux/Sankore\ 3.1.tar.gz Sankore_3.1.$VERSION -C . +tar cvzf ../../../install/linux/Sankore\ 3.1.tar.gz Sankore_3.1.$VERSION -C . +echo "Build Finished"; alert diff --git a/resources/linux/run.sh b/resources/linux/run.sh index 66c75a37..f1329d34 100644 --- a/resources/linux/run.sh +++ b/resources/linux/run.sh @@ -1,4 +1,2 @@ #!/bin/sh -LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH -export LD_LIBRARY_PATH -./Sankore\ 3.1 +env LD_LIBRARY_PATH=$PWD/qtlib:$LD_LIBRARY_PATH ./Sankore\ 3.1 From f19507195c15d46dc4534094abf91f1a49fe8e16 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 30 Jun 2011 15:58:23 +0200 Subject: [PATCH 2/2] linux build fixed --- src/tools/UBGraphicsProtractor.cpp | 6 ++++-- src/tools/UBGraphicsProtractor.h | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/UBGraphicsProtractor.cpp b/src/tools/UBGraphicsProtractor.cpp index 318b3e3f..cd8faae8 100644 --- a/src/tools/UBGraphicsProtractor.cpp +++ b/src/tools/UBGraphicsProtractor.cpp @@ -12,6 +12,7 @@ #include "domain/UBGraphicsScene.h" #include "board/UBBoardController.h" #include "board/UBDrawingController.h" +#include "UBAbstractDrawRuler.h" #include "core/memcheck.h" @@ -30,7 +31,8 @@ UBGraphicsProtractor::UBGraphicsProtractor() , mResizeSvgItem(0) , mMarkerSvgItem(0) { - + sFillTransparency = 127; + sDrawTransparency = 192; create(*this); setCacheMode(QGraphicsItem::DeviceCoordinateCache); @@ -49,7 +51,7 @@ UBGraphicsProtractor::UBGraphicsProtractor() mMarkerSvgItem = new QGraphicsSvgItem(":/images/angleMarker.svg", this); mMarkerSvgItem->setVisible(false); mMarkerSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Tool)); - + mRotateSvgItem = new QGraphicsSvgItem(":/images/rotateTool.svg", this); mRotateSvgItem->setVisible(false); mRotateSvgItem->setData(UBGraphicsItemData::ItemLayerType, QVariant(UBItemLayerType::Control)); diff --git a/src/tools/UBGraphicsProtractor.h b/src/tools/UBGraphicsProtractor.h index 76dc2546..90759a5b 100644 --- a/src/tools/UBGraphicsProtractor.h +++ b/src/tools/UBGraphicsProtractor.h @@ -92,6 +92,9 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse virtual void rotateAroundCenter(qreal angle); virtual QPointF rotationCenter() const; + + int sFillTransparency; + int sDrawTransparency; }; #endif /* UBGRAPHICSPROTRACTOR_H_ */