/pidgin/main: 76231c6158ba: VV: set farstream plugin paths

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Tue Jun 11 04:15:30 EDT 2013


Changeset: 76231c6158baaca9dc01b134ef59b5adeba3bae5
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-06-11 10:15 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/76231c6158ba

Description:

VV: set farstream plugin paths

diffstat:

 pidgin/win32/winpidgin.c |  24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diffs (42 lines):

diff --git a/pidgin/win32/winpidgin.c b/pidgin/win32/winpidgin.c
--- a/pidgin/win32/winpidgin.c
+++ b/pidgin/win32/winpidgin.c
@@ -146,8 +146,10 @@ static void common_dll_prep(const wchar_
 	HKEY hkey;
 	wchar_t alt_path_buff[MAX_PATH + 1];
 	wchar_t tmp_path[MAX_PATH + 1];
-	/* Hold strlen("FS_PLUGIN_PATH=") + MAX_PATH + 1 */
-	wchar_t farstream_path[MAX_PATH + 16];
+	/* Hold strlen("FS_PLUGIN_PATH=" or "GST_PLUGIN_SYSTEM_PATH") +
+	 * MAX_PATH + 1
+	 */
+	wchar_t set_path[MAX_PATH + 24];
 
 	if (!check_for_gtk(path)) {
 		const wchar_t *winpath = _wgetenv(L"PATH");
@@ -186,10 +188,22 @@ static void common_dll_prep(const wchar_
 	wcsncpy(tmp_path, path, MAX_PATH);
 	tmp_path[MAX_PATH] = L'\0';
 	wcsrchr(tmp_path, L'\\')[0] = L'\0';
-	_snwprintf(farstream_path, sizeof(farstream_path) / sizeof(wchar_t),
+	/* tmp_path now contains \path\to\Pidgin\Gtk */
+
+	_snwprintf(set_path, sizeof(set_path) / sizeof(wchar_t),
 		L"FS_PLUGIN_PATH=%s\\lib\\farstream-0.1", tmp_path);
-	farstream_path[sizeof(farstream_path) / sizeof(wchar_t) - 1] = L'\0';
-	_wputenv(farstream_path);
+	set_path[sizeof(set_path) / sizeof(wchar_t) - 1] = L'\0';
+	_wputenv(set_path);
+
+	_snwprintf(set_path, sizeof(set_path) / sizeof(wchar_t),
+		L"GST_PLUGIN_SYSTEM_PATH=%s\\lib\\gstreamer-0.10", tmp_path);
+	set_path[sizeof(set_path) / sizeof(wchar_t) - 1] = L'\0';
+	_wputenv(set_path);
+
+	_snwprintf(set_path, sizeof(set_path) / sizeof(wchar_t),
+		L"GST_PLUGIN_PATH=%s\\lib\\gstreamer-0.10", tmp_path);
+	set_path[sizeof(set_path) / sizeof(wchar_t) - 1] = L'\0';
+	_wputenv(set_path);
 
 	if ((hmod = GetModuleHandleW(L"kernel32.dll"))) {
 		MySetDllDirectory = (LPFNSETDLLDIRECTORY) GetProcAddress(



More information about the Commits mailing list