How do I get project to include P-Code so that the code can be referenced by another project?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have some old proprietry code provided by another Business Unit. To protect the IP the code has been saved as P-Code. The P-Code was created a while ago (probaby using MATLAB 2014 or 2016).
We are currently using 2018b but will (hopefully) be moving to 2020a soon. I have therefore tested the P-Code directly and can confirm that it all still runs.
We are developing new tools to use the functionality provided by the P-Code. However, when a new Project is created from the folder none of the P-Code is included in the project. This means that we are unable to reference the project, to use the P-Code, from our development project.
Any suggestions on how to get project to include the P-Code?
1 comentario
Walter Roberson
el 24 de Jul. de 2020
What happens if you specifically add it to the project ? such as with the -a command line flag.
Respuestas (1)
Fraser Macmillen
el 10 de Ag. de 2020
Hi Kevin
So it is correct that "when a new Project is created from the folder none of the P-Code is included in the project" - this is because P-code files are seen as derived files and not included by default (the same would be true of .slxp). Whether this is the right thing to do we could debate... but....
The initial set up of a project does not limit subsequent addition to / customisation of the project - so one can certainly add .p & .slxp files to a project. This can be done the usual way via the Project view, select the "All" tab and then select the .p files and right click to add to the project:
Using the API would an alternative.
Projects I think can be very helpful when dealing with I.P. For example, say an OEM has a project "A" that needs models, utilities etc from a supplier, but those models/utilities need to be obfuscated. The supplier in turn has a project "B" that contains their models/functions, etc. These files that the suplier controls can be labelled "unrestricted", "protected" etc. The supplier can then make a second project "Bshared" that is automatically populated from project B with files as appropriate - i.e. all "protected" labelled files would be protected and the .p/.slxp files saved into Bshared. Bshared may then be shared directly with the OEM as a complete project, either via a common GitHub type set-up or via project archives. This process can be highly automated - I can share an example if helpful.
Hope this helps answer your question
Best Regards
Fraser
1 comentario
Fraser Macmillen
el 10 de Ag. de 2020
One more thing....
If prior to creating a project from folders the files in the folders are already committed in a recognised source control tool (git/svn) then when the project is first created all files that are under source control will be added to the project from the outset (including protected files) - just so you know!
Ver también
Categorías
Más información sobre Project Setup en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!