2011-03-16 11:07:22 +00:00
|
|
|
#!/usr/bin/env python3.1
|
2011-04-12 08:04:01 +00:00
|
|
|
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
2010-10-05 08:22:02 +00:00
|
|
|
#
|
|
|
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
|
|
|
# which should be included with this package. The terms are also available at
|
|
|
|
# http://www.hardcoded.net/licenses/bsd_license
|
2010-10-04 13:42:38 +00:00
|
|
|
|
|
|
|
import sys
|
2010-10-05 08:22:02 +00:00
|
|
|
import sip
|
|
|
|
sip.setapi('QVariant', 1)
|
|
|
|
|
2011-01-19 08:47:00 +00:00
|
|
|
from PyQt4.QtCore import QCoreApplication, QSettings
|
2010-10-05 08:22:02 +00:00
|
|
|
from PyQt4.QtGui import QApplication, QIcon, QPixmap
|
|
|
|
|
2011-01-19 08:47:00 +00:00
|
|
|
from hscommon.trans import install_qt_trans
|
2010-11-20 11:42:15 +00:00
|
|
|
from qtlib.error_report_dialog import install_excepthook
|
2010-10-05 08:22:02 +00:00
|
|
|
from qt.base import dg_rc
|
2011-01-21 12:57:54 +00:00
|
|
|
from core_{{edition}} import __version__, __appname__
|
2010-10-05 08:22:02 +00:00
|
|
|
|
|
|
|
if sys.platform == 'win32':
|
2010-10-05 08:48:07 +00:00
|
|
|
import qt.base.cxfreeze_fix
|
2010-10-05 08:22:02 +00:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
app = QApplication(sys.argv)
|
2011-01-21 12:57:54 +00:00
|
|
|
QCoreApplication.setOrganizationName('Hardcoded Software')
|
|
|
|
QCoreApplication.setApplicationName(__appname__)
|
|
|
|
QCoreApplication.setApplicationVersion(__version__)
|
2011-01-19 08:47:00 +00:00
|
|
|
settings = QSettings()
|
|
|
|
lang = settings.value('Language').toString()
|
|
|
|
install_qt_trans(lang)
|
|
|
|
# Many strings are translated at import time, so this is why we only import after the translator
|
|
|
|
# has been installed
|
|
|
|
from qt.{{edition}}.app import DupeGuru
|
2010-10-05 08:22:02 +00:00
|
|
|
app.setWindowIcon(QIcon(QPixmap(":/{0}".format(DupeGuru.LOGO_NAME))))
|
|
|
|
dgapp = DupeGuru()
|
2010-11-20 11:42:15 +00:00
|
|
|
install_excepthook()
|
2010-10-05 08:22:02 +00:00
|
|
|
sys.exit(app.exec_())
|