1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
5 // This file is distributed under the same license as the Scilab package.
6 // =============================================================================
8 // <-- JVM NOT MANDATORY -->
10 load("SCI/modules/atoms/macros/atoms_internals/lib");
12 // Do not use the autoload system
13 config_autoload = atomsGetConfig("autoload");
14 config_Verbose = atomsGetConfig("Verbose");
15 atomsSetConfig("autoload","False");
16 atomsSetConfig("Verbose" ,"True");
18 // Load the 2nd scenario : See scene2.test.atoms.scilab.org.txt
19 // =============================================================================
20 atomsRepositorySetOfl("http://scene2.test.atoms.scilab.org");
21 atomsGetTOOLBOXES(%T);
23 // Install toolbox N°2
24 atomsInstall(["toolbox_2","2.0";"toolbox_2","2.1"],"user");
26 // Check input parameters
27 if execstr("atomsIsInstalled()","errcatch") == 0 then pause; end
28 if execstr("atomsIsInstalled([""toolbox_1"",""1.0"";""toolbox_2"",""2.0""],[""1.0"";""2.0""] )","errcatch") == 0 then pause, end
30 // Check output results
31 if ~ atomsIsInstalled("toolbox_1") then pause, end
32 if ~ atomsIsInstalled("toolbox_2") then pause, end
34 if ~ atomsIsInstalled(["toolbox_1","1.0"]) then pause, end
35 if ~ atomsIsInstalled(["toolbox_2","2.0"]) then pause, end
36 if ~ atomsIsInstalled(["toolbox_2","2.1"]) then pause, end
38 if atomsIsInstalled(["toolbox_1","1.0"],"allusers") then pause, end
39 if atomsIsInstalled(["toolbox_2","2.0"],"allusers") then pause, end
40 if atomsIsInstalled(["toolbox_2","2.1"],"allusers") then pause, end
42 if ~ atomsIsInstalled(["toolbox_1","1.0"],"user") then pause, end
43 if ~ atomsIsInstalled(["toolbox_2","2.0"],"user") then pause, end
44 if ~ atomsIsInstalled(["toolbox_2","2.1"],"user") then pause, end
46 if ~ atomsIsInstalled(["toolbox_1","1.0"],"all") then pause, end
47 if ~ atomsIsInstalled(["toolbox_2","2.0"],"all") then pause, end
48 if ~ atomsIsInstalled(["toolbox_2","2.1"],"all") then pause, end
50 if or( atomsIsInstalled(["toolbox_1","1.0";"toolbox_2","0.0";"toolbox_2","2.1";"toolbox_99","1.0"]) <> [%T;%F;%T;%F] ) then pause, end
52 // Remove toolbox_5 & toolbox_3
53 // =============================================================================
54 atomsRemove("toolbox_2","user");
56 // Restore original values
57 // =============================================================================
58 atomsSetConfig("autoload",config_autoload);
59 atomsSetConfig("Verbose" ,config_Verbose);
60 atomsRepositorySetOfl("http://atoms.scilab.org");