From 2656b76c0d907aed46a4961d32df203c7f6827fc Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Mon, 2 Oct 2023 17:10:31 -0600 Subject: [PATCH] Minor cleanup on toolbox generation script Signed-off-by: Travis F. Collins --- CI/scripts/genTlbx.m | 47 +++++++------------------------------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/CI/scripts/genTlbx.m b/CI/scripts/genTlbx.m index 16e85cff..ef4bd1bb 100644 --- a/CI/scripts/genTlbx.m +++ b/CI/scripts/genTlbx.m @@ -12,16 +12,6 @@ function genTlbx(examples) v = adi.Version; uuid = matlab.lang.internal.uuid; -%% Unpack verilog source -if ~examples - cd('../../'); - cd('hdl/vendor/AnalogDevices/vivado'); - !find -name '*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \; - !find . -name "*.zip" -type f -delete - cd('../../../..'); - cd('CI/scripts'); -end - %% cd(fileparts((mfilename('fullpath')))); cd('../..'); @@ -60,6 +50,13 @@ function genTlbx(examples) ps = [ps(:)',{'hdl'}]; end +% Check for deps +if ~isfolder('deps') + error('deps folder with libad9361 not available') +else + ps = [ps(:)',{'deps'}]; +end + paths = ''; for p = ps pp = genpath(p{:}); @@ -79,36 +76,6 @@ function genTlbx(examples) end matlab.addons.toolbox.packageToolbox(projectFile,outputFile) -if ~usejava('desktop') - %% Update toolbox paths - mkdir other - movefile([outputFile,'.mltbx'], ['other/',outputFile,'.zip']); - cd other - unzip([outputFile,'.zip'],'out'); - cd('out') - cd('metadata'); - fid = fopen('configuration.xml','r'); - f=fread(fid,'*char')'; - fclose(fid); - - s = ''; - sections = strsplit(f,s); - s1 = sections{1}; - s2 = sections{2}; - newfile = [s1,paths,s,s2]; - - fid = fopen('configuration.xml','w'); - fprintf(fid,'%s',newfile); - fclose(fid); - - %% Repack - cd('..'); - zip([outputFile,'.zip'], '*'); - movefile([outputFile,'.zip'],['../../',outputFile,'.mltbx']); - cd('../..'); - rmdir('other','s'); -end - delete bsp.prj