Matlab GUI cache file

2 ビュー (過去 30 日間)
Ye Zhang
Ye Zhang 2021 年 6 月 18 日
回答済み: Pratyush 2024 年 5 月 24 日
Hi,
I created a exe file of Matlab GUI program, and found that each time I run the exe file, the source codes (.m files) will be generated in a cache folder. I was wondering that is that possible to hide those source codes to prevent other users from finding those when they use the exe file.
Thanks.
Regards,

回答 (1 件)

Pratyush
Pratyush 2024 年 5 月 24 日
Hi Ye,
To prevent users from accessing source code (.m files) when running a MATLAB GUI program compiled into an executable (EXE) file, consider the following key points:
  • The MATLAB Runtime cache, which improves performance, does not include readable source code by default but rather necessary packaged components for execution.
  • Use the 'MCR_CACHE_ROOT' environment variable to change the cache directory to a less accessible location.
  • Implement a feature in your application to clear the cache directory upon exit, though this may affect performance for subsequent runs.
  • MATLAB Compiler encrypts your code during compilation, making it difficult to access the original .m files from the executable or cache.
  • Protect your code through licensing agreements and copyright notices as a deterrent against unauthorized use.
While you can't disable caching, you can manage and mitigate access to source code through environmental settings, cleanup procedures, and the inherent protection provided by MATLAB Compiler's encryption.

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by