Commit f056f1fc authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac, mozilla/vlcshell.cpp, mozilla/support/npwin.cpp: mozilla...

* configure.ac, mozilla/vlcshell.cpp, mozilla/support/npwin.cpp: mozilla plugin for win32 is finally working (well there's still work left).
* src/misc/modules.c: small clean-up and fixed --plugin-path on win32.
parent f57fdbdd
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
......
......@@ -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
......
......@@ -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];
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment