Is it possible to generate/update MATLAB toolbox project file (*.prj) programmatically?
Mostrar comentarios más antiguos
Hi,
I have created a custom toolbox. Now I'm trying to have a continuous development process that would automatically package the toolbox every midnight (if any of the files have changed). I'm trying to understand if it would be possible to update the toolbox project file programmatically - to change toolbox version, project file list, excluded file list, etc. I can then use the updated prj file to package the new toolbox.
Cheers,
sunny
Respuestas (3)
Sean de Wolski
el 23 de Feb. de 2018
1 voto
https://www.mathworks.com/help/releases/R2017b/matlab/ref/matlab.addons.toolbox.packagetoolbox.html and friends.
I don't know of a documented way to generate the prj file the first time.
7 comentarios
Sunny Talekar
el 23 de Feb. de 2018
Frederik Zilstorff
el 6 de Jul. de 2018
Sunny, did you find an answer for this problem? Thank you in advance.
Sean de Wolski
el 6 de Jul. de 2018
There is no documented way as of R2018a. I put in the enhancement request and will add your vote to it.
Sunny Talekar
el 16 de Jul. de 2018
James
el 23 de Jul. de 2018
upvote from me for this too.
Sean de Wolski
el 23 de Jul. de 2018
Done!
Harley Day
el 10 de Sept. de 2018
Editada: Harley Day
el 10 de Sept. de 2018
Yes I've been thinking the same thing. There doesn't seem to be a way to programatically update a matlab project file. This would be useful for the purposes of code maintenance from github. My continuous integration server could then be configured to build and distribute new releases of the toolbox when I commit to the master branch.
Sunny Talekar
el 1 de Mzo. de 2019
1 voto
4 comentarios
Harley Day
el 1 de Mzo. de 2019
Hi Sunny,
Great. Any chance we can use your code?
H
Sunny Talekar
el 5 de Mzo. de 2019
Harley Day
el 25 de Jun. de 2019
Hi Sunny,
Any progress?
H
Eric Hoffmann
el 3 de Oct. de 2019
Hi Sunny,
I too would be interested in looking at your code.
Thanks,
Eric
Sly Knight
el 14 de Jul. de 2022
Use readstruct and writestruct.
project = readstruct(fullfile(path,project_name.prj),'FileType','xml');
project.configuration.param_version = project_file.configuration.param_version + 1;
writestruct(project,fullfile(path,project_name.prj),'FileType','xml')
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!