forked from openlp/openlp
- 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:
parent
4dc0c331da
commit
659e3719f0
@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import add_welcome_page
|
from openlp.core.lib.ui import add_welcome_page
|
||||||
|
|
||||||
@ -77,7 +79,10 @@ class Ui_FirstTimeWizard(object):
|
|||||||
self.imageCheckBox.setObjectName(u'imageCheckBox')
|
self.imageCheckBox.setObjectName(u'imageCheckBox')
|
||||||
self.pluginLayout.addWidget(self.imageCheckBox)
|
self.pluginLayout.addWidget(self.imageCheckBox)
|
||||||
self.presentationCheckBox = QtGui.QCheckBox(self.pluginPage)
|
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.presentationCheckBox.setObjectName(u'presentationCheckBox')
|
||||||
self.pluginLayout.addWidget(self.presentationCheckBox)
|
self.pluginLayout.addWidget(self.presentationCheckBox)
|
||||||
self.mediaCheckBox = QtGui.QCheckBox(self.pluginPage)
|
self.mediaCheckBox = QtGui.QCheckBox(self.pluginPage)
|
||||||
@ -210,6 +215,8 @@ class Ui_FirstTimeWizard(object):
|
|||||||
'Images'))
|
'Images'))
|
||||||
self.presentationCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
self.presentationCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
||||||
'Presentations'))
|
'Presentations'))
|
||||||
|
if sys.platform == "darwin":
|
||||||
|
self.presentationCheckBox.setEnabled(False)
|
||||||
self.mediaCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
self.mediaCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
||||||
'Media (Audio and Video)'))
|
'Media (Audio and Video)'))
|
||||||
self.remoteCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
self.remoteCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
||||||
|
@ -189,7 +189,7 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
icon = build_icon(u':/general/general_delete.png')
|
icon = build_icon(u':/general/general_delete.png')
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
self, translate('PresentationPlugin.MediaItem',
|
translate('PresentationPlugin.MediaItem',
|
||||||
'Unsupported File'),
|
'Unsupported File'),
|
||||||
translate('PresentationPlugin.MediaItem',
|
translate('PresentationPlugin.MediaItem',
|
||||||
'This type of presentation is not supported.'))
|
'This type of presentation is not supported.'))
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
<string>MacOS/openlp</string>
|
<string>MacOS/openlp</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>%(openlp_appname)s</string>
|
<string>%(openlp_appname)s</string>
|
||||||
<key>CFBundleGetInfoString</string>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>%(openlp_appname)s %(openlp_version)s</string>
|
<string>%(openlp_appname)s %(openlp_version)s</string>
|
||||||
<key>LSHasLocalizedDisplayName</string>
|
<key>LSHasLocalizedDisplayName</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSAppleScriptEnabled</key>
|
<key>NSAppleScriptEnabled</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
@ -82,6 +82,7 @@ import ConfigParser
|
|||||||
import logging
|
import logging
|
||||||
import optparse
|
import optparse
|
||||||
import sys
|
import sys
|
||||||
|
import glob
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import subprocess as subp
|
import subprocess as subp
|
||||||
@ -122,6 +123,15 @@ def build_application(settings, app_name_lower, app_dir):
|
|||||||
script_name)
|
script_name)
|
||||||
sys.exit(1)
|
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...',
|
logging.info('[%s] copying the icons to the resource directory...',
|
||||||
script_name)
|
script_name)
|
||||||
result = os.system('cp %(icon_file)s \
|
result = os.system('cp %(icon_file)s \
|
||||||
@ -151,6 +161,19 @@ def build_application(settings, app_name_lower, app_dir):
|
|||||||
failed!', script_name)
|
failed!', script_name)
|
||||||
sys.exit(1)
|
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):
|
def deploy_qt(settings):
|
||||||
logging.info('[%s] running mac deploy qt on %s.app...', script_name,
|
logging.info('[%s] running mac deploy qt on %s.app...', script_name,
|
||||||
settings['openlp_appname']);
|
settings['openlp_appname']);
|
||||||
|
Loading…
Reference in New Issue
Block a user