mozilla-plugin-compile.html 4.68 KB
Newer Older
1 2 3 4 5 6 7 8
<?php
   $title = "VideoLAN Client - Mozilla plugin Compile HOWTO";
   $lang = "en";
   $date = "16 April 2005";
?>

<h1>HOWTO compile mozilla plugin</h1>

9 10 11 12
<p>Here is a small description on which steps to take for compiling the mozilla plugin in VLC using a Linux development and cygwin environment.</p>

<h2>Building using Linux</h2>
</p>The following description assumes that the mozilla-devel package is installed on your RPM based distribution (RedHat, Fedora Core 1/2/3, Mandrake, SuSE, etc.). You can check this by running: "rpm -q mozilla-devel". If it is not installed, then install it first before continuing with the following steps.</p>
13

Jean-Paul Saman's avatar
Jean-Paul Saman committed
14
<p>Checkout VLC from subversion, see http://developers.videolan.org/svn.html<br>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
15 16
<table border="0" width="100%">
  <tr><td class="code">
17
    $> cd src/vlc-trunk
18
</td></tr>
19
</table>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
20
</p>
21

Jean-Paul Saman's avatar
Jean-Paul Saman committed
22
<p>Bootstrap your fresh subversion checkout first.<br>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
23
<table border="0" width="100%">
24
<tr><td class="code">
25
$> ./bootstrap
26
</td></tr>
27
</table>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
28
</p>
29

Jean-Paul Saman's avatar
Jean-Paul Saman committed
30
<p>Determine your mozilla version using your package manager. For RPM based distributions (Redhat, Fedora Core, Mandrake, Suse):<br>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
31
<table border="0" width="100%">
32
<tr><td class="code">
Jean-Paul Saman's avatar
Jean-Paul Saman committed
33
$> rpm -q mozilla<br>
34
mozilla-1.7.6-1.3.2
35
</td></tr>
36
</table>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
37
The first number "1.7.6" is the mozilla version number the other number after the second '-' is the package version number.</p>
38

Jean-Paul Saman's avatar
Jean-Paul Saman committed
39
<p>Then configure to build VLC with mozilla plugin (See ./configure --help output for more information on commandline switches to use for configuring VLC.):<br>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
40
<table border="0" width="100%">
41
<tr><td class="code">
42
$> XPIDL=/usr/lib/mozilla-1.7.6/xpidl ./configure --prefix=/usr --enable-mozilla --enable-mpeg2dec <__add_your__options_here__> && make
43
</td></tr>
44
</table>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
45
</p>
46

Jean-Paul Saman's avatar
Jean-Paul Saman committed
47
<p>To run make after the ./configure step export XPIDL in the shell environment, like this example for bash shells:<br>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
48
<table border="0" width="100%">
49
<tr><td class="code">
50
$> export XPIDL=/usr/lib/mozilla-1.7.6/xpidl
51
</td></tr>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
52
</table>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
53
<br>or<br>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
54
<table border="0" width="100%">
55
<tr><td class="code">
56
$> XPIDL=/usr/lib/mozilla-1.7.6/xpidl make
57
</td></tr>
58
</table>
Jean-Paul Saman's avatar
Jean-Paul Saman committed
59
</p>
60 61 62

<p>This configures and builds VLC with the mozilla plugin for your version of mozilla.</p>

63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
<h2>Building using Cygwin</h2>
<p>The following description gives some additional hints on how to build the mozilla plugin under Cygwin.</p>

<p>Checkout VLC from subversion, see http://developers.videolan.org/svn.html<br><table border="0" width="100%">
<tr><td class="code">
$> cd src/vlc-trunk
</td></tr>
</table>
</p>

<p>Bootstrap your fresh subversion checkout first.<br>
<table border="0" width="100%">
<tr><td class="code">
$> ./bootstrap
</td></tr>
</table>
</p>

<p>Download the stable mozilla development environment named Gecko from mozilla.org</br>
<table border="0" width="100%">
<tr><td class="code">
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla-1.7.6/gecko-sdk-i586-pc-cygwin-1.7.6.zip
</td></tr>
</table>
</p>

<p>Download two additional libraries libIDL-0.6.3-win32-bin.zip and vc71-glib-1.2.10-bin.zip from mozilla.org<br>
<table border="0" width="100%">
<tr><td class="code">
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/libIDL-0.6.3-win32-bin.zip<br>
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/vc71-glib-1.2.10-bin.zip<br>
</td></tr>
</table>
</p>

<p>Extract libIDL-0.6.dll from libIDL-0.6.3-win32-bin.zip and put it into
C:\gecko-sdk\bin<br>
<table border="0" width="100%">
<tr><td class="code">
C:> unzip libIDL-0.6.3-win32-bin.zip<br>
C:> copy libIDL-0.6.dll C:\gecko-sdk\bin<br>
</td></tr>
</table>
</p>

<p>
extract glib-1.2.dll from vc71-glib-1.2.10-bin.zip and put it into
C:\gecko-sdk\bin<br>
<table border="0" width="100%">
<tr><td class="code">
C:> unzip vc71-glib-1.2.10-bin.zip<br>
C:> copy glib-1.2.dll C:\gecko-sdk\bin<br>
</td></tr>
</table>
</p>

<!-- Sounds dirty 
Modify configure.ac to remove -lembedstring because we don't need it
!-->

<p>The configure.ac has some predefined values for XPIDL and XPIDL_INCL which can be overriden on the commandline. Add --enable-mozilla and --with-mozilla-sdk-path to your configuration options. See the short example below (and don't forget to add your own options to the configure line!).<br>
<table border="0" width="100%">
<tr><td class="code">
export CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml
-I/cygdrive/d/gecko-sdk/include"<br>
export LDFLAGS="-L/usr/win32/lib -L/cygdrive/d/gecko-sdk/lib"<br>
XPIDL=/cygdrive/d/gecko-sdk/bin/xpidl.exe XPIDL_INCL="-Ic:\gecko-sdk/idl" ./configure --enable-release --enable-mozilla --with-mozilla-sdk-path=/cygdrive/c/gecko-sdk<br>
</td></tr>
</table>
</p>

134
<p>
135
<b>Written by Jean-Paul Saman <a href="mailto:jpsaman_at_videolan_dot_org">jpsaman_at_videolan_dot_org</a>, for the VideoLAN Team.</b>
136
</p>