dll filer
This commit is contained in:
@@ -2,10 +2,32 @@
|
|||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
|
import os, glob
|
||||||
|
|
||||||
|
# Find VLC installation
|
||||||
|
VLC_PATH = None
|
||||||
|
for _p in [
|
||||||
|
r'C:\Program Files\VideoLAN\VLC',
|
||||||
|
r'C:\Program Files (x86)\VideoLAN\VLC',
|
||||||
|
]:
|
||||||
|
if os.path.exists(os.path.join(_p, 'libvlc.dll')):
|
||||||
|
VLC_PATH = _p
|
||||||
|
break
|
||||||
|
|
||||||
|
VLC_BINARIES = []
|
||||||
|
if VLC_PATH:
|
||||||
|
VLC_BINARIES = [
|
||||||
|
(os.path.join(VLC_PATH, 'libvlc.dll'), '.'),
|
||||||
|
(os.path.join(VLC_PATH, 'libvlccore.dll'), '.'),
|
||||||
|
]
|
||||||
|
for _dll in glob.glob(os.path.join(VLC_PATH, 'plugins', '**', '*.dll'), recursive=True):
|
||||||
|
_rel = os.path.relpath(os.path.dirname(_dll), VLC_PATH)
|
||||||
|
VLC_BINARIES.append((_dll, _rel))
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['main.py'],
|
['main.py'],
|
||||||
pathex=['.'],
|
pathex=['.'],
|
||||||
binaries=[],
|
binaries=VLC_BINARIES,
|
||||||
datas=[
|
datas=[
|
||||||
('translations', 'translations'),
|
('translations', 'translations'),
|
||||||
],
|
],
|
||||||
@@ -20,7 +42,7 @@ a = Analysis(
|
|||||||
'ui.scan_worker', 'ui.bpm_worker', 'ui.tag_editor',
|
'ui.scan_worker', 'ui.bpm_worker', 'ui.tag_editor',
|
||||||
'ui.settings_dialog', 'ui.playlist_browser',
|
'ui.settings_dialog', 'ui.playlist_browser',
|
||||||
'ui.playlist_info_dialog', 'ui.dance_info_dialog',
|
'ui.playlist_info_dialog', 'ui.dance_info_dialog',
|
||||||
'ui.dance_picker_dialog', 'ui.share_dialog',
|
'ui.dance_picker_dialog', 'ui.alt_dance_picker_dialog', 'ui.share_dialog',
|
||||||
'ui.register_dialog',
|
'ui.register_dialog',
|
||||||
'player.player',
|
'player.player',
|
||||||
'local.local_db', 'local.scanner', 'local.file_watcher',
|
'local.local_db', 'local.scanner', 'local.file_watcher',
|
||||||
|
|||||||
@@ -8,13 +8,16 @@ Start:
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
if getattr(sys, 'frozen', False):
|
|
||||||
# Kørende som PyInstaller .exe — sæt VLC sti til app-mappen
|
|
||||||
_app_dir = os.path.dirname(sys.executable)
|
|
||||||
os.environ.setdefault("VLC_PLUGIN_PATH", os.path.join(_app_dir, "plugins"))
|
|
||||||
|
|
||||||
APP_VERSION = "0.9.5"
|
APP_VERSION = "0.9.5"
|
||||||
|
|
||||||
|
# VLC setup — skal ske FØR vlc importeres
|
||||||
|
if getattr(sys, 'frozen', False):
|
||||||
|
_app_dir = os.path.dirname(sys.executable)
|
||||||
|
_libvlc = os.path.join(_app_dir, 'libvlc.dll')
|
||||||
|
if os.path.exists(_libvlc):
|
||||||
|
os.environ['PYTHON_VLC_LIB_PATH'] = _libvlc
|
||||||
|
os.environ['VLC_PLUGIN_PATH'] = os.path.join(_app_dir, 'plugins')
|
||||||
|
|
||||||
sys.path.insert(0, os.path.dirname(__file__))
|
sys.path.insert(0, os.path.dirname(__file__))
|
||||||
|
|
||||||
from app_logger import setup_logging
|
from app_logger import setup_logging
|
||||||
@@ -63,4 +66,4 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
Reference in New Issue
Block a user