Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
accessibility_movie_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
赵心治
accessibility_movie_2
Commits
a5f36591
Commit
a5f36591
authored
Aug 11, 2023
by
smile2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查C盘依赖文件
parent
7858fbdc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
.gitignore
.gitignore
+1
-0
start.py
start.py
+17
-4
No files found.
.gitignore
View file @
a5f36591
...
...
@@ -8,3 +8,4 @@ easyOCR_usage.py
dist
build
log
product_test
start.py
View file @
a5f36591
...
...
@@ -15,8 +15,10 @@ import winreg
os
.
environ
[
'PYQTGRAPH_QT_LIB'
]
=
'PyQt5'
project_path
=
None
# 检查
def
is_lav_filters_installed
():
"""检查注册表是否注册成功
"""
try
:
# 检查注册表LAVSplitter.ax
with
winreg
.
OpenKey
(
winreg
.
HKEY_LOCAL_MACHINE
,
r"SOFTWARE\Classes\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{171252A0-8820-4AFE-9DF8-5C92B2D66B04}"
,
0
,
winreg
.
KEY_READ
)
as
key
:
...
...
@@ -30,7 +32,18 @@ def is_lav_filters_installed():
return
True
except
FileNotFoundError
:
return
False
def
is_file_copyed
():
"""检查文件是否复制成功到C:
\
LavFilters下
"""
dir_path
=
"C:
\
LavFilters"
if
os
.
path
.
exists
(
dir_path
):
file_list
=
[
'avcodec-lav-59.dll'
,
'avfilter-lav-8.dll'
,
'avformat-lav-59.dll'
,
'avutil-lav-57.dll'
,
'COPYING'
,
'install_audio.bat'
,
'install_splitter.bat'
,
'install_video.bat'
,
'IntelQuickSyncDecoder.dll'
,
'LAVAudio.ax'
,
'LAVFilters.Dependencies.manifest'
,
'LAVSplitter.ax'
,
'LAVVideo.ax'
,
'libbluray.dll'
,
'swresample-lav-4.dll'
,
'swscale-lav-6.dll'
,
'uninstall_audio.bat'
,
'uninstall_splitter.bat'
,
'uninstall_video.bat'
]
flag
=
True
for
file
in
file_list
:
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
dir_path
,
file
)):
print
(
file
)
flag
=
False
return
flag
def
change_project_path
(
path
):
"""用于切换当前工程路径
...
...
@@ -42,8 +55,8 @@ def change_project_path(path):
if
__name__
==
'__main__'
:
try
:
subprocess
.
call
([
'deploy.bat'
])
if
is_lav_filters_installed
()
==
True
:
#
subprocess.call(['deploy.bat'])
if
not
is_lav_filters_installed
()
or
not
is_file_copyed
()
:
QCoreApplication
.
setAttribute
(
Qt
.
AA_EnableHighDpiScaling
)
QCoreApplication
.
setAttribute
(
Qt
.
AA_UseHighDpiPixmaps
)
app
=
QApplication
(
sys
.
argv
)
...
...
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