microproduct/dem-C-SAR/pyinstaller.spec

83 lines
2.4 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# -*- mode: python ; coding: utf-8 -*-
import sys
import shutil
import os
import tarfile
sys.setrecursionlimit(5000)
block_cipher = None
#######begin-<2D><><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>##############
#<23><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>tool<6F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><E6BBBB><EFBFBD><EFBFBD>ǰ·<C7B0><C2B7><EFBFBD>µ<EFBFBD>tool
# <20><><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>
cwdpath = os.getcwd()
tool_path = ''
src = '../tool'
des = os.path.join(cwdpath, "tool")
targz_path = os.path.join(cwdpath, "tool.tar.gz")
#<23><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
if os.path.exists(des):
if os.path.isdir(des):
shutil.rmtree(des)
os.makedirs(des)
<><D1B9>
dir = os.path.split(targz_path )[0]
if os.path.exists(dir) is False:
os.makedirs(dir)
with tarfile.open(targz_path, "w:gz") as tar:
tar.add(src, arcname=os.path.basename(src))
#<23><>ѹ
t = tarfile.open(targz_path)
t.extractall(path=cwdpath)
<><C9BE><EFBFBD><EFBFBD>ʱѹ<CAB1><D1B9><EFBFBD><EFBFBD>
#os.remove(targz_path)
#<23><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
main_name = ''
for name in os.listdir(cwdpath):
if 'Main.py' in name:
main_name = name
exe_name = exe_name = main_name .split('.')[0][:-4] + '-C-SAR-V2.1'
#######end-<2D><><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>##############
a = Analysis(['DemMain.py',
'./tool/algorithm/algtools/CoordinateTransformation.py',
'./tool/algorithm/algtools/DEMJoint.py',
'./tool/algorithm/algtools/logHandler.py',
'./tool/algorithm/algtools/MetaDataHandler.py',
'./tool/algorithm/algtools/PreProcess.py',
'./tool/algorithm/algtools/ROIAlg.py',
'./tool/algorithm/algtools/ScatteringAuxData.py',
'./tool/algorithm/block/blockprocess.py',
'./tool/algorithm/image/ImageHandle.py',
'./tool/algorithm/xml/AlgXmlHandle.py',
'./tool/algorithm/xml/CreatMetafile.py',
'./tool/config/ConfigeHandle.py'],
pathex=[cwdpath],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Dem-C-SAR-V2.1',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )