License files from the FEX

조회 수: 10 (최근 30일)
Jan
Jan 2012년 6월 18일
댓글: Steven Lord 2018년 6월 28일
FEX submissions are accompanied by a file called "license.txt", which contains the name of the author. You can copy the files of a submission to a specific folder and include if in the Matlab path.
When a user downloads 100 submissions, there are two methods:
  • Either 100 folders are added to the path. This increases the danger of getting the strange and frequent "exhausted change notification handles" problems, see Solution 1-18IFI.
  • Save the functions to one folder and overwrite the license files. This does collide with the BSD license conditions.
Especially when I think about a tool, which automatically resolves dependencies to other FEX submissions, the pile of equivocal license files is a tedious obstacle. How can this problem be solved considering the large number of already existing submissions?

채택된 답변

Daniel Shub
Daniel Shub 2012년 6월 19일
You could download each FEX submission to a separate folder and then create links (hard or symbolic) to the MATLAB files (m, p, mex, etc.) in a single common folder for all FEX submissions. This might cause problems with name collisions to common files (e.g., contents.m).
  댓글 수: 1
Jan
Jan 2012년 6월 20일
The links are a good idea. The contents.m file is no problem here, because it should be re-created dynamically and contain the names of all functions contained inside a folder.
One problem is, that some submissions *require* specific subfolders, such that adding the folder to the PATH is obligatory. Therefore a full automatic package mamagement is not possible currently. However, the usability of the FEX is *decreasing* with a growing number of submissions, as long as there is no management function which resolves the depenencies.

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

추가 답변 (2개)

Jan
Jan 2012년 6월 20일
The license.txt files could be renamed by appending the name of the submission, e.g. "licence.txt" to "license_typecast_.txt" for James' important, efficient and useful helper function FEX: 17476.
A lot of users are overwhelmed by the installation procedures of some submissions. I include a "please compile the code by mex -O abc.c before the first run" in the help section of the code, but I still get more questions for clarifications about the MEX command than comments or ratings. Therefore I hesitate to force the user to download and install another function and compile it in addition.
  댓글 수: 3
Jan
Jan 2018년 6월 28일
편집: Jan 2018년 6월 28일
SPDX is a nice and efficient solution:
% Copyright [year], [project founder], [project name], [contributors]
% SPDX-License-Identifier: BSD-2-Clause
% http://www.opensource.org/licenses/BSD-2-Clause
If this is inserted in the help section of each M and C file, every thing is fine and clear. Then an additional license.txt is not required.
Steven Lord
Steven Lord 2018년 6월 28일
Consider using the Add-On Explorer to have MATLAB download and manage add-ons. If you do this, I believe it puts each in a separate directory to avoid potential conflicts like the license.txt files.

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


Malcolm Lidierth
Malcolm Lidierth 2013년 5월 22일
@Jan
I find lots of "installation procedure" enquiries also even though clear install instructions are provided. Often that is because users have read "between-the-lines" instead of taking the instructions literally - and their interpretation can be understandable e.g I see how a 10 year old caveat that "you must use "save -v6" might be interpreted as use "save -v[6 or 7]" in 2013.
For Waterloo, which has many files/folders/classes, I wrote a short script that uses MATLAB to do the download, unzip the files and set up the MATLAB and Java path - providing a few command line prompts/questions - in the present context that might be e.g "Have you run mex -setup before? If not do you want to run it now? [y/N]:"
Maybe the FEX should include an o[tional "Installation Script" button as well as a "Download Button" - providing script code to cut-and-paste into the Command Window when clicked, that could do this.
  댓글 수: 1
Jan
Jan 2013년 5월 22일
Thanks for your answer, Malcolm. In modern matlab versions the mex() command can reply, if the setup has been performed already. Unfortunately you cannot rely on FEX users to run a modern matlab version.
The install mechanism for Waterloo is fine for 99% of the cases. I do not have an internet connection on my Matlab computer to secure the stored patient data. Then an automatic downloading must fail, but it is impossible to guarantee a comfortable and flexible solution for all setups.

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

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by