Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
way
2025-12-10 14:03:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
65304d01c18bdcf2b87f7c5fa7a6e533de9d09ad
65304d01
1 parent
abc5227b
找GTK默认路径时,跳过加密/不存在的盘
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
ReportEngine/utils/dependency_check.py
ReportEngine/utils/dependency_check.py
View file @
65304d0
...
...
@@ -141,14 +141,19 @@ def _ensure_windows_gtk_paths():
]
# 常见自定义安装位置(其他盘符 / DevelopSoftware 目录)
# common_drives = ["C", "D", "E", "F"]
common_drives
=
[
"C"
,
"E"
,
"F"
]
common_drives
=
[
"C"
,
"D"
,
"E"
,
"F"
]
common_names
=
[
"GTK3-Runtime Win64"
,
"GTK3-Runtime Win32"
,
"GTK3-Runtime"
]
for
drive
in
common_drives
:
root
=
Path
(
f
"{drive}:/"
)
for
name
in
common_names
:
default_dirs
.
append
(
root
/
name
)
default_dirs
.
append
(
root
/
"DevelopSoftware"
/
name
)
# 检测路径是否存在并可访问
try
:
if
root
.
exists
():
for
name
in
common_names
:
default_dirs
.
append
(
root
/
name
)
default_dirs
.
append
(
root
/
"DevelopSoftware"
/
name
)
except
OSError
as
e
:
# print(f'盘{drive}不存在或被加密,已跳过')
pass
# 扫描 Program Files 下所有以 GTK 开头的目录,适配自定义安装目录名
for
root
in
(
program_files
,
program_files_x86
):
...
...
Please
register
or
login
to post a comment