MATLAB .exe distributable with pcode (*.p) file

2 次查看(过去 30 天)
Hi,
1) i have programmed a code with additional *.p file. the main GUI will be needing the *.p for most of the functions. at first i was thinking to build a GUI.exe that is fixed, if update programming is done, since most functions is in the pcode, only the *.p will be needed to be changed.
2) however i noticed that when the GUI is compiled into .exe, the *.p file is not needed??? is that mean distributable .exe is compiled including the *.p file in it?
3) when i compiled new *.p code and replace the old *.p file, the GUI.exe still load the old *.p code.
4) any recommendations so that 1) can be done, i think using .mat can right? other than that?
Thank you.

采纳的回答

Kaustubha Govind
Kaustubha Govind 2011-10-10
MATLAB Compiler finds all *.m, *.p, MEX-files, etc. that your application calls, and packages them into a CTF Archive. It then generates a C/C++ wrapper that calls into your main .m file. So, your .p file is actually part of the CTF archive that is packaged with your executable. I don't think there is a reliable way to simply re-generate a new .p file and somehow plug it into the deployed application. As far as I know, you will need to re-compile the application if the .p changes.
Typically .mat files are added to the CTF archive when you add them under the "Additional Files" section in DEPLOYTOOL or use the -a option with the MCC command (I'm not sure if MATLAB Compiler automatically grabs it, but intuition says that it doesn't). You can probably use UIGETFILE to ask the user to specify a .mat file, so that a new one can be specified each time. Or, you could store the MAT-file at a common location on all deployment machines, and always look at that path.
  6 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Standalone Applications 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by