Standalone application can't execute the p-code
3 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I designed a GUI using MATLAb R2019b, in the GUI there is a button where pushing it executes the command:
run 'trial.m'
I want to share the GUI with other users so I must share the (trial.m) file too with them but I don't want them to be able to read the code inside the m file so I saved it as p-code file and in the GUI i changed the command to
run 'trial.p'
The GUI works fine with me as long as i am running it inside MATLAB, my problem starts after I save the GUI as "standalone desktop application"
I attach the p-code file with the GUI so that when the user installs it, they will have the p-code file
When I run the standalone application, the GUI works except for the button that should run the (p file), the (p file) doesn't work. the error says that the GUI can't analyze the (p file)
So briefly, I made the p file to prevent the user from reading the code but instead I prevented the GUI from reading it too.
Is there a way to make the GUI access the p file?
Thank you
0 个评论
采纳的回答
Image Analyst
2019-11-2
In your program, instead of having this:
run 'trial.m'
have simply this:
trial
When it's compiled, it will be able to find trial.m and build it into your standalone executable. The source code of trial.m will not be visible to your end users.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!