1 // Copyright (C) 2008 - INRIA
2 // Copyright (C) 2009 - DIGITEO
4 // This file is released under the 3-clause BSD license. See COPYING-BSD.
6 function toolbox_skeletonlib = startModule()
8 toolbox_name = "Toolbox skeleton"
10 mprintf("Start " + toolbox_name + "\n");
12 if isdef("toolbox_skeletonlib") then
13 warning("Toolbox skeleton library is already loaded");
17 etc_tlbx = get_absolute_file_path("toolbox_skeleton.start");
18 etc_tlbx = getshortpathname(etc_tlbx);
19 root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") );
21 //Load functions library
22 // =============================================================================
23 mprintf("\tLoad macros\n");
24 pathmacros = pathconvert( root_tlbx ) + "macros" + filesep();
25 toolbox_skeletonlib = lib(pathmacros);
28 // =============================================================================
29 mprintf("\tLoad gateways\n");
30 verboseMode = ilib_verbose();
32 exec(pathconvert(root_tlbx+"/sci_gateway/loader_gateway.sce",%f));
33 ilib_verbose(verboseMode);
35 // Load and add help chapter
36 // =============================================================================
37 if or(getscilabmode() == ["NW";"STD"]) then
38 mprintf("\tLoad help\n");
39 path_addchapter = pathconvert(root_tlbx+"/jar");
40 if ( isdir(path_addchapter) <> [] ) then
41 add_help_chapter(toolbox_name, path_addchapter, %F);
46 // =============================================================================
47 if or(getscilabmode() == ["NW";"STD"]) then
48 mprintf("\tLoad demos\n");
49 pathdemos = pathconvert(root_tlbx+"/demos/toolbox_skeleton.dem.gateway.sce", %F, %T);
50 add_demo(toolbox_name, pathdemos);
53 addToolboxInfos(toolbox_name, root_tlbx, etc_tlbx + "toolbox_skeleton_preferences.xml");
57 toolbox_skeletonlib = startModule();
58 clear startModule; // remove startModule on stack