mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add beta launcher
This commit is contained in:
parent
7093f7e80f
commit
fb2a358c73
1
setup.py
1
setup.py
@ -31,6 +31,7 @@ entry_points = {
|
||||
'web2disk = libprs500.web.fetch.simple:main',\
|
||||
'web2lrf = libprs500.ebooks.lrf.web.convert_from:main',\
|
||||
'pdf2lrf = libprs500.ebooks.lrf.pdf.convert_from:main',\
|
||||
'libprs500-beta = libprs500.gui2.main:main',\
|
||||
],
|
||||
'gui_scripts' : [ APPNAME+' = libprs500.gui.main:main']
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
''' E-book management software'''
|
||||
__version__ = "0.3.84"
|
||||
__version__ = "0.3.86"
|
||||
__docformat__ = "epytext"
|
||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||
__appname__ = 'libprs500'
|
||||
|
@ -2,7 +2,7 @@ UI = main_ui.py dialogs/metadata_single_ui.py dialogs/metadata_bulk_ui.py dialog
|
||||
RC = images_rc.pyc
|
||||
|
||||
%_ui.py : %.ui
|
||||
pyuic4 $< > $@
|
||||
pyuic4 $< | sed "s/import images_rc/from libprs500.gui2 import images_rc/" > $@
|
||||
|
||||
%_rc.pyc : %.qrc %
|
||||
pyrcc4 $< > $*_rc.py
|
||||
|
@ -12,6 +12,7 @@
|
||||
## You should have received a copy of the GNU General Public License along
|
||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.Warning
|
||||
from libprs500.ptempfile import PersistentTemporaryFile
|
||||
import os, tempfile, sys, traceback
|
||||
|
||||
from PyQt4.QtCore import Qt, SIGNAL, QObject, QCoreApplication, \
|
||||
@ -485,6 +486,9 @@ class Main(QObject, Ui_MainWindow):
|
||||
|
||||
def unhandled_exception(self, type, value, tb):
|
||||
traceback.print_exception(type, value, tb, file=sys.stderr)
|
||||
if type == KeyboardInterrupt:
|
||||
self.window.close()
|
||||
self.window.thread().exit(0)
|
||||
fe = '\n'.join(traceback.format_exception(type, value, tb))
|
||||
msg = '<p><b>' + str(value) + '</b></p>'
|
||||
msg += '<p>Detailed <b>traceback</b>:<pre>'+fe+'</pre>'
|
||||
@ -492,33 +496,15 @@ class Main(QObject, Ui_MainWindow):
|
||||
d.exec_()
|
||||
|
||||
def main():
|
||||
lock = os.path.join(tempfile.gettempdir(),"libprs500_gui_lock")
|
||||
if os.access(lock, os.F_OK):
|
||||
print >>sys.stderr, "Another instance of", APP_TITLE, "is running"
|
||||
print >>sys.stderr, "If you are sure this is not the case then "+\
|
||||
"manually delete the file", lock
|
||||
sys.exit(1)
|
||||
from PyQt4.Qt import QApplication, QMainWindow
|
||||
app = QApplication(sys.argv)
|
||||
#from IPython.Shell import IPShellEmbed
|
||||
#ipshell = IPShellEmbed([],
|
||||
# banner = 'Dropping into IPython',
|
||||
# exit_msg = 'Leaving Interpreter, back to program.')
|
||||
#ipshell()
|
||||
#return 0
|
||||
window = QMainWindow()
|
||||
window.setWindowTitle(APP_TITLE)
|
||||
QCoreApplication.setOrganizationName("KovidsBrain")
|
||||
QCoreApplication.setApplicationName(APP_TITLE)
|
||||
initialize_file_icon_provider()
|
||||
main = Main(window)
|
||||
def unhandled_exception(type, value, tb):
|
||||
import traceback
|
||||
traceback.print_exception(type, value, tb, file=sys.stderr)
|
||||
if type == KeyboardInterrupt:
|
||||
main.window.close()
|
||||
sys.excepthook = main.unhandled_exception
|
||||
|
||||
return app.exec_()
|
||||
|
||||
|
||||
|
@ -89,6 +89,7 @@ def upload_docs():
|
||||
|
||||
|
||||
def main():
|
||||
upload = len(sys.argv) < 2
|
||||
shutil.rmtree('build')
|
||||
os.mkdir('build')
|
||||
shutil.rmtree('docs')
|
||||
@ -99,6 +100,7 @@ def main():
|
||||
dmg = build_osx()
|
||||
print 'Building Windows installer...'
|
||||
exe = build_windows()
|
||||
if upload:
|
||||
print 'Uploading installers...'
|
||||
upload_installers(exe, dmg)
|
||||
print 'Uploading to PyPI'
|
||||
|
@ -190,7 +190,7 @@ Section "Device Drivers" "secdd"
|
||||
IfErrors 0 +3
|
||||
MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "Failed to install USB driver. devcon exit code: $0"
|
||||
Goto +2
|
||||
MessageBox MB_OK 'If you have the SONY Connect Reader software installed: $\nGoto Add Remove Programs and uninstall the entry "Windows Driver Package - Sony Corporation (PRSUSB)". $\n$\nIf your reader is connected to the computer, disconnect and reconnect it now.'
|
||||
MessageBox MB_OK '1. If you have the SONY Connect Reader software installed: $\nGoto Add Remove Programs and uninstall the entry "Windows Driver Package - Sony Corporation (PRSUSB)". $\n$\n2. If your reader is connected to the computer, disconnect and reconnect it now.'
|
||||
DetailPrint " "
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user