From 861d3fa301f93e282c15548bca89529ab4745037 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Fri, 18 Sep 2009 22:59:29 +0000 Subject: [PATCH] added various files git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@217 014f5005-505e-4b48-8d0a-63407b615a7c --- mac/__argvemulator_relational.py | 4 +++ mac/relational | 23 +++++++++++++ windows/input.py | 59 ++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 mac/__argvemulator_relational.py create mode 100644 mac/relational create mode 100644 windows/input.py diff --git a/mac/__argvemulator_relational.py b/mac/__argvemulator_relational.py new file mode 100644 index 0000000..aa8d43d --- /dev/null +++ b/mac/__argvemulator_relational.py @@ -0,0 +1,4 @@ +import argvemulator, os + +argvemulator.ArgvCollector().mainloop() +execfile(os.path.join(os.path.split(__file__)[0], "relational.py")) diff --git a/mac/relational b/mac/relational new file mode 100644 index 0000000..79f3c05 --- /dev/null +++ b/mac/relational @@ -0,0 +1,23 @@ +#!/Developer/Applications/Utilities/MacPython-2.3/BuildApplet.app/Contents/MacOS/Python + +import sys, os +execdir = os.path.dirname(sys.argv[0]) +executable = os.path.join(execdir, "Python") +resdir = os.path.join(os.path.dirname(execdir), "Resources") +libdir = os.path.join(os.path.dirname(execdir), "Frameworks") +mainprogram = os.path.join(resdir, "__argvemulator_relational.py") + +sys.argv.insert(1, mainprogram) +if 0 or 0: + os.environ["PYTHONPATH"] = resdir + if 0: + os.environ["PYTHONHOME"] = resdir +else: + pypath = os.getenv("PYTHONPATH", "") + if pypath: + pypath = ":" + pypath + os.environ["PYTHONPATH"] = resdir + pypath +os.environ["PYTHONEXECUTABLE"] = executable +os.environ["DYLD_LIBRARY_PATH"] = libdir +os.environ["DYLD_FRAMEWORK_PATH"] = libdir +os.execve(executable, sys.argv, os.environ) diff --git a/windows/input.py b/windows/input.py new file mode 100644 index 0000000..e8c30a0 --- /dev/null +++ b/windows/input.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# coding=UTF-8 +# Relational +# Copyright (C) 2008 Salvo "LtWorf" Tomaselli +# +# Relation 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. +# +# This program 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 this program. If not, see . +# +# author Salvo "LtWorf" Tomaselli +from distutils.core import setup +import py2exe +#setup(console=['relational_gui.pyw']) +#setup(windows=['relational_gui.py']) +setup(windows=[{"script": "relational_gui.py","icon_resources": [(0, "favicon.ico")]}]) + +import sys +import sip +from PyQt4 import QtCore, QtGui +from relational_gui import maingui, about +from relational import relation, parser + + +version="0.10" +about.version=version + +if __name__ == "__main__": + if len (sys.argv) > 1 and sys.argv[1] == "-v": + print version + sys.exit(0) + + try: + import psyco + psyco.full() + except: + pass + + app = QtGui.QApplication(sys.argv) + Form = QtGui.QWidget() + + + Form.setFont(QtGui.QFont("Dejavu Sans Bold")) + + + ui = maingui.Ui_Form() + ui.setupUi(Form) + Form.show() + + sys.exit(app.exec_())