代码拉取完成,页面将自动刷新
同步操作将从 老张/TdxTradeServer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import shutil
import datetime
import time
qt_version = "5_9_1"
def p(s):
now = datetime.datetime.now()
nowstr = str(now)
print(nowstr + " > " + s)
def get_version(bpath):
with open(bpath + "\\ChangeLog.md", 'rb') as f:
ver = f.readline().split(b" ")[0]
build_ver = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
full_ver = ver.decode("utf-8") + "_" + build_ver
return full_ver
return None
if __name__ == "__main__":
bpath = os.path.dirname(os.path.abspath(__file__))
ver = get_version(bpath)
if ver is None:
p("version get error , check ChangeLog.md file's format")
raise Exception("Bye!")
archive_name = "TdxTradeServer-" + ver
p("building version: " + archive_name)
package_build_path = os.path.join(bpath, "package_build_path")
out_path = os.path.join(package_build_path, "out")
files_path = os.path.join(package_build_path, "files")
p("cleaning build path...")
shutil.rmtree(package_build_path, ignore_errors=True)
p("done")
p("making build path...")
os.mkdir(package_build_path)
os.mkdir(out_path)
os.mkdir(files_path)
p("cp all dependencies...")
[shutil.copy( os.path.join(os.path.join(bpath, "debug_version_dependencies"), s), files_path) for s in os.listdir( os.path.join(bpath, "debug_version_dependencies"))]
p("cp exe file...")
exec_path = os.path.join(os.path.dirname(bpath), "build-TdxTradeServer-Desktop_Qt_" + qt_version + "_MSVC2015_32bit-Debug") + "\\debug\\TdxTradeServer.exe"
if os.path.exists(exec_path):
[shutil.copy(exec_path, files_path)]
p("make zip file...")
os.chdir(out_path)
shutil.make_archive(archive_name, "zip", root_dir=files_path, base_dir=".")
p("Done!")
else:
p("exe file not found" + exec_path)
p("FAILED!")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。