Commit 97f2fb96 authored by Simon Latapie's avatar Simon Latapie

* Now the MacOS mozilla plugin is an independant bundle ( searchs no more

 * in /usr/local/lib/vlc for modules )
parent 92a149be
...@@ -96,6 +96,8 @@ VLC\ Plugin.plugin: ...@@ -96,6 +96,8 @@ VLC\ Plugin.plugin:
cp $(top_srcdir)/extras/MacOSX/plugin/pbdevelopment.plist $(srcdir)/VLC\ Plugin.plugin/Contents/pbdevelopment.plist cp $(top_srcdir)/extras/MacOSX/plugin/pbdevelopment.plist $(srcdir)/VLC\ Plugin.plugin/Contents/pbdevelopment.plist
cp -r $(top_srcdir)/extras/MacOSX/plugin/English.lproj $(srcdir)/VLC\ Plugin.plugin/Contents/Resources/ cp -r $(top_srcdir)/extras/MacOSX/plugin/English.lproj $(srcdir)/VLC\ Plugin.plugin/Contents/Resources/
Rez /Developer/Headers/FlatCarbon/Types.r $(srcdir)/vlc.r -o $(srcdir)/VLC\ Plugin.plugin/Contents/Resources/Vlc\ Plugin.rsrc Rez /Developer/Headers/FlatCarbon/Types.r $(srcdir)/vlc.r -o $(srcdir)/VLC\ Plugin.plugin/Contents/Resources/Vlc\ Plugin.rsrc
mkdir $(srcdir)/VLC\ Plugin.plugin/Contents/MacOS/modules
cp -r $(top_srcdir)/VLC.app/Contents/MacOS/modules/* $(srcdir)/VLC\ Plugin.plugin/Contents/MacOS/modules/
endif endif
endif endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcshell.cpp: a VLC plugin for Mozilla * vlcshell.cpp: a VLC plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcshell.cpp,v 1.19 2003/08/25 14:51:49 garf Exp $ * $Id: vlcshell.cpp,v 1.20 2003/08/27 07:21:07 garf Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -242,12 +242,31 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ...@@ -242,12 +242,31 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
#if USE_LIBVLC #if USE_LIBVLC
vlc_value_t value; vlc_value_t value;
int i_ret; int i_ret;
char * home_user;
char * plugin_path;
char * directory;
#ifdef XP_MACOSX
home_user = strdup( getenv("HOME") );
directory = strdup( "/Library/Internet Plug-Ins/VLC Plugin.plugin/Contents/MacOS/modules" );
plugin_path = malloc( strlen( directory ) + strlen( home_user ) );
memcpy( plugin_path , home_user , strlen(home_user) );
memcpy( plugin_path + strlen( home_user ) , directory , strlen( directory ) );
char *ppsz_foo[] =
{
"vlc"
/* , "--plugin-path", "/Library/Internet Plug-Ins/VLC Plugin.plugin/Contents/MacOS/modules" */
, "--plugin-path", plugin_path
, "--filter invert"
};
#else
char *ppsz_foo[] = char *ppsz_foo[] =
{ {
"vlc" "vlc"
/*, "--plugin-path", "/home/sam/videolan/vlc_MAIN/plugins"*/ /*, "--plugin-path", "/home/sam/videolan/vlc_MAIN/plugins"*/
}; };
#endif
#endif #endif
if( instance == NULL ) if( instance == NULL )
...@@ -299,6 +318,12 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, ...@@ -299,6 +318,12 @@ NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
return NPERR_GENERIC_ERROR; return NPERR_GENERIC_ERROR;
} }
#ifdef XP_MACOSX
free(home_user);
free(directory);
free(plugin_path);
#endif
value.psz_string = "dummy"; value.psz_string = "dummy";
VLC_Set( p_plugin->i_vlc, "conf::intf", value ); VLC_Set( p_plugin->i_vlc, "conf::intf", value );
value.psz_string = VOUT_PLUGINS; value.psz_string = VOUT_PLUGINS;
...@@ -472,6 +497,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window ) ...@@ -472,6 +497,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
text = strdup( WINDOW_TEXT ); text = strdup( WINDOW_TEXT );
MoveTo( valuew.i_int / 2 - 40 , valueh.i_int / 2 ); MoveTo( valuew.i_int / 2 - 40 , valueh.i_int / 2 );
DrawText( text , 0 , strlen(text) ); DrawText( text , 0 , strlen(text) );
free(text);
#else #else
/* FIXME: this cast sucks */ /* FIXME: this cast sucks */
......
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