forked from overfl0/Bulletproof-Arma-Launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlauncher.spec
43 lines (35 loc) · 1.35 KB
/
launcher.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
# -*- mode: python -*-
# Needed for generating the build number
import site
site.addsitedir(os.path.join(os.getcwd(), 'src', 'utils'))
site.addsitedir(os.path.join(os.getcwd(), 'src'))
import launcher_config
import os
import primitive_git
from kivy.deps import sdl2, glew
# Create the build number
primitive_git.save_git_sha1_to_file('.', primitive_git.build_sha1_file)
config_dir = 'resources/{}'.format(launcher_config.config_select.config_dir)
hiddenimports=[]
hiddenimports.append('importlib') # Kivy 1.9.2
hiddenimports.append('_cffi_backend') # Paramiko (cryptography)
a = Analysis(['src/launcher.py'],
hiddenimports=hiddenimports)
# Add the build number
a.datas += [(primitive_git.build_sha1_file, primitive_git.build_sha1_file, 'DATA')]
pyz = PYZ(a.pure)
exe = EXE(pyz,
Tree('./src', prefix='src', excludes=['*.pyc']),
Tree(config_dir, prefix='resources'), # resources/<name> directory contents
Tree('./common_resources', prefix='common_resources'),
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='{}.exe'.format(launcher_config.executable_name),
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
debug=False,
strip=None,
upx=True,
icon=os.path.join(config_dir, launcher_config.icon),
console=False )