% Installer: "mexcdf53_pcwin_install.m"
% Created: 08-May-2003 11:22:19.
function bund_driver
% bund_driver -- Driver for "bund" bundles.
% bund_driver (no arguments) contains Matlab commands
% to inflate the instructions and files that are
% encoded into the "bund_data" function of this package.
% Copyright (C) 2001 Dr. Charles R. Denham, ZYDECO.
% All Rights Reserved.
% Disclosure without explicit written consent from the
% copyright owner does not constitute publication.
% Version of 14-Jun-2001 10:54:16.
% Updated 06-Feb-2003 14:36:58.
help(mfilename)
v = version;
isVersion6 = (v(1) == '6');
BINARY_TAG = '?';
CR = char(13);
LF = char(10);
comp = upper(computer);
if any(findstr(comp, 'PCWIN')) % Windows.
NL = [CR LF];
elseif any(findstr(comp, 'MAC')) % Macintosh.
NL = CR;
else % Unix.
NL = LF;
end
c = zeros(1, 256);
c(abs('0'):abs('9')) = 0:9;
c(abs('a'):abs('f')) = 10:15;
disp([' '])
disp([' ## This installer is ready to expand its contents,'])
disp([' ## starting in the present directory: "' pwd '"'])
disp([' ## To abort, execute an interruption now.'])
disp([' ## Otherwise, to continue, press any key.'])
disp([' '])
try
pause
catch
disp([' ## Installation interrupted.'])
disp([' '])
return
end
% eval('pause', 'disp(''Installation interrupted.''), return')
tic
w = which(mfilename);
fin = fopen(w, 'r');
if fin < 0, return, end
found = ~~0;
while ~found
s = fgetl(fin);
if isequal(s, -1)
fclose(fin);
return
end
s = strrep(s, LF, ''); % Not necessary?
s = strrep(s, CR, ''); % Not necessary?
if isequal(s, 'function bund_data')
found = ~~1;
end
end
fout = -1;
done = ~~0;
while ~done
s = fgetl(fin);
if isequal(s, -1)
fclose(fin);
return
end
s = strrep(s, LF, ''); % Not necessary?
s = strrep(s, CR, ''); % Not necessary?
if length(s) > 0
if s(1) ~= '%'
f = findstr(s, 'bund_setdir');
if any(f)
theDir = eval(strrep(s, 'bund_setdir', ''));
[status, msg] = mkdir(theDir);
switch status
case 1
if isVersion6 & any(msg)
disp([' ## Directory exists: "' theDir '"'])
else
disp([' ## Directory created: "' theDir '"'])
end
case 2
disp([' ## Directory exists: "' theDir '"'])
otherwise
error([' ## Error while making new directory.'])
end
try
cd(theDir)
catch
error([' ## Unable to go to directory: "' theDir '"'])
end
% eval('cd(theDir)', ...
% 'disp(theDir), error('' ## Unable to go to directory.'')')
else
% try
% eval(s);
% catch
% error([' ## Unable to evaluate: "' s '"'])
% end
eval(s, ...
'disp(s), error(''Unable to evaluate statement.'')')
end
elseif length(s) > 1 & s(2) == BINARY_TAG
hx = double(s(3:end)); % Assume hex data.
bin = 16*c(hx(1:2:end)) + c(hx(2:2:end));
fwrite(fout, bin, 'uchar');
else
fprintf(fout, '%s', s(2:end));
fprintf(fout, NL);
end
end
end
fclose(fin);
disp([' ## Elapsed time: ' num2str(fix(10*toc)/10) ' s.'])
function bund_data
bund_setdir('mexcdf53_pcwin')
bund_setdir('PCWIN')
disp(' ## Installing: "mexcdf53.dll" (binary)')
fout = fopen('mexcdf53.dll', 'w');
%?4d5a90000300000004000000ffff0000b80000000000000040
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000800000000e1fba0e00b409cd21b801
%?4ccd21546869732070726f6772616d2063616e6e6f74206265
%?2072756e20696e20444f53206d6f64652e0d0d0a2400000000
%?000000504500004c0105004cf03a330000000000000000e000
%?0a210b0104140020020000a800000000000070710000001000
%?00003002000000001000100000000200000400000001000000
%?040000000000000000e0020000040000000000000200000000
%?0010000010000000001000001000000000000010000000204d
%?02005701000000b00200500000000000000000000000000000
%?0000000000000000000000000000c002002c14000000300200
%?54000000000000000000000000000000000000000000000000
%?0000000000000000000000000000000000000018b30200c802
%?00000000000000000000000000000000000000000000000000
%?002e74657874000000d11e0200001000000020020000040000
%?000000000000000000000000200000602e7264617461000077
%?1e000000300200002000000024020000000000000000000000
%?0000400000402e64617461000000385f000000500200004a00
%?0000440200000000000000000000000000400000c02e696461
%?74610000330f000000b0020000100000008e02000000000000
%?00000000000000400000c02e72656c6f6300002c17000000c0
%?020000180000009e0200000000000000000000000000400000
%?42000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?00000000000000000000000000000000000000000000000000
%?000000000000000000000000000000000000000000000000e9
%?0b000000cccccccccccccccccccccc558bec81ec1001000053
%?5657a190b50210f600010f8407000000a190b50210ff08837d
%?10010f8d0a000000e893390000e91f3100008b45148b0050e8
%?7f41000083c4048945d4c7458400000000e903000000ff4584
%?8b45d450e8a25b000083c4043b45840f86210000008b45848b
%?4dd40fbe040850e89659000083c4048b4d848b55d4880411e9
%?c7ffffff8b45d48945fc6a0268cc5f02108b45fc50e80f5900
%?0083c40c85c00f85040000008345fc02c7458400000000c785
%?2cffffff280000008b4584c1e00483b8305a0210280f84a000
%?00008b4584c1e0048b80345a0210508b45fc50e83658000083
%?c40885c00f85770000008b4584c1e0048b80305a021089852c
%?ffffff8b4584c1e0048b4d103988385a02100f8e230000008b
%?45d45068d05f0210e8cc56000083c40868e85f0210e8e35600
%?0083c404e923000000e91e0000008b45d450680c600210e8a4
%?56000083c4086824600210e8bb56000083c404e90d000000e9
%?03000000ff4584e94dffffff83bd2cffffff280f851e000000
%?8b45d4506848600210e86756000083c4086860600210e87e56
%?000083c4048d45d450e8c043000083c4048b852cffffff8985
%?18ffffffe921000000e97b0000008b45148b400450e8e24200
%?0083c4048945d8e964000000e95f000000ff8d18ffffff83bd
%?18ffffff260f87d1ffffff8b8518ffffff33c98a8825120010
%?ff248d15120010cc110010cc110010cc110010d11100100000
%?00030303030303030303030303030303030303030303030303
%?0303030303030301030202028b852cffffff898514ffffffe9
%?7e0000008b45148b400850e8b555000083c40485c00f841a00
%?00008b45148b400850e83f42000083c40489857cffffffe93e
%?0000008b45148b400850e8353f000083c404898538ffffff8b
%?8538ffffff508b45d850ff1530b5021083c40889857cffffff
%?8d8538ffffff50e8af42000083c404e929000000e924000000
%?e91f00000083bd14ffffff0c0f8c1200000083bd14ffffff0d
%?0f8e68ffffffe9000000008b852cffffff898510ffffffe994
%?0000008b45148b400850e80755000083c40485c00f84170000
%?008b45148b400850e89141000083c4048945ece9570000008b
%?45148b400850e88a3e000083c404898538ffffff8b8538ffff
%?ff508b45d850ff1564b5021083c4088945ec8d8538ffffff50
%?e80742000083c404837decff0f85120000008b45148b400850
%?e8b039000083c4048945ece929000000e924000000e91f0000
%?0083bd10ffffff100f8c1200000083bd10ffffff1f0f8e52ff
%?ffffe9000000008b852cffffff89850cffffffe9800000008b
%?45148b400c50e84354000083c40485c00f84480000008b4514
%?8b400c50e8cd40000083c4048945806a016880000000e80854
%?000083c4088945f88b45f8508b4580508b45ec508b45d850ff
%?156cb5021083c410898544ffffffe9120000008b45148b400c
%?50e8953d000083c4048945f8e946000000e941000000e93c00
%?000083ad0cffffff1983bd0cffffff060f87280000008b850c
%?ffffff33c98a8884140010ff248d78140010cf130010cf1300
%?1045140010000000000201018b852cffffff898508ffffffe9
%?540000008b45ec508b45d850e8123b000083c408dd5de08b45
%?ec508b45d850e8cf39000083c408dc1558300210dd5dccdfe0
%?f6c4400f840e0000