- disabled presentations plugin in the first time wizard when on OS X

- converting and bundling translations during the build process
- removing presentations plugin from the dmg file during the build process
- fixed Info.plist spelling errors reported by typovar
- fixed translation in the presentations mediaitem
This commit is contained in:
Matthias Hub 2011-03-10 02:45:45 +01:00
parent 4dc0c331da
commit 659e3719f0
5 changed files with 35 additions and 5 deletions

View File

@ -26,6 +26,8 @@
from PyQt4 import QtCore, QtGui
import sys
from openlp.core.lib import translate
from openlp.core.lib.ui import add_welcome_page
@ -77,7 +79,10 @@ class Ui_FirstTimeWizard(object):
self.imageCheckBox.setObjectName(u'imageCheckBox')
self.pluginLayout.addWidget(self.imageCheckBox)
self.presentationCheckBox = QtGui.QCheckBox(self.pluginPage)
self.presentationCheckBox.setChecked(True)
if sys.platform == "darwin":
self.presentationCheckBox.setChecked(False)
else:
self.presentationCheckBox.setChecked(True)
self.presentationCheckBox.setObjectName(u'presentationCheckBox')
self.pluginLayout.addWidget(self.presentationCheckBox)
self.mediaCheckBox = QtGui.QCheckBox(self.pluginPage)
@ -210,6 +215,8 @@ class Ui_FirstTimeWizard(object):
'Images'))
self.presentationCheckBox.setText(translate('OpenLP.FirstTimeWizard',
'Presentations'))
if sys.platform == "darwin":
self.presentationCheckBox.setEnabled(False)
self.mediaCheckBox.setText(translate('OpenLP.FirstTimeWizard',
'Media (Audio and Video)'))
self.remoteCheckBox.setText(translate('OpenLP.FirstTimeWizard',

View File

@ -189,7 +189,7 @@ class PresentationMediaItem(MediaManagerItem):
icon = build_icon(u':/general/general_delete.png')
else:
critical_error_message_box(
self, translate('PresentationPlugin.MediaItem',
translate('PresentationPlugin.MediaItem',
'Unsupported File'),
translate('PresentationPlugin.MediaItem',
'This type of presentation is not supported.'))

View File

@ -18,9 +18,9 @@
<string>MacOS/openlp</string>
<key>CFBundleName</key>
<string>%(openlp_appname)s</string>
<key>CFBundleGetInfoString</string>
<key>CFBundleGetInfoString</key>
<string>%(openlp_appname)s %(openlp_version)s</string>
<key>LSHasLocalizedDisplayName</string>
<key>LSHasLocalizedDisplayName</key>
<false/>
<key>NSAppleScriptEnabled</key>
<false/>

View File

@ -25,4 +25,4 @@ clean:
rm -rf OpenLP.app
rm -f warnopenlp.txt
rm -f *dmg

View File

@ -82,6 +82,7 @@ import ConfigParser
import logging
import optparse
import sys
import glob
import platform
import re
import subprocess as subp
@ -122,6 +123,15 @@ def build_application(settings, app_name_lower, app_dir):
script_name)
sys.exit(1)
logging.info('[%s] removing the presentations plugin...', script_name)
result = os.system('rm -rf \
%(application_directory)s/Contents/MacOS/plugins/presentations' \
% { 'application_directory' : app_dir })
if (result != 0):
logging.error('[%s] could not remove presentations plugins, dmg creation failed!',
script_name)
sys.exit(1)
logging.info('[%s] copying the icons to the resource directory...',
script_name)
result = os.system('cp %(icon_file)s \
@ -151,6 +161,19 @@ def build_application(settings, app_name_lower, app_dir):
failed!', script_name)
sys.exit(1)
logging.info('[%s] copying the translations...', script_name)
os.mkdir(app_dir + '/Contents/MacOS/i18n')
for ts_file in glob.glob(os.path.join(settings['openlp_basedir']
+ '/resources/i18n/', '*ts')):
result = os.system('lconvert -i %(ts_file)s \
-o %(target_directory)s/Contents/MacOS/i18n/%(base)s.qm' \
% { 'ts_file' : ts_file, 'target_directory' : app_dir,
'base': os.path.splitext(os.path.basename(ts_file))[0] })
if (result != 0):
logging.error('[%s] could not copy the translations, dmg creation \
failed!', script_name)
sys.exit(1)
def deploy_qt(settings):
logging.info('[%s] running mac deploy qt on %s.app...', script_name,
settings['openlp_appname']);