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

smorlat's avatar
smorlat committed
4 5
* mingw32, using Automated windows installer (when launched, choose candidate to have lastest binaries)
* msys, using windows installer too.
smorlat's avatar
smorlat committed
6

smorlat's avatar
smorlat committed
7
run msys as Administrator (right click on the icon, and click 'run as administrator')
smorlat's avatar
smorlat committed
8

smorlat's avatar
smorlat committed
9 10 11 12 13 14 15 16 17 18
Download zip and unzip (download setup.exe and run) from http://gnuwin32.sourceforge.net
	- add them to your path in msys terminal:
		export PATH=$PATH:/c/Program\ Files/GnuWin32/bin

Download from mingw download page (http://www.mingw.org, click download):
	- MSYS automake-1.11 
	- MSYS autoconf-2.63
	- MSYS libtool>=2.2.7 
	- MSYS libcrypt*-bin
	- MSYS perl
19
	- MSYS gettext-*bin* and gettext-*dev*
smorlat's avatar
smorlat committed
20 21 22 23 24 25 26 27 28
	===> Uncompress all these packages in /
	- from gcc-4.4 directory
		Download: 
			- gcc-core*-bin
			- gcc-core-*-dll
			- gcc-c++*-bin
			- gcc-c++*-dll
			- gmp*-dll
			- mpfr*-dll
29
	- w32api*-dev
smorlat's avatar
smorlat committed
30
	- mingwrt-dev and mingwrt-dll (mingw run time)
smorlat's avatar
smorlat committed
31
	- gnu binutils 2.19
smorlat's avatar
smorlat committed
32 33 34 35 36 37 38 39 40 41
	===> Uncompress all these packages in /mingw

note: lzma files can be uncompressed using tar --lzma -xvf <file>

* Download intltool (quicklink: 
	http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
	note: -dev package is not needed.)
  uncompress in  / with 'unzip' command.

* Download lastest gtk+bundle from http://www.gtk.org , uncompress in /
smorlat's avatar
smorlat committed
42
* Download libglade and libglade-dev >=2.6.3 from gnome ftp:
smorlat's avatar
smorlat committed
43 44 45 46 47 48
    http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade-dev_2.6.4-1_win32.zip
    http://ftp.gnome.org/pub/GNOME/binaries/win32/libglade/2.6/libglade_2.6.4-1_win32.zip
    uncompress in /
* Download ActiveState perl and run the installer with default options (http://www.activestate.com , developer tools)
	Yes it is required despite MSYS perl is already installed.

smorlat's avatar
smorlat committed
49
* Download lastest linphone-deps from linphone downloads, misc directory:
smorlat's avatar
smorlat committed
50
    http://download.savannah.gnu.org/releases-noredirect/linphone/misc/)
smorlat's avatar
smorlat committed
51 52
    uncompress in /
* Download and install Inno Setup Compiler in its default path (required only if you run 'make setup.exe').
53 54 55 56 57 58

* HACKS:
	Move out /lib/libintl.la : it confuses libtool
		mv /lib/libintl.la /lib/libintl.la.bak
	Move out libstdc++.la in order to workaround a gcc-4.4.0 bug (or packaging bug):
		mv /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la /mingw/lib/gcc/mingw32/4.4.0/libstdc++.la.bak
smorlat's avatar
smorlat committed
59

smorlat's avatar
smorlat committed
60 61 62 63 64
Get Linphone source code
************************

Install msys-git from (http://code.google.com/p/msysgit/)

smorlat's avatar
smorlat committed
65 66 67 68
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
smorlat's avatar
smorlat committed
69 70 71
git clone git://git.savannah.nongnu.org/linphone.git


72
Building
simorl's avatar
simorl committed
73
********
74

simorl's avatar
simorl committed
75 76 77
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.
78

smorlat's avatar
smorlat committed
79 80
The following variables must be exported:

81 82 83
#use ActiveState perl instead of mingw perl
export PERL="/c/Perl/bin/perl"
export INTLTOOL_PERL="/c/Perl/bin/perl"
smorlat's avatar
smorlat committed
84 85 86 87 88 89 90
#add gnuwin32 tools to your path:
export PATH=$PATH:/c/Program\ Files/Gnuwin32/bin

for convenience the 'mingw-envsetup.sh' script in linphone sources does this, so you can just source it:
. ./mingw-envsetup.sh

#run autogen.sh after a git checkout or update
91
./autogen.sh
smorlat's avatar
smorlat committed
92
./configure --prefix=/opt/linphone --enable-shared --disable-static
93
make
smorlat's avatar
smorlat committed
94
#will install to /opt/linphone, required for compilation of plugins.
simorl's avatar
simorl committed
95 96 97
make install
#make a binary zip of linphone
make zip
simorl's avatar
simorl committed
98 99
#additionally you can make binary installer if you have Inno Setup 5 installed in its default path
make setup.exe
100 101 102 103

#build plugins
cd mediastreamer2/plugins/msx264
./autogen.sh
simorl's avatar
simorl committed
104
PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static --enable-hacked-x264
simorl's avatar
simorl committed
105 106 107
make
#make a binary zip of this plugin
make zip
smorlat's avatar
smorlat committed
108 109
#or make an installer
make setup.exe
110

smorlat's avatar
smorlat committed
111
#the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
smorlat's avatar
smorlat committed
112
cd coreapi/plugins/buddylookup
113
./autogen.sh
simorl's avatar
simorl committed
114 115 116 117
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
118 119 120 121 122


******************************************************
*      Notes about linphone-deps generation          *
******************************************************
smorlat's avatar
smorlat committed
123 124 125 126 127 128

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.

129 130 131 132 133 134 135 136 137 138 139 140 141
List of software included in linphone-deps:
libosip2  (compiled)
libeXosip2 (compiled)
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)

smorlat's avatar
smorlat committed
142 143 144
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.
145

smorlat's avatar
smorlat committed
146 147
- building ffmpeg 
  ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
smorlat's avatar
smorlat committed
148
  make install DESTDIR=/home/<myuser>/ffmpeg-install
smorlat's avatar
smorlat committed
149
  Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
smorlat's avatar
smorlat committed
150 151 152 153
  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
154
  ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
smorlat's avatar
smorlat committed
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
  copy ~/libxml2-install/usr/local/* into linphone-deps/.

- building x264:
  
  * Download lastest snapshot the linphone fork of x264 from
  http://download.savannah.gnu.org/releases/linphone/plugins/sources/
  This fork just brings the H264 Nalu size control feature, necessary to make video packet that fits into the network mtu.
  It will be no longer necessary as soon as x264 official project will accept this patch or a similar one.

  * 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

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

smorlat's avatar
smorlat committed
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
- 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