When using the deploytool, can I specify a pre-build script?

2 ビュー (過去 30 日間)
Michael
Michael 2012 年 7 月 16 日
I use the deploytool to build a DLL used in C# code. The Matlab code is version controlled with Subversion. I would like to run a shell escape command prior to (but as part of) the compilation process to obtain the latest revision number, so that the compiled product can return this information when requested. This is a common task in other IDEs. How can I do this in Matlab?
I was hoping that the command ismcc would allow me to do this, but it does not appear to work that way. I figured I could invoke the shell escape command to write the version information to a txt file, and have a function compiled into the deployment which reads that information from the file. Perhaps somebody familiar with Subversion and the Matlab compiler knows a different way inject the version information into the compiled product?

回答 (1 件)

Michael
Michael 2012 年 7 月 16 日
I found a reasonable work-around. I can create a function that calls "deploytool -build myproject.prj". In that function, I can do the necessary pre-build steps.
FYI, deploytool appears to run in a separate thread, so you cannot access the success/failure of deploytool, and therefore cannot use this work-around to handle post-build events.
For people unfamiliar with build events, I'm talking about this.

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by