]> sjero.net Git - linphone/blob - README.mingw
Merge branch 'master' of git.linphone.org:linphone-private
[linphone] / README.mingw
1 Software to install
2 *******************
3
4 Download lastest mingw-get-inst.exe from http://www.mingw.org
5 Run mingw-get-inst.exe. Choose "download lastest catalogues".
6 In the feature list, select:
7 * C compiler
8 * C++ compiler
9 * Mingw developer toolkit
10 Let the installer fetch and install everything.
11
12 In mingw shell, run
13
14 mingw-get install msys-zip
15 mingw-get install msys-unzip
16 mingw-get install msys-wget
17
18 mkdir -p /opt/perl/bin
19 cp /bin/perl /opt/perl/bin/.
20
21 cd ~
22 #Download intltool
23 wget http://ftp.acc.umu.se/pub/GNOME/binaries/win32/intltool/0.40/intltool_0.40.4-1_win32.zip
24
25 Download lastest linphone-deps-win32 zip from  
26 http://download.savannah.gnu.org/releases-noredirect/linphone/misc
27 using your browser. 
28
29 Download lastest gtk+ win32 bundle from http://www.gtk.org 
30
31 Install all these three package in /:
32
33 cd /
34 unzip ~/intltool_0.40.4-1_win32.zip
35 unzip <path to gtk bundle zip>
36 unzip <path to linphone-deps>
37
38 #Install GTK+ Outcrop theme, the one used by linphone for distribution.
39 cd /share/themes
40 wget http://art.gnome.org/download/themes/gtk2/1122/GTK2-Outcrop.tar.gz
41 tar -xvzf GTK2-Outcrop.tar.gz
42
43 #Remove the special stdint.h and inttypes.h included in linphone-deps: it is for MSVC only.
44 #Mingw will use the one in /mingw/include
45 rm /include/stdint.h /include/inttypes.h
46
47 #Remove libgcc specific libraries, only needed for MSVC:
48 rm /lib/libgcc.a /lib/libmingw32.a /lib/libmingwex.a
49
50 #Remove libintl from gtk, we don't need it and it conflicts with the one supplied by mingw.
51 rm /lib/libintl.dll.a
52 rm /include/intl.h
53
54 * Download and install Inno Setup Compiler (required only if you run 'make setup.exe'). Add it to your windows Path environment variable.
55
56 Get Linphone source code
57 ************************
58
59 Install msys-git from (http://code.google.com/p/msysgit/)
60
61 It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
62 c:\sources\
63 Within msys-git bash, do
64 cd /c/sources
65 git clone git://git.savannah.nongnu.org/linphone.git --recursive
66
67
68 Building
69 ********
70
71 WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
72  you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
73 Kill it. Don't know what it is, but once killed, windows runs normally.
74
75 #run autogen.sh after a git checkout or update
76 ./autogen.sh
77 ./configure --prefix=/opt/linphone --enable-shared --disable-static
78 make
79 #will install to /opt/linphone, required for compilation of plugins.
80 make install
81 #make a binary zip of linphone
82 make zip
83 #additionally you can make binary installer if you have Inno Setup 5 installed in its default path
84 make setup.exe
85 #now you're done, you have a fresh linphone windows installer in the current directory.
86
87 #build plugins
88 cd mediastreamer2/plugins/msx264
89 ./autogen.sh
90 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
91 #make a binary zip of this plugin
92 make zip
93 #or make an installer
94 make setup.exe
95
96 #the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
97 cd coreapi/plugins/buddylookup
98 ./autogen.sh
99 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
100 make
101 #make a binary zip of this plugin
102 make zip
103
104
105 ******************************************************
106 *      Notes about linphone-deps generation          *
107 ******************************************************
108
109 Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
110 to find as windows binaries.
111 These notes are useful if you want to upgrade part of the software that is included in the
112 linphone-deps packages.
113
114 List of software included in linphone-deps:
115 libosip2  (compiled)
116 libeXosip2 (compiled)
117 libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
118 libtheora (from the web)
119 libx264 (compiled from the version distributed from linphone's web site)
120 libogg (from the web)
121 libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
122 libgnutls (from the web)
123 libgsm (from the web)
124 libxml2 (compiled)
125 libsoup (compiled)
126
127 Remarks:
128 For every package compiled that goes into linphone-deps, .la files (libtool files) must be removed to avoid libtool errors.
129 When running "make install DESTDIR=<somepath>", somepath must be absolute and should not contain any ~ or space.
130
131 - building ffmpeg 
132   ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
133   make install DESTDIR=/home/<myuser>/ffmpeg-install
134   Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
135   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.
136
137 - building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
138   (that requires libxml2).
139   ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
140   copy ~/libxml2-install/usr/local/* into linphone-deps/.
141
142 - building x264:
143  
144   * download yasm normal version windows executable from yasm project page:
145   http://www.tortall.net/projects/yasm/wiki/Download
146   copy it as /usr/local/bin/yasm.exe
147
148   cd into x264/ dir then run:
149   ./configure --enable-pic
150   make
151   make install DESTDIR=/home/<myuser>/x264-install
152   then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
153
154 - libgnutls (required for libsoup https support)
155         - download binary zip from http://josefsson.org/gnutls4win.org
156         - add to linphone-deps
157
158 - building libsoup (only required for buddylookup plugin)
159         - download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
160                 glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
161         - uncompress libgnutls zip in /
162         - make sure you have libxml2 installed in /
163         - apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
164                 is in linphone-deps/src, apply it this way:
165                 cd libsoup-2.26.*
166                 cd libsoup
167                 patch -p0 < libsoup-gnutls-bugfix.patch
168         - run:
169                 ./configure --prefix=/usr --enable-shared --disable-static
170                 make
171                 make install
172                 make install DESTDIR=/home/<myuser>/libsoup-install
173         - copy ~/libsoup-install/usr/* into linphone-deps/
174
175 Once you have everything in linphone-deps, remove .la files from lib:
176         cd lib && rm -f *.la