up
This commit is contained in:
parent
fbc84427d6
commit
ba65811129
15
.gitignore
vendored
15
.gitignore
vendored
@ -1,2 +1,17 @@
|
|||||||
|
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.egg-info/
|
||||||
|
*.egg
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
*.so
|
||||||
|
*.pyd
|
||||||
|
*.dll
|
||||||
|
*.dylib
|
||||||
|
*.lib
|
||||||
|
*.exp
|
||||||
|
*.ilk
|
||||||
|
*.pdb
|
@ -66,6 +66,12 @@ def run_config_selector(confList):
|
|||||||
print("请选择配置文件:")
|
print("请选择配置文件:")
|
||||||
for i, conf in enumerate(confList):
|
for i, conf in enumerate(confList):
|
||||||
print(f"{i+1}. {conf}")
|
print(f"{i+1}. {conf}")
|
||||||
choice = int(input("请输入选项:"))
|
temp = input("请输入选项:")
|
||||||
|
# 整数
|
||||||
|
if temp.isdigit():
|
||||||
|
choice = int(temp)
|
||||||
if choice in range(1, len(confList)+1):
|
if choice in range(1, len(confList)+1):
|
||||||
return confList[choice-1]
|
return confList[choice-1]
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
9
main.py
9
main.py
@ -6,10 +6,17 @@ import config as cfg
|
|||||||
def run():
|
def run():
|
||||||
# 读取配置文件
|
# 读取配置文件
|
||||||
conFigList = cfg.read_config_file()
|
conFigList = cfg.read_config_file()
|
||||||
if not conFigList: print('[没有找到配置文件]')
|
if not conFigList:
|
||||||
|
print('[没有找到配置文件]')
|
||||||
|
input('请按任意键退出...')
|
||||||
else:
|
else:
|
||||||
# 选择运行配置
|
# 选择运行配置
|
||||||
data = cfg.run_config_selector(conFigList)
|
data = cfg.run_config_selector(conFigList)
|
||||||
|
if not data:
|
||||||
|
os.system('cls')
|
||||||
|
print('[配置文件不存在]\n')
|
||||||
|
run()
|
||||||
|
else:
|
||||||
# 处理目录结构
|
# 处理目录结构
|
||||||
dirDict = cfg.config_dir_structure(data)
|
dirDict = cfg.config_dir_structure(data)
|
||||||
os.system('cls')
|
os.system('cls')
|
||||||
|
38
main.spec
Normal file
38
main.spec
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# -*- mode: python ; coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
||||||
|
a = Analysis(
|
||||||
|
['main.py'],
|
||||||
|
pathex=[],
|
||||||
|
binaries=[],
|
||||||
|
datas=[],
|
||||||
|
hiddenimports=[],
|
||||||
|
hookspath=[],
|
||||||
|
hooksconfig={},
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=[],
|
||||||
|
noarchive=False,
|
||||||
|
optimize=0,
|
||||||
|
)
|
||||||
|
pyz = PYZ(a.pure)
|
||||||
|
|
||||||
|
exe = EXE(
|
||||||
|
pyz,
|
||||||
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.datas,
|
||||||
|
[],
|
||||||
|
name='main',
|
||||||
|
debug=False,
|
||||||
|
bootloader_ignore_signals=False,
|
||||||
|
strip=False,
|
||||||
|
upx=True,
|
||||||
|
upx_exclude=[],
|
||||||
|
runtime_tmpdir=None,
|
||||||
|
console=True,
|
||||||
|
disable_windowed_traceback=False,
|
||||||
|
argv_emulation=False,
|
||||||
|
target_arch=None,
|
||||||
|
codesign_identity=None,
|
||||||
|
entitlements_file=None,
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user