File tree Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Original file line number Diff line number Diff line change 1
1
# -*- mode: python ; coding: utf-8 -*-
2
- from PyInstaller .utils .hooks import collect_all
3
-
4
- datas = []
5
- binaries = []
6
- hiddenimports = ['plyer.platforms.win.notification' ]
7
- tmp_ret = collect_all ('readchar' )
8
- datas += tmp_ret [0 ]; binaries += tmp_ret [1 ]; hiddenimports += tmp_ret [2 ]
2
+ from PyInstaller .utils .hooks import copy_metadata
3
+ import platform
9
4
5
+ datas = copy_metadata ("readchar" )
6
+ if platform .system () == "Windows" :
7
+ name = "BHYG-Windows"
8
+ elif platform .system () == "Linux" :
9
+ name = "BHYG-Linux"
10
+ elif platform .system () == "Darwin" :
11
+ print (platform .machine ())
12
+ if "arm" in platform .machine ():
13
+ name = "BHYG-macOS-Apple_Silicon"
14
+ elif "64" in platform .machine ():
15
+ name = "BHYG-macOS-Intel"
16
+ else :
17
+ name = "BHYG-macOS"
18
+ else :
19
+ name = "BHYG"
10
20
11
21
a = Analysis (
12
22
['main.py' ],
13
23
pathex = [],
14
- binaries = binaries ,
24
+ binaries = [] ,
15
25
datas = datas ,
16
- hiddenimports = hiddenimports ,
26
+ hiddenimports = [] ,
17
27
hookspath = [],
18
28
hooksconfig = {},
19
29
runtime_hooks = [],
20
- excludes = ['PyQt5' ],
30
+ excludes = [],
21
31
noarchive = False ,
22
32
optimize = 0 ,
23
33
)
@@ -29,7 +39,7 @@ exe = EXE(
29
39
a .binaries ,
30
40
a .datas ,
31
41
[],
32
- name = 'main' ,
42
+ name = name ,
33
43
debug = False ,
34
44
bootloader_ignore_signals = False ,
35
45
strip = False ,
You can’t perform that action at this time.
0 commit comments