1
0
mirror of https://gitlab.com/openlp/packaging.git synced 2024-12-22 04:52:50 +00:00

copy font and display files

This commit is contained in:
Tomas Groth 2019-02-18 20:48:44 +01:00
parent 78a7c9bcda
commit 2827fdf90b

View File

@ -372,16 +372,33 @@ class Builder(object):
self._print_verbose('... %s', filename)
copy(os.path.join(root, filename), os.path.join(dest_path, filename))
def copy_font(self):
def copy_font_files(self):
"""
Copy OpenLP font file
Copy OpenLP font files
"""
self._print('Copying OpenLP font...')
source = os.path.join(self.source_path, 'core', 'ui', 'fonts', 'OpenLP.ttf')
dest_dir = os.path.join(self.dist_path, 'core', 'ui', 'fonts')
dest = os.path.join(dest_dir, 'OpenLP.ttf')
os.makedirs(dest_dir)
copy(source, dest)
self._print('Copying OpenLP fonts files...')
src_dir = os.path.join(self.source_path, 'core', 'display', 'html')
dst_dir = os.path.join(self.dist_path, 'core', 'display', 'html')
font_files = ['OpenLP.ttf', 'openlp-charmap.json']
os.makedirs(dst_dir)
for font_file in font_files
src = os.path.join(src_dir, font_file)
dst = os.path.join(dest_dir, font_file)
copy(src, dst)
def copy_display_files(self):
"""
Copy OpenLP display HTML files
"""
self._print('Copying OpenLP HTML display files...')
src_dir = os.path.join(self.source_path, 'core', 'ui', 'fonts')
dst_dir = os.path.join(self.dist_path, 'core', 'ui', 'fonts')
html_files = ['OpenLP.ttf', 'openlp-charmap.json']
os.makedirs(dst_dir)
for display_file in os.listdir(src_dir)
src = os.path.join(src_dir, display_file)
dst = os.path.join(dest_dir, display_file)
copy(src, dst)
def copy_extra_files(self):
"""
@ -479,7 +496,8 @@ class Builder(object):
self.copy_default_theme()
self.copy_plugins()
self.copy_media_player()
self.copy_font()
self.copy_font_files()
self.copy_display_files()
if os.path.exists(self.manual_path):
self.run_sphinx()
else: