mirror of
				https://github.com/MCV-Software/TWBlue.git
				synced 2025-10-31 04:12:00 +00: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:
		| @@ -47,9 +47,6 @@ if system == "Windows": | |||||||
|     arch="x64" |     arch="x64" | ||||||
|    os.environ['PYTHON_VLC_MODULE_PATH']=os.path.abspath(paths.app_path("..", "windows-dependencies", arch)) |    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")) |    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 |  #the final log files have been opened succesfully, let's close the temporary files | ||||||
|  stdout_temp.close() |  stdout_temp.close() | ||||||
|  stderr_temp.close() |  stderr_temp.close() | ||||||
|   | |||||||
| @@ -11,8 +11,13 @@ import subprocess | |||||||
| import platform | import platform | ||||||
| import output | import output | ||||||
| import youtube_utils | import youtube_utils | ||||||
| import vlc |  | ||||||
| system = platform.system() | 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.repeating_timer import RepeatingTimer | ||||||
| from mysc.thread_utils import call_threaded | from mysc.thread_utils import call_threaded | ||||||
| import application | import application | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jose Manuel Delicado
					Jose Manuel Delicado