kiwix-hotspot-macos.spec 1.97 KB
Newer Older
user's avatar
user committed
1
# -*- mode: python -*-
rgaudin's avatar
rgaudin committed
2
3
import os
import sys
thiolliere's avatar
thiolliere committed
4
import subprocess
5
sys.path += [os.path.join(os.getcwd(), 'kiwix-hotspot')]
rgaudin's avatar
rgaudin committed
6
from version import get_version_str, get_short_version_str
user's avatar
user committed
7

thiolliere's avatar
thiolliere committed
8
9
output = subprocess.check_output(["ls", "qemu"])
files = output.decode('utf-8').splitlines()
user's avatar
user committed
10

thiolliere's avatar
thiolliere committed
11
block_cipher = None
user's avatar
user committed
12

13
a = Analysis(['kiwix-hotspot/__main__.py'],
user's avatar
user committed
14
             pathex=['.'],
thiolliere's avatar
thiolliere committed
15
             binaries=[("qemu/" + file, '.') for file in files],
thiolliere's avatar
thiolliere committed
16
             datas=[('ui.glade', '.'),
rgaudin's avatar
rgaudin committed
17
                    ('contents.json', '.'),
rgaudin's avatar
rgaudin committed
18
                    ('etcher.gif', '.'),
19
                    ('kiwix-hotspot-logo.png', '.'),
20
                    ('aria2c', '.'),
thiolliere's avatar
thiolliere committed
21
                    ('ansiblecube', 'ansiblecube'),
22
                    ('etcher-cli', 'etcher-cli'),
23
                    ('mbr.img', '.'),
24
                    ('vexpress-boot', 'vexpress-boot')],
25
             hiddenimports=['gui', 'cli', 'image', 'cache', 'wipe'],
thiolliere's avatar
thiolliere committed
26
             hookspath=['additional-hooks'],
user's avatar
user committed
27
28
29
30
31
32
33
34
35
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
thiolliere's avatar
thiolliere committed
36
          exclude_binaries=True,
37
          name='kiwix-hotspot',
user's avatar
user committed
38
39
40
          debug=False,
          strip=False,
          upx=True,
thiolliere's avatar
thiolliere committed
41
          console=False)
thiolliere's avatar
thiolliere committed
42
43
44
45
46
47
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
48
               name='kiwix-hotspot')
thiolliere's avatar
thiolliere committed
49
app = BUNDLE(coll,
50
             name='Kiwix Hotspot.app',
51
             icon='kiwix-hotspot-logo.icns',
rgaudin's avatar
rgaudin committed
52
             bundle_identifier='org.kiwix.hotspot',
rgaudin's avatar
rgaudin committed
53
             info_plist={
54
                 'CFBundleDisplayName': 'Kiwix Hotspot',
rgaudin's avatar
rgaudin committed
55
56
57
58
                 'CFBundleShortVersionString': get_version_str(),
                 'CFBundleVersion': get_short_version_str(),
                 'NSHumanReadableCopyright': 'Kiwix'
              })