Disallow running an App in an older version of ML?

1 回表示 (過去 30 日間)
Chris
Chris 2020 年 1 月 9 日
コメント済み: Sean de Wolski 2020 年 1 月 9 日
Is there a way to disallow or inform the user that they cant run an installable App in an older version of ML?
I have made an App that is used across my company; and have coworkers who are trying to use the app in older versions of ML where it crashes with cryptic messages. I made the app in 19a; after installing in anything older than 18a it crashes when run. Apparently, I am using some features that were added in 18a and are not back compatible (this is fine; I am glad ML is adding new features!).
The app crashes before getting to the StartupFcn, so I cant do a version test in there.
I have no problem requiring my coworkers to use 18a or newer to use the app but I need a way to communicate that; ideally it should not install in older versions or give a meaningful error when run. I am distributing the app via an internal repository.

回答 (1 件)

Ruger28
Ruger28 2020 年 1 月 9 日
編集済み: Ruger28 2020 年 1 月 9 日
if verLessThan('matlab','9.4') % 2018a = 9.4
disp('Version of Matlab is too old. Please open in MATLAB 2018a or later.')
else
% run your app
end
  5 件のコメント
Chris
Chris 2020 年 1 月 9 日
Sean,
I will give a wrapper a try, thanks.
I see you are MathWorks staff, can we expect that version requirements will get added into the App designer or the packageing process at some point?
-Chris
Sean de Wolski
Sean de Wolski 2020 年 1 月 9 日
Hi Chris,
Version requirements are already enforced in that a user of an older version gets an error. It could just probably be a nicer error message provided like you're saying. I'm not in development so can't comment on their plans but I can say that you contacting them via tech support and complaining is the best way to motivate them to do things :)

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by