0
|
1 |
Introduction
|
|
2 |
============
|
|
3 |
|
|
4 |
ConE installation offers three different use scenarios of the tool.
|
|
5 |
|
|
6 |
#. ConE API (read, write)
|
|
7 |
#. ConE plugin API (A plugin interface to add functionality to ConE)
|
|
8 |
#. ConE command line interface (tools/utilities that use the API)
|
|
9 |
|
3
|
10 |
ConE API introduction
|
|
11 |
---------------------
|
0
|
12 |
The ConE API tries to offer a simple way to access the configurations inside the Configuration
|
|
13 |
project. The concepts of confml and the Configuration project are quite complicated, but the API
|
|
14 |
simplifies the project quite a bit to enable effective programming. Although the API aims for
|
|
15 |
simplicity, everything is made available via the API.
|
3
|
16 |
|
|
17 |
The API is described in :ref:`cone-api` with a :ref:`cone-api-howto` and with python api documentation tool *epydoc*.
|
0
|
18 |
|
3
|
19 |
ConE plugin (extension) API
|
|
20 |
---------------------------
|
0
|
21 |
The purpose of the plugin API is to offer the possibility to expand the functionality of Configuration project. Normal use case
|
|
22 |
is an implementation plugin which reads data from the configuration and transforms it into some other form
|
3
|
23 |
(e.g. centralrepository text file).
|
0
|
24 |
|
3
|
25 |
See :ref:`plugin-api`.
|
|
26 |
|
|
27 |
ConE command line interface introduction
|
|
28 |
----------------------------------------
|
0
|
29 |
The main purpose of ConE is to offer the above APIs, but ConE installation as tool
|
|
30 |
offers also set of command line utilities that can used to modify, read and utilize (generate other output files
|
|
31 |
with implementation plugins) from a Configuration project. These utilities lie on the cone-script package and
|
3
|
32 |
are described in the ConE command line interface section.
|
|
33 |
|
|
34 |
See :ref:`cone-cli`
|
0
|
35 |
|
|
36 |
Installation
|
|
37 |
------------
|
|
38 |
|
|
39 |
Requirements
|
|
40 |
^^^^^^^^^^^^
|
|
41 |
|
|
42 |
ConE installation requires:
|
|
43 |
|
|
44 |
* Python 2.5 (though 2.6 probably works too)
|
|
45 |
* Ant (Required for installing from source)
|
|
46 |
* Python setuptools - http://pypi.python.org/pypi/setuptools. (Required to install ConE as part of python)
|
|
47 |
|
|
48 |
ConE can be installed in two different ways:
|
|
49 |
|
|
50 |
1. In the Python environment under site-packages like any other Python package
|
|
51 |
|
|
52 |
- Makes it possible to use the ConE API from Python scripts
|
|
53 |
|
|
54 |
2. As a standalone installation in a separate directory
|
|
55 |
|
|
56 |
- Contains the CLI and a set of plug-ins
|
|
57 |
|
|
58 |
Installing from source
|
|
59 |
^^^^^^^^^^^^^^^^^^^^^^
|
|
60 |
|
|
61 |
In order to install from source, you obviously need to first get the ConE sources:
|
|
62 |
|
|
63 |
* Clone the Mercurial repository:
|
|
64 |
|
|
65 |
* ``hg clone https://developer.symbian.org/sfl/MCL/sftools/depl/swconfigmdw/``
|
|
66 |
|
|
67 |
* -- or -- checkout from SVN (if you are in Nokia intranet):
|
|
68 |
|
|
69 |
* ``svn checkout https://trace1.isource-nokia.nokia.com/isource/svnroot/cone/trunk cone_src``
|
|
70 |
|
|
71 |
**Installing under site-packages**
|
|
72 |
|
|
73 |
Simply install using ``setup.py`` like for any Python package:
|
|
74 |
|
|
75 |
* ``cd cone_src/source``
|
|
76 |
* ``python setup.py install``
|
|
77 |
|
|
78 |
This will install the ConE core module into your Python environment. To install a plug-in,
|
|
79 |
do the same in the desired plug-in's source directory (e.g. ``cone_src/plugins/common/ConeRulePlugin``).
|
|
80 |
|
|
81 |
**Installing the standalone ConE**
|
|
82 |
|
|
83 |
The normal installation in windows environment creates a directory containing the needed
|
|
84 |
libraries and ConE plug-ins, and a ``cone.cmd`` wrapper script. The directory can then
|
|
85 |
be added somewhere into your PATH, and then the CLI can be used by running ``cone``.
|
|
86 |
|
|
87 |
To install, run:
|
|
88 |
|
|
89 |
* <windows> ``install.cmd /path/to/install common``
|
|
90 |
* <linux> *Not available yet*
|
|
91 |
|
|
92 |
Notice the parameter ``common`` in the install command. This specifies the plug-in package to install.
|
|
93 |
It can be omitted, in which case it defaults to ``common``. Replace this with e.g. ``symbian`` to create
|
|
94 |
a Symbian-specific ConE installation.
|
|
95 |
|
|
96 |
.. note::
|
|
97 |
Currently the standalone installation is Windows-specific in the sense that only a batch file
|
|
98 |
wrapper (``cone.cmd``) is included and some Symbian-specific plug-ins have dependencies to
|
|
99 |
Windows applications and Python libraries with native components. However, the ``common``
|
|
100 |
plug-in package should contain only pure Python, so it should work in Unix. Also, a ``cone.sh``
|
|
101 |
script is available under ``source/``, which can be used to replace ``cone.cmd`` in Unix.
|
|
102 |
|
|
103 |
Install from ZIP
|
|
104 |
^^^^^^^^^^^^^^^^
|
|
105 |
|
|
106 |
Fetch the latest ConE build from our CruiseControl build server (works only in Nokia intranet):
|
|
107 |
|
3
|
108 |
* Goto https://trace1.isource-nokia.nokia.com/trac/cone/wiki/ConeReleases
|
|
109 |
* Download the release zip file from ConE releases.
|
0
|
110 |
|
|
111 |
The ZIP file should contain a pre-built standalone installation described in the previous section.
|
|
112 |
Simply unzip it where you please.
|
|
113 |
|
|
114 |
|
|
115 |
.. _installation-export-tests:
|
|
116 |
|
|
117 |
Standalone test set
|
|
118 |
^^^^^^^^^^^^^^^^^^^
|
|
119 |
|
|
120 |
A standalone ConE installation can be tested using an automated standalone test set, which tests the
|
|
121 |
ConE CLI functionality. Like the ``install`` command, exporting the test set also needs to
|
|
122 |
be given the plug-in package name (it wouldn't make much sense to test a Symbian ConE
|
|
123 |
installation using a Maemo-specific test set).
|
|
124 |
|
|
125 |
* Export the test set:
|
|
126 |
|
|
127 |
* ``cd cone_src``
|
|
128 |
* <windows> ``export_bat.cmd /path/to/tests common``
|
|
129 |
* <linux> *Not available yet*
|
|
130 |
|
|
131 |
|
|
132 |
.. warning::
|
|
133 |
The path specified as the target path will be cleared before the actual
|
|
134 |
export takes place, so be sure not to pass anything like C:\\ there.
|
|
135 |
|
|
136 |
* Run the test set:
|
|
137 |
|
|
138 |
* Copy the ConE installation to test into ``/path/to/tests/cone/``
|
|
139 |
* ``cd /path/to/tests``
|
|
140 |
* ``runtests.cmd``
|
|
141 |
|
|
142 |
You can also run the tests so that a standalone ConE installation is built and then tested
|
|
143 |
with its corresponding test set:
|
|
144 |
|
|
145 |
* ``cd cone_src``
|
|
146 |
* <windows> ``run_bat.cmd /path/to/tests common``
|
|
147 |
* <linux> *Not available yet*
|
|
148 |
|
|
149 |
If you simply want to test that ConE works correctly on your machine, you can
|
|
150 |
also run:
|
|
151 |
|
|
152 |
* ``ant test``
|
|
153 |
|
|
154 |
This will export the test set, install ConE and run the tests inside a temporary
|
|
155 |
build directory in the working copy.
|
|
156 |
|
|
157 |
Build and install debian packages (Maemo)
|
|
158 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
159 |
|
|
160 |
1. Install tools and cone dependencies, as root or with sudo.
|
|
161 |
|
|
162 |
* ``sudo apt-get install dpkg-dev fakeroot python-setuptools python-central``
|
|
163 |
|
|
164 |
2. Build python-cone and cone-tool. The packages are placed in parent directory.
|
|
165 |
|
|
166 |
* ``cd cone/trunk``
|
|
167 |
* ``dpkg-buildpackage -rfakeroot -b``
|
|
168 |
|
|
169 |
3. Install the binary packages, as root or with sudo.
|
|
170 |
|
|
171 |
* ``sudo dpkg -i ../python-cone*.deb ../cone-tool*.deb``
|
|
172 |
|
|
173 |
4. Install Jinja2 (not part of all Debian-based distros)
|
|
174 |
|
|
175 |
* ``sudo easy_install Jinja2``
|
|
176 |
|
|
177 |
|