<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5] Getting directory exe is running in</title>
		<link>http://www.allegro.cc/forums/view/613219</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 05 Sep 2013 07:39:08 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just wanted to store the path that the executable is running in.  When I try and check for a file, it shows it as not being there even though it is in the same folder as the executable, so I am uncertain where it is looking.</p><p>When I used some code I found in some of the other posts in these forums, all I got was &quot;\&quot; which is definitely wrong.  Now, I can look at <span class="source-code">argv<span class="k2">[</span><span class="n">0</span><span class="k2">]</span></span> and that gives me  the full path, but it includes the exe filename, also, I doubt this is very cross platform friendly (although I am mainly working with Windows at the moment).</p><p>Is there an Allegro 5 function to provide this, or should I parse <span class="source-code">argv<span class="k2">[</span><span class="n">0</span><span class="k2">]</span></span> myself?</p><p>Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Thu, 05 Sep 2013 06:54:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>take a look at <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_standard_path"><span class="a">al_get_standard_path</span></a></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Thu, 05 Sep 2013 07:03:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="source-code snippet"><div class="inner"><pre>  ALLEGRO_PATH <span class="k3">*</span>path<span class="k2">;</span>
  path <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_standard_path"><span class="a">al_get_standard_path</span></a><span class="k2">(</span>ALLEGRO_RESOURCES_PATH<span class="k2">)</span><span class="k2">;</span>
  <a href="http://www.allegro.cc/manual/al_change_directory"><span class="a">al_change_directory</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_path_cstr"><span class="a">al_path_cstr</span></a><span class="k2">(</span>path,ALLEGRO_NATIVE_PATH_SEP<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 05 Sep 2013 07:04:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Closest I see is <a href="https://www.allegro.cc/manual/5/al_get_current_directory">https://www.allegro.cc/manual/5/al_get_current_directory</a></p><p>nvm, above is better.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Thu, 05 Sep 2013 07:05:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/613219/989618#target">Arthur Kalliokoski</a> said:</div><div class="quote"><p>
  ALLEGRO_PATH *path;<br />  path = al_get_standard_path(ALLEGRO_RESOURCES_PATH);<br />  al_change_directory(al_path_cstr(path,ALLEGRO_NATIVE_PATH_SEP));
</p></div></div><p>

Thanks.</p><p>That worked.</p><p>Edit: I&#39;ll create a new thread for my next problem.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Thu, 05 Sep 2013 07:39:08 +0000</pubDate>
	</item>
</rss>
