IGN:Fix #2152 (Typo in GUI)

This commit is contained in:
Kovid Goyal 2009-08-24 08:44:58 -06:00
parent 8dd752d850
commit 05f7f42400
5 changed files with 111 additions and 56 deletions

View File

@ -9,7 +9,7 @@ Create linux binary.
''' '''
def freeze(): def freeze():
import glob, sys, tarfile, os, textwrap, shutil import glob, sys, tarfile, os, textwrap, shutil, platform
from contextlib import closing from contextlib import closing
from cx_Freeze import Executable, setup from cx_Freeze import Executable, setup
from calibre.constants import __version__, __appname__ from calibre.constants import __version__, __appname__
@ -19,6 +19,9 @@ def freeze():
from calibre.ebooks.lrf.fonts import FONT_MAP from calibre.ebooks.lrf.fonts import FONT_MAP
import calibre import calibre
is64bit = platform.architecture()[0] == '64bit'
arch = 'x86_64' if is64bit else 'i686'
QTDIR = '/usr/lib/qt4' QTDIR = '/usr/lib/qt4'
QTDLLS = ('QtCore', 'QtGui', 'QtNetwork', 'QtSvg', 'QtXml', QTDLLS = ('QtCore', 'QtGui', 'QtNetwork', 'QtSvg', 'QtXml',
@ -47,7 +50,8 @@ def freeze():
'/usr/lib/libxslt.so.1', '/usr/lib/libxslt.so.1',
'/usr/lib/libxslt.so.1', '/usr/lib/libxslt.so.1',
'/usr/lib/libgthread-2.0.so.0', '/usr/lib/libgthread-2.0.so.0',
'/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/libstdc++.so.6', '/usr/lib/gcc/***-pc-linux-gnu/4.4.1/libstdc++.so.6'.replace('***',
arch).replace('i686', 'i486'),
'/usr/lib/libpng12.so.0', '/usr/lib/libpng12.so.0',
'/usr/lib/libexslt.so.0', '/usr/lib/libexslt.so.0',
'/usr/lib/libMagickWand.so', '/usr/lib/libMagickWand.so',
@ -228,7 +232,8 @@ def freeze():
open(os.path.join(FREEZE_DIR, 'manifest'), 'wb').write('\n'.join(exes)) open(os.path.join(FREEZE_DIR, 'manifest'), 'wb').write('\n'.join(exes))
print 'Creating archive...' print 'Creating archive...'
dist = open(os.path.join(DIST_DIR, 'calibre-%s-i686.tar.bz2'%__version__), 'wb') dist = open(os.path.join(DIST_DIR, 'calibre-%s-%s.tar.bz2'%(__version__,
arch)), 'wb')
with closing(tarfile.open(fileobj=dist, mode='w:bz2', with closing(tarfile.open(fileobj=dist, mode='w:bz2',
format=tarfile.PAX_FORMAT)) as tf: format=tarfile.PAX_FORMAT)) as tf:
for f in walk(FREEZE_DIR): for f in walk(FREEZE_DIR):

View File

@ -71,7 +71,7 @@ if __name__ == '__main__':
tag_release, upload_demo, build_linux, build_windows, \ tag_release, upload_demo, build_linux, build_windows, \
build_osx, upload_installers, upload_user_manual, \ build_osx, upload_installers, upload_user_manual, \
upload_to_pypi, stage3, stage2, stage1, upload, \ upload_to_pypi, stage3, stage2, stage1, upload, \
upload_rss, betas upload_rss, betas, build_linux32, build_linux64
entry_points['console_scripts'].append( entry_points['console_scripts'].append(
'calibre_postinstall = calibre.linux:post_install') 'calibre_postinstall = calibre.linux:post_install')
@ -258,6 +258,8 @@ if __name__ == '__main__':
'tag_release' : tag_release, 'tag_release' : tag_release,
'upload_demo' : upload_demo, 'upload_demo' : upload_demo,
'build_linux' : build_linux, 'build_linux' : build_linux,
'build_linux32' : build_linux32,
'build_linux64' : build_linux64,
'build_windows' : build_windows, 'build_windows' : build_windows,
'build_osx' : build_osx, 'build_osx' : build_osx,
'upload_installers': upload_installers, 'upload_installers': upload_installers,

View File

@ -78,7 +78,7 @@ class EPUBOutput(OutputFormatPlugin):
), ),
OptionRecommendation(name='no_default_epub_cover', recommended_value=False, OptionRecommendation(name='no_default_epub_cover', recommended_value=False,
help=_('Normally, if the input file ahs no cover and you don\'t' help=_('Normally, if the input file has no cover and you don\'t'
' specify one, a default cover is generated with the title, ' ' specify one, a default cover is generated with the title, '
'authors, etc. This option disables the generation of this cover.')), 'authors, etc. This option disables the generation of this cover.')),

View File

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: calibre 0.6.8\n" "Project-Id-Version: calibre 0.6.8\n"
"POT-Creation-Date: 2009-08-23 11:19+MDT\n" "POT-Creation-Date: 2009-08-24 08:38+MDT\n"
"PO-Revision-Date: 2009-08-23 11:19+MDT\n" "PO-Revision-Date: 2009-08-24 08:38+MDT\n"
"Last-Translator: Automatically generated\n" "Last-Translator: Automatically generated\n"
"Language-Team: LANGUAGE\n" "Language-Team: LANGUAGE\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -937,7 +937,7 @@ msgid "Split all HTML files larger than this size (in KB). This is necessary as
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/epub/output.py:81 #: /home/kovid/work/calibre/src/calibre/ebooks/epub/output.py:81
msgid "Normally, if the input file ahs no cover and you don't specify one, a default cover is generated with the title, authors, etc. This option disables the generation of this cover." msgid "Normally, if the input file has no cover and you don't specify one, a default cover is generated with the title, authors, etc. This option disables the generation of this cover."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/fb2/fb2ml.py:123 #: /home/kovid/work/calibre/src/calibre/ebooks/fb2/fb2ml.py:123
@ -3074,109 +3074,109 @@ msgstr ""
msgid "new email address" msgid "new email address"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:507 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:508
msgid "No valid plugin path" msgid "No valid plugin path"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:508 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:509
msgid "%s is not a valid plugin path" msgid "%s is not a valid plugin path"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:511 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:512
msgid "Choose plugin" msgid "Choose plugin"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:523 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:524
msgid "Plugin cannot be disabled" msgid "Plugin cannot be disabled"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:524 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:525
msgid "The plugin: %s cannot be disabled" msgid "The plugin: %s cannot be disabled"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:533 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:534
msgid "Plugin not customizable" msgid "Plugin not customizable"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:534 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:535
msgid "Plugin: %s does not need customization" msgid "Plugin: %s does not need customization"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:558 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:559
msgid "Customize %s" msgid "Customize %s"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:568 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:569
msgid "Cannot remove builtin plugin" msgid "Cannot remove builtin plugin"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:569 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:570
msgid " cannot be removed. It is a builtin plugin. Try disabling it instead." msgid " cannot be removed. It is a builtin plugin. Try disabling it instead."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:602 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:603
msgid "Error log:" msgid "Error log:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:609 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:610
msgid "Access log:" msgid "Access log:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:634 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:635
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:564 #: /home/kovid/work/calibre/src/calibre/gui2/main.py:564
msgid "Failed to start content server" msgid "Failed to start content server"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:658 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:659
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:469 #: /home/kovid/work/calibre/src/calibre/gui2/wizard/__init__.py:469
msgid "Select location for books" msgid "Select location for books"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:675 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:676
msgid "Invalid size" msgid "Invalid size"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:676 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:677
msgid "The size %s is invalid. must be of the form widthxheight" msgid "The size %s is invalid. must be of the form widthxheight"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:720
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:725
msgid "Invalid database location"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:721 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:721
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:726
msgid "Invalid database location" msgid "Invalid database location"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:722 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:722
msgid "Invalid database location "
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:723
msgid "<br>Must be a directory." msgid "<br>Must be a directory."
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:726 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:727
msgid "Invalid database location.<br>Cannot write to " msgid "Invalid database location.<br>Cannot write to "
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:763 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:764
msgid "Checking database integrity" msgid "Checking database integrity"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:782 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:783
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:141 #: /home/kovid/work/calibre/src/calibre/gui2/main.py:141
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:995 #: /home/kovid/work/calibre/src/calibre/gui2/main.py:995
#: /home/kovid/work/calibre/src/calibre/utils/ipc/job.py:52 #: /home/kovid/work/calibre/src/calibre/utils/ipc/job.py:52
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:783 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:784
msgid "Failed to check database integrity" msgid "Failed to check database integrity"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:788 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:789
msgid "Some inconsistencies found" msgid "Some inconsistencies found"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:789 #: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config/__init__.py:790
msgid "The following books had formats listed in the database that are not actually available. The entries for the formats have been removed. You should check them manually. This can happen if you manipulate the files in the library folder directly." msgid "The following books had formats listed in the database that are not actually available. The entries for the formats have been removed. You should check them manually. This can happen if you manipulate the files in the library folder directly."
msgstr "" msgstr ""
@ -6072,7 +6072,7 @@ msgstr ""
msgid "Password to access your calibre library. Username is " msgid "Password to access your calibre library. Username is "
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/library/server.py:523 #: /home/kovid/work/calibre/src/calibre/library/server.py:526
msgid "" msgid ""
"[options]\n" "[options]\n"
"\n" "\n"
@ -6219,7 +6219,7 @@ msgid "\tFailed links:"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/news.py:682 #: /home/kovid/work/calibre/src/calibre/web/feeds/news.py:682
msgid "Could not fetch article. Run with --debug to see the reason" msgid "Could not fetch article. Run with -vv to see the reason"
msgstr "" msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/news.py:703 #: /home/kovid/work/calibre/src/calibre/web/feeds/news.py:703
@ -6309,6 +6309,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_7dias.py:23 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_7dias.py:23
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_ambito.py:61 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_ambito.py:61
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_axxon_news.py:21
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_buenosaireseconomico.py:23 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_buenosaireseconomico.py:23
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_clarin.py:26 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_clarin.py:26
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_criticadigital.py:17 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_criticadigital.py:17
@ -6422,7 +6423,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_nytimes.py:17 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_nytimes.py:17
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py:17 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_nytimes_sub.py:17
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_ourdailybread.py:16 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_ourdailybread.py:16
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_outlook_india.py:15 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_outlook_india.py:17
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_phd_comics.py:16 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_phd_comics.py:16
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_physics_today.py:11 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_physics_today.py:11
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_physics_world.py:8 #: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_physics_world.py:8

View File

@ -4,7 +4,7 @@ __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
import shutil, os, glob, re, cStringIO, sys, tempfile, time, textwrap, socket, \ import shutil, os, glob, re, cStringIO, sys, tempfile, time, textwrap, socket, \
struct, subprocess struct, subprocess, platform
from datetime import datetime from datetime import datetime
from setuptools.command.build_py import build_py as _build_py, convert_path from setuptools.command.build_py import build_py as _build_py, convert_path
from distutils.core import Command from distutils.core import Command
@ -24,6 +24,7 @@ HTML2LRF = "src/calibre/ebooks/lrf/html/demo"
TXT2LRF = "src/calibre/ebooks/lrf/txt/demo" TXT2LRF = "src/calibre/ebooks/lrf/txt/demo"
MOBILEREAD = 'ftp://dev.mobileread.com/calibre/' MOBILEREAD = 'ftp://dev.mobileread.com/calibre/'
is64bit = platform.architecture()[0] == '64bit'
def get_ip_address(ifname): def get_ip_address(ifname):
import fcntl import fcntl
@ -35,7 +36,7 @@ def get_ip_address(ifname):
)[20:24]) )[20:24])
try: try:
HOST=get_ip_address('eth0') HOST=get_ip_address('br0')
except: except:
try: try:
HOST=get_ip_address('wlan0') HOST=get_ip_address('wlan0')
@ -481,12 +482,12 @@ class upload_demo(OptionlessCommand):
def installer_name(ext): def installer_name(ext):
if ext in ('exe', 'dmg'): if ext in ('exe', 'dmg'):
return 'dist/%s-%s.%s'%(__appname__, __version__, ext) return 'dist/%s-%s.%s'%(__appname__, __version__, ext)
return 'dist/%s-%s-i686.%s'%(__appname__, __version__, ext) ans = 'dist/%s-%s-i686.%s'%(__appname__, __version__, ext)
if is64bit:
ans = ans.replace('i686', 'x86_64')
return ans
def _build_linux():
class build_linux(OptionlessCommand):
description = 'Build linux installer'
def run(self):
installer = installer_name('tar.bz2') installer = installer_name('tar.bz2')
locals = {} locals = {}
exec open('installer/linux/freeze.py') in locals exec open('installer/linux/freeze.py') in locals
@ -495,9 +496,15 @@ class build_linux(OptionlessCommand):
raise Exception('Failed to build installer '+installer) raise Exception('Failed to build installer '+installer)
return os.path.basename(installer) return os.path.basename(installer)
class build_linux64(OptionlessCommand):
description = 'Build linux 64bit installer'
def run(self):
return _build_linux()
class VMInstaller(OptionlessCommand): class VMInstaller(OptionlessCommand):
user_options = [('dont-shutdown', 'd', 'Dont shutdown Vm after build')] user_options = [('dont-shutdown', 'd', 'Dont shutdown VM after build')]
boolean_options = ['dont-shutdown'] boolean_options = ['dont-shutdown']
def initialize_options(self): def initialize_options(self):
@ -521,10 +528,13 @@ class VMInstaller(OptionlessCommand):
def get_build_script(self, subs): def get_build_script(self, subs):
return self.BUILD_SCRIPT%subs return self.BUILD_SCRIPT%subs
def start_vm(self, ssh_host, build_script, sleep=75): def run_vm(self):
build_script = self.get_build_script(build_script)
vmware = ('vmware', '-q', '-x', '-n', self.VM) vmware = ('vmware', '-q', '-x', '-n', self.VM)
Popen(vmware) self.__p = Popen(vmware)
def start_vm(self, ssh_host, build_script, sleep=75):
self.run_vm()
build_script = self.get_build_script(build_script)
t = tempfile.NamedTemporaryFile(suffix='.sh') t = tempfile.NamedTemporaryFile(suffix='.sh')
t.write(build_script) t.write(build_script)
t.flush() t.flush()
@ -537,6 +547,28 @@ class VMInstaller(OptionlessCommand):
check_call(('scp', t.name, ssh_host+':build-calibre')) check_call(('scp', t.name, ssh_host+':build-calibre'))
check_call('ssh -t %s bash build-calibre'%ssh_host, shell=True) check_call('ssh -t %s bash build-calibre'%ssh_host, shell=True)
class build_linux32(VMInstaller):
description = 'Build linux 32bit installer'
def run_vm(self):
self.__p = Popen('/vmware/bin/linux_build')
def run(self):
if is64bit:
installer = installer_name('tar.bz2').replace('x86_64', 'i686')
self.start_vm('linux_build', ('python setup.py build_ext',
'python', 'setup.py build_linux32'))
check_call(('scp', 'linux_build:build/calibre/dist/*.tar.bz2', 'dist'))
if not os.path.exists(installer):
raise Exception('Failed to build installer '+installer)
if not self.dont_shutdown:
Popen(('ssh', 'linux_build', 'sudo', '/sbin/poweroff'))
return os.path.basename(installer)
else:
return _build_linux()
class build_windows(VMInstaller): class build_windows(VMInstaller):
description = 'Build windows installer' description = 'Build windows installer'
VM = '/mnt/backup/calibre_windows_xp_home/calibre_windows_xp_home.vmx' VM = '/mnt/backup/calibre_windows_xp_home/calibre_windows_xp_home.vmx'
@ -573,9 +605,7 @@ class build_windows(VMInstaller):
class build_osx(VMInstaller): class build_osx(VMInstaller):
description = 'Build OS X app bundle' description = 'Build OS X app bundle'
VM = '/mnt/backup/calibre_os_x/Mac OSX.vmx' VM = '/vmware/calibre_os_x/Mac OSX.vmx'
if not os.path.exists(VM):
VM = '/home/kovid/calibre_os_x/Mac OSX.vmx'
def get_build_script(self, subs): def get_build_script(self, subs):
return (self.BUILD_SCRIPT%subs).replace('rm ', 'sudo rm ') return (self.BUILD_SCRIPT%subs).replace('rm ', 'sudo rm ')
@ -583,13 +613,25 @@ class build_osx(VMInstaller):
def run(self): def run(self):
installer = installer_name('dmg') installer = installer_name('dmg')
python = '/Library/Frameworks/Python.framework/Versions/Current/bin/python' python = '/Library/Frameworks/Python.framework/Versions/Current/bin/python'
self.start_vm('osx', ('sudo %s setup.py develop'%python, python, if os.path.exists('/dev/kvm'):
check_call('sudo rmmod -w kvm-intel kvm', shell=True)
check_call('sudo /etc/init.d/vmware restart', shell=True)
self.start_vm('osx_build', ('sudo %s setup.py develop'%python, python,
'installer/osx/freeze.py')) 'installer/osx/freeze.py'))
check_call(('scp', 'osx:build/calibre/dist/*.dmg', 'dist')) check_call(('scp', 'osx_build:build/calibre/dist/*.dmg', 'dist'))
if not os.path.exists(installer): if not os.path.exists(installer):
raise Exception('Failed to build installer '+installer) raise Exception('Failed to build installer '+installer)
if not self.dont_shutdown: if not self.dont_shutdown:
Popen(('ssh', 'osx', 'sudo', '/sbin/shutdown', '-h', 'now')) Popen(('ssh', 'osx_build', 'sudo', '/sbin/shutdown', '-h', 'now'))
time.sleep(20)
while True:
try:
check_call('sudo /etc/init.d/vmware stop', shell=True)
break
except:
pass
check_call('sudo modprobe kvm-intel', shell=True)
return os.path.basename(installer) return os.path.basename(installer)
@ -661,8 +703,9 @@ class upload_installers(OptionlessCommand):
def run(self): def run(self):
print 'Uploading installers...' print 'Uploading installers...'
for i in ('dmg', 'exe', 'tar.bz2'): installers = list(map(installer_name, ('dmg', 'exe', 'tar.bz2')))
self.upload_installer(installer_name(i)) installers.append(installers[-1].replace('x86_64', 'i686'))
map(self.upload_installer, installers)
check_call('''ssh divok echo %s \\> %s/latest_version'''\ check_call('''ssh divok echo %s \\> %s/latest_version'''\
%(__version__, DOWNLOADS), shell=True) %(__version__, DOWNLOADS), shell=True)
@ -715,6 +758,10 @@ class stage3(OptionlessCommand):
OptionlessCommand.run(self) OptionlessCommand.run(self)
self.misc() self.misc()
class build_linux(OptionlessCommand):
description = 'Build linux installers'
sub_commands = [ ('build_linux64', None), ('build_linux32', None) ]
class stage2(OptionlessCommand): class stage2(OptionlessCommand):
description = 'Stage 2 of the build process' description = 'Stage 2 of the build process'
sub_commands = [ sub_commands = [