Hi.<br><br>That&#39;s funny you asking... I just finished test builds of the FreeSwitch snapshot using Msbuild and nothing more than Platform SDK.<br>And I haven&#39;t seen your email until after I had Debug build succeed. Release build took a bit more tweaking.<br>

<br>If anyone interested - Platform SDK, starting with version 6.1 (or may be even 6.0, so not remember) includes non-optimizing C++ compiler, msbuild and most other tools (but not all) needed to build projects.<br>Builds Freeswitch.2008.express.sln with PlatformSDK only needs some tweaking to project files. If you have VS2008 Express or full version, it should be even easier - just correct one typo and one tweak (I think that should be enough).<br>

<br>So, except obvious fixes, there are two limitations to PlatformSDK build environments:<br>- bscmake.exe tool is not included, so it is not possible to build .bsc files - this is just debug info and can be easily turned off<br>

- there is one project which has a requirement for optimization to be turned on when building in Release mode, so it will be compatible with default compiler switch (/GS- BufferSecurityCheck), but that can be turned off as well<br>

<br>Below are the tweaks I did to project files in order too build with PlatformSDK. As I said - you may need less tweaking if you have VS installed.<br>Disclamer - I haven&#39;t tried running Freeswitch executables I built, the results based on successful build results with PlatformSDK 6.1 only.<br>

<br>Also - once I test this and verify all tweaks, I plan to post the info on the wiki (if there are no objections, of course).<br><br>Let&#39;s go over the tweaks:<br><br>\libs\win32\Download sphinxmodel.2008.vcproj<br>
This file has a typo, preventing build to succeed in release mode,<br>
Look for section<br>        &lt;Configuration<br>            Name=&quot;Release|Win32&quot;<br>...<br>                &lt;Tool<br>                    Name=&quot;VCCustomBuildTool&quot;<br>...<br>and remove line break (join two lines) like this:<br>

            GetUnzip <a href="http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz">http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz</a> &amp;quot;$(ProjectDir)..&amp;quot;&amp;#x0D;&amp;#x0A;&quot;<br>

<br>Original file has CrLf in the middle of the URL, preventing file download.<br><br>\libs\win32\util.vbs<br>This is not a big issue for most of the people, but it was for me - file tries to download several files from <a href="http://files.freeswitch.org/downloads/win32/">http://files.freeswitch.org/downloads/win32/</a><br>

And there are at least 3 .exe files it needs. I tried this build from my work and, obviously, downloading .exe files is blocked on the proxy. And that&#39;s ok - I have no problem, just a recommendation - why not to zip all those exe files and keep them in the archive? The single file which needs to be downloaded unpacked is 7za.exe - but it can be kept with some innocent extension instead and renamed after successful download.<br>

So, I had to download those files manually and place them... where? util.vbs does not tell where it tries to download files, it only tells the source url. So I added the following line after the one, which prints source URL:<br>

    Wscript.echo(&quot;Downloading: &quot; &amp; URL)<br>    Wscript.echo(&quot;Destination folder: &quot; &amp; DestFolder)<br>(This needs to be done in two places in that file).<br><br>\libs\win32\curl\curllib.2008.vcproj<br>

\libs\win32\sofia\libsofia_sip_ua_static.2008.vcproj     <br>Both this files try to generate .bsc files. In order to disable that, edit those files, find all occurrences of BrowseInformation attribute and set it to &quot;0&quot; if it is set to &quot;1&quot;<br>

(You may want to edit only section which will be used for the target you need - Debug/Release and appropriate platform)<br><br>\w32\Library\FreeSwitchCore.2008.vcproj<br>\libs\srtp\libsrtp.2008.vcproj<br>This is only needed for building using PlatformSDK only Release build.<br>

We need to reset setting to treate all warnings as errors to &quot;false&quot;<br>Look for section:<br>        &lt;Configuration<br>            Name=&quot;Release|Win32&quot;<br>...<br>            &lt;Tool<br>                Name=&quot;VCCLCompilerTool&quot;<br>

...<br>find:<br>                WarnAsError=&quot;true&quot;<br>change to:<br>                WarnAsError=&quot;false&quot;<br><br><br>\src\mod\languages\mod_spidermonkey\mod_spidermonkey.2008.vcproj<br>Here, mod_spidermonke.dll is generated, as well as export .exp and Import .lib<br>

The thing is that MSBuild creates a copy of original ..vcproj file in order o use file references instead of component references. This does not affect DLL, but .exp and .lib files are generated with funky names.<br>And as the result - .lib file can not be found on the later stage of the build (it actulally should have worked - it is probably referenced incorrectly on the dependent project).<br>

To avoid this, we can set attribute to request specific name of the Import library:<br>Find config sections you are targeting:<br>        &lt;Configuration<br>            Name=&quot;Release|Win32&quot;<br>or<br>        &lt;Configuration<br>

            Name=&quot;Debug|Win32&quot;<br>then in section<br>            &lt;Tool<br>                Name=&quot;VCLinkerTool&quot;<br>add this line:<br>                ImportLibrary=&quot;$(PlatformName)\$(ConfigurationName)/$(ProjectName).lib&quot;<br>

<br>That should do it.<br><br>Remember - if you are fixing the above gradually, building project as you go - you have to be careful and may have to delete obj/lib/etc files which were built with incorrect settings (especially for WarnAsError changes).<br>

<br>Oh, and to kick-off the build - open CMD shell for SDK - shortcut is provided in PlatformSDK programs group, navigate to the folder where Freeswitch.2008.express.sln  is located and run something like this:<br><br>msbuild Freeswitch.2008.express.sln /v:d /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=Freeswitch.2008.express.log<br>

<br>(You can replace Release with Debug to build debug target).<br><br>This will create detailed Freeswitch.2008.express.log in case you need to troubleshoot build further.<br><br>Thanks,<br>Dmitry<br><br><div class="gmail_quote">

On Tue, Nov 3, 2009 at 18:00, Josh Rivers <span dir="ltr">&lt;<a href="mailto:josh@radianttiger.com">josh@radianttiger.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

I&#39;ve spent a couple of nights trying to get FS to build on Win32 using msbuild against the .sln file. Debug builds seem to fail in spidermonkey, and release builds fail in util.vbs. Everything builds fine if I do it in Studio, it just doesn&#39;t build from the command line.<br>


<br>Is anybody doing an automated build of FS on windows? If so, are you using any tricks to get it compile or am I missing something obvious? <br><br>Thanks,<br><font color="#888888">Josh<br></font><br>ps. I see a binary build reference in the Wiki. Is the code to build / package that checked in somewhere?<br>


<br>_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>DG<br>NJ<br><br>