How does MATLAB app designer call external. m functions after packaging into exe?
Respuestas (2)
- Include External Functions in the Package: Ideally, you should include all necessary .m files in the packaging process. This ensures that all dependencies are available when the EXE runs.
- Calling external functions in App Designer - MATLAB Answers - MATLAB Central
- How can I call external functions in different paths within App Designer - MATLAB Answers - MATLAB Central
3 comentarios
- Use the MATLAB Compiler to compile your .m files into standalone executables or shared libraries. This approach converts your MATLAB code into a binary format, which is much harder to reverse-engineer compared to pcode.
- In addition to pcode, you can manually obfuscate your code by renaming variables and functions to non-descriptive names, removing comments, and using complex logic structures. This makes it more difficult for someone to understand and reverse-engineer your code.
When you package into exe then external .m that are not packaged as part of the exe, cause an error when they are called.
Only .m and .mlx and .p and .mdl and .slx (and possibly a few others) that are packaged with the exe can be called. It is impossible for external .m not bundled with the exe to be called. All .m must have been pre-parsed and encoded into ctf format to be callable.
The purpose of compiling into exe is to create a limited-functionality executable. If it were possible to run external .m that were not compiled into the bundle then unlimited functionality could be built. Imagine an executable that simply called an external .m and returned, then the user could supply arbitrary code in the .m and thus evade the need for a matlab license to execute arbitrary code. Therefore it will never be possible to execute external .m that are not bundled into the exe
Ver también
Categorías
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!