Generate command-line command from library compiler project?

I am using the Library Compiler to generate a Java package. From the saved project, is there any way to generate the command-line command to perform the compilation? I looked in the `*.prj` project file, and it's way more complicated than I want to deal with.
If the answer is "no", that would be helpful as well.
Thanks.

 採用された回答

Todd Flanagan
Todd Flanagan 2020 年 10 月 29 日

0 投票

You can use:
deploytool -build foo.prj
To build from the command line using the current settings in the project.
Form the os command line, you can use
deploytool /build foo.prj
These are current supported, but are on a path to deprecation. The command will be replaced with similar, but improved functionality in a future release.

3 件のコメント

FM
FM 2020 年 10 月 29 日
Thank you, Todd. I noted that "deploytool` is located at "/c/Program Files/MATLAB/R2019a/bin/deploytool.bat".
I also found that the compilation process generates a "PackagingLog.html", which start off with a long "mcc" command that is cryptic to non-experts (me). I haven't yet given it a spin.
Todd Flanagan
Todd Flanagan 2020 年 10 月 29 日
The mcc command is a litte cryptic, for sure. Mostly what is says is "make a java class out of these files and put the output in this folder". But, it can get a little verbose. We put it there so you can copy and paste it right out of the file and use it in a script, which can be convenient.
deploytool.bat is in the bin folder and you should be able to call it directly from the OS command line. This is useful if you are using some sort of automated build system. If you are just working in MATLAB,
>> deployool -build foo.prj
is a good way to go.
FM
FM 2020 年 10 月 29 日
Thanks again, Todd.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB Compiler SDK についてさらに検索

製品

リリース

R2019a

質問済み:

FM
2020 年 10 月 28 日

コメント済み:

FM
2020 年 10 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by