I've created a deployment project which works rather well and now I want to add it to source control repository for others to use.
The main problem I'm facing is that the .prj file which deploytool creates contains absolute paths which will not work on other computers. So far I've tried the following:
- Create the stand alone exe using just
mccwithoutdeploytool. This works great but I could find a way to create the final_pkg.exewhich contains everything. mcc doesn't seem to be able to create this file and there doesn't seem to be any other tool which does. Is this really the case? - Edit the
.prjfile to include relative paths instead of absolute paths. This only works partially because the.prjfile contains a section calledMATLABPathwhich is always replaced with the currentsetpathof matlab. anyone which uses this file will have to check it out since it is being changed when used. - Find a way to generate the
.prjfile. the mcc documentation say:Project files created using either mcc or deploytool are eligible to use this option.suggesting there is a way to create a.prjfile usingmccbut I wasn't able to find how this can be done.
Is there a solution to this situation?
Here's the mcc option documentation.
What I've found most useful is creating a standalone exe using mcc:
The -C option tells
mccto generate the ctf file (which is the archive of all the compiled MATLAB stuff) as a separate file. I've had trouble on some target computers using a single exe with everything compiled in.The -m option tells
mccto make an exe.The -a options tell
mccto include the specified file in the package. For instance, if your script uses two fig files and a data file, you need a -a for each to make sure they get put in the output package.To tell mcc to use a project file (I've never done this myself):
Also, if you're using R2009a on Windows, there's a known bug that requires some manifest manipulation.