]> sjero.net Git - linphone/blob - README.mingw
Merge branch 'master' into dev_sal
[linphone] / README.mingw
1 Software to install
2 *******************
3
4 * mingw32, using Automated windows installer (when launched, choose candidate to have lastest binaries)
5 * msys, using windows installer too.
6
7 run msys as Administrator (right click on the icon, and click 'run as administrator')
8
9 Download zip and unzip (download setup.exe and run) from http://gnuwin32.sourceforge.net
10         - add them to your path in msys terminal:
11                 export PATH=$PATH:/c/Program\ Files/GnuWin32/bin
12
13 Download from mingw download page (http://www.mingw.org, click download):
14         - MSYS automake-1.11 
15         - MSYS autoconf-2.63
16         - MSYS libtool>=2.2.7 
17         - MSYS libcrypt*-bin
18         - MSYS perl
19         - MSYS gettext-*bin* and gettext-*dev*
20         ===> Uncompress all these packages in /
21         - from gcc-4.4 directory
22                 Download: 
23                         - gcc-core*-bin
24                         - gcc-core-*-dll
25                         - gcc-c++*-bin
26                         - gcc-c++*-dll
27                         - gmp*-dll
28                         - mpfr*-dll
29         - w32api*-dev
30         - mingwrt-dev and mingwrt-dll (mingw run time)
31         - gnu binutils 2.19
32         ===> Uncompress all these packages in /mingw
33
34 note: lzma files can be uncompressed using tar --lzma -xvf <file>
35
36 * Download intltool (quicklink: 
37         http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
38         note: -dev package is not needed.)
39   uncompress in  / with 'unzip' command.
40
41 * Download lastest gtk+bundle from http://www.gtk.org , uncompress in /
42 * Download libglade and libglade-dev >=2.6.3 from gnome ftp:
43     http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade-dev_2.6.4-1_win32.zip
44     http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade_2.6.4-1_win32.zip
45     uncompress in /
46 * Download ActiveState perl and run the installer with default options (http://www.activestate.com , developer tools)
47         Yes it is required despite MSYS perl is already installed.
48
49 * Download lastest linphone-deps from linphone downloads, misc directory:
50     http://download.savannah.gnu.org/releases-noredirect/linphone/misc/)
51     uncompress in /
52 * Download and install Inno Setup Compiler in its default path (required only if you run 'make setup.exe').
53
54 * HACKS:
55         Move out /lib/libintl.la : it confuses libtool
56                 mv /lib/libintl.la /lib/libintl.la.bak
57         Move out libstdc++.la in order to workaround a gcc-4.4.0 bug (or packaging bug):
58                 mv /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la.bak
59
60 Get Linphone source code
61 ************************
62
63 Install msys-git from (http://code.google.com/p/msysgit/)
64
65 It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
66 c:\sources\
67 Within msys-git bash, do
68 cd /c/sources
69 git clone git://git.savannah.nongnu.org/linphone.git
70
71
72 Building
73 ********
74
75 WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
76  you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
77 Kill it. Don't know what it is, but once killed, windows runs normally.
78
79 The following variables must be exported:
80
81 #use ActiveState perl instead of mingw perl
82 export PERL="/c/Perl/bin/perl"
83 export INTLTOOL_PERL="/c/Perl/bin/perl"
84 #add gnuwin32 tools to your path:
85 export PATH=$PATH:/c/Program\ Files/Gnuwin32/bin
86
87 for convenience the 'mingw-envsetup.sh' script in linphone sources does this, so you can just source it:
88 . ./mingw-envsetup.sh
89
90 #run autogen.sh after a git checkout or update
91 ./autogen.sh
92 ./configure --prefix=/opt/linphone --enable-shared --disable-static
93 make
94 #will install to /opt/linphone, required for compilation of plugins.
95 make install
96 #make a binary zip of linphone
97 make zip
98 #additionally you can make binary installer if you have Inno Setup 5 installed in its default path
99 make setup.exe
100
101 #build plugins
102 cd mediastreamer2/plugins/msx264
103 ./autogen.sh
104 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
105 #make a binary zip of this plugin
106 make zip
107 #or make an installer
108 make setup.exe
109
110 #the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
111 cd coreapi/plugins/buddylookup
112 ./autogen.sh
113 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
114 make
115 #make a binary zip of this plugin
116 make zip
117
118
119 ******************************************************
120 *      Notes about linphone-deps generation          *
121 ******************************************************
122
123 Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
124 to find as windows binaries.
125 These notes are useful if you want to upgrade part of the software that is included in the
126 linphone-deps packages.
127
128 List of software included in linphone-deps:
129 libosip2  (compiled)
130 libeXosip2 (compiled)
131 libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
132 libtheora (from the web)
133 libx264 (compiled from the version distributed from linphone's web site)
134 libogg (from the web)
135 libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
136 libgnutls (from the web)
137 libgsm (from the web)
138 libxml2 (compiled)
139 libsoup (compiled)
140
141 Remarks:
142 For every package compiled that goes into linphone-deps, .la files (libtool files) must be removed to avoid libtool errors.
143 When running "make install DESTDIR=<somepath>", somepath must be absolute and should not contain any ~ or space.
144
145 - building ffmpeg 
146   ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
147   make install DESTDIR=/home/<myuser>/ffmpeg-install
148   Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
149   Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls.
150
151 - building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
152   (that requires libxml2).
153   ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
154   copy ~/libxml2-install/usr/local/* into linphone-deps/.
155
156 - building x264:
157  
158   * download yasm normal version windows executable from yasm project page:
159   http://www.tortall.net/projects/yasm/wiki/Download
160   copy it as /usr/local/bin/yasm.exe
161
162   cd into x264/ dir then run:
163   ./configure --enable-pic
164   make
165   make install DESTDIR=/home/<myuser>/x264-install
166   then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
167
168 - libgnutls (required for libsoup https support)
169         - download binary zip from http://josefsson.org/gnutls4win.org
170         - add to linphone-deps
171
172 - building libsoup (only required for buddylookup plugin)
173         - download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
174                 glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
175         - uncompress libgnutls zip in /
176         - make sure you have libxml2 installed in /
177         - apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
178                 is in linphone-deps/src, apply it this way:
179                 cd libsoup-2.26.*
180                 cd libsoup
181                 patch -p0 < libsoup-gnutls-bugfix.patch
182         - run:
183                 ./configure --prefix=/usr --enable-shared --disable-static
184                 make
185                 make install
186                 make install DESTDIR=/home/<myuser>/libsoup-install
187         - copy ~/libsoup-install/usr/* into linphone-deps/
188
189 Once you have everything in linphone-deps, remove .la files from lib:
190         cd lib && rm -f *.la