parent
956baed76b
commit
e9b5c355d2
@ -61,7 +61,7 @@ def run(args):
|
|||||||
"""Initialize everthing and run the application."""
|
"""Initialize everthing and run the application."""
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
if args.version:
|
if args.version:
|
||||||
print(version.version())
|
print(version.version(short=True))
|
||||||
print()
|
print()
|
||||||
print()
|
print()
|
||||||
print(qutebrowser.__copyright__)
|
print(qutebrowser.__copyright__)
|
||||||
|
@ -184,33 +184,41 @@ def _os_info():
|
|||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
|
||||||
def version():
|
def version(short=False):
|
||||||
"""Return a string with various version informations."""
|
"""Return a string with various version informations.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
short: Return a shortened output.
|
||||||
|
"""
|
||||||
lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
|
lines = ["qutebrowser v{}".format(qutebrowser.__version__)]
|
||||||
gitver = _git_str()
|
gitver = _git_str()
|
||||||
if gitver is not None:
|
if gitver is not None:
|
||||||
lines.append("Git commit: {}".format(gitver))
|
lines.append("Git commit: {}".format(gitver))
|
||||||
style = QApplication.instance().style()
|
|
||||||
lines += [
|
lines += [
|
||||||
'',
|
'',
|
||||||
'{}: {}'.format(platform.python_implementation(),
|
'{}: {}'.format(platform.python_implementation(),
|
||||||
platform.python_version()),
|
platform.python_version()),
|
||||||
'Qt: {}, runtime: {}'.format(QT_VERSION_STR, qVersion()),
|
'Qt: {}, runtime: {}'.format(QT_VERSION_STR, qVersion()),
|
||||||
'PyQt: {}'.format(PYQT_VERSION_STR),
|
'PyQt: {}'.format(PYQT_VERSION_STR),
|
||||||
'Style: {}'.format(style.metaObject().className()),
|
|
||||||
'Desktop: {}'.format(os.environ.get('DESKTOP_SESSION')),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
lines += _module_versions()
|
if not short:
|
||||||
|
style = QApplication.instance().style()
|
||||||
|
lines += [
|
||||||
|
'Style: {}'.format(style.metaObject().className()),
|
||||||
|
'Desktop: {}'.format(os.environ.get('DESKTOP_SESSION')),
|
||||||
|
]
|
||||||
|
|
||||||
lines += [
|
lines += _module_versions()
|
||||||
'Webkit: {}'.format(qWebKitVersion()),
|
|
||||||
'Harfbuzz: {}'.format(os.environ.get('QT_HARFBUZZ', 'system')),
|
lines += [
|
||||||
'SSL: {}'.format(QSslSocket.sslLibraryVersionString()),
|
'Webkit: {}'.format(qWebKitVersion()),
|
||||||
'',
|
'Harfbuzz: {}'.format(os.environ.get('QT_HARFBUZZ', 'system')),
|
||||||
'Frozen: {}'.format(hasattr(sys, 'frozen')),
|
'SSL: {}'.format(QSslSocket.sslLibraryVersionString()),
|
||||||
'Platform: {}, {}'.format(platform.platform(),
|
'',
|
||||||
platform.architecture()[0]),
|
'Frozen: {}'.format(hasattr(sys, 'frozen')),
|
||||||
]
|
'Platform: {}, {}'.format(platform.platform(),
|
||||||
lines += _os_info()
|
platform.architecture()[0]),
|
||||||
|
]
|
||||||
|
lines += _os_info()
|
||||||
return '\n'.join(lines)
|
return '\n'.join(lines)
|
||||||
|
Loading…
Reference in New Issue
Block a user