Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 3af986e

Browse files
committed
Added spec file for PyInstaller
1 parent 549cc40 commit 3af986e

2 files changed

Lines changed: 71 additions & 1 deletion

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ MANIFEST
2929
# Usually these files are written by a python script from a template
3030
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3131
*.manifest
32-
*.spec
3332

3433
# Installer logs
3534
pip-log.txt

elpcd.spec

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
app_name = 'ElPCD v0.4 Beta'
4+
5+
from kivymd import hooks_path as kivymd_hooks_path
6+
7+
import os
8+
import platform
9+
10+
path = os.path.abspath('.')
11+
12+
datas = [
13+
(os.path.join(path, 'elpcd.kv'),'.'),
14+
(os.path.join(path, 'lib', '*.py'), f'lib{os.sep}'),
15+
(os.path.join(path, 'lib', 'py', '*.py'), f'lib{os.sep}py{os.sep}'),
16+
(os.path.join(path, 'lib', 'kv', '*.kv'), f'lib{os.sep}kv{os.sep}'),
17+
(os.path.join(path, 'assets', '*.png'), f'assets{os.sep}'),
18+
]
19+
20+
a = Analysis(
21+
['main.py'],
22+
pathex=[path],
23+
binaries=[],
24+
datas=datas,
25+
hiddenimports=[
26+
'kivymd.uix.managerswiper',
27+
'kivymd.uix.datatables',
28+
'kivymd.stiffscroll'
29+
],
30+
hookspath=[kivymd_hooks_path],
31+
runtime_hooks=[],
32+
excludes=[],
33+
win_no_prefer_redirects=False,
34+
win_private_assemblies=False,
35+
cipher=None,
36+
noarchive=False
37+
)
38+
pyz = PYZ(
39+
a.pure,
40+
a.zipped_data,
41+
cipher=None
42+
)
43+
exe = EXE(
44+
pyz,
45+
a.scripts,
46+
a.binaries,
47+
a.zipfiles,
48+
a.datas,
49+
[],
50+
name=app_name,
51+
debug=False,
52+
bootloader_ignore_signals=False,
53+
strip=False,
54+
upx=True,
55+
upx_exclude=[],
56+
runtime_tmpdir=None,
57+
console=False,
58+
icon=os.path.join(path, 'elpcd192x.ico')
59+
)
60+
61+
if platform.system() == 'Windows':
62+
from kivy_deps import glew, angle, sdl2
63+
coll = COLLECT(
64+
exe,
65+
a.binaries,
66+
a.zipfiles,
67+
a.datas,
68+
*[Tree(p) for p in (glew.dep_bins + angle.dep_bins + sdl2.dep_bins)],
69+
strip=False,
70+
upx=True,
71+
)

0 commit comments

Comments
 (0)