splitting into modules is completed and working (hopefully also on macosx)

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@94 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2009-03-02 16:29:11 +07:00
parent 31fe0bf9ea
commit be36b2ccd8
8 changed files with 45 additions and 27 deletions

@ -58,3 +58,4 @@
- Showing fields of selected relation will work with themes different than oxygen
0.9
- Splitted into independent packages (gui and library)

@ -5,30 +5,46 @@ source: clean
rm -rf /tmp/relational/
mkdir /tmp/relational/
cp -R * /tmp/relational/
rm -rf /tmp/relational/samples/.svn/ /tmp/relational/debscript/.svn/ /tmp/relational/mac/.svn/
rm -rf /tmp/relational/samples/.svn/ /tmp/relational/debscript/.svn/ /tmp/relational/mac/.svn/ /tmp/relational/relational/.svn/ /tmp/relational/relational_gui/.svn/ /tmp/relational/mac /tmp/relational/debscript/
echo "cd /tmp ; tar -jcvvf relational.tar.bz relational/" | bash
mv /tmp/relational.tar.bz ./relational_`./relational.py -v`.tar.bz
mv /tmp/relational.tar.bz ./relational_`./relational_gui.py -v`.tar.bz
source_all: clean
rm -rf /tmp/relational/
mkdir /tmp/relational/
cp -R * /tmp/relational/
rm -rf /tmp/relational/samples/.svn/ /tmp/relational/debscript/.svn/ /tmp/relational/mac/.svn/ /tmp/relational/relational/.svn/ /tmp/relational/relational_gui/.svn/
echo "cd /tmp ; tar -jcvvf relational.tar.bz relational/" | bash
mv /tmp/relational.tar.bz ./relational_`./relational_gui.py -v`.tar.bz
clean:
rm -rf *~ || echo ok
rm -rf *.pyc *.pyo || echo ok
rm -rf Relational.app || echo ok
rm -rf relational || echo ok
rm relational*.tar.gz || echo ok
rm -rf relational_mac
rm -rf data || echo ok
rm -rf *tar.bz || echo ok
rm -rf *.deb || echo ok
rm -rf relational/*~ || echo ok
rm -rf relational/*.pyc *.pyo || echo ok
rm -rf relational_gui/*~ || echo ok
rm -rf relational_gui/*.pyc *.pyo || echo ok
mac: app
mkdir relational || echo Exists
mv Relational.app relational
mkdir relational/samples || echo Exists
cp samples/*csv relational/samples
tar -zcvvf relational_`./relational.py -v`.tar.gz relational/
mkdir relational_mac || echo Exists
mv Relational.app relational_mac
mkdir relational_mac/samples || echo Exists
cp samples/*csv relational_mac/samples
tar -zcvvf relational_`./relational_gui.py -v`.tar.gz relational_mac/
app:
mkdir Relational.app/ || echo Exists
mkdir Relational.app/Contents || echo Exists
mkdir Relational.app/Contents/Resources || echo Exists
cp *py Relational.app/Contents/Resources
mkdir Relational.app/Contents/Resources/relational
cp relational/*py Relational.app/Contents/Resources/relational
mkdir Relational.app/Contents/Resources/relational_gui
cp relational_gui/*py Relational.app/Contents/Resources/relational_gui
cp mac/Info.plist mac/PkgInfo Relational.app/Contents
mkdir Relational.app/Contents/MacOS || echo Exists
cp mac/relational mac/Python Relational.app/Contents/MacOS
@ -37,54 +53,46 @@ app:
debian:
#Python files
mkdir -p data/usr/share/python-support/relational/
mkdir -p data/usr/share/python-support/relational/relational_gui
mkdir -p data/usr/share/python-support/relational/relational
cp *py data/usr/share/python-support/relational/
cp relational/*py data/usr/share/python-support/relational/relational/
cp relational_gui/*py data/usr/share/python-support/relational/relational_gui
#man
mkdir -p data/usr/share/man/man1
cp relational.1 data/usr/share/man/man1
gzip --best data/usr/share/man/man1/relational.1
#doc
mkdir -p data/usr/share/doc/relational
echo "Copyright (C) 2008 Salvo "LtWorf" Tomaselli" >> data/usr/share/doc/relational/copyright
echo "" >> data/usr/share/doc/relational/copyright
echo "License:" >> data/usr/share/doc/relational/copyright
echo "This program is under the GPLv3 license" >> data/usr/share/doc/relational/copyright
cp CHANGELOG data/usr/share/doc/relational/changelog
echo "relational ("`./relational.py -v | cut -d. -f1`":"`./relational.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`") unstable; urgency=low" >> data/usr/share/doc/relational/changelog.Debian
echo "relational ("`./relational_gui.py -v | cut -d. -f1`":"`./relational_gui.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`") unstable; urgency=low" >> data/usr/share/doc/relational/changelog.Debian
echo "" >> data/usr/share/doc/relational/changelog.Debian
echo " * Automatically generated package, see changelog.gz" >> data/usr/share/doc/relational/changelog.Debian
echo "" >> data/usr/share/doc/relational/changelog.Debian
echo " -- Make <make@make.org> Fri, 10 Oct 2008 19:18:35 +0200">> data/usr/share/doc/relational/changelog.Debian
gzip --best data/usr/share/doc/relational/changelog.Debian
gzip --best data/usr/share/doc/relational/changelog
cp -r samples data/usr/share/doc/relational/examples
rm -rf data/usr/share/doc/relational/examples/.svn
#start script
mkdir -p data/usr/bin
cp debscript/relational data/usr/bin/relational
chmod a+x data/usr/bin/relational
#desktop file
mkdir -p data/usr/share/applications/
cp debscript/relational.desktop data/usr/share/applications/
mkdir -p data/DEBIAN
#package description
debscript/gencontrol.sh > data/DEBIAN/control
cp debscript/rules data/DEBIAN
#Postrm file to remove optimized generated python files
cp debscript/prerm data/DEBIAN/prerm
cp debscript/postinst data/DEBIAN/postinst
chmod 0755 data/DEBIAN/prerm data/DEBIAN/postinst
su -c "chown -R root:root data/*; dpkg -b data/ relational.deb; rm -rf data/"
cp relational.deb relational_`./relational.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`.deb
cp relational.deb relational_`./relational_gui.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`.deb
rm -f relational.deb

@ -1,6 +1,6 @@
#!/bin/bash
echo "Package: relational"
echo "Version: "`./relational.py -v | cut -d. -f1`":"`./relational.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`
echo "Version: "`./relational_gui.py -v | cut -d. -f1`":"`./relational_gui.py -v`+SVN`svn update | cut -d" " -f3 | tr -d "."`
echo "Architecture: all"
echo "Maintainer: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>"
echo "Installed-Size: "`du -s --apparent-size data/ | cut -f1`

@ -1,6 +1,12 @@
#!/usr/bin/python
import py_compile
import os
for i in os.listdir("/usr/share/python-support/relational/relational/"):
if i.endswith(".py"):
py_compile.compile("/usr/share/python-support/relational/relational/"+i)
for i in os.listdir("/usr/share/python-support/relational/relational_gui/"):
if i.endswith(".py"):
py_compile.compile("/usr/share/python-support/relational/relational_gui/"+i)
for i in os.listdir("/usr/share/python-support/relational/"):
if i.endswith(".py"):
py_compile.compile("/usr/share/python-support/relational/"+i)

@ -1,2 +1,2 @@
#!/bin/bash
python /usr/share/python-support/relational/relational.py $@
python /usr/share/python-support/relational/relational_gui.py $@

@ -21,10 +21,11 @@
import sys
from PyQt4 import QtCore, QtGui
from relational_gui import maingui
from relational_gui import maingui, about
from relational import relation, parser
version="0.9"
about.version=version
if __name__ == "__main__":
if len (sys.argv) > 1 and sys.argv[1] == "-v":

@ -24,7 +24,8 @@ try: #If QtWebKit is available, uses it
webk=True
except:
webk=False
import relational
version=0
class Ui_Dialog(object):
def setupUi(self, Dialog):
@ -116,7 +117,7 @@ class Ui_Dialog(object):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Documentation", None, QtGui.QApplication.UnicodeUTF8))
self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", "Relational", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("Dialog", "Relational", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("Dialog", "Version "+relational.version, None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("Dialog", "Version "+version, None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
self.groupBox_3.setTitle(QtGui.QApplication.translate("Dialog", "Author", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("Dialog", "Salvo \"LtWorf\" Tomaselli <tiposchi@tiscali.it>", None, QtGui.QApplication.UnicodeUTF8))

@ -17,6 +17,7 @@
#
# author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>
from PyQt4 import QtCore, QtGui
from relational import relation, parser
import sys
import about