README.mingw 8 KB
Newer Older
1
Software to install
smorlat's avatar
smorlat committed
2 3
*******************

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Download lastest mingw-get-inst.exe from http://www.mingw.org
Run mingw-get-inst.exe. Choose "download lastest catalogues".
In the feature list, select:
* C compiler
* C++ compiler
* Mingw developer toolkit
Let the installer fetch and install everything.

In mingw shell, run

mingw-get install msys-zip
mingw-get install msys-unzip
mingw-get install msys-wget

mkdir -p /opt/perl/bin
cp /bin/perl /opt/perl/bin/.

cd ~
#Download intltool
wget http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip

Download lastest linphone-deps-win32 zip from  
http://download.savannah.gnu.org/releases-noredirect/linphone/misc
using your browser. 

29
Download lastest gtk+2 win32 bundle from http://www.gtk.org 
30 31 32 33 34 35 36 37 38 39 40 41 42

Install all these three package in /:

cd /
unzip ~/intltool_0.40.4-1_win32.zip
unzip <path to gtk bundle zip>
unzip <path to linphone-deps>

#Install GTK+ Outcrop theme, the one used by linphone for distribution.
cd /share/themes
wget http://art.gnome.org/download/themes/gtk2/1122/GTK2-Outcrop.tar.gz
tar -xvzf GTK2-Outcrop.tar.gz

Sylvain Berfini's avatar
Sylvain Berfini committed
43 44
#To get the translations working, remove from C:/MinGW/lib :
libintl.a libintl.la libintl.dll.a
45 46

* Download and install Inno Setup Compiler (required only if you run 'make setup.exe'). Add it to your windows Path environment variable.
smorlat's avatar
smorlat committed
47

smorlat's avatar
smorlat committed
48 49 50
Get Linphone source code
************************

Simon Morlat's avatar
Simon Morlat committed
51 52
Install msys-git from (http://code.google.com/p/msysgit/). During installation you are asked to make a choice about how line endings are treated by git.
Choose "Checkout line endings as they are, commit as they are". THIS CHOICE IS VERY IMPORTANT. OTHERS BREAK AUTOMAKE.
smorlat's avatar
smorlat committed
53

smorlat's avatar
smorlat committed
54 55 56 57
It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
c:\sources\
Within msys-git bash, do
cd /c/sources
58
git clone git://git.linphone.org/linphone.git --recursive
smorlat's avatar
smorlat committed
59 60


61
Building
simorl's avatar
simorl committed
62
********
63

simorl's avatar
simorl committed
64 65 66
WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
 you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
Kill it. Don't know what it is, but once killed, windows runs normally.
67

68
#Build linphone itself:
smorlat's avatar
smorlat committed
69
#run autogen.sh after a git checkout or update
70

71
./autogen.sh
72

smorlat's avatar
smorlat committed
73
./configure --prefix=/opt/linphone --enable-shared --disable-static
74 75 76 77
#note: in order to use the tunnel, append --enable-tunnel to the configure line above.

#compile:

78
make
79 80 81

#now install to /opt/linphone, required for compilation of plugins.

simorl's avatar
simorl committed
82
make install
83

simorl's avatar
simorl committed
84
#make a binary zip of linphone
85

simorl's avatar
simorl committed
86
make zip
87

simorl's avatar
simorl committed
88
#additionally you can make binary installer if you have Inno Setup 5 installed in its default path
89

simorl's avatar
simorl committed
90
make setup.exe
91

92
#now you're done, you have a fresh linphone windows installer in the current directory.
93

94 95


96 97 98
#build plugins
cd mediastreamer2/plugins/msx264
./autogen.sh
smorlat's avatar
smorlat committed
99
PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
simorl's avatar
simorl committed
100 101
#make a binary zip of this plugin
make zip
smorlat's avatar
smorlat committed
102 103
#or make an installer
make setup.exe
104

smorlat's avatar
smorlat committed
105
#the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
smorlat's avatar
smorlat committed
106
cd coreapi/plugins/buddylookup
107
./autogen.sh
simorl's avatar
simorl committed
108 109 110 111
PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
make
#make a binary zip of this plugin
make zip
112 113 114 115 116


******************************************************
*      Notes about linphone-deps generation          *
******************************************************
smorlat's avatar
smorlat committed
117 118 119 120 121 122

Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
to find as windows binaries.
These notes are useful if you want to upgrade part of the software that is included in the
linphone-deps packages.

123
List of software included in linphone-deps:
124 125 126 127
antlr3c (compiled)
polarssl (compiled
belle-sip (compiled)
libsrtp (compiled)
128 129 130 131 132 133 134 135 136
libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
libtheora (from the web)
libx264 (compiled from the version distributed from linphone's web site)
libogg (from the web)
libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
libgnutls (from the web)
libgsm (from the web)
libxml2 (compiled)
libsoup (compiled)
137
libsqlite3 (compiled)
138

smorlat's avatar
smorlat committed
139 140 141
Remarks:
For every package compiled that goes into linphone-deps, .la files (libtool files) must be removed to avoid libtool errors.
When running "make install DESTDIR=<somepath>", somepath must be absolute and should not contain any ~ or space.
142

143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
- building antlr3c
  * download the sources with:
    $ git clone -b linphone git://git.linphone.org/antlr3.git
  * compile and install
    $ cd runtime/C
    $ ./autogen.sh
    $ ./configure --prefix=/usr --enable-shared --disable-static
    $ make
    $ make install
    $ make install DESTDIR=/home/<myuser>/antlr3c-install
    $ cp 

- building polarssl
  * download the sources with:
    $ git clone -b linphone git://git.linphone.org/polarssl.git
  * compile and install:
    $ cd polarssl
    $ make lib SHARED=1 WINDOWS=1
    $ make install DESTDIR=/usr
    $ make install DESTDIR=/home/<myuser>/polarssl-install

- building belle-sip
  * download the sources with:
    $ git clone git://git.linphone.org/belle-sip.git
  * compile and install, assuming you have already compiled polarssl and antlr3c and installed in /.
    $ ./autogen.sh
    $ ./configure --prefix=/usr --enable-shared --disable-static 
    $ make && make install && make install DESTDIR=/home/<myuser>/belle-sip-install

- building libsrtp
  *  download the sources with
    $ git clone git://git.linphone.org/srtp.git
  * compile with 
    $ autoconf
    $ ./configure --prefix=/usr
    $ make libsrtp.a
    $ make install
    $ make install DESTDIR=/home/<myuser>/libsrtp-install

182 183 184 185 186 187 188 189 190
- building sqlite3
  * download the sources on the following website:
  http://www.sqlite.org/download.html (choose the sqlite-autoconf-3XXX.tar.gz)
  
  * install: 
  ./configure
  make && make install DESTDIR=/home/<myuser>/sqlite3-install
  then copy the content of ~/sqlite3-install/usr/local/ into linphone-deps/. 	

smorlat's avatar
smorlat committed
191 192
- building ffmpeg 
  ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
smorlat's avatar
smorlat committed
193
  make install DESTDIR=/home/<myuser>/ffmpeg-install
smorlat's avatar
smorlat committed
194
  Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
smorlat's avatar
smorlat committed
195 196 197 198
  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.

- building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
  (that requires libxml2).
smorlat's avatar
smorlat committed
199
  ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
smorlat's avatar
smorlat committed
200 201
  copy ~/libxml2-install/usr/local/* into linphone-deps/.

202

smorlat's avatar
smorlat committed
203
- building x264:
smorlat's avatar
smorlat committed
204
 
smorlat's avatar
smorlat committed
205 206 207 208 209 210 211
  * download yasm normal version windows executable from yasm project page:
  http://www.tortall.net/projects/yasm/wiki/Download
  copy it as /usr/local/bin/yasm.exe

  cd into x264/ dir then run:
  ./configure --enable-pic
  make
smorlat's avatar
smorlat committed
212
  make install DESTDIR=/home/<myuser>/x264-install
smorlat's avatar
smorlat committed
213
  then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
214

smorlat's avatar
smorlat committed
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
- libgnutls (required for libsoup https support)
	- download binary zip from http://josefsson.org/gnutls4win.org
	- add to linphone-deps

- building libsoup (only required for buddylookup plugin)
	- download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
		glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
	- uncompress libgnutls zip in /
	- make sure you have libxml2 installed in /
	- apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
		is in linphone-deps/src, apply it this way:
		cd libsoup-2.26.*
		cd libsoup
		patch -p0 < libsoup-gnutls-bugfix.patch
	- run:
		./configure --prefix=/usr --enable-shared --disable-static
		make
		make install
		make install DESTDIR=/home/<myuser>/libsoup-install
	- copy ~/libsoup-install/usr/* into linphone-deps/

Once you have everything in linphone-deps, remove .la files from lib:
	cd lib && rm -f *.la