<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Firegarden Software</title>
	<atom:link href="http://www.firegarden.com/software/feed" rel="self" type="application/rss+xml" />
	<link>http://www.firegarden.com/software</link>
	<description>Software Design Patterns, Development, &#38; Training</description>
	<lastBuildDate>Wed, 26 Oct 2011 19:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>is .net dead or .net dying?</title>
		<link>http://www.firegarden.com/software/dot-net-is-dead/</link>
		<comments>http://www.firegarden.com/software/dot-net-is-dead/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 20:40:30 +0000</pubDate>
		<dc:creator>firegarden</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.firegarden.com/software/?p=186</guid>
		<description><![CDATA[Is the .net framework dead or is .net dying? Short answer: .net is not going away, .net is alive in the cloud and desktop&#8230; oh Javascript is back! Javascript, HTML5, and CSS3 are thriving ASP MVC on the rise Microsoft has no chance in mobile After spending the last decade embracing .net as the top [...]]]></description>
			<content:encoded><![CDATA[<div>
<h2>Is the .net framework dead or is .net dying?</h2>
<p>Short answer: .net is not going away, .net is alive in the cloud and desktop&#8230; oh Javascript is back!</p>
<ul>
<li>Javascript, HTML5, and CSS3 are thriving</li>
<li>ASP MVC on the rise</li>
<li>Microsoft has no chance in mobile</li>
</ul>
<p>After spending the last decade embracing .net as the top developers platform I have come to a sad conclusion that the .net ubiquitous client is terminal.</p>
<p>I have been tuned into the American software job market for the last few months checking all major cities for <a href="http://newyork.craigslist.org/sof/">Craigslist software jobs</a>. I am not suggesting there are no jobs in .net, rather more jobs are growing in other technologies. Also the perception of the <a href="http://software.meetup.com/cities/us/10014/">tech software start up space</a> right now is simply that .net isn&#8217;t cool. </p>
<ul>
<li>Linux is cool</li>
<li>PHP is cool</li>
<li>Ruby is uber cool</li>
<li>Javascript is wicked uber cool</li>
<li>HTML5 is cocaine in the 80&#8242;s cool</li>
<li>Python is hip</li>
<li>Asp.net MVC is socially acceptable</li>
<li>.net is perceived as expensive which isn&#8217;t cool</li>
</ul>
<p>It all started while I was living downtown Manhattan and <a href="http://software.meetup.com/cities/us/10014/">getting involved in the NYC tech community</a>. To my surprise there were <a href="http://onstartups.com/">a lot of cool startups</a> but very few of them cared about .net. Speaking with a few companies I found they steered away from .net because of the perceived higher cost to purchasing visual studio as well as the cost of hosting .net &#8211; especially when using Amazon Web Services (AWS). Most of time they had never heard of <a href="http://www.microsoft.com/bizspark/">Microsoft Bizspark</a> which is an amazing offering from Microsoft which levels the playing field in terms of cost to development. Check out bizspark for yourself. <a href="http://www.microsoft.com/web/websitespark/support.aspx?tab=ProgramDetails"> Bizspark gives you 5 licenses of Visual Studio tools as well as free production versions of windows server, free sql server and more</a>.</p>
<h3>Why is .net dying?</h3>
<p>It&#8217;s not because the start up community fails to recognize the lower cost of .net development. Rather it is simply because Apple and Google are kicking Microsoft&#8217;s butt in the mobile web space. On top of that pain Microsoft itself is moving away from .net. We have all heard the <a href="http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834">silverlight is dead</a> debate. The truth is that Javascript and HTML5 are the real players in the client side software as a service space. I am hearing rumors that windows 8 is focused on HTML5 and javascript at the same time limiting Silverlight support in their cloud offering. People could argue Silverlight is alive in the Windows Phone space but in case you have not had the chance to seriously consider Windows Phone development I will save you the time &#8211; windows phone development sucks my big fat one.</p>
<p>In the mobile space it is a clear fight between <a href="http://developer.android.com/sdk/index.html">Android</a> and <a href="http://developer.apple.com/devcenter/ios/index.action">iPhone</a>. IMO Android is the environment to learn and yes please learn Java.</p>
<h3>Why is .net alive?&#8230;eh .net not dead!</h3>
<p>2 Reasons</p>
<ol>
<li>ASP MVC</li>
<li>WCF</li>
</ol>
<p>ASP.net MVC is a relatively new framework from Microsoft designed to allow developers to get back to the HTML stack. This provides a lot of millage when leveraging existing .net skills as well as providing a great html5 dev platform.</p>
<p>WCF &#8211; Windows communication foundation is still a very strong offering when building middle ware and back end services. Recently I quickly coded a RESTful WCF service layer and then converted into a full server side asynchronous API. Regardless of front end technology WCF is still a strong cross platform offering especially with the <a href="http://www.odata.org/">OData services offering</a> as well the JSON support in the <a href="http://wcf.codeplex.com/">WCF Web APIs</a></p>
<h4>Windows vs LAMP is dead</h4>
<p>When learning software development the old question of Windows vs Linux as a programming platform is no longer the question. Quite simply it is time to embrace multiple platforms and languages. Instead return to the art of software and learn design patterns such as model view controller. Then learn Asp.net MVC as well as a <a href="http://www.phpwact.org/php/mvc_frameworks">PHP MVC framework</a> or Ruby on Rails then decide for yourself.</p>
<h4>.net vs Java is dead</h4>
<p>Most .net and java developers have an opinion on which platform is better. Most .net developers hate java and want it to go away. I too shared this sentiment however I have changed my tune. Java is simply a great cross OS platform. Period. If you love .net then learn Java. I am talking about going to <a href="http://Eclipse.org/">Eclipse.org and installing the classic IDE</a> or something else that lets you start coding java.</p>
<h4>Javascript is thriving</h4>
<p>In the same way that retro 80&#8242;s is cool Javascript is uber cool. Most agree that a <a href="http://code.google.com/apis/libraries/devguide.html">java script framework</a> is the most efficient way to write their javascript code as it handles a lot of the cross browser issues and makes coding faster, more stable etc. In case you are wondering <a href="http://jquery.com/">jQuery is clearly the winner</a> when it comes to choosing a javascript framework. In short embrace javascript like you embrace software development.</p>
<h6>The state of software development today.</h6>
<p>In closing if you happen to have a different opinion as to the future of .net and the state of software today then you probably do not know what you are talking about &#8211; however if you think you do then please leave a comment and I will publish it.</p>
<p><script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.firegarden.com/software/dot-net-is-dead/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Caliburn Micro v1.1 .net 3.5 WPF Framework Build Download Instructions</title>
		<link>http://www.firegarden.com/software/caliburn-micro-compile-net-3-5/</link>
		<comments>http://www.firegarden.com/software/caliburn-micro-compile-net-3-5/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 20:19:02 +0000</pubDate>
		<dc:creator>firegarden</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.firegarden.com/software/?p=111</guid>
		<description><![CDATA[Instructions &#38; Downloads for Caliburn Micro 1.1 RTW .net 3.5 WPF Compilation Update:]]></description>
			<content:encoded><![CDATA[<div>
<h2>Instructions &amp; Downloads for Caliburn Micro 1.1 RTW .net 3.5 WPF Compilation</h2>
<p><strong>Update:</strong> <a title="Caliburn.Micro 1.1 release to web (RTW)" href="<a href="http://caliburnmicro.codeplex.com/releases/view/67451">Caliburn.Micro 1.1 has been released (RTW)</a> and if you are living in .net framework 3.5 Sp1 land these instructions show how to <strong>compile Caliburn.Micro 1.1 RTW against the .Net framework 3.5 SP1 runtime</strong>.</p>
<h4>Instructions how to compile Caliburn.Micro 1.1 for .net framework 3.5 and WPF</h4>
<ol>
<li>First things first &#8211; you can skip these instructions and simply <a href="http://www.firegarden.com/free-software/caliburn.micro/caliburn.micro_net3.5-assemblies.zip">download Caliburn.Micro 1.1 RTW .net 3.5 assemblies</a>.</li>
<li>Otherwise to get started <a title="Caliburn.Micro Source Code" href="http://caliburnmicro.codeplex.com/SourceControl/list/changesets" target="_blank">download the Caliburn.Micro .net 4.0 source</a>.</li>
<li>Copy the visual studio 2010 solution files into a working directory<br />
<img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/Caliburn.Micro-Source-Code1.png" alt="Caliburn.Micro Source Code Files" title="Caliburn.Micro Source Code Files" width="550" height="200" /></li>
<li>Open the solution file (ignore projects not loading message).<img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/Microsoft-Visual-Studio-Projects-not-loaded-correctly1.png" alt="Microsoft Visual Studio Projects not loaded correctly" title="Microsoft Visual Studio Projects not loaded correctly" width="360" height="143" class="alignnone size-full wp-image-152" /></li>
<li>Generally the windows phone 7 project will not load <br />(unless you have WP7 SDK)<img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/Caliburn.Micro-VS-Solution.png" alt="Caliburn.Micro VS Solution" title="Caliburn.Micro VS Solution" width="373" height="173" class="alignnone size-full wp-image-154" /></li>
<li>Remove the WP7 &amp; Silverlight Projects from the solution <img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/Caliburn.Micro-WPF-Project.png" alt="Caliburn.Micro WPF Project Files" title="Caliburn.Micro WPF Project Files" width="375" height="135" class="alignnone size-full wp-image-155" /><br />
		(don&#8217;t delete the Silverlight files as they are referenced by WPF)</li>
<li>Change the project to target the .net 3.5 runtime . <img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/Target-Framework-net-3.5-e1309313115336.png" alt="Target .net 3.5 Framework" title="Target-Framework-net-3.5" width="540" height="234" class="alignnone size-full wp-image-159" />(client profile is optional depending on your needs)</li>
<li>Remove the existing reference to System.Windows.Interactivity and System.Xaml <br /><img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/System.Windows.Interactivity.png" alt="System.Windows.Interactivity Caliburn" title="System.Windows.Interactivity" width="256" height="160" class="alignnone size-full wp-image-163" /></li>
<li>Download System.Windows.Interactivity assembly dll for .net 3.5 from one of the following sources:
<ul>
<li><a title="Blend 3 SDK" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f1ae9a30-4928-411d-970b-e682ab179e17&amp;displaylang=en"> Blend 3 SDK</a></li>
<li><a href="http://www.firegarden.com/free-software/caliburn.micro/caliburn.micro_net3.5-assemblies.zip">Firegarden Caliburn Micro 1.1 .net 3.5 Assemblies</a></li>
</ul>
</li>
<li>Add a reference to System.Windows.Interactivity.dll assembly.</li>
<li>Download System.CoreEx assembly dll for .net 3.5 from one of the following sources:
<ul>
<li><a title="Reactive Extensions Framework" href="http://msdn.microsoft.com/en-us/devlabs/ee794896">reactive extensions framework for .net3.5 sp1</a></li>
<li><a href="http://www.firegarden.com/free-software/caliburn.micro/caliburn.micro_net3.5-assemblies.zip">Firegarden Caliburn Micro 1.1 .net 3.5 Assemblies</a></li>
</ul>
</li>
<li>Add a reference to the System.CoreEx.dll assembly.</li>
<li>Compiling the solution will throw an error: <code>Invalid variance: The type parameter 'T' must be invariantly valid on 'Caliburn.Micro.IParent&lt;T&gt;.GetChildren()'. 'T' is covariant.</code>
<ul>
<li>To correct this error change line 26 of IConductor.cs to remove the &#8216;out&#8217; modifier</li>
<li><img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/IConductor.cs-Error.png" alt="IConductor.cs IParent Error" title="IConductor.cs-Error" width="430" height="100" class="alignnone size-full wp-image-164" /></li>
<li>The updated code will look as follows:<img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/IConductor.cs-IParent.png" alt="IConductor.cs IParent Fixed" title="IConductor.cs-IParent" width="440" height="100" class="alignnone size-full wp-image-165" /></li>
</ul>
</li>
<li>Compiling will throw another error: <code>type or namespace name 'DatePicker' could not be found</code>
<ul>
<li>There are two options to correct this:</li>
<li>Add a reference to the <a href="http://wpf.codeplex.com/releases/view/40535">WPF Toolkit</a>.</li>
<li>Remove the conditional from line 182 of ConventionManager.cs <img src="http://www.firegarden.com/software/wp-content/uploads/2011/06/AddElementConvention-DatePicker.png" alt="ConventionManager DatePicker AddElementConvention" title="AddElementConvention-DatePicker" width="550" height="30" /></li>
</ul>
</li>
<li> Compiling will throw one final error: ActionMessage.cs <code>'System.Array' does not contain a definition for 'Zip'...</code>
<ul>
<li>The following code will fix the error and get Caliburn.Micro 1.1 to compile under .Net 3.5</li>
<li>You can <a href="http://www.firegarden.com/free-software/caliburn.micro/caliburn.micro_net3.5-assemblies.zip">download the EnumerableExtension.cs source file</a> or copy the code below.</li>
<li>
			<code><br />
			static class EnumerableExtension<br />
			{<br />
			public static IEnumerable&lt;TResult&gt; Zip&lt;T1, T2, TResult&gt;(this<br />
			IEnumerable&lt;T1&gt; source1, IEnumerable&lt;T2&gt; source2, Func&lt;T1, T2,<br />
			TResult&gt; func)<br />
			{<br />
			using (var iter1 = source1.GetEnumerator())<br />
			using (var iter2 = source2.GetEnumerator())<br />
			{<br />
			while (iter1.MoveNext() &amp;&amp; iter2.MoveNext())<br />
			{<br />
			yield return func(iter1.Current, iter2.Current);<br />
			}<br />
			}<br />
			}<br />
			}</code>
			</li>
</ul>
</li>
</ol>
<p>If all was followed correctly you will have a copy of the Caliburn.Micro 1.1 RTW source code  building against the .net framework 3.5. If you have any questions please comment and I will replay asap. Of course you can always <a href="http://www.firegarden.com/free-software/caliburn.micro/caliburn.micro_net3.5-assemblies.zip">download the compiled Caliburn.Micro 3.5 assemblies directly</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.firegarden.com/software/caliburn-micro-compile-net-3-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting Mercurial Repo IIS7 Windows Server 2008R2 x64 Python ISAPI CGI</title>
		<link>http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi/</link>
		<comments>http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 07:51:53 +0000</pubDate>
		<dc:creator>firegarden</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.firegarden.com/software/?p=1</guid>
		<description><![CDATA[How to setup Mercurial 1.8 HgWeb Repository hosted on IIS 7.5 with Windows Server 2008 R2 (x86 &#124; x64 bit) and Python 2.6 or Python 2.7 with ISAPI or CGI After reading existing tutorials Setting up Mercurial server in IIS7 using ISAPI-WSGI and Setting up a Mercurial server on IIS7 via Fast CGI then receiving [...]]]></description>
			<content:encoded><![CDATA[<div>
<h3>How to setup Mercurial 1.8 HgWeb Repository hosted on IIS 7.5 with Windows Server 2008 R2 (x86 | x64 bit) and Python 2.6 or Python 2.7 with ISAPI or CGI</h3>
<p>After reading existing tutorials <a href="http://www.eworldui.net/blog/post/2010/04/08/Setting-up-Mercurial-server-in-IIS7-using-a-ISAPI-module.aspx">Setting up Mercurial server in IIS7 using ISAPI-WSGI</a> and<br />
<a href="http://www.jeremyskinner.co.uk/mercurial-on-iis7/">Setting up a Mercurial server on IIS7 via Fast CGI</a> then receiving a number of <a href="http://stackoverflow.com/questions/4355256/mercurial-and-hgweb-on-iis-7-5-python-error">Python errors</a> including <strong>Failed to import callback module &#8216;hgwebdir_wsgi&#8217;</strong> I decided to author this <a href="http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi">updated guide to setting up Mercurial 1.8 on IIS 7.5</a> (x86 or x64) using <a href="http://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi">Python 2.6</a> or <a href="http://www.python.org/ftp/python/2.7.2/python-2.7.2.amd64.msi">Python 2.7</a>.</p>
<p>There are a number of <a href="http://www.selenic.com/pipermail/mercurial/2011-January/036596.html">problems with the existing instructions</a> due to changes in Mercurial 1.7+. Unfortunately all other existing instructions fail under Mercurial 1.7.2+ as well they force you to install 32 bit versions of Mercurial / Python even on 64 bit systems &#8211; this is no longer an issue, so enjoy true 64 bit goodness! </p>
<p>This guide will show you how to successfully setup Mercurial 1.7 / 1.8 (either 64 bit or 32 bit versions) HgWeb hosted repositories on IIS7 and will allow you to use either Python 2.6 or the current version, Python 2.7.2 &#8211; look no further &#8211; this guide works <img src='http://www.firegarden.com/software/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Please donate your mouse button to support this information <img src='http://www.firegarden.com/software/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
</div>
<div>
<h2>How To Install and Setup Mercurial 1.8 on IIS 7</h2>
<ol>
<li>
<h4>How to Install Python (64 bit or 32 bit)</h4>
</li>
<li>
<h4>Install PyWin32</h4>
</li>
<li>
<h4>Mercurial IIS 7 Installation</h4>
</li>
<li>
<h4>Configure IIS 7 as Repository Host</h4>
<ul>
<li>
<h5>IIS ISAPI Configuration</h5>
</li>
<li>
<h5>IIS Fast CGI Configuration</h5>
</li>
</ul>
</li>
</ol>
</div>
<div>
<h2>How to Setup Python on Windows Server 2008 R2</h2>
<ol>
<li>Choose a Python version (2.6 or 2.7) and architecture (32bit or 64bit)
<ul>
<li>It&#8217;s very important to be <strong>consistent when choosing a Python version (2.6 or 2.7) &amp; architecture (x86 or x64)</strong>.</li>
<li>I suggest using Python 2.7.2+ <br />Note: Python 3.X is NOT supported by Mercurial</li>
<li>If you are on a 64 bit version of Windows then I suggest you take advantage of x64 bit. Otherwise you will have to choose 32 bit.</li>
</ul>
</li>
<li>Download Python Installer
<ul>
<li><a href="http://www.python.org/download/releases/2.6.6/">Python 2.6.6</a>
<ul>
<li>64 Bit &#8211; <a href="http://www.python.org/ftp/python/2.6.6/python-2.6.6.amd64.msi">Download Windows X86-64 MSI Installer</a></li>
<li>32 Bit &#8211; <a href="http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi">Download Windows x86 MSI Installer</a></li>
</ul>
</li>
<li><a href="http://www.python.org/download/releases/2.7.2/">Python 2.7.2</a>
<ul>
<li>64 Bit &#8211; <a href="http://www.python.org/ftp/python/2.7.2/python-2.7.2.amd64.msi">Download Windows X86-64 MSI Installer</a></li>
<li>32 Bit &#8211; <a href="http://www.python.org/ftp/python/2.7.2/python-2.7.2.msi">Download Windows x86 MSI Installer</a></li>
</ul>
</li>
</ul>
</li>
<li>Run Python Installer
<ul>
<li>Accept the default installation path of C:\Python2X</li>
</ul>
</li>
<li>Add Python to Environment Path
<ol>
<li>Follow this step to <strong>ensure python.exe can run</strong> without it&#8217;s full path c:\python2X\Python.exe</li>
<li>Bring up System Window (Right Click My Computer -> Properties or Control Panel &#8211; >System and Security -> System)</li>
<li>Click on Advanced System Settings -> then Environment Variables in popup window</li>
<li>Under system variables -> Click to edit &#8216;Path&#8217;</li>
<li>Append the Python path to existing values such as ;c:\python26\; or ;c:\python27\; &#8211; note values are separated with a ; (semicolon).</li>
<li>Test the python executable is in the environment path by opening a DOS prompt and typing &#8216;Python&#8217; then CTR-Z to quit out of Python.</li>
</ol>
</li>
</ol>
</div>
<div>
<h3>Install Python for Windows Extensions (PyWin32)</h3>
<ol>
<li><a href="http://sourceforge.net/projects/pywin32/files/pywin32/">Choose a PyWin32 Build</a> (<a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build216/">Build216</a> has been tested and verified)
<ul>
<li>It&#8217;s very important to be <strong>consistent choosing the PyWin32 version matching your Python version &amp; architecture (x86 or x64)</strong>.</li>
<li>For example if you installed the 64 bit version of Python 2.7 then you need to download the PyWin32 64 bit installer for Python 2.7 </li>
</ul>
</li>
<li>Download PyWin32 Installer (Pay attention to match step 1)
<ul>
<li>PyWin32 for Python 2.6
<ul>
<li>64 Bit &#8211; <a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win-amd64-py2.6.exe/download">Download Pywin32 64bit MSI Installer</a></li>
<li>32 Bit &#8211; <a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win32-py2.6.exe/download">Download PyWin32 x86 MSI Installer</a></li>
</ul>
</li>
<li>PyWin32 for Python 2.7
<ul>
<li>64 Bit &#8211; <a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win-amd64-py2.7.exe/download">Download Pywin32 64bit MSI Installer</a></li>
<li>32 Bit &#8211; <a href="http://sourceforge.net/projects/pywin32/files/pywin32/Build216/pywin32-216.win32-py2.7.exe/download">Download PyWin32 x86 MSI Installer</a></li>
</ul>
</li>
</ul>
</li>
<li>Run PyWin32 Installer
<ul>
<li>This will install into the \Lib\site-packages\ directory</li>
</ul>
</li>
</ol>
</div>
<div>
<h3>Install &amp; Build Mercurial Source Code</h3>
<ol>
<li><a href="http://mercurial.selenic.com/release/mercurial-1.8.4.tar.gz">Download the Mercurial 1.8.4 Source Code Release</a>
<ul>
<li>Don&#8217;t waste time monkeying around with the installers. You need a version of Mercurial matching your Python install so get the source code!</li>
<li>You will need to unzip the pain in the ass .tar.gz compressed source code file. This is easy on windows <a href="http://www.7-zip.org/download.html">using 7zip</a></li>
<li>You should now have opened the source code <a href="http://www.7-zip.org/download.html">using 7Zip</a> and copied to a folder such as c:\mercurial-source-1.8.4\</li>
</ul>
</li>
<li>Build Mercurial Source Code
<ul>
<li>This is done as per the <a href="http://mercurial.selenic.com/wiki/WindowsInstall#Building_pure_Python_alternative">&#8220;pure install&#8221; instructions</a>
<ul>
<li>Open a dos window and browse to the source folder (c:\mercurial-source-1.8.4\ in this example)</li>
<li>Run the following commands:</li>
<li><code>python.exe setup.py --pure build_py -c -d . build_ext -i build_mo --force</code></li>
<li><code>python.exe setup.py --pure install --force</code></li>
<li>This will build and install Mercurial into the Python install folder eg. C:\Python27\Lib\site-packages\mercurial</li>
</ul>
</li>
</ul>
</li>
<li>You now have a working Mercurial install &#8211; however you will want the hg command to work from anywhere. Currently you have to call the hg  command directly via <code>c:\Python2X\Scripts\hg</code>. This can be fixed a few ways.
<ul>
<li>Add the c:\python2x\scripts\ path to the environment variable similar to the python steps above</li>
<li>Copy the c:\python2x\scripts\hg.bat file into the c:\python2X\ folder which is already added to windows Path var &#8211; then update the hg.bat file as follows:</li>
<li>
			<code><br />
				@echo off<br/><br />
				rem Windows Driver script for Mercurial<br/><br/><br />
				setlocal<br/><br />
				set HG=%~f0<br/><br/></p>
<p>				rem Use a full path to Python (relative to this script) as the standard Python<br/><br />
				rem install does not put python.exe on the PATH...<br/><br />
				rem %~dp0 is the directory of this script<br/><br/></p>
<p>				<strong>"%~dp0python" "%~dp0\scripts\hg" %*</strong><br/><br />
				endlocal<br/><br />
			</code>
			</li>
<li>You can test this works by typing hg from any directory in dos and you will see the hg instructions</li>
</ul>
</li>
</ol>
</div>
<div>
<h2>Setup Mercurial HgWeb Host on IIS 7</h2>
<ol>
<li>Choose an IIS7 plugin technology
<ul>
<li>ISAPI is the fastest and considered a superior option</li>
<li>CGI is an older and equally as capable option</li>
<li>If you are unsure use the ISAPI option</li>
</ul>
</li>
</ol>
<h3>ISAPI Configuration Instructions for Mercurial HgWeb</h3>
<ol>
<li><a href="http://code.google.com/p/isapi-wsgi/downloads/detail?name=isapi_wsgi-0.4.2.zip&#038;can=2&#038;q=">Download the ISAPI WSGI Handler Source Code</a>
<ul>
<li>There is a <a href="http://code.google.com/p/isapi-wsgi/issues/detail?id=5">known installer issue where setup fails missing MSVCR71.dll</a> so you have to build the source.</li>
<li>(work around provided where you download the egg is not as flexible and could cause issue when using the latest version of Python 2.X)</li>
</ul>
</li>
<li>Unzip the source code .zip file into a temporary downloads directory Eg. C:\ISAPI-204-Source\ </li>
<li>Compile the ISAPI source code from DOS by running the following command from the ISAPI source directory:
<ul>
<li>python setup.py install</li>
</ul>
</li>
<li>isapi_wsgi.py will be installed in the &#8216;site-packages&#8217; directory of your Python installation. Eg. C:\Python27\Lib\site-packages\</li>
<li>Download the <a href="http://selenic.com/repo/hg-stable/raw-file/1e6661e09818/contrib/win32/hgwebdir_wsgi.py">hgwebdir_wsgi.py</a> file from the <a href="http://selenic.com/repo/hg-stable/file/">Mercural source</a>. This can be found in the contrib\win32 directory
<ul>
<li>isapi_wsgi.py is a Python script that is configured to compile into the _hgwebdir_wsgi.dll file</li>
</ul>
</li>
<li>
<h5>HgWeb ISAPI Configuration</h5>
<ol>
<li>Create the file folder that will be hosting your Mercurial IIS7 repository website. Eg. c:\inetpub\hg\</li>
<li>Copy hgwebdir_wsgi.py file to the website folder.</li>
<li>Open hgwebdir_wsgi.py for editing by right clicking it and using the Python editor (notepad will not open the file properly due to the invalid new line characters)
<ul>
<li>You should see a pretty version of file with colors from the IDLE or Pythonwin editors</li>
</ul>
</li>
<li>Set the hgweb config value to the website folder. <code>hgweb_config = r'c:\inetpub\hg\hgweb.config' </code></li>
<li>Unless you are using a virtual application/directory set the path prefix to zero then save/close the file.<code>path_prefix = 0</code></li>
<li>Create a new hgweb.config file in the website folder with the following content <code>[paths]<br />
/ = c:\path-to-desired-repository-folder-location\*</code></li>
<li>Open a DOS prompt and set the directory to your website folder. Eg. c:\inetpub\hg\</li>
<li>Execute the following to compile a DLL called _hgwebdir_wsgi.dll<code> python hgwebdir_wsgi.py</code></li>
<li>Create a new application pool in IIS Manager called &#8220;Mercurial-Repo&#8221;
<ul>
<li>Set the .net framework version to &#8220;No Managed Code&#8221;</li>
<li>*Only if* the <strong>installation is 32 bit</strong>  then change the <strong>&#8220;Enable 32-bit Applications&#8221;</strong> to true.</li>
</ul>
</li>
<li>Create a new website in IIS Manager pointing it to the website folder. Be sure to select the Mercurial-Repo application pool.</li>
<li>Open up the Handler Mappings for your new web site.</li>
<li>Add a new &#8220;Wildcard Script Map&#8221; with the Executable location pointing to the _hgwebdir_wsgi.dll in the website folder. Name it Mercurial-ISAPI</li>
<li>Click the OK button, and click YES to allow the ISAPI extension.</li>
<li>Assuming you have followed all directions carefully browsing to the newly created website should serve the empty repositories listing!</li>
</ol>
</li>
</ol>
<p>This has been a comprehensive approach to configuring Mercurial on IIS 7 and Windows Server 2008 via building the source code directly to ensure the version of Mercurial setup matches the version of Python as well the system architecture. This is the only tutorial I know of that allows the 64 bit version of Mecurial 1.8+ to be setup.</p>
<p>Please post a comment if you have *any* issues with following these directions. I have invested time and care into testing this process and keeping these instructions current. Thank you.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.firegarden.com/software/hosting-mercurial-repo-iis7-windows-server-2008r2-x64-python-isapi-cgi/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

