Skip to content

Commit

Permalink
can I find vlc libs for linux?
Browse files Browse the repository at this point in the history
  • Loading branch information
ozankaraali committed May 19, 2024
1 parent 30fb2f3 commit 5efa631
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions qitv-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,27 @@ import site
import os

PACKAGES_PATH = site.getsitepackages()[0]
VLC_PATH = '/usr/lib/x86_64-linux-gnu/' # Adjust this path if necessary
# Attempt to locate VLC library files in common directories
VLC_PATHS = [
'/usr/lib/x86_64-linux-gnu',
'/usr/lib', # Try this common path as a fallback
'/usr/lib64' # Another common path on some distributions
]
found_vlc_paths = []

# Check if the VLC libraries exist in any of the specified paths
for path in VLC_PATHS:
if os.path.exists(os.path.join(path, 'libvlc.so')):
found_vlc_paths.append((os.path.join(path, 'libvlc.so'), '.'))
if os.path.exists(os.path.join(path, 'libvlccore.so')):
found_vlc_paths.append((os.path.join(path, 'libvlccore.so'), '.'))

block_cipher = None

a = Analysis(
['main.py'],
pathex=[],
binaries=[
(os.path.join(VLC_PATH, 'libvlc.so'), '.'),
(os.path.join(VLC_PATH, 'libvlccore.so'), '.'),
],
binaries=found_vlc_paths,
datas=[
('assets/qitv.png', 'assets/qitv.png')
],
Expand Down

0 comments on commit 5efa631

Please sign in to comment.