<?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: Writing Deployable Code</title>
	<atom:link href="http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/</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: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32691</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Fri, 18 Nov 2011 14:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32691</guid>
		<description>Isaiah,

Sounds like they were running the MATLAB Compiler in a path that looks like \\server\directory\. The MATLAB Compiler doesn&#039;t like UNC paths as outputs (it can&#039;t open files on UNC paths reliably) so it decided to use the standard Windows directory as output. However, the user did not apparently have write permission to that directory, so compilation failed. 

Solution: The user should map the UNC path to a drive letter and cd to that drive letter from inside MATLAB before starting MCC.</description>
		<content:encoded><![CDATA[<p>Isaiah,</p>
<p>Sounds like they were running the MATLAB Compiler in a path that looks like \\server\directory\. The MATLAB Compiler doesn&#8217;t like UNC paths as outputs (it can&#8217;t open files on UNC paths reliably) so it decided to use the standard Windows directory as output. However, the user did not apparently have write permission to that directory, so compilation failed. </p>
<p>Solution: The user should map the UNC path to a drive letter and cd to that drive letter from inside MATLAB before starting MCC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaiah</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32582</link>
		<dc:creator>Isaiah</dc:creator>
		<pubDate>Wed, 02 Nov 2011 16:56:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32582</guid>
		<description>Peter,

One of my matlab users received this error could you give me some insight.

&gt;&gt; mcc -m -v s2p_unwrap.m
Warning: DOS programs may not execute correctly when the current directory is a UNC
pathname.
&#039;theUNCpath&#039;
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
You do not have write permission in the output directory:
    &#039;C:\Windows&#039;.
??? Error using ==&gt; mcc
Error executing mcc, return status = 1 (0x1).</description>
		<content:encoded><![CDATA[<p>Peter,</p>
<p>One of my matlab users received this error could you give me some insight.</p>
<p>&gt;&gt; mcc -m -v s2p_unwrap.m<br />
Warning: DOS programs may not execute correctly when the current directory is a UNC<br />
pathname.<br />
&#8216;theUNCpath&#8217;<br />
CMD.EXE was started with the above path as the current directory.<br />
UNC paths are not supported. Defaulting to Windows directory.<br />
You do not have write permission in the output directory:<br />
    &#8216;C:\Windows&#8217;.<br />
??? Error using ==&gt; mcc<br />
Error executing mcc, return status = 1 (0&#215;1).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32451</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Mon, 29 Aug 2011 16:18:17 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32451</guid>
		<description>Arjun,

You&#039;ll need to develop your own licensing solution. We don&#039;t have an extensible licensing interface.</description>
		<content:encoded><![CDATA[<p>Arjun,</p>
<p>You&#8217;ll need to develop your own licensing solution. We don&#8217;t have an extensible licensing interface.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arjun Raj</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32425</link>
		<dc:creator>Arjun Raj</dc:creator>
		<pubDate>Thu, 18 Aug 2011 00:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32425</guid>
		<description>Hi Peter,

I have developed a MATLAB program that I would like to deploy as a standalone application.  I would like to charge for it and implement a license key (per user per year) that ties to MAC address (much like MATLAB does).  Is there any documented/easy way to do this in MATLAB?  Or would I have to develop my own solution?

Thanks,
Arjun</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>I have developed a MATLAB program that I would like to deploy as a standalone application.  I would like to charge for it and implement a license key (per user per year) that ties to MAC address (much like MATLAB does).  Is there any documented/easy way to do this in MATLAB?  Or would I have to develop my own solution?</p>
<p>Thanks,<br />
Arjun</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard de Garis</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32140</link>
		<dc:creator>Richard de Garis</dc:creator>
		<pubDate>Thu, 24 Mar 2011 20:41:16 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32140</guid>
		<description>Peter, or Loren,

I&#039;m finding the relative ease of working with Matlab scripts to open/close excel files, read/write from/to them, etc. is rapidly turning into a headache in terms of deploying equivalent functions, for other people to use.

I&#039;ve already discovered that I can&#039;t access the current Excel process directly through actxGetRunningServer, because the request to Excel for its process handle never gets answered because Excel itself is waiting for the called Matlab function to complete. Frustrating!

Now, the wonderful global workspace doesn&#039;t directly translate across to deployment space.  Regarding your recommendation to use a handle object, I have no experience creating &amp; using objects.  Do I simply declare a methodless class and stick all the data in the properties section, like:

&lt;pre classdef sharedata 
   properties
      data1
      data2
      data3.sub1
      data3.sub2
   end
end
&lt;/pre&gt;

Where do I declare it; do I not need to type and size the variables?  How do I instantiate it and use it, etc.

And what about the setmcruserdata and getmcruserdata functions - are these an alternative to using a handle object?  The documentation on these functions and how to use them isn&#039;t clear.

I need help, please, as development has ground to a halt.</description>
		<content:encoded><![CDATA[<p>Peter, or Loren,</p>
<p>I&#8217;m finding the relative ease of working with Matlab scripts to open/close excel files, read/write from/to them, etc. is rapidly turning into a headache in terms of deploying equivalent functions, for other people to use.</p>
<p>I&#8217;ve already discovered that I can&#8217;t access the current Excel process directly through actxGetRunningServer, because the request to Excel for its process handle never gets answered because Excel itself is waiting for the called Matlab function to complete. Frustrating!</p>
<p>Now, the wonderful global workspace doesn&#8217;t directly translate across to deployment space.  Regarding your recommendation to use a handle object, I have no experience creating &amp; using objects.  Do I simply declare a methodless class and stick all the data in the properties section, like:</p>
<p>&lt;pre classdef sharedata<br />
   properties<br />
      data1<br />
      data2<br />
      data3.sub1<br />
      data3.sub2<br />
   end<br />
end

</p><p>Where do I declare it; do I not need to type and size the variables?  How do I instantiate it and use it, etc.</p>
<p>And what about the setmcruserdata and getmcruserdata functions - are these an alternative to using a handle object?  The documentation on these functions and how to use them isn't clear.</p>
<p>I need help, please, as development has ground to a halt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hooman</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32122</link>
		<dc:creator>Hooman</dc:creator>
		<pubDate>Tue, 15 Mar 2011 16:09:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-32122</guid>
		<description>Loren,

I have two folders which includes two DLL libraries. These two use other DLL libraries. 
Let&#039;s call the folders F1 and F2. Folder F1 contains DLL1 with all of its required DLLs. Folder F2 include DLL2 with all of its required DLLs. 

In my M file in GUI OpeningFcn I add assembly as follows: 

&lt;pre&gt;
NET.addAssembly(strcat(ctfroot,&#039;\F1\DLL1.dll&#039;));
NET.addAssembly(strcat(ctfroot,&#039;\F2\DLL2.dll&#039;));
&lt;/pre&gt;


The program is running on my machine in MATLAB. The MCR is set up properly on the destintation machine. ( It runs other compiled files. ) 

I have put F1 and F2 in the program files&gt;MATLAB&gt;2010b, and included them in the Compiler for packaging. 

However, when we click on exe file in the destination machine I hear a beep and the program does not run. 

I have spoken to tech support and they referred me to one of your pages, which has taken my program to this point. What is it that I am missing?</description>
		<content:encoded><![CDATA[<p>Loren,</p>
<p>I have two folders which includes two DLL libraries. These two use other DLL libraries.<br />
Let&#8217;s call the folders F1 and F2. Folder F1 contains DLL1 with all of its required DLLs. Folder F2 include DLL2 with all of its required DLLs. </p>
<p>In my M file in GUI OpeningFcn I add assembly as follows: </p>
<pre>
NET.addAssembly(strcat(ctfroot,'\F1\DLL1.dll'));
NET.addAssembly(strcat(ctfroot,'\F2\DLL2.dll'));
</pre>
<p>The program is running on my machine in MATLAB. The MCR is set up properly on the destintation machine. ( It runs other compiled files. ) </p>
<p>I have put F1 and F2 in the program files&gt;MATLAB&gt;2010b, and included them in the Compiler for packaging. </p>
<p>However, when we click on exe file in the destination machine I hear a beep and the program does not run. </p>
<p>I have spoken to tech support and they referred me to one of your pages, which has taken my program to this point. What is it that I am missing?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31997</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Thu, 27 Jan 2011 19:41:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31997</guid>
		<description>Carl,

The compiler supports MATLAB objects and the package system, so what you&#039;re trying should work, I think (I haven&#039;t tried that myself.) I&#039;d suggest, since you&#039;ve got such a specific question, that you contact support (support@mathworks.com) and provide them with details -- what packages you were using, what you tried to compile, what errors you encountered, etc. They&#039;re great at diagnosing problems like this.</description>
		<content:encoded><![CDATA[<p>Carl,</p>
<p>The compiler supports MATLAB objects and the package system, so what you&#8217;re trying should work, I think (I haven&#8217;t tried that myself.) I&#8217;d suggest, since you&#8217;ve got such a specific question, that you contact support (support@mathworks.com) and provide them with details &#8212; what packages you were using, what you tried to compile, what errors you encountered, etc. They&#8217;re great at diagnosing problems like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Webb</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31996</link>
		<dc:creator>Peter Webb</dc:creator>
		<pubDate>Thu, 27 Jan 2011 19:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31996</guid>
		<description>Ted,

Without knowing exactly what errors you encountered, it&#039;s hard to diagnose the problem. Have you contacted support? (Try support@mathworks.com.) This is the kind of question they&#039;re very good at answering.

(IMHO, you should be able to use -a to include the JAR file -- but make sure you get all the JARs it depends on -- or simply require the customer to have JDBC available on their site.)</description>
		<content:encoded><![CDATA[<p>Ted,</p>
<p>Without knowing exactly what errors you encountered, it&#8217;s hard to diagnose the problem. Have you contacted support? (Try <a href="mailto:support@mathworks.com">support@mathworks.com</a>.) This is the kind of question they&#8217;re very good at answering.</p>
<p>(IMHO, you should be able to use -a to include the JAR file &#8212; but make sure you get all the JARs it depends on &#8212; or simply require the customer to have JDBC available on their site.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl Wouters</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31991</link>
		<dc:creator>Carl Wouters</dc:creator>
		<pubDate>Wed, 26 Jan 2011 12:45:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31991</guid>
		<description>Hi,

very nice posts !!
But there is something that no one ever talks about when they are talking about the compiler.

At work we are making our own toolbox and we use ofcourse packages for this and object oriented structures.

As a test we tried with a trial version to compile a specific function that ofcourse needs different functions that are in different packages in the same main root folder.
This didn&#039;t work,...

I have been looking a while now for some information about this, without any luck.

So my question: Is it possible to compile a function that uses functions embeded in different packages?

I thank you in advance,

Carl</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>very nice posts !!<br />
But there is something that no one ever talks about when they are talking about the compiler.</p>
<p>At work we are making our own toolbox and we use ofcourse packages for this and object oriented structures.</p>
<p>As a test we tried with a trial version to compile a specific function that ofcourse needs different functions that are in different packages in the same main root folder.<br />
This didn&#8217;t work,&#8230;</p>
<p>I have been looking a while now for some information about this, without any luck.</p>
<p>So my question: Is it possible to compile a function that uses functions embeded in different packages?</p>
<p>I thank you in advance,</p>
<p>Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted</title>
		<link>http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31979</link>
		<dc:creator>Ted</dc:creator>
		<pubDate>Wed, 19 Jan 2011 19:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/06/19/writing-deployable-code/#comment-31979</guid>
		<description>Hello,

I have a perhaps simple question regarding the java path for Matlab Ex Builder. If I want to distribute an application that uses jdbc with matlab, how do I package the jar file with deploytool?
My previous attempts have failed.

Thank you.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I have a perhaps simple question regarding the java path for Matlab Ex Builder. If I want to distribute an application that uses jdbc with matlab, how do I package the jar file with deploytool?<br />
My previous attempts have failed.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

