pibox-installer-macos.spec 1.85 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
rgaudin's avatar
rgaudin committed
5
6
sys.path += [os.path.join(os.getcwd(), 'pibox-installer')]
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
14

a = Analysis(['pibox-installer/__main__.py'],
             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', '.'),
thiolliere's avatar
thiolliere committed
18
                    ('pibox-installer-logo.png', '.'),
thiolliere's avatar
thiolliere committed
19
                    ('ansiblecube', 'ansiblecube'),
thiolliere's avatar
thiolliere committed
20
                    ('pibox-installer-vexpress-boot', 'pibox-installer-vexpress-boot')],
rgaudin's avatar
rgaudin committed
21
             hiddenimports=['gui', 'cli', 'image'],
thiolliere's avatar
thiolliere committed
22
             hookspath=['additional-hooks'],
user's avatar
user committed
23
24
25
26
27
28
29
30
31
             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
32
          exclude_binaries=True,
33
          name='kiwix-plug_installer',
user's avatar
user committed
34
35
36
          debug=False,
          strip=False,
          upx=True,
thiolliere's avatar
thiolliere committed
37
          console=False)
thiolliere's avatar
thiolliere committed
38
39
40
41
42
43
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
44
               name='kiwix-plug_installer')
thiolliere's avatar
thiolliere committed
45
app = BUNDLE(coll,
46
             name='kiwix-plug_installer.app',
thiolliere's avatar
thiolliere committed
47
             icon='pibox-installer-logo.icns',
rgaudin's avatar
rgaudin committed
48
49
50
51
52
53
54
             bundle_identifier='org.kiwix.plug',
             info_plist={
                 'CFBundleDisplayName': 'Kiwix-plug installer',
                 'CFBundleShortVersionString': get_version_str(),
                 'CFBundleVersion': get_short_version_str(),
                 'NSHumanReadableCopyright': 'Kiwix'
              })