mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-31 05:10:45 -06:00
Call os.chdir() before importing vlc, only if we are running from source. Restore the original current dir after that. Changed wx.NewId() calls to wx.ID_ANY
This commit is contained in:
parent
f4e20f8ed4
commit
83612b6a3c
@ -47,9 +47,6 @@ if system == "Windows":
|
||||
arch="x64"
|
||||
os.environ['PYTHON_VLC_MODULE_PATH']=os.path.abspath(paths.app_path("..", "windows-dependencies", arch))
|
||||
os.environ['PYTHON_VLC_LIB_PATH']=os.path.abspath(paths.app_path("..", "windows-dependencies", arch, "libvlc.dll"))
|
||||
# I don't know why libvlccore.dll needs to be loaded first, but it works when doing it
|
||||
from ctypes import CDLL
|
||||
CDLL(os.path.abspath(paths.app_path("..", "windows-dependencies", arch, "libvlccore.dll")))
|
||||
#the final log files have been opened succesfully, let's close the temporary files
|
||||
stdout_temp.close()
|
||||
stderr_temp.close()
|
||||
|
@ -11,8 +11,13 @@ import subprocess
|
||||
import platform
|
||||
import output
|
||||
import youtube_utils
|
||||
import vlc
|
||||
system = platform.system()
|
||||
if system=="Windows" and not hasattr(sys, 'frozen'): # We are running from source on Windows
|
||||
current_dir=os.getcwd()
|
||||
os.chdir(os.environ['PYTHON_VLC_MODULE_PATH'])
|
||||
import vlc
|
||||
if system=="Windows" and not hasattr(sys, 'frozen'): # Restore the original folder
|
||||
os.chdir(current_dir)
|
||||
from mysc.repeating_timer import RepeatingTimer
|
||||
from mysc.thread_utils import call_threaded
|
||||
import application
|
||||
|
Loading…
x
Reference in New Issue
Block a user