<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Path Management in Deployed Applications</title>
	<atom:link href="http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Thu, 09 Feb 2012 04:19:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Luis</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32976</link>
		<dc:creator>Luis</dc:creator>
		<pubDate>Wed, 08 Feb 2012 12:14:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32976</guid>
		<description>Hi Loren,
Sorry for the last reply, but the code that I talking about is the following: %#function pragma.
Thank you very much</description>
		<content:encoded><![CDATA[<p>Hi Loren,<br />
Sorry for the last reply, but the code that I talking about is the following: %#function pragma.<br />
Thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32975</link>
		<dc:creator>Luis</dc:creator>
		<pubDate>Wed, 08 Feb 2012 12:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32975</guid>
		<description>Hi Loren,
I am developing a stand-alone application with the GUIDE tool. The application consists of a Graphical User Interface that allows the behavior of different algorithms to be evaluated, not only implemented now, also some that can be further developed. This application must be a stand-alone deployment, so the users can work with this open-source application and evaluates their own algorithms.
The idea is that the user can program their algorithms in a Matlab function template (.m file) (created by myself), and my application calls the template function modified by the user, evaluates the algorithm, shows the results and compares with other algorithms.
So, I used the function feval in order to evaluate the algorithms. The problem is that if I modify the template function, which is the idea of this application, the application does not detect the change in the .m template, and uses the original contents of the .m file.
I use this command: , because is the only way that my application can evaluate the function that contains the algorithms that I created. But, if I want to evaluate another function, developed by another user, it is not possible because it is not referenced in the main code has: .
So, my question is: Is it possible to call a function that has not been reported to the compiler by the  command? What other tools exist that help me to develop this application in order to call non-reported functions?
Any help would be appreciated.
Thank you very much.</description>
		<content:encoded><![CDATA[<p>Hi Loren,<br />
I am developing a stand-alone application with the GUIDE tool. The application consists of a Graphical User Interface that allows the behavior of different algorithms to be evaluated, not only implemented now, also some that can be further developed. This application must be a stand-alone deployment, so the users can work with this open-source application and evaluates their own algorithms.<br />
The idea is that the user can program their algorithms in a Matlab function template (.m file) (created by myself), and my application calls the template function modified by the user, evaluates the algorithm, shows the results and compares with other algorithms.<br />
So, I used the function feval in order to evaluate the algorithms. The problem is that if I modify the template function, which is the idea of this application, the application does not detect the change in the .m template, and uses the original contents of the .m file.<br />
I use this command: , because is the only way that my application can evaluate the function that contains the algorithms that I created. But, if I want to evaluate another function, developed by another user, it is not possible because it is not referenced in the main code has: .<br />
So, my question is: Is it possible to call a function that has not been reported to the compiler by the  command? What other tools exist that help me to develop this application in order to call non-reported functions?<br />
Any help would be appreciated.<br />
Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hana</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32497</link>
		<dc:creator>hana</dc:creator>
		<pubDate>Wed, 14 Sep 2011 19:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32497</guid>
		<description>Hi Loren,
I have a GUI consisting of various functions as well as some Sub-folders containing mostly my input &amp; output txt files. I need the organization &amp; can&#039;t just have all the files out of their designated folders. Currently I&#039;m using &quot;cd&quot; command to change the directory, however that&#039;s not working for the compiled version. Is there away to avoid this problem?</description>
		<content:encoded><![CDATA[<p>Hi Loren,<br />
I have a GUI consisting of various functions as well as some Sub-folders containing mostly my input &amp; output txt files. I need the organization &amp; can&#8217;t just have all the files out of their designated folders. Currently I&#8217;m using &#8220;cd&#8221; command to change the directory, however that&#8217;s not working for the compiled version. Is there away to avoid this problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32020</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Thu, 10 Feb 2011 14:35:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32020</guid>
		<description>Andrew,

If you specify -C when you compile (i.e., mcc -C ...) the Compiler will not embed the CTF archive into the application. When the application runs, it will expect to find the CTF archive in directory containing the application, and it will extract the contents into that directory. (This is close to the behavior that you&#039;re looking for, I think, though it means you have to ship two files instead of just one.)

Also, if you&#039;re having trouble with ctfrt.dll, you might check to be sure the directory that contains it (/bin/) is on your PATH.

Finally, please note that you can find the full details of CTF archive embedding and extraction here:

http://www.mathworks.com/help/toolbox/compiler/brl4_f1-1.html

You can set environment variables that control how and where the CTF archive is extracted. You can, for example:

C:\&gt; set MCR_CACHE_ROOT=.

And then run your application -- it will extract the CTF archive into the current directory. Use MCR_CACHE_VERBOSE (set it to 1) to see exactly what&#039;s happening during the cache extraction process.</description>
		<content:encoded><![CDATA[<p>Andrew,</p>
<p>If you specify -C when you compile (i.e., mcc -C &#8230;) the Compiler will not embed the CTF archive into the application. When the application runs, it will expect to find the CTF archive in directory containing the application, and it will extract the contents into that directory. (This is close to the behavior that you&#8217;re looking for, I think, though it means you have to ship two files instead of just one.)</p>
<p>Also, if you&#8217;re having trouble with ctfrt.dll, you might check to be sure the directory that contains it (/bin/) is on your PATH.</p>
<p>Finally, please note that you can find the full details of CTF archive embedding and extraction here:</p>
<p><a href="http://www.mathworks.com/help/toolbox/compiler/brl4_f1-1.html" rel="nofollow">http://www.mathworks.com/help/toolbox/compiler/brl4_f1-1.html</a></p>
<p>You can set environment variables that control how and where the CTF archive is extracted. You can, for example:</p>
<p>C:\&gt; set MCR_CACHE_ROOT=.</p>
<p>And then run your application &#8212; it will extract the CTF archive into the current directory. Use MCR_CACHE_VERBOSE (set it to 1) to see exactly what&#8217;s happening during the cache extraction process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anderson, Andrew</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32019</link>
		<dc:creator>Anderson, Andrew</dc:creator>
		<pubDate>Wed, 09 Feb 2011 19:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-32019</guid>
		<description>On the Issue of the Compiler, I am having some difficulty with the change of direction that Mathworks has imposed. In the development of standalone applications using a previous version of the compiler (supplied with 7.0.4a) when the Operator double clicked on app.exe the installer process would extract this and place it into a directory that was relative to the position of the app.exe. In the new compiler suppllied with 7.9.0A when the operator clicks on app.exe the installation appears to be somewhere in the Profiles (usually a tmp/temp) directory.
The Matlab documentation on the compiler does not detail the full extraction process nor the locations.
I would like to know how I can pusuade the compiler / ctf extraction process to place the deployed application where it is intended (i.e. C:Program Files)
On a second issue pertaining to &quot;extractCTF.exe&quot; this application does not function due to ctfrt.dll being reported as missing.
Any help would be appreciated, thanks</description>
		<content:encoded><![CDATA[<p>On the Issue of the Compiler, I am having some difficulty with the change of direction that Mathworks has imposed. In the development of standalone applications using a previous version of the compiler (supplied with 7.0.4a) when the Operator double clicked on app.exe the installer process would extract this and place it into a directory that was relative to the position of the app.exe. In the new compiler suppllied with 7.9.0A when the operator clicks on app.exe the installation appears to be somewhere in the Profiles (usually a tmp/temp) directory.<br />
The Matlab documentation on the compiler does not detail the full extraction process nor the locations.<br />
I would like to know how I can pusuade the compiler / ctf extraction process to place the deployed application where it is intended (i.e. C:Program Files)<br />
On a second issue pertaining to &#8220;extractCTF.exe&#8221; this application does not function due to ctfrt.dll being reported as missing.<br />
Any help would be appreciated, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Weijia Wu</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31565</link>
		<dc:creator>Weijia Wu</dc:creator>
		<pubDate>Fri, 06 Aug 2010 03:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31565</guid>
		<description>Hi peter,
   I got a question when i use the compiler to a application .exe, it shows &quot;The file &#039;.\cvx\matlab6\true.m&#039; is not in the application&#039;s expanded CTF archive at &#039;C:\DOCUME~1\LOCALS~1\Temp\Administrator\mcrCache7.11\SAR_GU10&#039;. This is typically caused by calls to ADDPATH in your startup.m or matlabrc.m files.Please see the compiler documentation and use the ISDEPLOYD function to ensure ADDPATH commands are not executed by deployed application&quot;. I used a function to call a software package. How can solute this problem, thanks!</description>
		<content:encoded><![CDATA[<p>Hi peter,<br />
   I got a question when i use the compiler to a application .exe, it shows &#8220;The file &#8216;.\cvx\matlab6\true.m&#8217; is not in the application&#8217;s expanded CTF archive at &#8216;C:\DOCUME~1\LOCALS~1\Temp\Administrator\mcrCache7.11\SAR_GU10&#8242;. This is typically caused by calls to ADDPATH in your startup.m or matlabrc.m files.Please see the compiler documentation and use the ISDEPLOYD function to ensure ADDPATH commands are not executed by deployed application&#8221;. I used a function to call a software package. How can solute this problem, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schaugn</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31459</link>
		<dc:creator>Schaugn</dc:creator>
		<pubDate>Fri, 25 Jun 2010 18:46:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31459</guid>
		<description>Hi Peter,

So.. I read a bit deeper in the link you provided in 9. and managed to sort out the problem.. 
The problem was actually with the way that I was passing the path/filname string from the system command prompt - I was using the &#039;path/filename&#039; matlab convention rather than the system command prompt convention. Kind of silly.

&lt;pre&gt;
! myProgram path/filename
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>So.. I read a bit deeper in the link you provided in 9. and managed to sort out the problem..<br />
The problem was actually with the way that I was passing the path/filname string from the system command prompt &#8211; I was using the &#8216;path/filename&#8217; matlab convention rather than the system command prompt convention. Kind of silly.</p>
<pre>
! myProgram path/filename
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schaugn</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31453</link>
		<dc:creator>Schaugn</dc:creator>
		<pubDate>Thu, 24 Jun 2010 23:26:37 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31453</guid>
		<description>Hi Peter, 
Thanks for the reply.. 
So, I do not include the datafile with the compilation because the aim is to apply the action on varying folders as they are created. Also, this action will be deployed on a non-matlab machine. The usage is expected to be like: 

&lt;pre&gt;
myprogram(&#039;path/filename&#039;)
&lt;/pre&gt;

So, it seems to me that your recommendation 1) would not be the strategy for this deployment. 

I&#039;ve tried a number of ways to pass the &#039;path/filename&#039; argument to the fopen function, yet it only seems to work if I provide a static string manually. I would like myprogram to accept any &#039;path/filename&#039; provided by the user. 

I&#039;ve checked pathway interpreted by myprogram and it seems as if the files should be available to open. It seems I&#039;m just not passing it correctly. The exact same .m file works great while the compiled .exe does not.

Works: 
&lt;pre&gt;
&gt; myprogram(&#039;path/filename&#039;)
&lt;/pre&gt;



Does Not Work: 
&lt;pre&gt;
! myprogram(&#039;path/filename&#039;)

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Peter,<br />
Thanks for the reply..<br />
So, I do not include the datafile with the compilation because the aim is to apply the action on varying folders as they are created. Also, this action will be deployed on a non-matlab machine. The usage is expected to be like: </p>
<pre>
myprogram('path/filename')
</pre>
<p>So, it seems to me that your recommendation 1) would not be the strategy for this deployment. </p>
<p>I&#8217;ve tried a number of ways to pass the &#8216;path/filename&#8217; argument to the fopen function, yet it only seems to work if I provide a static string manually. I would like myprogram to accept any &#8216;path/filename&#8217; provided by the user. </p>
<p>I&#8217;ve checked pathway interpreted by myprogram and it seems as if the files should be available to open. It seems I&#8217;m just not passing it correctly. The exact same .m file works great while the compiled .exe does not.</p>
<p>Works: </p>
<pre>
&gt; myprogram('path/filename')
</pre>
<p>Does Not Work: </p>
<pre>
! myprogram('path/filename')
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31450</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Tue, 22 Jun 2010 20:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31450</guid>
		<description>Schaugn,

This error occurs for one of three reasons:

1. The data file has not been included in the deployed application. (Use mcc&#039;s -a switch to add a data file to a deployed application.)

2. The path to the data file is not the same when the application has been deployed. fullfile(pwd,file) only works when the data file exists in the same directory as the executable (this is not typically the case). Instead, just call fopen on the file name: fopen(file). This allows the deployed application to look for the file on the MATLAB path.

3. The application is attempting to write to a non-writable file. (This probably isn&#039;t the case in your application, given the code you&#039;ve posted.)

Try the suggestions in 1 and 2, and let me know if you&#039;re still having trouble.</description>
		<content:encoded><![CDATA[<p>Schaugn,</p>
<p>This error occurs for one of three reasons:</p>
<p>1. The data file has not been included in the deployed application. (Use mcc&#8217;s -a switch to add a data file to a deployed application.)</p>
<p>2. The path to the data file is not the same when the application has been deployed. fullfile(pwd,file) only works when the data file exists in the same directory as the executable (this is not typically the case). Instead, just call fopen on the file name: fopen(file). This allows the deployed application to look for the file on the MATLAB path.</p>
<p>3. The application is attempting to write to a non-writable file. (This probably isn&#8217;t the case in your application, given the code you&#8217;ve posted.)</p>
<p>Try the suggestions in 1 and 2, and let me know if you&#8217;re still having trouble.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schaugn</title>
		<link>http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31449</link>
		<dc:creator>Schaugn</dc:creator>
		<pubDate>Tue, 22 Jun 2010 19:15:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/08/11/path-management-in-deployed-applications/#comment-31449</guid>
		<description>..continuing.. 

Also, the function works fine if the filename is explicitly specified in the fopen command rather than passed from the function input. 

?</description>
		<content:encoded><![CDATA[<p>..continuing.. </p>
<p>Also, the function works fine if the filename is explicitly specified in the fopen command rather than passed from the function input. </p>
<p>?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

