Required software ----------------- 1) MS Visual Studio 2005 (and not Visual Studio 2003) 2) Microsoft Windows Server 2003 R2 Platform SDK http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en or http://www.microsoft.com/downloads/details.aspx?FamilyId=484269E2-3B89-47E3-8EB7-1F2BE6D7123A&displaylang=en in directory C:\Program Files\Microsoft Platform SDK\ 3) DirectX SDK November 2003 http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&d isplaylang=en Required files -------------- 1) CMake http://www.cmake.org/files/v2.4/cmake-2.4.7-win32-x86.exe 2) Qt source code ftp://ftp.trolltech.com/qt/source/qt-win-opensource-src-4.1.4.zip 3) Qt compilation patch for Visual studio http://downloads.sourceforge.net/qtwin/acs4qt414p1.zip?modtime=1151526073&big_mirror=0 4) Boost Boost v1.33.1 executable http://www.boost-consulting.com/boost_1_33_1_setup.exe 5) NSIS install system http://nsis.sourceforge.net/Download 6) PJNATH-0.8.0 library http://www.pjsip.org/release/0.8.0/pjproject-0.8.0.tar.gz Pre-compilation ---------------- 1) Add the paths for Direct X and Platform SDK in source and libs of Tools->Options for VC project. Compilations steps for P2PP and OpenWengo with P2PP on Windows XP and Linux --------------------------------------------------------------------------- 1) create a dir c:\dev 2) P2PP a) Copy the P2PP code into c:\dev\p2p 3) PJNATH a) Download http://www.pjsip.org/release/0.8.0/pjproject-0.8.0.zip Windows XP b) Unzip to c:\dev c) change file name C:\dev\pjproject-0.8.0\pjlib\include\pj\config_site_sample.h to config_site.h d) Open the pjproject.sln and build pjlib, pjlib_util and pjnath in Debug/Release mode Linux b) Unzip to DIR, where DIR is a directory you create for unzipping pjnath-0.8.0 c) Linux In p2p/src/stun run update_stun.sh [absolute path of pjnath] [absolute path of p2p/src/stun] Windows in p2p/src/stun run update_stun.bat [absolute path of pjnath] [absolute path of p2p/src/stun] Steps (1-3) are enough to build P2PP code with NAT support. To build WengoPhone with P2PP and NAT support, please continue. 4) Install CMake (add to path) 5) Compile QT a) unzip qt in c:\dev\qt-win-opensource-src-4.1.4 b) unzip qt patch in c:\dev\qt-win-opensource-src-4.1.4 c) Run installpatch c:\dev\qt-win-opensource-src-4.1.4; installpatch41.bat; [Enter] d) open a Visual Studio command prompt. cd c:\dev\qt-win-opensource-src-4.1.4 [Enter] qconfigue.bat msvc2005 [Enter] (generates the qt makefiles) nmake [Enter] e) Set the QTDIR environment variable to QT directory 6) Install Boost -Set the following options: Multithread Debug DLL, Multithread DLL, Multithread, Multithread Debug, Multithread static runtime, Multithread Debug static runtime 7) Pre-compilation setups for Wengophone a) Start CMake GUI from program files b) Set the source code directory C:\dev\wengophone-2.1.2-source c) Set the build directory C:\dev\wengophone-2.1.2-source\build d) Delete the CMake cache e) Click on Configure (Ignore the errors) f) Set the Boost directories (must be multithreaded libs (not dlls) mt-gd for debug) g) Open a Visual studio command prompt (not command) h) cd C:\dev\wengophone-2.1.2-source\build i) create_vcproj-VC80.bat [Enter] It should create the visual c++ project. 8-9) 10) Build Debug Version of OpenWengo a) Create project using CMake. b) In curl, owebcam, phapi, phapiutil, portaudio, yealinkwenbox.dll and sfp-plugin projects change preprocessor to BUILD_PHAPI_DLL,PHAPI_DLL c) The above projects are created as dlls, but they are not copied into C:\dev\wengophone-2.1.2-source-debug\build\debug Open the project settings, and in the Post-Build settings, add debug/ before the source dll path. d) In owphone project, add P2P sources (See 12) for a list of files) e) Add the include directories of p2pp, and pjnath, pjlib, pjlib-util in the owphone and qtwengophone project. (see 14) for a list of directories) (WARNING: make sure that you include all directories. If you add the files later, you will need to rebuild the project which takes time ~40min) f) We have written a wrapper around pjnath functions. This wrapper is available as a Visual C++ project in p2p/windows. Compile the project and note where the library was build. If p2p code was in c:\dev\p2p, the library should be in C:\dev\p2p\windows\stun\lib\stun_turn and is stun-debug.lib. Add it to the owphone library dependencies and also the path. g) In the qtwengophone project add library references together with the corresponding lib directories to: stun-debug.lib pjlib-i386-win32-vc8-debug.lib pjlib-util-i386-win32-vc8-debug.lib pjnath-i386-win32-vc8-debug.lib each pjlib library should be in c:\dev\pjproject-0.8.0\pjlib\lib h) In order to avoid having CMake re-creating the projects and possibly lose our changes find the CMakelists.txt in all of the modified projects (should be 9 in total) and exclude it from the build. i) do step c) here add debug\ to source path C:\dev\wengophone-2.1.2-source\build\wengophone\src\presentation\qt\release[debug] BUILD IT. j) [OPTIONAL] /CONSOLE if _tMainConsole link error. Not required to make the executable though. 11) Installer a) Install NSIS b) Make sure INSTALL project is checked in the project configuration. 12) P2PP sources bigint\bigint.cpp distance\bamboodist.cpp distance\distance.cpp distance\kaddist.cpp msg\msgheader.cpp net\socketi.cpp net\transport.cpp node\bamboopeer.cpp node\bootstrap.cpp node\client.cpp node\cmdclient.cpp node\diagnostics.cpp node\kadpeer.cpp node\mainthelper.cpp node\node.cpp node\peer.cpp node\rmanager.cpp node\stimanager.cpp node\transaction.cpp p2pconfig\p2pconfig.cpp sys\cpuutil.cpp sys\gettimeofday.cpp sys\sysutils.cpp sys\threadi.cpp table\bamboortable.cpp table\kadrtable.cpp table\table.cpp utils\genhash.cpp utils\md4.cpp utils\md5.cpp utils\sha1.cpp utils\sha256.cpp 13) Files changed in qtwengophone (needs to be updated) 1. wengophone\src\model\phoneline\ - phoneline.cpp phoneline.h 2. wifo\phapi - phapi.c phapi.h phapi-old.c phmedia-audio.c phmedia-video.c 3. wifo\libosip2\include\osipparser2 - osip_parser.h 4. wifo\libosip2\src\osipparser2 - osip_contact.c osip_parser_cfg.c 5. wifo\eXosip\include\eXosip - exosip.h 6. wifo\eXosip\src - jcallback.c udp.c exosip.c exosip2.h jevents.c sdp_offans.c 7. wifo\eXosip\src\ow_osip - osip_negotiation.c osip_negotiation.h 8. wifo\ortp\src - rtpsession.c rtpsession.h 9. libs\sipwrapper\src\phapi - phapiwrapper.cpp phapiwrapper.h 10. libs\sipwrapper\include\sipwrapper - sipwrapper.h 11. wengophone\src\model\account - sipaccount.cpp sipaccount.h 12. wengophone\src\model\account - sipaccountxmlserializer.cpp 13. wengophone\src\model\profile - userprofilehandler.cpp 14. wengophone\src\presentation - main.cpp 15. wengophone\src\presentation\qt\login - qtaddsipaccount.cpp 16. wengophone\src\presentation\qt\login - AddAccount.ui AddSIPAccount.ui 17. wengophone\src\presentation\qt - WengoPhoneWindow.ui 18. wengophone\src\presentation\qt\contactlist\ - QtContactWidget.cpp 19. libs\imwrapper\src\ - imcontact.cpp 20. libs\imwrapper\include\imwrapper\ - imcontact.h 21. wifo\phapi\ - phapi.c 22. wengophone\src\model\profile\ - UserProfile.cpp 23. wifo\eXosip\src\ - jevents.c jevents.c 24. wengophone\src\model\contactlist - contact.cpp 25. wengophone-2.1.2-source\wengophone\nsis\files_install.nsis 14) P2PP include directories C:\dev\p2p\src\bigint C:\dev\p2p\src\common C:\dev\p2p\src\distance C:\dev\p2p\src\msg C:\dev\p2p\src\net C:\dev\p2p\src\node C:\dev\p2p\src\p2pconfig C:\dev\p2p\src\stun C:\dev\p2p\src\sys C:\dev\p2p\src\table C:\dev\p2p\src\utils