필터 지우기
필터 지우기

How do I get project to include P-Code so that the code can be referenced by another project?

조회 수: 5 (최근 30일)
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개)

Fraser Macmillen
Fraser Macmillen 2020년 8월 10일
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
Fraser Macmillen
Fraser Macmillen 2020년 8월 10일
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!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Project Setup에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by