📜 ⬆️ ⬇️

Mozilla-vlc-plugin for Windows in xpi format

There is such a cool thing, called mozilla-vlc-plugin. But in order to install it under Windows, we need to install a whole vlc, and also remember to mark the plugin in the list of installed components. The opportunity (di and desire too) to put the application entirely is not always, but the plug-in for firefox in xpi format would be just right. The vlc developers do not collect anything themselves, so you have to do everything yourself. Let's get started

I did everything under Kubuntu 9.10, and the final product should work under Windows, respectively, and I recommend in advance to find an experimental Windows machine, although wine can be useful.
To get started, download the latest version of the vlc source from the manufacturer’s website. I downloaded 1.0.6 from here (a more recent version from the git repository refused to work with me).
A guide was found on the VideoLan wiki: http://wiki.videolan.org/Win32Compile , which helped a lot. In addition, the necessary patch was found on the vlc-devel mailing list, which should be applied to the source code in the future.
Now we put a cross-compiler with mingw32 support, in (k) ubuntu everything is quite simple:

apt-get install mingw32 mingw32-binutils

The sources themselves are downloaded, now download the compiled libraries that are needed to build vlc: http://people.videolan.org/~jb/Contribs/ . We download in accordance with the installed version of mingw32. We unpack to the root with a command like:

tar jxf contrib-20061122-win32-bin-gcc-3.4.5-only.tar.bz2 -C /

Further we will use these libraries for the assembly, for convenience we export the variable:
')
export CONTRIBS=/usr/win32

Next, go to the directory with the source code vlc and apply the patch downloaded in the mailing list. This patch creates an install.rdf file, which is required for our plug-in to be compatible with version 3 of firefox. In addition, this patch creates the goal of building a package with a plugin and makes several corrections to vlcplugin.cpp.
Before applying the patch in it, you need in the block that creates install.rdf to replace the maximum firefox version from 3.5. * With 3.6. * Otherwise the plugin under FF 3.6 will not work. Either do it already in the created install.rdf.in.
Next, we proceed according to the instructions from the VideoLan Wiki, go to the directory and the vlc sources, and execute:

./bootstrap && \
export PKG_CONFIG_LIBDIR=$CONTRIBS/lib/pkgconfig PKG_CONFIG_PATH=$CONTRIBS/lib/pkgconfig \
CPPFLAGS="-I$CONTRIBS/include -I$CONTRIBS/include/ebml" CXXCPP=i586-mingw32msvc-cpp \
LDFLAGS=-L$CONTRIBS/lib \
CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++

Next, you need to run the configure script with the necessary parameters. For us, the --enable-mozilla and --with-mozilla-sdk-path parameters are required. Accordingly, the first parameter says that the plugin for mozilla will still have to be assembled, and the second shows where the necessary dev components of this mozilla lie. As a result, I ran the script with this set of parameters:

./configure --host=i586-mingw32msvc --build=i386-linux \
--disable-gtk \
--enable-nls --enable-sdl --with-sdl-config-path=$CONTRIBS/bin \
--enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
--with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora \
--with-wx-config-path=$CONTRIBS/bin \
--with-freetype-config-path=$CONTRIBS/bin \
--with-fribidi-config-path=$CONTRIBS/bin \
--with-libgcrypt-prefix=$CONTRIBS \
--enable-live555 --with-live555-tree=$CONTRIBS/live.com \
--enable-caca --with-caca-config-path=$CONTRIBS/bin \
--with-xml2-config-path=$CONTRIBS/bin \
--with-dvdnav-config-path=$CONTRIBS/bin \
--disable-cddax --disable-vcdx --enable-goom \
--enable-twolame --enable-dvdread \
--disable-fluidsynth --disable-qt4 --disable-skins2 \
--enable-mozilla --with-mozilla-sdk-path=/usr/win32/gecko-sdk

After that, you can run make all , but the system is likely to curse with something like this:

Makefile:1961: *** . .

Open the Makefile and change the spaces at the beginning of the specified line to fair tabs and so with almost the whole block that was inserted from the patch.
All, now run make all and go to drink tea, I have been going for a long time.
After this, we run make package-win32-xpi and in a couple of moments in the directory ./vlc-1.0.6/vlc-plugin we get vlc-1.0.6.xpi ready for use.

UPD: At the request of workers laid out the finished package .

Source: https://habr.com/ru/post/94618/


All Articles