add version information for mako, migrate and uno to exceptionform

This commit is contained in:
M2j 2011-10-20 22:11:06 +02:00
parent 525658ae8b
commit aa0b49290d
1 changed files with 27 additions and 1 deletions

View File

@ -39,6 +39,11 @@ try:
PHONON_VERSION = Phonon.phononVersion()
except ImportError:
PHONON_VERSION = u'-'
try:
import migrate
MIGRATE_VERSION = migrate.__version__
except ImportError:
MIGRATE_VERSION = u'-'
try:
import chardet
CHARDET_VERSION = chardet.__version__
@ -54,6 +59,24 @@ try:
SQLITE_VERSION = sqlite.version
except ImportError:
SQLITE_VERSION = u'-'
try:
import mako
MAKO_VERSION = mako.__version__
except ImportError:
MAKO_VERSION = u'-'
try:
import uno
arg = uno.createUnoStruct(u'com.sun.star.beans.PropertyValue')
arg.Name = u'nodepath'
arg.Value = u'/org.openoffice.Setup/Product'
context = uno.getComponentContext()
provider = context.ServiceManager.createInstance(
u'com.sun.star.configuration.ConfigurationProvider')
node = provider.createInstanceWithArguments(
u'com.sun.star.configuration.ConfigurationAccess', (arg,))
UNO_VERSION = node.getByName(u'ooSetupVersion')
except ImportError:
UNO_VERSION = u'-'
from openlp.core.lib import translate, SettingsManager
from openlp.core.lib.ui import UiStrings
@ -89,11 +112,14 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
u'Phonon: %s\n' % PHONON_VERSION + \
u'PyQt4: %s\n' % Qt.PYQT_VERSION_STR + \
u'SQLAlchemy: %s\n' % sqlalchemy.__version__ + \
u'SQLAlchemy Migrate: %s\n' % MIGRATE_VERSION + \
u'BeautifulSoup: %s\n' % BeautifulSoup.__version__ + \
u'lxml: %s\n' % etree.__version__ + \
u'Chardet: %s\n' % CHARDET_VERSION + \
u'PyEnchant: %s\n' % ENCHANT_VERSION + \
u'PySQLite: %s\n' % SQLITE_VERSION
u'PySQLite: %s\n' % SQLITE_VERSION + \
u'Mako: %s\n' % MAKO_VERSION + \
u'pyUNO bridge: %s\n' % UNO_VERSION
if platform.system() == u'Linux':
if os.environ.get(u'KDE_FULL_SESSION') == u'true':
system = system + u'Desktop: KDE SC\n'