1 | # -*- mode: python ; coding: utf-8 -*- |
---|
2 | |
---|
3 | ## generated on windows using: |
---|
4 | ## pyi-makespec.exe --windowed --icon img\oga.ico --manifest OGAgent.manifest OGAgentUser.py opengnsys\windows\OGAgentService.py |
---|
5 | ## move OGAgentUser.spec OGAgent.spec |
---|
6 | |
---|
7 | |
---|
8 | ogausr_a = Analysis( |
---|
9 | ['OGAgentUser.py'], |
---|
10 | pathex=[], |
---|
11 | binaries=[], |
---|
12 | datas=[ |
---|
13 | # ('cfg', 'cfg'), ## add the entire directory |
---|
14 | ('img', 'img'), ## add the entire directory |
---|
15 | ], |
---|
16 | hiddenimports=['win32timezone', 'socketserver', 'http.server', 'urllib'], |
---|
17 | hookspath=[], |
---|
18 | hooksconfig={}, |
---|
19 | runtime_hooks=[], |
---|
20 | excludes=[], |
---|
21 | noarchive=False, |
---|
22 | optimize=0, |
---|
23 | ) |
---|
24 | ogasvc_a = Analysis( |
---|
25 | ['opengnsys\\windows\\OGAgentService.py'], |
---|
26 | pathex=[], |
---|
27 | binaries=[], |
---|
28 | datas=[], |
---|
29 | hiddenimports=['win32timezone', 'socketserver', 'http.server', 'urllib'], |
---|
30 | hookspath=[], |
---|
31 | hooksconfig={}, |
---|
32 | runtime_hooks=[], |
---|
33 | excludes=[], |
---|
34 | noarchive=False, |
---|
35 | optimize=0, |
---|
36 | ) |
---|
37 | |
---|
38 | MERGE( |
---|
39 | (ogausr_a, 'OGAgentUser', 'OGAgentUser'), ## class, py name, exe name |
---|
40 | (ogasvc_a, 'OGAgentService', 'OGAgentService') |
---|
41 | ) |
---|
42 | |
---|
43 | ogausr_pyz = PYZ(ogausr_a.pure) |
---|
44 | ogasvc_pyz = PYZ(ogasvc_a.pure) |
---|
45 | |
---|
46 | ogausr_exe = EXE( |
---|
47 | ogausr_pyz, |
---|
48 | ogausr_a.scripts, |
---|
49 | [], |
---|
50 | exclude_binaries=True, |
---|
51 | name='OGAgentUser', |
---|
52 | debug=False, |
---|
53 | bootloader_ignore_signals=False, |
---|
54 | strip=False, |
---|
55 | upx=True, |
---|
56 | console=False, |
---|
57 | disable_windowed_traceback=False, |
---|
58 | argv_emulation=False, |
---|
59 | target_arch=None, |
---|
60 | codesign_identity=None, |
---|
61 | entitlements_file=None, |
---|
62 | icon=['img\\oga.ico'], |
---|
63 | ) |
---|
64 | ogasvc_exe = EXE( |
---|
65 | ogasvc_pyz, |
---|
66 | ogasvc_a.scripts, |
---|
67 | [], |
---|
68 | exclude_binaries=True, |
---|
69 | name='OGAgentService', |
---|
70 | debug=False, |
---|
71 | bootloader_ignore_signals=False, |
---|
72 | strip=False, |
---|
73 | upx=True, |
---|
74 | console=True, |
---|
75 | disable_windowed_traceback=False, |
---|
76 | argv_emulation=False, |
---|
77 | target_arch=None, |
---|
78 | codesign_identity=None, |
---|
79 | entitlements_file=None, |
---|
80 | icon=['img\\oga.ico'], |
---|
81 | manifest='OGAgent.manifest', |
---|
82 | ) |
---|
83 | |
---|
84 | dist_name = 'OGAgent' |
---|
85 | coll = COLLECT( |
---|
86 | ogausr_exe, |
---|
87 | ogausr_a.binaries, |
---|
88 | ogausr_a.datas, |
---|
89 | |
---|
90 | ogasvc_exe, |
---|
91 | ogasvc_a.binaries, |
---|
92 | ogasvc_a.datas, |
---|
93 | |
---|
94 | strip=False, |
---|
95 | upx=True, |
---|
96 | upx_exclude=[], |
---|
97 | name=dist_name, |
---|
98 | ) |
---|
99 | |
---|
100 | import shutil |
---|
101 | shutil.copytree ('cfg', '{}/{}/cfg'.format(DISTPATH, dist_name)) |
---|