matlab - 从 Matlab 代码构建一个独立的应用程序

标签 matlab matlab-deployment matlab-compiler source-code-protection

我有一些 Matlab 代码和一个 GUI,我想制作一个独立的应用程序来保护我的源代码。我怎样才能独立构建这个? 感谢您提供任何指导。

============================================= =================================

我在帮助中找到:

If you do not want to distribute your proprietary application code in this format, you can use one of these more secure options instead:

• Deploy as P-code — Convert some or all of your source code files to a content-obscured form called a P-code file (from its .p file extension), and distribute your application code in this format.

• Compile into binary format — Compile your source code files using the MATLAB Compiler to produce a standalone application. Distribute the latter to end users of your application.

使用 P 代码非常简单,没有问题。

Building a Standalone Executable

Another way to protect your source code is to build it into a standalone executable and distribute the executable, along with any other necessary files, to external customers. You must have the MATLAB Compiler and a supported C or C++ compiler installed to prepare files for deployment. The end user, however, does not need MATLAB.

To build a standalone application for your MATLAB application, develop and debug your application following the usual procedure for MATLAB program files. Then, generate the executable file or files following the instructions in Steps by the Programmer to Deploy to End Users in the MATLAB Compiler documentation.

  1. Create a package that contains the software needed at run time. See What Software Does a Programmer Need? for more details.

To distribute a standalone application created with MATLAB Compiler to a development machine, create a package that includes the following files.

MCRInstaller.exe (Windows)

MCRInstaller is a self-extracting executable that installs the necessary components to develop your application. This file is included with MATLAB Compiler.

application_name.exe (Windows)

Application created by MATLAB Compiler. Maci64 must include the bundle directory hierarchy.

最佳答案

我认为您已经被 .exe 文件的吸引力所吸引。如果您的目标是知识产权保护,那么 .p 代码就足够了。如果您的目标是拥有一个 .exe 文件,那么它不仅仅是 IP 保护。

其他人已经表示文档简单明了。 Here is a very simple step-by-step example使用 Matlab 编译器创建编译示例。请记住,您需要购买编译器,或者如果您想了解它是如何完成的,至少使用试用版。

关于matlab - 从 Matlab 代码构建一个独立的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6966318/

相关文章:

matlab - 多维数组的元素矩阵乘法

java - 如何从 Java 运行 MATLAB 代码?

java - 使用 java 执行 Matlab 函数

c# - 如何重定向已编译的 matlab 脚本的输出?

matlab - 如何从变量中手动输出发布内容

matlab - 如何解决此错误: “plot: Wrong size for input arguments #2 and #3: Incompatible dimensions.”?

algorithm - 判断线段的方向是顺时针还是逆时针

java - MATLAB JA Builder 在 MCRConfiguration 中抛出 NullPointerException

compiler-errors - 为自定义MATLAB工具箱执行编译器脚本时出错

c# - 从 C# 调用 Matlab 编译函数时执行错误