openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #07479
[Merge] lp:~matthiashub/openlp/osx-build-scripts into lp:openlp
Matthias Hub has proposed merging lp:~matthiashub/openlp/osx-build-scripts into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~matthiashub/openlp/osx-build-scripts/+merge/54955
Changes did for the packaging of 1.9.5 (version 1346 contains the main changes):
- 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 (though disabled on OS X)
--
https://code.launchpad.net/~matthiashub/openlp/osx-build-scripts/+merge/54955
Your team OpenLP Core is requested to review the proposed merge of lp:~matthiashub/openlp/osx-build-scripts into lp:openlp.
=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py 2011-03-24 19:04:02 +0000
+++ openlp/core/ui/firsttimewizard.py 2011-03-26 14:19:34 +0000
@@ -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 @@
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 @@
'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',
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2011-03-24 19:04:02 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2011-03-26 14:19:34 +0000
@@ -189,7 +189,7 @@
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.'))
=== modified file 'resources/osx/Info.plist.master'
--- resources/osx/Info.plist.master 2011-02-14 18:18:51 +0000
+++ resources/osx/Info.plist.master 2011-03-26 14:19:34 +0000
@@ -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/>
=== modified file 'resources/osx/Makefile'
--- resources/osx/Makefile 2011-02-14 18:18:51 +0000
+++ resources/osx/Makefile 2011-03-26 14:19:34 +0000
@@ -25,4 +25,4 @@
rm -rf OpenLP.app
rm -f warnopenlp.txt
rm -f *dmg
-
+
=== modified file 'resources/osx/build.py'
--- resources/osx/build.py 2011-03-24 19:04:02 +0000
+++ resources/osx/build.py 2011-03-26 14:19:34 +0000
@@ -82,6 +82,7 @@
import logging
import optparse
import sys
+import glob
import platform
import re
import subprocess as subp
@@ -122,6 +123,15 @@
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 @@
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']);
Follow ups