필터 지우기
필터 지우기

Can I work with two versions of an application under separate folders but with the same filenames?

조회 수: 2 (최근 30일)
Hi,
Is it possible to simultaneously work on two (or more) versions of the same application, sharing the same set of filenames but under different main folders, without risking conflicts? I also need to be able to deploy .exe files from the different versions. What will the compiler say when it discoveres recurring m-files? Or perhaps there is a better way to manage multiple versions of an application?
Thanks

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 12일
The .m files are packaged up in pre-compiled and encrypted format. When the application runs, a temporary directory is created and the files are unpacked into there (still in pre-compiled form), and the path for the executable is set to that directory. A different executable would unpack to a different directory and its path would be set appropriately. There will be no conflict.

추가 답변 (1개)

Spigge
Spigge 2015년 5월 12일
Thanks Walter, that sorts out my compilation worries.
But how is it in general, prior to compilation: If I have two folders, Folder1 and Folder2, both in the Matlab path and I run a script in Folder1 that calls the script "calculate.m" that exists under both folders. How do I know which version of calculate.m will be executed? Don't I need to, temporarily by an appropriate script, remove Folder2 from the path to be sure to execute calculate.m under Folder1?
Thanks
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 5월 12일
Folders earlier on the path are used first.
Consider using different startup.m to use different search paths. This will depend upon you invoking MATLAB from the proper directory rather than just clicking on an icon, though. (Unless you create different icons to set different startup values.)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by