<?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>distriqt // labs &#187; linux</title>
	<atom:link href="http://labs.distriqt.com/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://labs.distriqt.com</link>
	<description>flash platform &#38; digital development australia</description>
	<lastBuildDate>Fri, 27 Jan 2012 00:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Launching Multiple Instances of Eclipse</title>
		<link>http://labs.distriqt.com/post/844</link>
		<comments>http://labs.distriqt.com/post/844#comments</comments>
		<pubDate>Fri, 27 Jan 2012 00:24:57 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[shortcuts]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=844</guid>
		<description><![CDATA[I've been a fan of Eclipse for a long time now, even before FDT and Flash Builder were built around it. The use of workspaces, once you get your head around them, is powerful for focusing your head on the work at hand, keeping all associated projects within the one space. However there are times [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F844"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F844&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've been a fan of Eclipse for a long time now, even before FDT and Flash Builder were built around it. The use of workspaces, once you get your head around them, is powerful for focusing your head on the work at hand, keeping all associated projects within the one space.</p>
<p>However there are times when I wish I was able to have multiple workspaces open. And too the rescue comes the command line.<br />
<span id="more-844"></span></p>
<pre>[Path/To/Eclipse]/eclipse -data [Your/Workspace/Dir] &
</pre>
<p><br/><br />
I've wrapped this up into a little bash script to start eclipse from either the current directory or using the specified directory as the workspace:</p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/bin/sh</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> -n <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> $<span style="color: #000000;">1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	/Applications/eclipse/eclipse  -data $<span style="color: #000000;">1</span> &amp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">else</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> `<span style="color: #7a0874; font-weight: bold;">pwd</span>`</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	/Applications/eclipse/eclipse  -data `<span style="color: #7a0874; font-weight: bold;">pwd</span>` &amp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">fi</span></div></li></ol></pre>
<p><br/></p>
<p>On OSX it's better to use the open command, like:</p>
<pre class="bash"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/bin/sh</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> -n <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> $<span style="color: #000000;">1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	open -n /Applications/eclipse/Eclipse.app --args  -data $<span style="color: #000000;">1</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">else</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Starting eclipse: WORKSPACE: &quot;</span> `<span style="color: #7a0874; font-weight: bold;">pwd</span>`</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	open -n /Applications/eclipse/Eclipse.app --args  -data `<span style="color: #7a0874; font-weight: bold;">pwd</span>`</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">fi</span></div></li></ol></pre>
<p><br/><br />
This will work equally as well with the Flash Builder application, just replace the Eclipse.app with the path to Flash Builder.</p>
<p>Happy workspacing!</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/844"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/844/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 on the Command Line</title>
		<link>http://labs.distriqt.com/post/80</link>
		<comments>http://labs.distriqt.com/post/80#comments</comments>
		<pubDate>Wed, 01 Jul 2009 01:26:03 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=80</guid>
		<description><![CDATA[As anyone who knows me would tell you, I live by the command line, so I thought I would share my newest trick to compile as3 applications from bash.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F80"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F80&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As anyone who knows me would tell you, I live by the command line, so I thought I would share an old trick to compile as3 applications from the command line in bash.</p>
<p>The trick here is to use the Flex SDK compiler which is available free from Adobe. It also requires having installed <a href="http://www.java.com/" target="_blank">java</a>, which is so common on most machines that I won't talk about installation.</p>
<p>The setup process is fairly simple:</p>
<ul>
<li>Grab Flex SDK: <a href="http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK" target="_blank">http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK</a> </li>
<li>Extract to a location, eg: <code>~/.flex</code></li>
<li>Make executable: <code>chmod +x ~/.flex/bin/compc ~/.flex/bin/mxmlc</code></li>
<li>Add the location to your path in .bashrc: <code>PATH=~/.flex/bin:"${PATH}"</code></li>
</ul>
<p>Once that's done you should be able to type <code>mxmlc</code> into the command line and see an error stating you must specify a target file. To compile an as3 file simply use the following:</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mxmlc main-app-file.as -o output.swf</div></li></ol></pre>
<p>Additionally I compile my libraries to my-libs.swc by doing the following:
</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">compc -source-path . -include-sources . -output my-libs.swc</div></li></ol></pre>
<p>Since this is a flex compile you can also use flex syntax in your actionscript to embed resources in the code. Most commonly I use the swf definition line below to simply definite the frame rate and dimensions of the compiled output.
</p>
<pre><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">[SWF(width='990',height='680',backgroundColor='0x000000', frameRate='30')]</div></li></ol></pre>
<p><br/></p>
<hr/>
<br/></p>
<p>Now to use Flash CS3's V3 Components see this post: <a href="http://www.moock.org/blog/archives/000253.html" >moock.org</a></p>
<p>Additionally there are Eclipse tools for actionscript: <a href="http://www.kintespace.com/rasxlog/?p=784" >the rasx() context</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/80"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/80/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

