Code covered by the BSD License  

Highlights from
selfpack

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 4.89 KB File ID: #8565
image thumbnail

selfpack

by M MA

 

27 Sep 2005 (Updated 28 Sep 2005)

Creation of self-extract packages.

| Watch this File

File Information
Description

Creates a single MATLAB self-extract p (and m) file with all the contents of a selected folder.
When executed, the output file will recreate the package inside a folder with the same name of the main package folder. For instance if the selected folder is "/home/user/package", the creted folder during extraction will be "package".

The screenshot shows the creation of the p file of the saved MathWorks site at the folder /tmp/matlab_site

Acknowledgements
This submission has inspired the following:
aselfpack
MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
26 Mar 2008 Durga Shrestha

Nice utility, but there is error message:
?? Error using ==> fileparts at 17
Input must be a row vector of characters.

Error in ==> selfpack>basename at 483
[path,name,ext]=fileparts(d);

Error in ==> selfpack at 55
lastDir = basename(theDir);

I went to the code and commenting the following lines works.
%deal with filesep:
theDir = strrep(theDir,'/',filesep);
theDir = strrep(theDir,'\',filesep);
theDir = strrep(theDir,':',filesep);
theDir = realpath(theDir);

It will be nice to have filter of certain files. For example i have p-files and m-files and want to deploy only p-files but not m-files.
Another nice work would be to add path automatically after installing to the user defined folder.
Othewise it is very nice work.

27 Mar 2008 Durga Shrestha

I have modified the 'selfpack' which can do the followings:

1. Filter to include or exclude files. E.g. {'~.m' '~.asv'} excludes all the m-files and asv files in the pack. Similiarly {'*.p'} includes only p-files.

2. User defined installation folder (in the orginal version, the files are installed into the current directory).

3. The folders are automatically added to the MATLAB path.

I am planning to submit it to the file exchange, but i am not sure if i am allowed.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
path M MA 22 Oct 2008 08:00:50
directories M MA 22 Oct 2008 08:00:50
files M MA 22 Oct 2008 08:00:50
pcode M MA 22 Oct 2008 08:00:50
selfpack M MA 22 Oct 2008 08:00:50
self extract M MA 22 Oct 2008 08:00:50
packages M MA 22 Oct 2008 08:00:50
utilities M MA 22 Oct 2008 08:00:50

Contact us at files@mathworks.com