Skip to content

Commit

Permalink
help-file generation w/ Scilab 5 only
Browse files Browse the repository at this point in the history
Call Sequence/Syntax problem between Scilab 5 and 6
  • Loading branch information
Hani Andreas Ibrahim committed Aug 28, 2019
1 parent 1a1b2b5 commit 150adfa
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 41 deletions.
7 changes: 5 additions & 2 deletions builder.sce
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ function main_builder()
// Action
// =============================================================================

// Update help XML-files from sci-files
exec(fullfile(toolbox_dir,"/help/en_US/update_help.sce"),-1);
// Update help XML-files from sci-files when version is < 6 (Syntx/Calling Sequence problem))
if v(1) < 6 then
exec(fullfile(toolbox_dir,"/help/en_US/update_help.sce"),-1);
end

// ------------------------------------

tbx_builder_macros(toolbox_dir);
Expand Down
102 changes: 64 additions & 38 deletions cleaner.sce
Original file line number Diff line number Diff line change
@@ -1,38 +1,64 @@
// This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce: Please, do not edit this file

try
getversion("scilab");
catch
error("Scilab 5.0 or more is required.");
end
function perform_clean()
root_tlbx = get_absolute_file_path('cleaner.sce');

if isfile(root_tlbx + '/macros/cleanmacros.sce') then
exec(root_tlbx+'/macros/cleanmacros.sce');
end

if isfile(root_tlbx + '/src/cleaner_src.sce') then
exec(root_tlbx+'/src/cleaner_src.sce');
end

if isfile(root_tlbx + "/sci_gateway/cleaner_gateway.sce") then
exec(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
mdelete(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
end

if isfile(root_tlbx + "/help/cleaner_help.sce") then
exec(root_tlbx + "/help/cleaner_help.sce");
end

if isfile(root_tlbx + "/loader.sce") then
mdelete(root_tlbx + "/loader.sce");
end

if isfile(root_tlbx + "/unloader.sce") then
mdelete(root_tlbx + "/unloader.sce");
end
endfunction
perform_clean();
clear perform_clean;
// This file is released under the 3-clause BSD license. See COPYING-BSD.
// Generated by builder.sce: Please, do not edit this file

oldmode = mode();
oldlines = lines()(2);
lines(0);

function perform_clean()
root_tlbx = get_absolute_file_path('cleaner.sce');

if isfile(root_tlbx + '/macros/cleanmacros.sce') then
exec(root_tlbx+'/macros/cleanmacros.sce');
else
if isdir(root_tlbx + "/macros/") then
deletefile(root_tlbx + "/macros/lib");
binfiles = findfiles(root_tlbx + "/macros/", "*.bin");
if ~isempty(binfiles) then
deletefile(root_tlbx + "/macros/" + binfiles);
end
end
end

if isfile(root_tlbx + "/src/cleaner_src.sce") then
exec(root_tlbx + "/src/cleaner_src.sce");
mdelete(root_tlbx + "/src/cleaner_src.sce");
end

if isfile(root_tlbx + "/sci_gateway/cleaner_gateway.sce") then
exec(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
mdelete(root_tlbx + "/sci_gateway/cleaner_gateway.sce");
end

if isfile(root_tlbx + "/help/cleaner_help.sce") then
exec(root_tlbx + "/help/cleaner_help.sce");
else
if isdir(root_tlbx + "/jar/") then
rmdir(root_tlbx + "/jar/", "s");
end
end

if isfile(root_tlbx + "/loader.sce") then
mdelete(root_tlbx + "/loader.sce");
end

if isfile(root_tlbx + "/unloader.sce") then
mdelete(root_tlbx + "/unloader.sce");
end
endfunction

try
perform_clean();
catch
[errmsg, tmp, nline, func] = lasterror();
msg = "%s: error on line #%d: ""%s""\n";
msg = msprintf(msg, func, nline, errmsg);
lines(oldlines);
mode(oldmode);
clear perform_clean oldlines oldmode tmp nline func errmsg;
error(msg);
end

lines(oldlines)
mode(oldmode);
clear perform_clean oldlines oldmode;
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ FUNCTIONS:

dataINT is available for Scilab 5.5.x and Scilab 6.0.x and cross-platform.

-------------------------------------------------------------------------------

CHANGELOG:

1.0.1
1.0.1 Bug fixes:
- "test" print in DI_readcsv())
- Syntax/Calling Sequence missing bug in help-files
- some minor improvements

-------------------------------------------------------------------------------

Expand Down

0 comments on commit 150adfa

Please sign in to comment.