Discussion:
No .ctf file generated by MATLAB compiler
(too old to reply)
Scott Dobbins
2008-09-17 16:04:03 UTC
Permalink
I'm trying to deploy a stand alone executable file generated by the MATLAB compiler on a computer that does not have MATLAB installed.

According to the MATLAB compiler documentation, I need to:
1)Run MCRInstaller.exe on the target computer
2)Copy the .exe file (my m file compiled) to the target computer
3)Copy the .ctf file to the target computer.

Questions:
1) Are these three the only files needed in the package?
2) What folder do I copy the .exe to on the target computer? Does it matter?
3) The .ctf file is supposed to be automatically generated by the compiler. This didn't happen. I searched for *.ctf on my computer and came up with zilch. I'm using the -m compiler option and no other. Do I need to add/change compiler options to get my .ctf file?
4) Once I do get the .ctf, what folder do I copy it to on the target computer?

Editorial:
Mathworks should have created a wizard to do compiling and create a self extracting executable for the target machine AUTOMATICALLY. Following the MATLAB compiler documentation is like following a badly written program with GOTOs all over the place. I'm trying to do a job in a reasonable amount of time, not be an expert on the intricacies of compiling and preparing a package. That's the sort of thing computers are really good at. And yes, I have sent this off to Mathworks for feedback.

Thanks for your help.

Scott
Stephen Lienhard
2008-09-17 16:40:21 UTC
Permalink
Post by Scott Dobbins
I'm trying to deploy a stand alone executable file generated by the MATLAB compiler on a computer that does not have MATLAB installed.
<snip>
Post by Scott Dobbins
Mathworks should have created a wizard to do compiling
Check out the _deploytool_. Type deploytool at the command line.


Stephen
Scott Dobbins
2008-09-17 20:24:03 UTC
Permalink
Post by Stephen Lienhard
Post by Scott Dobbins
I'm trying to deploy a stand alone executable file generated by the MATLAB compiler on a computer that does not have MATLAB installed.
<snip>
Post by Scott Dobbins
Mathworks should have created a wizard to do compiling
Check out the _deploytool_. Type deploytool at the command line.
Stephen
Stephen:

Thanks for responding.

Deploytool looks pretty handy. I took my existing project and packaged it successfully. Well, I don't know how successful it will be until I run the *_pkg.exe file. But the packager said "Packaging completed" so that's a good sign. Thanks again.
Matt
2008-09-17 21:37:02 UTC
Permalink
Post by Scott Dobbins
Following the MATLAB compiler documentation is like following a badly written program with GOTOs all over the place. I'm trying to do a job in a reasonable amount of time, not be an expert on the intricacies of compiling and preparing a package. That's the sort of thing computers are really good at. And yes, I have sent this off to Mathworks for feedback.
I agree about the documentation.

I'm currently wrestling with the same kind of thing.

One comment though. The readme.txt produced output by deploytool seems a bit better than the online compiler documentation. It produces deployment instructions that are a bit more up-to-date and more self-contained.
Bill
2008-09-18 01:14:03 UTC
Permalink
I'm sorry, but I had no trouble at all compiling a VERY complicated Matlab job created with Guide. It compiled, produced .exe and .ctf files and MCRInstaller came along for the ride. It unpacked at my users network and they went on with their job.

Did I mention that I learned to read in 2nd grade? (I went to public school). Good Grief......................
Matt
2008-09-18 05:53:02 UTC
Permalink
Post by Bill
I'm sorry, but I had no trouble at all compiling a VERY complicated Matlab job created with Guide. It compiled, produced .exe and .ctf files and MCRInstaller came along for the ride. It unpacked at my users network and they went on with their job.
Did I mention that I learned to read in 2nd grade? (I went to public school). Good Grief......................
Well, that's very fortunate for you, but Scott is not wrong. Not all versions of the compiler produce .ctf files, apparently, and mine was the same way. Nor did I find anything in the user documentation explaining that .ctf files may not be generated. I found it only in the readme.txt file produced by deploytool. If it's in the documentation, so be it, but it's obscure.

In any case, Scott, the .exe file produced by the compiler does seem to be self-sufficient, and not to require .ctf files.
Sean Geary
2008-09-18 18:00:55 UTC
Permalink
Post by Matt
In any case, Scott, the .exe file produced by the compiler does seem to be self-sufficient, and not to require .ctf files.
Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
For older versions it is not.
Matt
2008-09-18 20:37:02 UTC
Permalink
Post by Matt
In any case, Scott, the .exe file produced by the compiler does seem to b=
e self-sufficient, and not to require .ctf files.
Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
For older versions it is not.
thanks. good to know.
Dean Fang
2008-09-25 18:29:02 UTC
Permalink
Post by Matt
In any case, Scott, the .exe file produced by the compiler does seem to b=
e self-sufficient, and not to require .ctf files.
Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
For older versions it is not.
More FYI: You can force MATLAB to generate ctf files with deploytool. Open the cpj file with deploytool and go to settings. In 'General', uncheck the 'Embed CTF archive into the Application'. Although under most circumstances, maybe embedding the CTF is a better choice.
Cross
2008-11-25 17:44:02 UTC
Permalink
Post by Dean Fang
Post by Matt
In any case, Scott, the .exe file produced by the compiler does seem to b=
e self-sufficient, and not to require .ctf files.
Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
For older versions it is not.
More FYI: You can force MATLAB to generate ctf files with deploytool. Open the cpj file with deploytool and go to settings. In 'General', uncheck the 'Embed CTF archive into the Application'. Although under most circumstances, maybe embedding the CTF is a better choice.
Yes, right. But without CTF file, how can I access the files I have added into the compiled exe file?
I need to fetch some of the added files as configuration.

Cross
Peter Webb
2008-11-26 15:10:57 UTC
Permalink
Once the files have been placed into a CTF archive, they are really not
useful to anything but the compiled application. M-files will be encrypted,
and locked to that particular application, so they can't be used with any
other compiled applications. Nor can you execute them in MATLAB.

If you just wish to store them, for achival purposes, you can find them in
the MCR Cache. Here's the documentation page explaining how to view and
manipulate the MCR Cache:

http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/index.html?/access/helpdesk/help/toolbox/compiler/brl4_f1-1.html&http://www.mathworks.com/cgi-bin/texis/webinator/search/

Alternatively, you can generate a CTF archive separate from your executable
by using the mcc flag -C.
Post by Cross
Post by Dean Fang
Post by Matt
In any case, Scott, the .exe file produced by the compiler does seem to b=
e self-sufficient, and not to require .ctf files.
Just a FYI. The .ctf file is in the .exe for MATLAB 7.6 (R2008a).
For older versions it is not.
More FYI: You can force MATLAB to generate ctf files with deploytool.
Open the cpj file with deploytool and go to settings. In 'General',
uncheck the 'Embed CTF archive into the Application'. Although under most
circumstances, maybe embedding the CTF is a better choice.
Yes, right. But without CTF file, how can I access the files I have added
into the compiled exe file?
I need to fetch some of the added files as configuration.
Cross
Loading...