summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpmarecha2009-10-30 11:09:03 +0000
committerpmarecha2009-10-30 11:09:03 +0000
commit64b7628adbecbce593348718a9792eb7910f6532 (patch)
treeaa2ed39e8c69a8cdbd3332f93cae6f56c9ef128b
parent2024ce936ae056e4ba7905b3f6239d8501741920 (diff)
downloadscilab2c-64b7628adbecbce593348718a9792eb7910f6532.tar.gz
scilab2c-64b7628adbecbce593348718a9792eb7910f6532.tar.bz2
scilab2c-64b7628adbecbce593348718a9792eb7910f6532.zip
Fix scilab2c.start
-rw-r--r--scilab2c/etc/scilab2c.start74
1 files changed, 28 insertions, 46 deletions
diff --git a/scilab2c/etc/scilab2c.start b/scilab2c/etc/scilab2c.start
index 7537617d..367e4261 100644
--- a/scilab2c/etc/scilab2c.start
+++ b/scilab2c/etc/scilab2c.start
@@ -1,57 +1,39 @@
-// ====================================================================
-// Allan CORNET
-// Copyright INRIA 2008
// This file is released into the public domain
-// ====================================================================
-disp('Start Scilab 2 C Toolbox');
-
-etc_tlbx = get_absolute_file_path('scilab2c.start');
-etc_tlbx = getshortpathname(etc_tlbx);
+mprintf("Start Scilab 2 C module");
+etc_tlbx = get_absolute_file_path("scilab2c.start");
+etc_tlbx = getshortpathname(etc_tlbx);
root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length('\etc\') );
-pathmacros = pathconvert( root_tlbx ) + 'macros'+ filesep();
-
-disp('Load macros');
//Load functions library
-sci2c_mainlib = lib(pathmacros);
-sci2c_ASTManagementlib = lib(pathmacros + "ASTManagement" + filesep());
-sci2c_CCodeGenerationlib = lib(pathmacros + "CCodeGeneration" + filesep());
-sci2c_ErrorMessageslib = lib(pathmacros + "ErrorMessages" + filesep());
-sci2c_FunAnnotationlib = lib(pathmacros + "FunctionAnnotation"+ filesep());
-sci2c_FunListlib = lib(pathmacros + "FunctionList" + filesep());
-sci2c_GenFunctionslib = lib(pathmacros + "GeneralFunctions" + filesep());
-sci2c_SymbolTablelib = lib(pathmacros + "SymbolTable" + filesep());
-sci2c_ToolInitlib = lib(pathmacros + "ToolInitialization" + filesep());
-sci2c_finDeps = lib(pathmacros + "findDeps" + filesep());
-
-// load gateways
-//disp('Load gateways');
-
-//ilib_verbose(0);
-// load gateways
-//exec( root_tlbx + '/sci_gateway/loader_gateway.sce' );
+// =============================================================================
+pathmacros = pathconvert( root_tlbx ) + 'macros'+ filesep();
+mprintf("\tLoad macros\n");
+sci2c_mainlib = lib(pathmacros);
+sci2c_ASTManagementlib = lib(pathmacros + "ASTManagement" + filesep());
+sci2c_CCodeGenerationlib = lib(pathmacros + "CCodeGeneration" + filesep());
+sci2c_ErrorMessageslib = lib(pathmacros + "ErrorMessages" + filesep());
+sci2c_FunAnnotationlib = lib(pathmacros + "FunctionAnnotation" + filesep());
+sci2c_FunListlib = lib(pathmacros + "FunctionList" + filesep());
+sci2c_GenFunctionslib = lib(pathmacros + "GeneralFunctions" + filesep());
+sci2c_SymbolTablelib = lib(pathmacros + "SymbolTable" + filesep());
+sci2c_ToolInitlib = lib(pathmacros + "ToolInitialization" + filesep());
+sci2c_finDeps = lib(pathmacros + "findDeps" + filesep());
+clear pathmacros;
-disp('Load help');
+// Load and add help chapter
+// =============================================================================
-//add help chapter
-path_addchapter = root_tlbx + "/jar/";
-if ( fileinfo(path_addchapter) <> [] ) then
- add_help_chapter('Scilab 2 C', path_addchapter, %F);
- clear add_help_chapter;
+if or(getscilabmode() == ["NW";"STD"]) then
+ mprintf("\tLoad help\n");
+ path_addchapter = pathconvert(root_tlbx+"/jar");
+ if ( isdir(path_addchapter) <> [] ) then
+ add_help_chapter("Scilab 2 C", path_addchapter, %F);
+ clear add_help_chapter path_addchapter
+ end
end
-// ====================================================================
-// add demos
-//pathdemos = pathconvert(root_tlbx+"/demos/toolbox_skeleton.dem.gateway.sce",%f,%t);
-//add_demo("Toolbox skeleton",pathdemos);
-//clear pathdemos ;
-// ====================================================================
-clear warning_mode;
-clear path_addchapter;
+
+// =============================================================================
clear root_tlbx;
clear etc_tlbx;
-clear pathmacros;
-clear pathconvert;
-// ====================================================================
-