Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
7ac76301
Commit
7ac76301
authored
Mar 16, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3179b817
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
18 deletions
+23
-18
backend/controller/apps_manager.py
backend/controller/apps_manager.py
+2
-1
backend/controller/download_manager.py
backend/controller/download_manager.py
+21
-17
No files found.
backend/controller/apps_manager.py
View file @
7ac76301
...
...
@@ -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
,
...
...
backend/controller/download_manager.py
View file @
7ac76301
...
...
@@ -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
)
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
]))
#
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]))
temp
=
[]
# 读取当前系统所有应用及其资源文件
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment