Commit 7ac76301 authored by wanli's avatar wanli

update

parent 3179b817
......@@ -107,9 +107,10 @@ class AppsManager(object):
if result and len(result):
temp = []
for item in result:
t = item.to_dict(with_collections=True, related_objects=True, exclude=["app_annex", "app_build_log", "app_download", "is_delete", "delete_by", "delete_at"])
t = item.to_dict(with_collections=True, related_objects=True, exclude=["app_annex", "app_download", "is_delete", "delete_by", "delete_at"])
t.update({
"app_icon": item.app_icon.to_dict(only=["path"]),
# "app_build_log": item.app_build_log.to_dict(only=["app_path"]),
"create_by": item.create_by.to_dict(only=["uuid", "username"]),
"update_by": item.update_by.to_dict(only=["uuid", "username"]),
"create_at": item.create_at.strftime("%Y-%m-%d %H:%M:%S") if item.create_at else None,
......
......@@ -96,13 +96,17 @@ class DownloadManager(object):
# 判断应用UUID是否等于evue_launcher
if data.get("id") == "evue_launcher":
# 读取evue_launcher.evue和evue_dock.evue以及相关资源文件
launcher_file = Framework.get(name="evue_launcher")
if not launcher_file:
return False, "evue_launcher not found"
dock_file = Framework.get(name="evue_dock")
if not dock_file:
return False, "evue_launcher not found"
# launcher_file = Apps.get(name="evue_launcher")
# if not launcher_file:
# launcher_file = Framework.get(name="evue_launcher")
# if not launcher_file:
# return False, "evue_launcher not found"
# else:
# launcher_file = launcher_file.annex
# dock_file = Framework.get(name="evue_dock")
# if not dock_file:
# return False, "evue_launcher not found"
# 按照格式创建文件夹
dir_format = datetime.now().strftime("%Y%m%d%H%M%S")
......@@ -114,17 +118,17 @@ class DownloadManager(object):
if not os.path.exists(build_source_path):
os.mkdir(build_source_path)
target_path = launcher_file.assets.get("files", []) + dock_file.assets.get("files", [])
# 将取evue_launcher.evue和evue_dock.evue以及相关资源文件复制到这个目录下
for f in target_path:
tf = convert_url_to_local_path(f)
if not os.path.exists(tf):
return False, "{} not found".format(tf)
# target_path = launcher_file.assets.get("files", []) + dock_file.assets.get("files", [])
# # 将取evue_launcher.evue和evue_dock.evue以及相关资源文件复制到这个目录下
# for f in target_path:
# tf = convert_url_to_local_path(f)
# if not os.path.exists(tf):
# return False, "{} not found".format(tf)
filename = os.path.basename(tf)
name, suffix = os.path.splitext(filename)
name = re.sub(r"_\d{14}$", "", name)
shutil.copy(tf, os.sep.join([build_source_path, name + suffix]))
# filename = os.path.basename(tf)
# name, suffix = os.path.splitext(filename)
# name = re.sub(r"_\d{14}$", "", name)
# shutil.copy(tf, os.sep.join([build_source_path, name + suffix]))
temp = []
# 读取当前系统所有应用及其资源文件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment