mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-25 11:14:08 +00:00
Fix build paths after moving osx build code to packaging branch.
This commit is contained in:
parent
7043629baf
commit
f40225419b
@ -1,6 +1,6 @@
|
|||||||
[executables]
|
[executables]
|
||||||
sphinx = sphinx-build
|
sphinx = sphinx-build
|
||||||
pyinstaller = %(here)s/../pyinstaller/pyinstaller.py
|
pyinstaller = %(projects)s/pyinstaller/pyinstaller.py
|
||||||
lrelease = lrelease
|
lrelease = lrelease
|
||||||
diskutil = diskutil
|
diskutil = diskutil
|
||||||
hdiutil = hdiutil
|
hdiutil = hdiutil
|
||||||
|
@ -205,14 +205,13 @@ class MacosxBuilder(object):
|
|||||||
"""
|
"""
|
||||||
parser = ArgumentParser()
|
parser = ArgumentParser()
|
||||||
parser.add_argument('-b', '--branch', metavar='BRANCH', dest='branch',
|
parser.add_argument('-b', '--branch', metavar='BRANCH', dest='branch',
|
||||||
help='Specify the path to the branch you wish to build.',
|
help='Specify the path to the branch you wish to build.')
|
||||||
default='../trunk')
|
|
||||||
parser.add_argument('--devel', dest='devel',
|
parser.add_argument('--devel', dest='devel',
|
||||||
action='store_true', default=False,
|
action='store_true', default=False,
|
||||||
help='Development build does not have set icons for .dmg file '
|
help='Development build does not have set icons for .dmg file '
|
||||||
'and .dmg filename contains bzr revision number.')
|
'and .dmg filename contains bzr revision number.')
|
||||||
parser.add_argument('-d', '--documentation', metavar='DOCS',
|
parser.add_argument('-d', '--documentation', metavar='DOCS',
|
||||||
dest='docs', default=os.path.join('..', 'documentation'),
|
dest='docs',
|
||||||
help='Specify the path to the documentation branch.')
|
help='Specify the path to the documentation branch.')
|
||||||
parser.add_argument('-c', '--config', metavar='CONFIG', dest='config',
|
parser.add_argument('-c', '--config', metavar='CONFIG', dest='config',
|
||||||
help='Specify the path to the configuration file.',
|
help='Specify the path to the configuration file.',
|
||||||
@ -236,7 +235,9 @@ class MacosxBuilder(object):
|
|||||||
Read the configuration from the configuration file.
|
Read the configuration from the configuration file.
|
||||||
"""
|
"""
|
||||||
self.config = ConfigParser(defaults={
|
self.config = ConfigParser(defaults={
|
||||||
u'here': self.script_path
|
u'here': self.script_path,
|
||||||
|
u'projects': os.path.abspath(os.path.join(self.script_path,
|
||||||
|
'..', '..')),
|
||||||
})
|
})
|
||||||
self.config.read(os.path.abspath(self.args.config))
|
self.config.read(os.path.abspath(self.args.config))
|
||||||
|
|
||||||
@ -264,15 +265,15 @@ class MacosxBuilder(object):
|
|||||||
Set up a variety of paths that we use throughout the build process.
|
Set up a variety of paths that we use throughout the build process.
|
||||||
"""
|
"""
|
||||||
if self.args.branch:
|
if self.args.branch:
|
||||||
branch_path = self.args.branch
|
branch_path = os.path.abspath(self.args.branch)
|
||||||
else:
|
else:
|
||||||
branch_path = self.config.get(u'paths', u'branch')
|
branch_path = self.config.get(u'paths', u'branch')
|
||||||
self.branch_path = os.path.abspath(branch_path)
|
self.branch_path = branch_path
|
||||||
if self.args.docs:
|
if self.args.docs:
|
||||||
docs_path = self.args.docs
|
docs_path = os.path.abspath(self.args.docs)
|
||||||
else:
|
else:
|
||||||
docs_path = self.config.get(u'paths', u'documentation')
|
docs_path = self.config.get(u'paths', u'documentation')
|
||||||
self.docs_path = os.path.abspath(docs_path)
|
self.docs_path = docs_path
|
||||||
|
|
||||||
self.openlp_script = os.path.abspath(
|
self.openlp_script = os.path.abspath(
|
||||||
os.path.join(branch_path, u'openlp.pyw'))
|
os.path.join(branch_path, u'openlp.pyw'))
|
||||||
@ -374,6 +375,7 @@ class MacosxBuilder(object):
|
|||||||
version_string = latest == revision and tag or \
|
version_string = latest == revision and tag or \
|
||||||
u'%s-bzr%s' % (tag, latest)
|
u'%s-bzr%s' % (tag, latest)
|
||||||
self.version_string = version_string
|
self.version_string = version_string
|
||||||
|
self.version_tag = tag
|
||||||
version_file = open(os.path.join(self.dist_path, u'.version'), u'w')
|
version_file = open(os.path.join(self.dist_path, u'.version'), u'w')
|
||||||
version_file.write(version_string)
|
version_file.write(version_string)
|
||||||
version_file.close()
|
version_file.close()
|
||||||
@ -513,7 +515,12 @@ class MacosxBuilder(object):
|
|||||||
"""
|
"""
|
||||||
self._print(u'Creating dmg file...')
|
self._print(u'Creating dmg file...')
|
||||||
|
|
||||||
dmg_name = 'OpenLP-' + self.version_string + '.dmg'
|
# Release version does not contain revision in .dmg name.
|
||||||
|
if self.args.devel:
|
||||||
|
dmg_name = 'OpenLP-' + self.version_string + '.dmg'
|
||||||
|
else:
|
||||||
|
dmg_name = 'OpenLP-' + self.version_tag + '.dmg'
|
||||||
|
|
||||||
dmg_file = os.path.join(self.branch_path, 'build', dmg_name)
|
dmg_file = os.path.join(self.branch_path, 'build', dmg_name)
|
||||||
# Remove dmg if it exists.
|
# Remove dmg if it exists.
|
||||||
if os.path.exists(dmg_file):
|
if os.path.exists(dmg_file):
|
||||||
|
Loading…
Reference in New Issue
Block a user