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

Margaux Clerc's avatar
Margaux Clerc committed
4 5 6
Download lastest mingw-get-setup.exe from http://www.mingw.org
Run mingw-get-setup.exe.
In the package list, select and install:
7
* mingw-developer-toolkit
Margaux Clerc's avatar
Margaux Clerc committed
8 9
* mingw32-base
* mingw32-gcc-g++
10
* mingw32-pthreads-w32
Margaux Clerc's avatar
Margaux Clerc committed
11
* msys-base
12 13 14
* msys-zip
* msys-unzip
* msys-wget
Margaux Clerc's avatar
Margaux Clerc committed
15 16 17

For more information:
http://www.mingw.org/wiki/Getting_Started
18

19
In mingw shell (also refered as msys), run
20 21 22 23 24 25 26 27 28 29 30 31

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. 

32 33
Download gtk+-2.24.10 win32 _bundle_ from http://www.gtk.org, direct link:
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip 
34 35 36 37 38 39 40 41 42 43

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
Margaux Clerc's avatar
Margaux Clerc committed
44
wget ftp://ftp.gnome.org/mirror/gnome.org/teams/art.gnome.org/themes/gtk2/GTK2-Outcrop.tar.gz
45 46
tar -xvzf GTK2-Outcrop.tar.gz

Sylvain Berfini's avatar
Sylvain Berfini committed
47 48
#To get the translations working, remove from C:/MinGW/lib :
libintl.a libintl.la libintl.dll.a
49

50 51
* 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
52

53 54 55 56
* Install msys-git from (http://msysgit.github.io/). 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
57 58


59 60
General rules for compilation
*****************************
61

62 63 64 65 66 67 68 69 70 71 72 73
* It is recommended that you create a directory somewhere with a path without
  any spaces or ~ characters, for example c:\sources\. This is the place where
  source code must be compiled.
* git commands (to retrieve source code) must be performed within msys-git
  terminal.
* all other commands (configure, autogen.sh, make) must be done within the
  mingw shell (msys). In both msys and msys-git windows, change into the
  directory you created for sources:
	cd /c/sources

* make sure pkg-config works by adding this env variable to your terminal:
	export PKG_CONFIG_PATH=/usr/lib/pkgconfig
74

75 76
Building belle-sip
******************
77 78
  * make sure that java version 1.6 is available in the PATH. java-1.7 will
    not work with antlr generator.
79 80 81 82 83 84
  * download the sources with msys-git shell using the following command:
    $ git clone git://git.linphone.org/belle-sip.git
  * compile and install 
    $ ./autogen.sh
    $ ./configure --prefix=/usr --enable-shared --disable-static
    $ make && make install
85

86 87
Building Linphone
*****************
88

89 90
  * download the sources using the following command:
    $ git clone git://git.linphone.org/linphone.git --recursive
91

92
  * compile  
93
    #always run autogen.sh after a git checkout or update
94
    $ ./autogen.sh
95

96
    $ ./configure --prefix=/usr --enable-shared --disable-static
97 98
    #note: in order to use the tunnel (commercial extension), append
    #--enable-tunnel to the configure line above.
99

100 101
    $ make
    $ make install
102

103 104
    #Option: make a portable binary zip of linphone
    $ make zip
105

106 107
    #additionally you can make binary installer if you have Inno Setup 5
    installed in its default path
108

109
    $ make setup.exe
110 111
    #now you're done, you have a fresh linphone windows installer in the
    current directory.
112

113 114
Building plugins (optional)
***************************
115

116 117
  This the example for msx264 (H264 plugin), the same applies for other
  linphone plugins.
118 119
  $ git clone git://git.linphone.org/msx264.git
  $ cd msx264
120 121 122 123 124 125
  $ ./autogen.sh
  $ PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure --prefix=/usr --enable-shared --disable-static
  #make a binary zip of this plugin
  $ make zip
  #or make an installer
  $ make setup.exe
126 127 128 129 130


******************************************************
*      Notes about linphone-deps generation          *
******************************************************
smorlat's avatar
smorlat committed
131

132 133 134
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.
smorlat's avatar
smorlat committed
135

136
List of software included in linphone-deps:
137
antlr3c (compiled)
Simon Morlat's avatar
Simon Morlat committed
138
bzrtp (compiled)
139 140
polarssl (compiled
libsrtp (compiled)
141 142
libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all
these from ffmpeg)
143 144 145
libtheora (from the web)
libx264 (compiled from the version distributed from linphone's web site)
libogg (from the web)
146
libspeex, libspeexdsp (compiled)
147 148 149 150
libgnutls (from the web)
libgsm (from the web)
libxml2 (compiled)
libsoup (compiled)
151
libsqlite3 (compiled)
152

smorlat's avatar
smorlat committed
153
Remarks:
154 155 156 157
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.
158

159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
- 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 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

Simon Morlat's avatar
Simon Morlat committed
190 191 192 193 194 195 196 197
- building bzrtp
 * download the sources with msys-git shell using the following command:
    $ git clone git://git.linphone.org/bzrtp.git
  * compile and install 
    $ ./autogen.sh
    $ ./configure --prefix=/usr --enable-shared --disable-static
    $ make && make install

198 199 200 201 202 203 204 205 206
- 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
207 208
- building ffmpeg 
  ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
smorlat's avatar
smorlat committed
209
  make install DESTDIR=/home/<myuser>/ffmpeg-install
smorlat's avatar
smorlat committed
210
  Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
211 212 213
  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.
smorlat's avatar
smorlat committed
214

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

221

smorlat's avatar
smorlat committed
222
- building x264:
223
 
smorlat's avatar
smorlat committed
224 225 226 227 228 229 230
  * 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
231
  make install DESTDIR=/home/<myuser>/x264-install
smorlat's avatar
smorlat committed
232
  then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
233

smorlat's avatar
smorlat committed
234 235 236 237 238
- 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)
239 240 241
	- 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)
smorlat's avatar
smorlat committed
242 243
	- uncompress libgnutls zip in /
	- make sure you have libxml2 installed in /
244 245 246
	- apply a bugfix patch (fix gnutls support on windows, completely
	  broken otherwise). The patch is in linphone-deps/src, apply it this
	  way:
smorlat's avatar
smorlat committed
247 248 249 250 251 252 253 254 255 256 257 258
		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