Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
e23c4d69
Commit
e23c4d69
authored
Aug 10, 2009
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python-ctypes: improve win32 initialization (contrib from <mmuellen@gmx.de>)
parent
10d4cfc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
bindings/python-ctypes/header.py
bindings/python-ctypes/header.py
+20
-5
No files found.
bindings/python-ctypes/header.py
View file @
e23c4d69
...
...
@@ -46,11 +46,26 @@ elif sys.platform == 'win32':
plugin_path
=
None
path
=
ctypes
.
util
.
find_library
(
'libvlc.dll'
)
if
path
is
None
:
# Try a standard location.
p
=
'c:
\
\
Program Files
\
\
VideoLAN
\
\
VLC
\
\
libvlc.dll'
if
os
.
path
.
exists
(
p
):
plugin_path
=
os
.
path
.
dirname
(
p
)
os
.
chdir
(
plugin_path
)
# Try to use registry settings
import
_winreg
plugin_path_found
=
None
subkey
,
name
=
'Software
\
\
VideoLAN
\
\
VLC'
,
'InstallDir'
for
hkey
in
_winreg
.
HKEY_LOCAL_MACHINE
,
_winreg
.
HKEY_CURRENT_USER
:
try
:
reg
=
_winreg
.
OpenKey
(
hkey
,
subkey
)
plugin_path_found
,
type_id
=
_winreg
.
QueryValueEx
(
reg
,
name
)
_winreg
.
CloseKey
(
reg
)
break
except
_winreg
.
error
:
pass
if
plugin_path_found
:
plugin_path
=
plugin_path_found
else
:
# Try a standard location.
p
=
'c:
\
\
Program Files
\
\
VideoLAN
\
\
VLC
\
\
libvlc.dll'
if
os
.
path
.
exists
(
p
):
plugin_path
=
os
.
path
.
dirname
(
p
)
os
.
chdir
(
plugin_path
)
# If chdir failed, this will not work and raise an exception
path
=
'libvlc.dll'
else
:
...
...
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