ogagent/src/OGAgent.spec

103 lines
2.6 KiB
Python

# -*- mode: python ; coding: utf-8 -*-
## generated on windows using:
## pyi-makespec.exe --windowed --icon img\oga.ico --manifest OGAgent.manifest OGAgentUser.py opengnsys\windows\OGAgentService.py
## move OGAgentUser.spec OGAgent.spec
ogausr_a = Analysis(
['OGAgentUser.py'],
pathex=[],
binaries=[],
datas=[
# ('cfg', 'cfg'), ## add the entire directory
('img', 'img'), ## add the entire directory
],
hiddenimports=['win32timezone', 'socketserver', 'http.server', 'urllib', 'opengnsys.modules.client.OpenGnSys', 'opengnsys.modules.server.ogAdmClient', 'opengnsys.modules.server.OpenGnSys'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
ogasvc_a = Analysis(
['opengnsys\\windows\\OGAgentService.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=['win32timezone', 'socketserver', 'http.server', 'urllib', 'opengnsys.modules.client.OpenGnSys', 'opengnsys.modules.server.ogAdmClient', 'opengnsys.modules.server.OpenGnSys'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
MERGE(
(ogausr_a, 'OGAgentUser', 'OGAgentUser'), ## class, py name, exe name
(ogasvc_a, 'OGAgentService', 'OGAgentService')
)
ogausr_pyz = PYZ(ogausr_a.pure)
ogasvc_pyz = PYZ(ogasvc_a.pure)
ogausr_exe = EXE(
ogausr_pyz,
ogausr_a.scripts,
[],
exclude_binaries=True,
name='OGAgentUser',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['img\\oga.ico'],
)
ogasvc_exe = EXE(
ogasvc_pyz,
ogasvc_a.scripts,
[],
exclude_binaries=True,
name='OGAgentService',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['img\\oga.ico'],
manifest='OGAgent.manifest',
)
dist_name = 'OGAgent'
coll = COLLECT(
ogausr_exe,
ogausr_a.binaries,
ogausr_a.datas,
ogasvc_exe,
ogasvc_a.binaries,
ogasvc_a.datas,
strip=False,
upx=True,
upx_exclude=[],
name=dist_name,
)
import shutil
shutil.copytree ('cfg', '{}/{}/cfg'. format(DISTPATH, dist_name))
shutil.copy ('stop-agent.ps1', '{}/{}/stop-agent.ps1'.format(DISTPATH, dist_name))