从Matlab代码构建一个独立的应用程序 [英] build a standalone application from Matlab code

查看:175
本文介绍了从Matlab代码构建一个独立的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些Matlab代码和一个GUI,我想制作一个独立的应用程序来保护我的源代码.我如何建立这个独立的? 谢谢您的指导.

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

我在帮助中找到了

如果您不想以这种格式分发专有的应用程序代码,则可以使用以下更安全的选项之一:

•作为P代码部署-将您的部分或全部源代码文件转换为内容模糊的形式,称为P代码文件(来自其.p文件扩展名),并以这种格式分发您的应用程序代码. /p>

•编译为二进制格式-使用MATLAB编译器编译源代码文件以生成独立的应用程序.将后者分发给应用程序的最终用户.

使用P代码很简单,没有问题.

构建独立的可执行文件

保护源代码的另一种方法是将其构建为独立的可执行文件,并将该可执行文件以及任何其他必要的文件分发给外部客户.您必须安装MATLAB编译器和受支持的C或C ++编译器才能准备要部署的文件.但是,最终用户不需要MATLAB.

要为MATLAB应用程序构建独立的应用程序,请按照MATLAB程序文件的常规过程开发和调试应用程序.然后,按照MATLAB编译器文档中程序员将其部署到最终用户的步骤"中的说明生成一个或多个可执行文件.

  1. 创建一个包含运行时所需软件的软件包.看看程序员需要什么软件?有关更多详细信息.

要将使用MATLAB Compiler创建的独立应用程序分发到开发计算机,请创建一个包含以下文件的包.

MCRInstaller.exe(Windows)

MCRInstaller是一个自解压可执行文件,它安装了必要的组件以开发您的应用程序.该文件包含在MATLAB编译器中.

application_name.exe(Windows)

由MATLAB Compiler创建的应用程序. Maci64必须包含捆绑软件目录的层次结构.

解决方案

我认为您已经对.exe文件的吸引力了如指掌.如果您的目标是IP保护,那么.p代码就足够了.如果您的目标是拥有一个.exe文件,那么这不仅是IP保护.

其他人已经声明该文档简单明了. 这里是一个非常简单的分步示例,用于创建已编译的例如,使用Matlab编译器.请记住,您需要购买编译器,或者至少要使用试用版才能了解它的完成方式.

I have some Matlab code and a GUI for it and I want to make a standalone app to Protect my Source Code. How can I build this standalone? Thank you for any guide.

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

I found in help:

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.

working with P-codes is straightforward and no problem.

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.

解决方案

I think you're getting caught up on the attraction of the .exe file. If your goal is IP protection, then the .p code suffices. If your goal is to have a .exe file, then it's not simply IP protection.

Others have already stated that the documentation is simple and straightforward. Here is a very simple step-by-step example for creating a compiled example, using the Matlab compiler. Keep in mind you need to buy the compiler or at least use the trial version if you want to see how it is done.

这篇关于从Matlab代码构建一个独立的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆