aboutsummaryrefslogtreecommitdiff
path: root/music_sampler.spec
diff options
context:
space:
mode:
Diffstat (limited to 'music_sampler.spec')
-rw-r--r--music_sampler.spec25
1 files changed, 20 insertions, 5 deletions
diff --git a/music_sampler.spec b/music_sampler.spec
index 591a6cf..0d99dca 100644
--- a/music_sampler.spec
+++ b/music_sampler.spec
@@ -3,6 +3,11 @@ import os
3from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal,\ 3from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal,\
4 hookspath, runtime_hooks 4 hookspath, runtime_hooks
5 5
6import importlib.machinery
7sysfont = importlib.machinery\
8 .SourceFileLoader('sysfont', os.getcwd() + '/helpers/sysfont.py') \
9 .load_module()
10
6excluded_and_hidden_modules = get_deps_minimal( 11excluded_and_hidden_modules = get_deps_minimal(
7 video=None, 12 video=None,
8 camera=None, 13 camera=None,
@@ -22,16 +27,26 @@ pyinstaller_file = open(".pyinstaller_commit", "w")
22pyinstaller_file.write(commit_message) 27pyinstaller_file.write(commit_message)
23pyinstaller_file.close() 28pyinstaller_file.close()
24 29
30data = [
31 ('music_sampler.kv', '.'),
32 ('.pyinstaller_commit', '.')
33]
34
25a = Analysis(['music_sampler.py'], 35a = Analysis(['music_sampler.py'],
26 binaries=None, 36 binaries=None,
27 datas=[ 37 datas=data,
28 ('fonts/*', 'fonts'),
29 ('music_sampler.kv', '.'),
30 ('.pyinstaller_commit', '.')
31 ],
32 hookspath=hookspath(), 38 hookspath=hookspath(),
33 runtime_hooks=runtime_hooks(), 39 runtime_hooks=runtime_hooks(),
34 **excluded_and_hidden_modules) 40 **excluded_and_hidden_modules)
41
42for fontname, style in [("Ubuntu", sysfont.STYLE_NORMAL), ("Ubuntu", sysfont.STYLE_BOLD), ("Symbola", sysfont.STYLE_NONE)]:
43 font = sysfont.get_font(fontname, style=style)
44 a.datas.append((
45 'fonts/{}_{}.ttf'.format(fontname, style),
46 font[4],
47 'DATA'
48 ))
49
35pyz = PYZ(a.pure, a.zipped_data) 50pyz = PYZ(a.pure, a.zipped_data)
36 51
37# Single file 52# Single file