<commit_before>// Copyright (c) 2015, Embedded Solutions
// All rights reserved.

// This file is released under the 3-clause BSD license. See COPYING-BSD.

mode(-1);
lines(0);

function main_builder()
  TOOLBOX_NAME  = "microdaq";
  TOOLBOX_TITLE = "MicroDAQ toolbox";
  toolbox_dir   = get_absolute_file_path("builder.sce");

// Check Scilab's version
// =============================================================================

  // check minimal version (xcosPal required)
  if ~isdef('xcosPal') then
    // and xcos features required
    error(gettext('Scilab 5.3.2 or more is required.'));
  end

// Check modules_manager module availability
// =============================================================================

  if ~isdef('tbx_build_loader') then
    error(msprintf(gettext('%s module not installed.'), 'modules_manager'));
  end


  if ~isdir(toolbox_dir+filesep()+"images"+filesep()+"h5")
      [status, msg] = mkdir(toolbox_dir+filesep()+"images"+filesep()+"h5");
      if and(status <> [1 2])
          error(msg);
      end
  end

// Action
// =============================================================================

  tbx_builder_macros(toolbox_dir);
//  tbx_builder_help(toolbox_dir);
  tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
  tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
  
  //delete mblockstmpdir file to force loader to rebuild mdaq palette 
  deletefile(toolbox_dir+filesep()+"etc"+filesep()+"mblockstmpdir");
  
endfunction

if with_module('xcos') then
  main_builder();
  clear main_builder; // remove main_builder on stack
end<commit_msg>By default enable help builder<commit_after>// Copyright (c) 2015, Embedded Solutions
// All rights reserved.

// This file is released under the 3-clause BSD license. See COPYING-BSD.

mode(-1);
lines(0);

function main_builder()
  TOOLBOX_NAME  = "microdaq";
  TOOLBOX_TITLE = "MicroDAQ toolbox";
  toolbox_dir   = get_absolute_file_path("builder.sce");

// Check Scilab's version
// =============================================================================

  // check minimal version (xcosPal required)
  if ~isdef('xcosPal') then
    // and xcos features required
    error(gettext('Scilab 5.3.2 or more is required.'));
  end

// Check modules_manager module availability
// =============================================================================

  if ~isdef('tbx_build_loader') then
    error(msprintf(gettext('%s module not installed.'), 'modules_manager'));
  end


  if ~isdir(toolbox_dir+filesep()+"images"+filesep()+"h5")
      [status, msg] = mkdir(toolbox_dir+filesep()+"images"+filesep()+"h5");
      if and(status <> [1 2])
          error(msg);
      end
  end

// Action
// =============================================================================

  tbx_builder_macros(toolbox_dir);
  tbx_builder_help(toolbox_dir);
  tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
  tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
  
  //delete mblockstmpdir file to force loader to rebuild mdaq palette 
  deletefile(toolbox_dir+filesep()+"etc"+filesep()+"mblockstmpdir");
  
endfunction

if with_module('xcos') then
  main_builder();
  clear main_builder; // remove main_builder on stack
end
{'fraction_non_alphanumeric': 0.25633010315723664, 'fraction_numerical': 0.0087527352297593, 'mean_word_length': 5.049149338374291, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2184272', 'n_tokens_mistral': 1028, 'n_tokens_neox': 953, 'n_words': 219}