]> sjero.net Git - linphone/blob - README.mingw
fix warning in gtk app
[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+2 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 #To get the translations working, remove from C:/MinGW/lib :
44 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.
47
48 Get Linphone source code
49 ************************
50
51 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.
52 Choose "Checkout line endings as they are, commit as they are". THIS CHOICE IS VERY IMPORTANT. OTHERS BREAK AUTOMAKE.
53
54 It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example
55 c:\sources\
56 Within msys-git bash, do
57 cd /c/sources
58 git clone git://git.linphone.org/linphone.git --recursive
59
60
61 Building
62 ********
63
64 WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor,
65  you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu.
66 Kill it. Don't know what it is, but once killed, windows runs normally.
67
68 #Compile and install tunnel (optional, available under proprietary licensing)
69
70 cd tunnel && ./autogen.sh && ./configure --prefix=/usr --enable-shared --disable-static  && make && make install
71
72 #Build linphone itself:
73 #run autogen.sh after a git checkout or update
74
75 ./autogen.sh
76
77 ./configure --prefix=/opt/linphone --enable-shared --disable-static
78 #note: in order to use the tunnel, append --enable-tunnel to the configure line above.
79
80 #compile:
81
82 make
83
84 #now install to /opt/linphone, required for compilation of plugins.
85
86 make install
87
88 #make a binary zip of linphone
89
90 make zip
91
92 #additionally you can make binary installer if you have Inno Setup 5 installed in its default path
93
94 make setup.exe
95
96 #now you're done, you have a fresh linphone windows installer in the current directory.
97
98
99
100 #build plugins
101 cd mediastreamer2/plugins/msx264
102 ./autogen.sh
103 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static
104 #make a binary zip of this plugin
105 make zip
106 #or make an installer
107 make setup.exe
108
109 #the buddylookup plugin enables lookup of buddies in a remote database using xml-rpc over http/https.
110 cd coreapi/plugins/buddylookup
111 ./autogen.sh
112 PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static 
113 make
114 #make a binary zip of this plugin
115 make zip
116
117
118 ******************************************************
119 *      Notes about linphone-deps generation          *
120 ******************************************************
121
122 Linphone-deps is a collection of linphone dependencies, that are for some of them difficult
123 to find as windows binaries.
124 These notes are useful if you want to upgrade part of the software that is included in the
125 linphone-deps packages.
126
127 List of software included in linphone-deps:
128 libosip2  (compiled)
129 libeXosip2 (compiled)
130 libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg)
131 libtheora (from the web)
132 libx264 (compiled from the version distributed from linphone's web site)
133 libogg (from the web)
134 libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash)
135 libgnutls (from the web)
136 libgsm (from the web)
137 libxml2 (compiled)
138 libsoup (compiled)
139 libsqlite3 (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 sqlite3
146   * download the sources on the following website:
147   http://www.sqlite.org/download.html (choose the sqlite-autoconf-3XXX.tar.gz)
148   
149   * install: 
150   ./configure
151   make && make install DESTDIR=/home/<myuser>/sqlite3-install
152   then copy the content of ~/sqlite3-install/usr/local/ into linphone-deps/.    
153
154 - building ffmpeg 
155   ./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make
156   make install DESTDIR=/home/<myuser>/ffmpeg-install
157   Copy to ~/ffmpeg-install/usr/local/* to linphone-deps/.
158   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.
159
160 - building libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup 
161   (that requires libxml2).
162   ./configure --enable-shared --disable-static && make && make install DESTDIR=/home/<myuser>/libxml2-install
163   copy ~/libxml2-install/usr/local/* into linphone-deps/.
164
165
166 - building x264:
167  
168   * download yasm normal version windows executable from yasm project page:
169   http://www.tortall.net/projects/yasm/wiki/Download
170   copy it as /usr/local/bin/yasm.exe
171
172   cd into x264/ dir then run:
173   ./configure --enable-pic
174   make
175   make install DESTDIR=/home/<myuser>/x264-install
176   then copy the content of ~/x264-install/usr/local/ into linphone-deps/.
177
178 - libgnutls (required for libsoup https support)
179         - download binary zip from http://josefsson.org/gnutls4win.org
180         - add to linphone-deps
181
182 - building libsoup (only required for buddylookup plugin)
183         - download source from gnome ftp (warning: at the time of the writing only version 2.26.x can compile with the 
184                 glib version supplied in the gtk-bundle, 2.27 requires a new version of glib)
185         - uncompress libgnutls zip in /
186         - make sure you have libxml2 installed in /
187         - apply a bugfix patch (fix gnutls support on windows, completely broken otherwise). The patch
188                 is in linphone-deps/src, apply it this way:
189                 cd libsoup-2.26.*
190                 cd libsoup
191                 patch -p0 < libsoup-gnutls-bugfix.patch
192         - run:
193                 ./configure --prefix=/usr --enable-shared --disable-static
194                 make
195                 make install
196                 make install DESTDIR=/home/<myuser>/libsoup-install
197         - copy ~/libsoup-install/usr/* into linphone-deps/
198
199 Once you have everything in linphone-deps, remove .la files from lib:
200         cd lib && rm -f *.la