<?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>LieberLieber Software TeamBlog &#187; delphi</title>
	<atom:link href="http://blog.lieberlieber.com/category/delphi/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lieberlieber.com</link>
	<description>was uns treibt und verfolgt!</description>
	<lastBuildDate>Mon, 06 Feb 2012 15:36:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>How to set up a Continuous Integration Server with Delphi, dUnit and Teamcity</title>
		<link>http://blog.lieberlieber.com/2010/05/25/how-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity/</link>
		<comments>http://blog.lieberlieber.com/2010/05/25/how-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity/#comments</comments>
		<pubDate>Tue, 25 May 2010 20:18:09 +0000</pubDate>
		<dc:creator>Nenad Steric</dc:creator>
				<category><![CDATA[Buildserver]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[Programmierung Allgemein]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[Teamcity]]></category>

		<guid isPermaLink="false">http://blog.lieberlieber.com/?p=2070</guid>
		<description><![CDATA[If you want to set up Teamcity with Delphi you have to take care of several important issues : You can run a build with the msbuild-runner, but the Delphi commandline-compiler needs additional Environment Variables : APPDATA : this is where EnvOptions.proj is saved, without it Delphi cannot compile anything, the Problem is that this [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to set up Teamcity with Delphi you have to take care of several important issues :</p>
<p>You can run a build with the msbuild-runner, but the Delphi commandline-compiler needs additional Environment Variables :</p>
<ol>
<li>APPDATA : this is where EnvOptions.proj is saved, without it Delphi cannot compile anything, the Problem is that this is installed under the Config-Dir of the User who installed Delphi<br />
Values can be :<br />
German Win2003 &#8211; D2007 : C:\Dokumente und Einstellungen\&lt;USER&gt;\Anwendungsdaten\Borland\BDS\5.0<br />
English Windows7 -D2010: C:\Users\&lt;USER&gt;\AppData\Roaming\CodeGear\BDS\7.0<br />
etc.</li>
<li>BDS &#8211; where Delphi is stored e.g. (for Delphi 2007)  C:\Programme\CodeGear\RAD Studio\5.0</li>
<li>BDSCOMMONDIR &#8211; e.g. (for Delphi 2007) C:\Dokumente und Einstellungen\All Users\Dokumente\RAD Studio\5.0</li>
</ol>
<p>In Build file path you just need to add the &lt;Project&gt;.dproj File and your done if you just want to build the executable.</p>
<p>This alone already helped us to ensure that we always have at least all the source-files which are needed to compile the project, which wasn&#8217;t always the case before.</p>
<p>If you want Teamcity to also to run your Unit-tests then you have some extra work to do :</p>
<ol>
<li>Create a new Teamcity project with all the configuration from above e.g. &lt;Project&gt;-Test
<ol>
<li>Then you need my adapted Console-Runner for DUnit, which emits the necessary infos for Teamcity.<br />
Use this instead of the standard console-Runner from DUnit<br />
e.g. change the Source of your Test-Exe Project to</p>
<pre>Application.Initialize;</pre>
<pre>if IsConsole then</pre>
<pre> TeamCityTestRunner.RunRegisteredTests</pre>
<pre> else</pre>
<pre> GUITestRunner.RunRegisteredTests;</pre>
</li>
</ol>
</li>
<li>Create a batch-file which calls the compiled Unit-test Exe and call it with Teamcity</li>
</ol>
<p>and there you have it &#8211; a working integration of Delphi,  DUnit  and TeamCity.</p>
<p>Now if i only had a sure-fire way how to make all of the old GUI-centered Code testable so that i could switch to some Agile Practice like TDD &#8230;</p>
<p><a rel="attachment wp-att-2071" href="http://blog.lieberlieber.com/2010/05/25/how-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity/teamcitytestrunner/">TeamCityTestRunner</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F" title="Technorati"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;bodytext=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="Digg"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;t=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="Facebook"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;notes=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="del.icio.us"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="Live"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;annotation=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="Google Bookmarks"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="DotNetKicks"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="DZone"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="" title="TwitThis"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.blogospherenews.com/submit.php?url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="Blogosphere News"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/blogospherenews.png" title="Blogosphere News" alt="Blogosphere News" class="sociable-hovers" /></a></li>
	<li><a  target="_blank" href="http://blogplay.com" title="Blogplay"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/blogplay.png" title="Blogplay" alt="Blogplay" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;source=LieberLieber+Software+TeamBlog+was+uns+treibt+und+verfolgt%21&amp;summary=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="LinkedIn"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;bm_description=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;plugin=soc" title="MisterWong"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.mister-wong.de/addurl/?bm_url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;bm_description=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;plugin=soc" title="MisterWong.DE"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong.DE" alt="MisterWong.DE" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://reporter.nl.msn.com/?fn=contribute&amp;Title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;URL=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;cat_id=6&amp;tag_id=31&amp;Remark=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="MSN Reporter"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/msnreporter.png" title="MSN Reporter" alt="MSN Reporter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://myshare.url.com.tw/index.php?func=newurl&amp;url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;desc=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="MyShare"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/myshare.png" title="MyShare" alt="MyShare" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://blog.lieberlieber.com/feed/" title="RSS"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="StumbleUpon"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home/?status=tip%20@Techmeme%20http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F%20How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="Suggest to Techmeme via Twitter"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/techmeme.png" title="Suggest to Techmeme via Twitter" alt="Suggest to Techmeme via Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;t=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&amp;s=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="Tumblr"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity%20-%20http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F" title="Twitter"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.webnews.de/einstellen?url=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;title=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="Webnews.de"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/webnews.png" title="Webnews.de" alt="Webnews.de" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://bookmarks.yahoo.com/toolbar/savebm?u=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;t=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity&opener=bm&amp;ei=UTF-8&amp;d=If%20you%20want%20to%20set%20up%20Teamcity%20with%20Delphi%20you%20have%20to%20take%20care%20of%20several%20important%20issues%20%3A%0D%0A%0D%0AYou%20can%20run%20a%20build%20with%20the%20msbuild-runner%2C%20but%20the%20Delphi%20commandline-compiler%20needs%20additional%20Environment%20Variables%20%3A%0D%0A%0D%0A%09APPDATA%20%3A%20this%20is%20where%20En" title="Yahoo! Bookmarks"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://yigg.de/neu?exturl=http%3A%2F%2Fblog.lieberlieber.com%2F2010%2F05%2F25%2Fhow-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity%2F&amp;exttitle=How%20to%20set%20up%20a%20Continuous%20Integration%20Server%20with%20Delphi%2C%20dUnit%20and%20Teamcity" title="Yigg"><img src="http://blog.lieberlieber.com/wp-content/plugins/sociable/images/yiggit.png" title="Yigg" alt="Yigg" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.lieberlieber.com/2010/05/25/how-to-set-up-a-continous-integration-server-with-delphi-dunit-and-teamcity/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

