= Getting Started: Building for Windows Phone 8.x and UWP = [[TracNav(Getting-Started/TOC)]] [[PageOutline(2-3,,inline)]] == Build Preparation == * Get the source code from UWP branch located in: '''https://svn.pjsip.org/repos/pjproject/branches/projects/uwp''' * Set your [wiki:Getting-Started/Build-Preparation config_site.h] to the following: {{{ #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_WMME 0 #define PJMEDIA_AUDIO_DEV_HAS_WASAPI 1 }}} == Requirements == === Tools and SDKs === The Visual Studio based project files can be used with one of the following tools: * Microsoft Visual Studio 2015. ==== Windows Phone 8.x SDK ==== * [http://dev.windowsphone.com/en-us/downloadsdk Windows phone SDK]. ==== Configuring Windows Phone 8.x for Development ==== * [http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769508(v=vs.105).aspx Follow ​these instructions] ==== UWP SDK ==== * [https://dev.windows.com/en-us/downloads/windows-10-sdk UWP SDK]. ==== Configuring Windows Phone 10 for Development ==== * [https://msdn.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development Follow these instructions] === Host requirements === For the host, the following are required: * Operating System type : 64-bit Windows 8 Professional or higher. == Building and running the Projects == === Windows Phone 8.x === Follow the steps below to build the libraries/application using Visual Studio: 1. Open {{{pjproject-vs14.sln}}} solution file. 1. Set API_Family on pjproject-vs14-api-def.props to Winphone8 1. Set '''pjsua_cli_wp''' as Active or Startup Project. 1. Set '''ARM''' as the target platform. 1. Select '''Debug''' or '''Release''' build as appropriate. 1. Build the project. This will build '''pjsua_cli_wp''' application and all libraries needed by '''pjsua_cli_wp'''. 1. Run/deploy the '''pjsua_cli_wp''' application on a registered Windows phone device. 1. You will see telnet instructions on the device's screen. Telnet to this address to operate the application. See [wiki:PJSUA-CLI PJSUA CLI Manual] for command reference. === UWP === 1. Open {{{pjproject-vs14.sln}}} solution file. 1. Set API_Family on pjproject-vs14-api-def.props to UWP 1. Set '''Voip''' as Active or Startup Project. 1. Set '''ARM''' as the target platform for Windows Phone Device, otherwise set '''Win32''' as the target 1. Select '''Debug''' or '''Release''' build as appropriate. 1. Build the project. This will build '''Voip''' application and all libraries needed by '''Voip'''. 1. Run/deploy the '''Voip''' application on a Windows 10 device == Debugging Application == To Debug native(C/C++) part of the application: * Set the '''Debugger type''' of project properties [Debug menu] to '''Native Only'''. To Debug managed(C#) part of the application: * Set the '''Debugger type''' of project properties [Debug menu] to '''Managed Only'''. === Assert Problem on Debugging Native Code === As described [http://blogs.msdn.com/b/andypennell/archive/2013/06/17/native-code-on-windows-phone-8-the-assert-problem.aspx here], assertion will cause process exiting (instead of just stopping). Adding the following code in the application would make process stopping on assertion: {{{ #ifndef NDEBUG signal(SIGABRT, [](int) { __debugbreak(); }); #endif }}} == Other References == * [http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206983%28v=vs.105%29.aspx VoIP apps for Windows Phone 8] * [https://trac.pjsip.org/repos/ticket/1900 Windows 10/UWP Port ticket]