]> git.sesse.net Git - vlc/commitdiff
* configure.ac, mozilla/vlcshell.cpp, mozilla/support/npwin.cpp: mozilla plugin for...
authorGildas Bazin <gbazin@videolan.org>
Tue, 23 Sep 2003 16:07:49 +0000 (16:07 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 23 Sep 2003 16:07:49 +0000 (16:07 +0000)
* src/misc/modules.c: small clean-up and fixed --plugin-path on win32.

configure.ac
mozilla/support/npwin.cpp
mozilla/vlcshell.cpp
src/misc/modules.c

index 4efce96a0d2c57419c1a1bff574c3e393601c0a0..dd6432a9fd36ecf69a44610152168a996c6a1481 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.76 2003/09/20 15:52:19 gbazin Exp $
+dnl $Id: configure.ac,v 1.77 2003/09/23 16:07:48 gbazin Exp $
 
 AC_INIT(vlc,0.6.3-cvs)
 
@@ -3086,7 +3086,7 @@ then
       AC_MSG_RESULT(${real_mozilla_sdk}/mozilla-config.h)
       mozilla=:
       AX_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
-      AX_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -lnspr4 -lplds4 -lplc4 -lembedstring -lxpcomglue])
+      AX_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -lnspr4 -lplds4 -lplc4 -lembedstring -lxpcomglue -Wl,--kill-at])
       XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl"
     else
       dnl  The given path is incorrect
index 5c4dce99395de544bb124c7de88fb076430cd69a..9f369cc6a3071592bb8d47df03251607219bf659 100644 (file)
@@ -86,7 +86,7 @@ static NPPluginFuncs* g_pluginFuncs;
 //  by using the NP_LOADDS macro, when compiling for Win16
 //
 #ifdef __MINGW32__
-extern "C" NPError
+extern "C" __declspec(dllexport) NPError WINAPI
 #else
 NPError WINAPI NP_EXPORT
 #endif
@@ -124,11 +124,11 @@ NP_GetEntryPoints(NPPluginFuncs* pFuncs)
 //     called immediately after the plugin DLL is loaded
 //
 #ifdef __MINGW32__
-extern "C" NPError
+extern "C" __declspec(dllexport) NPError WINAPI
 #else
 NPError WINAPI NP_EXPORT 
 #endif
-NP_Initialize(NPNetscapeFuncs* pFuncs, NPPluginFuncs*)
+NP_Initialize(NPNetscapeFuncs* pFuncs)
 {
     // trap a NULL ptr 
     if(pFuncs == NULL)
@@ -165,7 +165,7 @@ NP_Initialize(NPNetscapeFuncs* pFuncs, NPPluginFuncs*)
 //     unloadable or it needs to stay in memory. 
 //
 #ifdef __MINGW32__
-extern "C" NPError
+extern "C" __declspec(dllexport) NPError WINAPI
 #else
 NPError WINAPI NP_EXPORT 
 #endif
index dd77caaaf6c8b89f5cfbb65ac5a2ed05e8731143..ed64cdfaf879f4cb57c410dee49c24b81b643208 100644 (file)
@@ -2,7 +2,7 @@
  * vlcshell.cpp: a VLC plugin for Mozilla
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: vlcshell.cpp,v 1.23 2003/09/20 22:52:27 gbazin Exp $
+ * $Id: vlcshell.cpp,v 1.24 2003/09/23 16:07:48 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -94,8 +94,8 @@ static void Redraw( Widget w, XtPointer closure, XEvent *event );
  * Windows-only declarations
  *****************************************************************************/
 #ifdef XP_WIN
-#   define VOUT_PLUGINS "directx,dummy"
-#   define AOUT_PLUGINS "none" /* "directx,waveout,dummy" */
+#   define VOUT_PLUGINS "directx,wingdi,dummy"
+#   define AOUT_PLUGINS "directx,waveout,dummy"
 
 HINSTANCE g_hDllInstance = NULL;
 
@@ -302,7 +302,7 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
         ppsz_argv[2] = plugin_path;
 
 #elif defined(XP_WIN)
-        char *ppsz_argv[] = { "vlc", "--plugin-path", NULL };
+        char *ppsz_argv[] = { "vlc", "--plugin-path", NULL, "-vv" };
         HKEY h_key;
         DWORD i_type, i_data;
         char p_data[MAX_PATH + 1];
index 40a0240bb35f095db777c090cff3b4e87dbdd260..6de54fbf03bb85582cb655f19dd12e23ea924a08 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Builtin and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.131 2003/09/10 11:37:52 fenrir Exp $
+ * $Id: modules.c,v 1.132 2003/09/23 16:07:49 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -574,11 +574,6 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
 
     char **         ppsz_path = path;
     char *          psz_fullpath;
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) \
-     || ( defined( WIN32 ) && !defined( UNDER_CE ) )
-    int             i_vlclen = strlen( p_this->p_libvlc->psz_vlcpath );
-    vlc_bool_t      b_notinroot;
-#endif
 
 #if defined( UNDER_CE )
     wchar_t         psz_dir[MAX_PATH];
@@ -602,20 +597,16 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
     {
 #if defined( SYS_BEOS ) || defined( SYS_DARWIN ) \
      || ( defined( WIN32 ) && !defined( UNDER_CE ) )
-        /* Store strlen(*ppsz_path) for later use. */
-        int i_dirlen = strlen( *ppsz_path );
 
-        b_notinroot = VLC_FALSE;
-        /* Under BeOS, we need to add beos_GetProgramPath() to access
-         * files under the current directory */
+        /* Handle relative as well as absolute paths */
 #ifdef WIN32
-        if( i_dirlen < 3 || (*ppsz_path)[3] != '\\' )
+        if( !(*ppsz_path)[0] || (*ppsz_path)[1] != ':' )
 #else
         if( (*ppsz_path)[0] != '/' )
 #endif
         {
-            i_dirlen += i_vlclen + 2;
-            b_notinroot = VLC_TRUE;
+            int i_dirlen = strlen( *ppsz_path );
+            i_dirlen += strlen( p_this->p_libvlc->psz_vlcpath ) + 2;
 
             psz_fullpath = malloc( i_dirlen );
             if( psz_fullpath == NULL )
@@ -633,7 +624,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
         else
 #endif
         {
-            psz_fullpath = *ppsz_path;
+            psz_fullpath = strdup( *ppsz_path );
         }
 
         msg_Dbg( p_this, "recursively browsing `%s'", psz_fullpath );
@@ -646,12 +637,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
         AllocatePluginDir( p_this, psz_fullpath, 5 );
 #endif
 
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
-        if( b_notinroot )
-        {
-            free( psz_fullpath );
-        }
-#endif
+        free( psz_fullpath );
     }
 
     /* Free plugin-path */