close
Warning:
Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.
- Timestamp:
-
Feb 8, 2016, 10:12:34 AM (9 years ago)
- Author:
-
Pedro Gea
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v5
|
v6
|
|
19 | 19 | = Packages = |
20 | 20 | |
21 | | {{{ |
22 | | #!div style="background:#fcc; border: 1px solid red; color:red; padding-left:1em; margin-right:1em" |
23 | | To do. See [wiki:TolPackageRulesAndComments]. |
24 | | }}} |
25 | | |
26 | 21 | == Introduction == |
27 | 22 | |
28 | 23 | The idea of a package comes from the concept of modularity and the possibility of loading and |
29 | | distributing a whole module as a unit. A TOL package is essentially no more than a NameBlock |
| 24 | distributing a whole module as a unit. A TOL package is essentially a NameBlock |
30 | 25 | distributed in an .oza file. |
31 | 26 | |
32 | | In the TOL programming frame, we identify the package with the NameBlock that contains |
33 | | the set of classes, structurs, variables, functions and definitions. This is distributed and loaded as |
34 | | an unit of the TOL package system. |
| 27 | The package distribution is usually accompanied by other complementary resources that can be: files containing icons or images, |
| 28 | documentation, libraries of compiled functions (written in C++ and distributed in .dll or .so files) |
| 29 | and even uncompiled TOL code (.tol files) used as examples. |
35 | 30 | |
36 | | Looking more from a distribution-focused point of view, a package is a compressed file |
37 | | (specifically a .zip file) that contains the nameblock serialisation (an .oza file). This is |
38 | | accompanied by other complementary resources that can be: files containing icons or images, |
39 | | documentation, libraries of compiled functions (written in C++ and distributed in .dll or .so files) |
40 | | and even uncompiled TOL code ( .tol files) by way of example. |
| 31 | On a programming-focused point of view, the package is the mentioned NameBlock containing a set of classes, structures, variables, functions and definitions. |
41 | 32 | |
42 | 33 | == Names and versions == |
… |
… |
|
44 | 35 | A TOL package is identifed by its name and version. |
45 | 36 | |
46 | | The name of the package matches with the name of the nameblock that represents it. It generally |
| 37 | The '''name''' of the package matches with the name of the nameblock that represents it. It generally |
47 | 38 | follows a CamelCase structure. |
48 | 39 | |
49 | | The version consists of integers. The first (the high version number) shows if there has been an |
50 | | important change in the structure and functionality; one which could break the compatability |
51 | | with the user-code in use. The second however (the low version number) shows that changes |
52 | | have been made to the package that maintain package-use compatibility. These changes could |
53 | | be corrections or the inclusion of new functionalities. |
| 40 | The '''version''' consists of integers. The first (the high version number) shows if there has been an |
| 41 | important change in the structure and functionality. This new version could incorporate changes that break the compatibility |
| 42 | with previous code in use. The second number (the low version number) however shows changes that maintain the package-use compatibility. These changes could be corrections or new functionalities. |
54 | 43 | |
55 | 44 | The package identifier is created by linking the name and two version numbers |
56 | | <name>.<version.high>.<version.low> with a full-stop (.). |
| 45 | {{{<name>.<version.high>.<version.low>}}} with a full-stop ({{{.}}}). |
57 | 46 | For example, the identifier {{{GuiTools.3.5}}} makes reference to version 3.5 of GuiTools, which |
58 | 47 | includes utilities for TOLBase graphical integration. |
59 | 48 | |
| 49 | Some packages (usually those that contain binary libraries) show an additional name indicating the '''platform''' for which the package is compatible. This name appears after the name concatenated a number sign ({{{#}}}). For example, {{{TclCore#Win32GNU.8.407}}} is the {{{TclCore.8.407}}} package for TOL GNU-GCC compiled for Windows 32-bits. |
| 50 | |
| 51 | == Official TOL Archive Network == |
| 52 | |
| 53 | The official repository of TOL packages is called '''OTAN''' ('''O'''fficial '''T'''OL '''A'''rchive '''N'''etwork). In this link: [wiki:OTAN] you can browse the full list of public packages. |
| 54 | |
| 55 | Other local or private repositories can also be available. |
| 56 | |
60 | 57 | == TolPackage == |
61 | 58 | |
62 | | The TOL kernel provides a module to manage packages: TolPackage. |
63 | | |
| 59 | The TOL kernel provides a module to manage packages: TolPackage. |
64 | 60 | This module allow TOL users to download, update or upgrade packages. It provides also utilities for creating and uploading packages. For more details, see [wiki:TolPackage]. |
65 | 61 | |
66 | | == Requiring a package == |
| 62 | === Requiring a package === |
67 | 63 | |
68 | 64 | TOL provides a preevaluation directive: {{{#Require}}} to indicate the package requeriments. |
… |
… |
|
73 | 69 | }}} |
74 | 70 | |
75 | | When you ''compile'' a package requirement, TolPackage try to load the package, searching into the repositories, downloading it and intalling it if necessary. |
76 | | |
77 | | == Official TOL Archive Network == |
78 | | |
79 | | The official repository of TOL packages is called '''OTAN''' ('''O'''fficial '''T'''OL '''A'''rchive '''N'''etwork). In this link: [wiki:OTAN] you can browse the full list of public packages. |
| 71 | When you ''compile'' a package requirement, TolPackage try to load the package, searching into the repositories, downloading and installing it if necessary. |
80 | 72 | |
81 | 73 | == Package manager in TOLBase == |
… |
… |
|
89 | 81 | The interface offers a list of all available packages from all of the of the repositories to which they have access for installation, updates or upgrades. |
90 | 82 | |
91 | | Different package states are displayed in the form of various different icons: |
92 | | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_no.gif)]]: New, not installed. |
93 | | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_upd.gif)]]: Update required; a more recent package of an identical version is available. |
94 | | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_upg.gif)]]: Upgrade required, a package with a superior version is available. |
95 | | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_unu.gif)]]: Upgrade and update required, both of these are required periodically. |
96 | | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_ok.gif)]]: Package okay, currently installed without requirement for update or upgrade. |
| 83 | The package states are displayed with different icons: |
| 84 | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_no.gif)]] '''New:''' the package is not installed. |
| 85 | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_upd.gif)]] '''Update required:''' a more recent package of an identical version (an update) is available. |
| 86 | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_upg.gif)]] '''Upgrade required:''' a package with a superior version (an upgrade) is available. |
| 87 | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_unu.gif)]] '''Upgrade and update required:''' both an update and an upgrade are available for this package. |
| 88 | * [[Image(source:tolp/trunk/tolbase/lib/toltk/images/p_ok.gif)]] '''OK:''' the package is installed and does not need an update nor an upgrade. |
97 | 89 | |
98 | 90 | Various actions can be carried out on packages. These are offered in the contextual menu. |