<?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>computers should be less friendly &#187; AIR</title>
	<atom:link href="http://blog.danmcweeney.com/category/air/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.danmcweeney.com</link>
	<description></description>
	<lastBuildDate>Mon, 10 Aug 2009 20:38:22 +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>Some Useful Flex/AIR Tidbits</title>
		<link>http://blog.danmcweeney.com/69</link>
		<comments>http://blog.danmcweeney.com/69#comments</comments>
		<pubDate>Tue, 22 Apr 2008 14:03:21 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://blog.danmcweeney.com/69</guid>
		<description><![CDATA[Recently I had the &#8220;pleasure&#8221; of learning the ins and outs of building Flex and AIR applications via the SDK on a Linux machine.&#160; I wanted to do this for some of the libraries that underpin my project so that they could be built and tested automatically.&#160; So, I setup SVN, Trac and CruiseControl on [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had the &#8220;pleasure&#8221; of learning the ins and outs of building Flex and AIR applications via the SDK on a Linux machine.&nbsp; I wanted to do this for some of the libraries that underpin my project so that they could be built and tested automatically.&nbsp; So, I setup SVN, Trac and CruiseControl on a Ubuntu VM on my mac.&nbsp; To get started there are tons of resources about getting SVN and Trac setup under Apache on Ubuntu so, just Google for them.&nbsp; Setting up CruiseControl was really easy thanks to their good documents, I started with the source distro but, do whatever works.</p>
<p>Now, onto why I&#8217;m posting today, along the way I found some annoying things about how FlexBuilder played with the SDK.&nbsp; For instance, the .flexLibProperties file that is hidden in your FB project, is not the right format to be taken in as a parameter to &#8220;compc&#8221; ( the library compiler, which seems to require a list of class names to include ), so I wrote a quick Python script to convert that file into a config file that is readable by compc.&nbsp; Here is how to include it in your Ant script:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 300px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">

<span style="color: #0000ff">&lt;</span><span style="color: #800000">target</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">="setupClassList"</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">exec</span> <span style="color: #ff0000">executable</span><span style="color: #0000ff">="python"</span> <span style="color: #ff0000">failonerror</span><span style="color: #0000ff">="yes"</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">arg</span> <span style="color: #ff0000">line</span><span style="color: #0000ff">="${helperDir}/classFileConverter.py ${lib_root_dir}/.flexLibProperties classes.xml"</span><span style="color: #0000ff">/&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">exec</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">target</span><span style="color: #0000ff">&gt;</span>


&nbsp;
</pre>
</div>
<p>It takes in two parameters so you can manipulate the output location of the new file.<br />Another odd part is that the application descriptor for an AIR project doesn&#8217;t get correctly populated.&nbsp; FB itself fills in the &lt;content&gt; tag for you when it goes to compile.&nbsp; If you look in your source directory the application descriptor has this string, &#8220;[This value will be overwritten by Flex Builder in the output app.xml]&#8221; instead of the name of the SWF.&nbsp; One more little python script:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 300px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">

<span style="color: #0000ff">&lt;</span><span style="color: #800000">exec</span> <span style="color: #ff0000">executable</span><span style="color: #0000ff">="python"</span> <span style="color: #ff0000">failonerror</span><span style="color: #0000ff">="yes"</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">arg</span> <span style="color: #ff0000">line</span><span style="color: #0000ff">="${helperDir}/appDescrFix.py ../bin-debug/${app_descriptor}"</span><span style="color: #0000ff">/&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">exec</span><span style="color: #0000ff">&gt;</span>

<span style="color: #0000ff"></span><font color="#0000ff"></font>

</pre>
</div>
<p>&nbsp;</p>
<p>Of course, I am going to give you the scripts!&nbsp; Here are the links:<br /><a href="http://www.danmcweeney.com/static/mxmlcHelpers/classFileConverter.py">.flexLibProperties Converter</a><br /><a href="http://www.danmcweeney.com/static/mxmlcHelpers/appDescrFix.py">Application Descriptor Fixer</a></p>
<p>&nbsp;</p>
<p>If someone knows a much easier way to do this just using the command line tools and/or Ant, I&#8217;d love to hear it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.danmcweeney.com/69/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

