Compile a stand-alone application from a user-created toolbox

3 visualizaciones (últimos 30 días)
Steven Lulich
Steven Lulich el 30 de Mzo. de 2017
Respondida: Sangeetha Jayaprakash el 3 de Abr. de 2017
I have a custom-made toolbox with a structure that looks something like this:
>> pwd
<PATH>\code
>> ls
entryFcn.m
+pkg1
+pkg2
>> cd +pkg1; ls
fcn1.m
private
>> cd private; ls
prfcn1.mexw64
>> cd ../../+pkg2; ls
+subpkg1
+subpkg2
>> cd subpkg1; ls
sfcn1.m;
>> cd ../subpkg2; ls
sfcn2.m
The toolbox therefore makes heavy use of packages, and functions such as entryFcn.m and sfcn2.m include commands such as
output = pkg1.fcn1(input);
and
output = pkg2.subpkg1.sfcn1(input);
Note that the toolbox contains *.m, *.p, *.mexw32, *.mexw64, *.cpp, *.h, and *.dll files.
The toolbox entry function (entryFcn.m) creates a MATLAB figure, and it and several additional functions within various packages and subpackages create a number of ui tools (i.e. uitab, uicontrol), but these are all done programmatically - there are no *.fig files within the toolbox.
I'd like to be able to share this toolbox with people don't have access to MATLAB, and thought that compiling it would work, using the MATLAB Compiler App. However, the compiled *.exe file does not seem to be dealing well with the packages and the program is therefore useless.
Is there a way to compile a custom-made toolbox that contains custom-made packages?
Thanks!

Respuestas (1)

Sangeetha Jayaprakash
Sangeetha Jayaprakash el 3 de Abr. de 2017
I assume that the MATLAB functions you are trying to compile into an application are supported for compilation by the MATLAB Compiler. Refer this link for details on this:
To add a +package type folder for compilation, add the folder to the "Files required for your application to run" tab of the Application compiler app.
Alternatively, if compiling using the 'mcc' command , you can use the '-a' flag to do the same. Refer the link below for information on this:

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by