<?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>Filipe Silvestrim Blog &#187; Shell</title>
	<atom:link href="http://www.filipesilvestrim.com/blog/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.filipesilvestrim.com/blog</link>
	<description>The life of a Game Developer</description>
	<lastBuildDate>Sat, 16 Apr 2011 08:54:23 +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>Alchemy shell script for easy compilation</title>
		<link>http://www.filipesilvestrim.com/blog/04/08/2009/alchemy-shell-script-for-easy-compilation/</link>
		<comments>http://www.filipesilvestrim.com/blog/04/08/2009/alchemy-shell-script-for-easy-compilation/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 15:42:25 +0000</pubDate>
		<dc:creator>Filipe Silvestrim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Alchemy]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Easy]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://www.filipesilvestrim.com/blog/?p=66</guid>
		<description><![CDATA[<p>Hello all!</p> <p>Once the blog is with a new face, let&#8217;s start to renew the posts too </p> <p>Today I&#8217;m posting a quick tip for those who are new with <a title="Adobe Alchemy" href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Adobe Alchemy</a>. I really agree that it kind of sucks when you&#8217;re new with theses technologies and you need to configure [...]]]></description>
			<content:encoded><![CDATA[<p>Hello all!</p>
<p>Once the blog is with a new face, let&#8217;s start to renew the posts too <img src='http://www.filipesilvestrim.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Today I&#8217;m posting a quick tip for those who are new with <a title="Adobe Alchemy" href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Adobe Alchemy</a>. I really agree that it kind of sucks when you&#8217;re new with theses technologies and you need to configure a lot of things.</p>
<p>Well, I have created a little <a title="Shell Script" href="http://en.wikipedia.org/wiki/Shell_script" target="_blank">shell script</a> that helps to compile a C or C++ Alchemy project without the necessity of configuring the .profile file.</p>
<p>The steps to install and compile a Alchemy project with this shell script are:</p>
<ol>
<li>Download the Alchemy Toolkit at <a title="Alchemy ToolKit" href="http://labs.adobe.com/downloads/alchemy.html" target="_blank">http://labs.adobe.com/downloads/alchemy.html</a></li>
<li>Unzip the package in a directory (that will be your main Alchemy directory)</li>
<li>Go to the main Alchemy directory via Terminal (i.e. cd /Documents/alchemy)</li>
<li>Run the config script in Terminal (i.e. ./config)</li>
</ol>
<p>Now to compile a project just copy the <a title="Alchemy Shell Script File" href="http://filipesilvestrim.googlecode.com/files/run.sh" target="_blank">shell script file</a> to the folder that contains your C or C++ Alchemy project. But before run the script you just need to change the path (highlighted line) to the alchemy-setup directory located in the Alchemy directory (i.e. source /Documents/alchemy/alchemy-setup).</p>
<p>And that is it <img src='http://www.filipesilvestrim.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Now to run the shell script just make the file executable (i.e. in terminal type &#8220;chmod +x run.sh&#8221;) and run it. The script will then ask the main C file of the project: Just type the name of the file without extension and click Return. Done! Your project will be compiled!</p>
<p>Ps.: This is a shell script for Unix. If you want to port it to Windows (.bat) feel free to do that! Just share with us!</p>
<p>Ps.: To compile a C++ file just change the lines of the c-file extension (i.e. cName=&#8221;$fname.cpp&#8221;) and change the compiler to the g++ (i.e. which g++ AND g++ $cName -O3 -Wall -swc -o $swcName).</p>
<pre class="brush: bash; highlight: [33]; title: ;">
#!/bin/bash
#
# About:     This file is a shell script to make easier
#         the compilation of Adobe Alchemy sources
#
# The MIT License
#
# Copyright (c) 2009 Filipe Silvestrim - http://www.filipesilvestrim.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the &quot;Software&quot;), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

echo &quot;**************** Easy Alchemy Compiler script ****************&quot;
shopt -s expand_aliases

echo &quot;// Configurating Alchemy...&quot;
source /Documents/alchemy/alchemy-setup
PATH=$PATH:~/bin:/usr/local/bin:~/bin/flex/bin:~/bin/astmp:$ALCHEMY_HOME/achacks
export PATH

alc-on
which gcc

echo &quot;// Accessing  Current Dir...&quot;
DIR=$( (cd -P $(dirname $0) &amp;&amp; pwd) )
cd $DIR

echo &quot;// Please, write the main C file name:&quot;
read fname
cName=&quot;$fname.c&quot;
swcName=&quot;$fname.swc&quot;
gcc $cName -O3 -Wall -swc -o $swcName

echo &quot;**************** DONE ****************&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.filipesilvestrim.com/blog/04/08/2009/alchemy-shell-script-for-easy-compilation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

