# -*- mode: python ; coding: utf-8 -*- import sys import shutil import os import tarfile sys.setrecursionlimit(5000) block_cipher = None #######begin-���ǰ����############## #����һ����tool�ļ����滻����ǰ·���µ�tool # ���Դ��� cwdpath = os.getcwd() tool_path = '' src = '../tool' des = os.path.join(cwdpath, "tool") targz_path = os.path.join(cwdpath, "tool.tar.gz") #�����ļ��� if os.path.exists(des): if os.path.isdir(des): shutil.rmtree(des) os.makedirs(des) #ѹ�� 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)) #��ѹ t = tarfile.open(targz_path) t.extractall(path=cwdpath) #ɾ����ʱѹ���� #os.remove(targz_path) #�������� 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-���ǰ����############## 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 )