-
Notifications
You must be signed in to change notification settings - Fork 3
/
tilia.spec
77 lines (66 loc) · 1.96 KB
/
tilia.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- mode: python ; coding: utf-8 -*-
import argparse
from pathlib import Path
import tilia.constants
parser = argparse.ArgumentParser()
parser.add_argument("--debug", action="store_true")
options = parser.parse_args()
options = parser.parse_args()
a = Analysis(
["./tilia/main.py"],
pathex=[],
binaries=None,
datas=[
("./README.md", "."),
("./LICENSE", "."),
("./tilia/ui/img", "./tilia/ui/img/"),
("./tilia/ui/fonts", "./tilia/ui/fonts/"),
("./tilia/media/player/youtube.html", "./tilia/media/player/"),
("./tilia/media/player/youtube.css", "./tilia/media/player/"),
],
hiddenimports=[],
hookspath=None,
runtime_hooks=None,
excludes=None,
)
pyz = PYZ(a.pure)
if options.debug:
exe = EXE(
pyz,
a.scripts,
name="tilia-" + tilia.constants.VERSION,
console=True,
embed_manifest=True,
exclude_binaries=True,
icon=Path("tilia", "ui", "img", "main_icon.ico").resolve().__str__(),
)
coll = COLLECT(exe, a.datas, a.binaries, name="TiLiA")
else:
exe = EXE(
pyz,
a.scripts,
a.datas,
a.binaries,
name="tilia-" + tilia.constants.VERSION,
console=False,
embed_manifest=True,
icon=Path("tilia", "ui", "img", "main_icon.ico").resolve().__str__(),
)
app = BUNDLE(
exe,
name='TiLiA.app',
icon=Path("tilia", "ui", "img", "main_icon.ico").resolve().__str__(),
version=tilia.constants.VERSION,
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
'CFBundleDocumentTypes': [
{
'CFBundleTypeName': 'My File Format',
'CFBundleTypeIconFile': 'MyFileIcon.icns',
'LSItemContentTypes': ['com.example.myformat'],
'LSHandlerRank': 'Owner'
}
]
},
)