Added new scripts for building app, plugins and packages
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Fri, 6 Aug 2010 07:16:59 +0000 (09:16 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Fri, 6 Aug 2010 07:16:59 +0000 (09:16 +0200)
19 files changed:
bin/.gitstuffer [new file with mode: 0644]
buildapp [new file with mode: 0755]
debian/changelog
debian/control
debian/dirs
debian/files
debian/mdictionary.substvars
debian/rules
lib/mdictionary/.gitstuffer [new file with mode: 0644]
make-package [new file with mode: 0755]
make-plugins [deleted file]
mdictionary.pro
packages/.gitstuffer [new file with mode: 0644]
rename-plugins [new file with mode: 0755]
setqmake [new file with mode: 0755]
trunk/src/base/base.pro
trunk/src/base/gui/SearchBarWidget.cpp~ [deleted file]
trunk/src/plugins/xdxf/src/XdxfPlugin.pro [deleted file]
trunk/src/plugins/xdxf/src/src.pro [new file with mode: 0644]

diff --git a/bin/.gitstuffer b/bin/.gitstuffer
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/buildapp b/buildapp
new file mode 100755 (executable)
index 0000000..e66dec2
--- /dev/null
+++ b/buildapp
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./setqmake
+qmake mdictionary.pro
+make clean
+make
+make clean
+./rename-plugins "lib/mdictionary"
+
index 631d163..850c361 100644 (file)
@@ -1,3 +1,3 @@
 mdictionary (1.0.0-2) unstable; urgency=low
-  * minor bugfixes in debian package
- -- unknown <Dariusz.Wiechecki@comarch.com>  Mon, 20 Nov 2007 13:11:00 +0300
+  * first version of maemo mDictionary
+ -- Mateusz Półrola <mateusz.polrola@comarch.pl>  Fri, 06 Aug 2010 08:02:53 +0200
index 3ed06a9..2b3a45c 100644 (file)
@@ -1,8 +1,8 @@
 Source: mdictionary
-Section: user/multimedia
+Section: user/education
 Priority: optional
-Maintainer: Mateusz Polrola <mateusz.polrola@comarch.pl>
-Build-Depends: debhelper (>= 4.0.0), libqt4-core
+Maintainer: Jakub Jaszczyński <jakub.jaszczynski@comarch.pl>, Piotr Pilarczyk <piotr.pilarczyk@comarch.pl>, Mateusz Półrola <mateusz.polrola@comarch.pl>, Bartosz Szatkowski <bartosz.szatkowski@comarch.pl>
+Build-Depends: debhelper (>= 4.0.0), libqt4-core, libqt4-gui, libqt4-xml
 Standards-Version: 3.8.0
 
 Package: mdictionary
index ca882bb..e772481 100644 (file)
@@ -1,2 +1 @@
 usr/bin
-usr/sbin
index 36e4e8a..57026b2 100644 (file)
@@ -1 +1 @@
-mdictionary_1.0.0-2_i386.deb user/multimedia optional
+mdictionary_1.0.0-2_i386.deb user/education optional
index cfd29b1..abbeeb5 100644 (file)
@@ -1 +1 @@
-shlibs:Depends=libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-core (>= 4.6.2~git20100401), libqt4-gui (>= 4.6.2~git20100401), libstdc++6 (>= 4.2.1)
+shlibs:Depends=libc6 (>= 2.5.0-1), libgcc1 (>= 1:4.2.1), libqt4-core (>= 4.6.2~git20100401), libqt4-gui (>= 4.6.2~git20100401), libqt4-xml (>= 4.6.2~git20100401), libstdc++6 (>= 4.2.1)
index b92048f..71bcc21 100755 (executable)
@@ -38,13 +38,14 @@ install: build
        dh_clean -k 
        dh_installdirs
        cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(APPNAME) install
-
+       ./rename-plugins "$(CURDIR)/debian/$(APPNAME)/usr/lib/mdictionary"
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.
 
 # Build architecture-dependent files here.
 binary-arch: build install
+       
        dh_testdir
        dh_testroot
        dh_installchangelogs 
diff --git a/lib/mdictionary/.gitstuffer b/lib/mdictionary/.gitstuffer
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/make-package b/make-package
new file mode 100755 (executable)
index 0000000..03e1f6c
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+APPNAME=mdictionary
+
+./setqmake
+dpkg-buildpackage -D -rfakeroot
+rm -rf builddir 
+rm build-stamp
+rm -rf debian/$APPNAME
+mv ../${APPNAME}_* packages/
diff --git a/make-plugins b/make-plugins
deleted file mode 100755 (executable)
index 40377d1..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-path="trunk/src/plugins/"
-pushd $path
-
-for pro in  *; do
-    if [ -d "$pro" ] ; then  
-            pushd $pro/src/
-           qmake *.pro
-           make clean
-           make
-            mv `find . -name "*.so.*" -type f` "../../../base/$pro.so"
-            popd
-    fi
-done
-popd
-    
index 52c41fd..64f5f2d 100644 (file)
@@ -4,5 +4,13 @@ isEmpty( ISQT4 ) {
 error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4");
 }
 
+MDICT_BINDIR = $$[MDICT_BINDIR]
+
+isEmpty(MDICT_BINDIR) {
+       message("empty")
+}
+message($$MDICT_BINDIR)
+
 TEMPLATE = subdirs
 SUBDIRS  = trunk/src/base/
+SUBDIRS += trunk/src/plugins/xdxf/src/
diff --git a/packages/.gitstuffer b/packages/.gitstuffer
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/rename-plugins b/rename-plugins
new file mode 100755 (executable)
index 0000000..fa15c98
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+path=$1
+
+
+echo $path
+pushd $path
+
+echo *
+
+rm `find . -name "*" -type l`
+
+for pro in  *; do
+    if [ -e "$pro" ] ; then  
+           pro=`echo $pro | cut -d"." -f1`
+
+               echo " "
+               echo " "
+               echo $pro 
+               echo " "
+               echo " "        
+            mv `find . -name "*.so.*" -type f` "$pro.so"
+    fi
+done
+popd
+    
diff --git a/setqmake b/setqmake
new file mode 100755 (executable)
index 0000000..ff9a659
--- /dev/null
+++ b/setqmake
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+qmake -set MDICT_APPNAME mdictionary
+qmake -set MDICT_BINDIR `pwd`/bin
+qmake -set MDICT_PLUGINSDIR `pwd`/lib
index e5c069f..58950c4 100644 (file)
@@ -9,6 +9,13 @@ QT       += core gui
 TARGET = mdictionary
 TEMPLATE = app
 
+MDICT_BINDIR = $$[MDICT_BINDIR]
+
+isEmpty(MDICT_BINDIR) {
+  MDICT_BINDIR = .
+}
+
+DESTDIR = $${MDICT_BINDIR}
 
 SOURCES += gui/main.cpp\
         gui/MainWindow.cpp \
diff --git a/trunk/src/base/gui/SearchBarWidget.cpp~ b/trunk/src/base/gui/SearchBarWidget.cpp~
deleted file mode 100644 (file)
index 374e22a..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
-
-    This file is part of mDictionary.
-
-    mDictionary is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    mDictionary is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with mDictionary.  If not, see <http://www.gnu.org/licenses/>.
-
-    Copyright 2010 Comarch S.A.
-
-*******************************************************************************/
-
-//Created by Mateusz Półrola
-
-
-#include "SearchBarWidget.h"
-#include <QDebug>
-
-
-
-SearchBarWidget::SearchBarWidget(Backbone* backbone, QWidget *parent) :
-    QWidget(parent) {
-
-    this->backbone = backbone;
-
-    initializeUI();
-
-    setMaximumHeight(150);
-
-    _isSearching = false;
-
-    connect(searchPushButton, SIGNAL(clicked()),
-            this, SLOT(searchPushButtonClicked()));
-
-    connect(historyNextToolButton, SIGNAL(clicked()),
-            this, SLOT(historyNextToolButtonClicked()));
-
-    connect(historyPrevToolButton, SIGNAL(clicked()),
-            this, SLOT(historyPrevToolButtonClicked()));
-
-    connect(historyShowToolButton, SIGNAL(clicked()),
-            this, SLOT(historyShowToolButtonClicked()));
-
-    connect(clearSearchWordToolButton, SIGNAL(clicked()),
-            this, SLOT(clearSearchWordToolButtonClicked()));
-
-
-    //connects request to backbone
-    connect(this, SIGNAL(searchForTranslations(QString)),
-            backbone, SLOT(search(QString)));
-
-    connect(this, SIGNAL(stopSearching()),
-            backbone, SLOT(stopSearching()));
-
-    connect(backbone, SIGNAL(ready()),
-            this, SLOT(setEnabled(bool)));
-
-}
-
-SearchBarWidget::~SearchBarWidget() {
-
-}
-
-
-void SearchBarWidget::initializeUI() {
-    horizontalLayout = new QHBoxLayout();
-    verticalLayout = new QVBoxLayout();
-
-
-    searchPushButton = new QPushButton(tr("Search"));
-    searchPushButton->setMinimumWidth(200);
-
-
-    searchWordLineEdit = new QLineEdit();
-    searchWordLineEdit->setMinimumWidth(350);
-    //create layout for lineEdit to have clear button on it
-    QHBoxLayout* lineEditLayout = new QHBoxLayout;
-    searchWordLineEdit->setLayout(lineEditLayout);
-
-
-    clearSearchWordToolButton = new QToolButton();
-    clearSearchWordToolButton->setIcon(QIcon("sowa.svg"));
-    //tool buttons will have size 2 times smaller
-    clearSearchWordToolButton->setMaximumSize(
-            clearSearchWordToolButton->sizeHint().width()/2,
-            clearSearchWordToolButton->sizeHint().height()/2);
-
-
-    historyNextToolButton = new QToolButton();
-    historyNextToolButton->setIcon(QIcon("sowa.svg"));
-    historyNextToolButton->setMaximumSize(
-            historyNextToolButton->sizeHint().width()/2,
-            historyNextToolButton->sizeHint().height()/2);
-
-
-    historyPrevToolButton = new QToolButton();
-    historyPrevToolButton->setIcon(QIcon("sowa.svg"));
-    historyPrevToolButton->setMaximumSize(
-            historyPrevToolButton->sizeHint().width()/2,
-            historyPrevToolButton->sizeHint().height()/2);
-
-
-    historyShowToolButton = new QToolButton();
-    historyShowToolButton->setIcon(QIcon("sowa.svg"));
-    historyShowToolButton->setMaximumSize(
-            historyShowToolButton->sizeHint().width()/2,
-            historyShowToolButton->sizeHint().height()/2);
-
-
-    searchingProgressBar = new QProgressBar();
-    //progress bar have minimum and maximum values set to 0, which will effect
-    //with "I'm alive" bar
-    searchingProgressBar->setMinimum(0);
-    searchingProgressBar->setMaximum(0);
-    searchingProgressBar->hide();
-    searchingProgressBar->setMaximumHeight(50);
-
-
-
-    setLayout(verticalLayout);
-
-    verticalLayout->addWidget(searchingProgressBar);
-
-    //adding widgets to layout
-    horizontalLayout->addWidget(searchWordLineEdit);
-    horizontalLayout->addWidget(searchPushButton);
-    horizontalLayout->addWidget(historyPrevToolButton);
-    horizontalLayout->addWidget(historyShowToolButton);
-    horizontalLayout->addWidget(historyNextToolButton);
-
-    //adding clear toolButton to textEdit with right alignment
-    lineEditLayout->addWidget(clearSearchWordToolButton, 0,
-                              Qt::AlignRight | Qt::AlignVCenter);
-
-    verticalLayout->addLayout(horizontalLayout);
-}
-
-
-void SearchBarWidget::searchPushButtonClicked() {
-    if(_isSearching) {
-        emit stopSearching();
-        searchingProgressBar->hide();
-        searchPushButton->setText(tr("Search"));
-        setEnabled(true);
-        _isSearching = false;
-    }
-    else {
-        emit searchForTranslations(searchWordLineEdit->text());
-        searchingProgressBar->show();
-        searchPushButton->setText(tr("Stop"));
-        setEnabled(false);
-        _isSearching = true;
-    }
-}
-
-void SearchBarWidget::setEnabled(bool enabled) {
-    searchWordLineEdit->setEnabled(enabled);
-    historyNextToolButton->setEnabled(enabled);
-    historyPrevToolButton->setEnabled(enabled);
-    historyShowToolButton->setEnabled(enabled);
-}
-
-void SearchBarWidget::historyNextToolButtonClicked() {
-
-}
-
-void SearchBarWidget::historyPrevToolButtonClicked() {
-
-}
-
-void SearchBarWidget::historyShowToolButtonClicked() {
-
-}
-
-void SearchBarWidget::clearSearchWordToolButtonClicked() {
-    searchWordLineEdit->clear();
-}
-
-void SearchBarWidget::showHistoryListDialog() {
-
-}
-
-bool SearchBarWidget::isSearching() const {
-    return _isSearching;
-}
diff --git a/trunk/src/plugins/xdxf/src/XdxfPlugin.pro b/trunk/src/plugins/xdxf/src/XdxfPlugin.pro
deleted file mode 100644 (file)
index 0c4b06b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2010-08-03T09:33:52
-#
-#-------------------------------------------------
-
-QT       += core xml gui
-
-
-TARGET = XdxfPlugin
-TEMPLATE = lib
-
-SOURCES +=  \
-    xdxfplugin.cpp \
-    TranslationXdxf.cpp \
-    XdxfLoadDialog.cpp \
-    XdxfDictDialog.cpp
-
-
-HEADERS += \
-    xdxfplugin.h \
-    TranslationXdxf.h \
-    XdxfLoadDialog.h \
-    ../../../includes/DictDialog.h \
-    XdxfDictDialog.h \
-    ../../../includes/translation.h \
-    ../../../includes/settings.h \
-    ../../../includes/CommonDictInterface.h \
diff --git a/trunk/src/plugins/xdxf/src/src.pro b/trunk/src/plugins/xdxf/src/src.pro
new file mode 100644 (file)
index 0000000..291648d
--- /dev/null
@@ -0,0 +1,66 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-08-03T09:33:52
+#
+#-------------------------------------------------
+
+QT       += core xml gui
+
+
+TARGET = XdxfPlugin
+TEMPLATE = lib
+
+MDICT_PLUGINSDIR = $$[MDICT_PLUGINSDIR]
+
+isEmpty(MDICT_PLUGINSDIR) {
+  MDICT_PLUGINSDIR = .
+}
+
+MDICT_APPNAME = $$[MDICT_APPNAME]
+
+isEmpty(MDICT_APPNAME) {
+  MDICT_APPNAME = mdictionary
+}
+
+
+DESTDIR = $${MDICT_PLUGINSDIR}/$${MDICT_APPNAME}
+
+
+
+SOURCES +=  \
+    xdxfplugin.cpp \
+    TranslationXdxf.cpp \
+    XdxfLoadDialog.cpp \
+    XdxfDictDialog.cpp
+
+
+HEADERS += \
+    xdxfplugin.h \
+    TranslationXdxf.h \
+    XdxfLoadDialog.h \
+    ../../../includes/DictDialog.h \
+    XdxfDictDialog.h \
+    ../../../includes/translation.h \
+    ../../../includes/settings.h \
+    ../../../includes/CommonDictInterface.h \
+
+
+    
+unix {
+  #VARIABLES
+  isEmpty(PREFIX) {
+    PREFIX = /usr
+  }
+  
+  BINDIR = $$PREFIX/bin
+  LIBDIR = $$PREFIX/lib/$${MDICT_APPNAME}
+  DATADIR =$$PREFIX/share
+
+  DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
+
+  #MAKE INSTALL
+
+  INSTALLS += target
+
+  target.path = $$LIBDIR
+}