-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpdfapps.spec
More file actions
79 lines (73 loc) · 2.08 KB
/
pdfapps.spec
File metadata and controls
79 lines (73 loc) · 2.08 KB
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
75
76
77
78
79
# -*- mode: python ; coding: utf-8 -*-
import importlib, os, re
_qa = os.path.dirname(importlib.import_module('qtawesome').__file__)
# Read APP_VERSION from app/constants.py so the macOS bundle stays in sync.
with open('app/constants.py', encoding='utf-8') as _f:
_m = re.search(r'APP_VERSION\s*=\s*"([^"]+)"', _f.read())
_app_version = _m.group(1) if _m else '0.0.0'
a = Analysis(
['pdfapps.py'],
pathex=[],
binaries=[],
datas=[
('icon.ico', '.'),
('pdfapps.svg', '.'),
('app/translations.json', 'app'),
(os.path.join(_qa, 'fonts'), 'qtawesome/fonts'),
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='PDFApps',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['icon.ico'],
)
# macOS .app bundle (ignored on other platforms)
import sys as _sys
if _sys.platform == 'darwin':
_icon = 'icon.icns' if os.path.isfile('icon.icns') else 'icon.ico'
app = BUNDLE(
exe,
name='PDFApps.app',
icon=_icon,
bundle_identifier='com.pdfapps.app',
version=_app_version,
info_plist={
'CFBundleName': 'PDFApps',
'CFBundleDisplayName': 'PDFApps',
'CFBundleExecutable': 'PDFApps',
'CFBundleIdentifier': 'com.pdfapps.app',
'CFBundleVersion': _app_version,
'CFBundleShortVersionString': _app_version,
'LSMinimumSystemVersion': '10.14',
'NSHighResolutionCapable': True,
'CFBundleDocumentTypes': [{
'CFBundleTypeName': 'PDF Document',
'CFBundleTypeRole': 'Editor',
'LSItemContentTypes': ['com.adobe.pdf'],
}],
},
)