buildframework/helium/doc/src/manual/blocks.rst
author andy simpson <andrews@symbian.org>
Fri, 30 Jul 2010 15:14:33 +0100
changeset 652 311511800c67
parent 645 b8d81fa19e7d
permissions -rw-r--r--
Add export for s60ibymacros.pm (re-applies missing part of fix for Bug 2901
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
645
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     1
..  ============================================================================ 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     2
    Name        : blocks.rst
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     3
    Part of     : Helium 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     4
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     5
    Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     6
    All rights reserved.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     7
    This component and the accompanying materials are made available
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     8
    under the terms of the License "Eclipse Public License v1.0"
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
     9
    which accompanies this distribution, and is available
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    10
    at the URL "http://www.eclipse.org/legal/epl-v10.html".
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    11
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    12
    Initial Contributors:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    13
    Nokia Corporation - initial contribution.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    14
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    15
    Contributors:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    16
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    17
    Description:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    18
    
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    19
    ============================================================================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    20
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    21
.. index::
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    22
  module: Blocks
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    23
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    24
======
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    25
Blocks
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    26
======
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    27
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    28
.. contents::
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    29
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    30
.. _`Blocks-Intro-label`:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    31
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    32
Blocks Introduction
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    33
====================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    34
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    35
Blocks is a packaging framework, which allows you to create bundles 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    36
with interdependencies (like rpm or deb packages) base on the outcome of the build.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    37
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    38
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    39
Enabling Blocks input generation
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    40
================================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    41
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    42
The input generation consists in gathering data from build steps throughout the build to allow the generation
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    43
of the future bundle. Not all the steps are supported, so the build engineer must keep in mind that custom
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    44
exports or modification of the binaries after a controlled build step might lead to bundles with inconsistent content.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    45
 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    46
In order to enable blocks input generation you simply need to define the **blocks.enabled** property to true. Intermediate 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    47
configuration file will be generated under **blocks.config.dir**.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    48
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    49
e.g::
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    50
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    51
   hlm -Dblocks.enabled=true....
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    52
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    53
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    54
Currently supported steps are:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    55
 * SBSv2 compilation
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    56
 * Configuration export using cMaker (only if cmaker-what is called)
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    57
 * ROM image creation
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    58
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    59
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    60
Bundle generation
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    61
=================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    62
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    63
Once the data have been gathered during the build, it is then possible to create bundles. To do so you need to call the 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    64
**blocks-create-bundles** target. Generated bundle will be created under **blocks.bundle.dir**.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    65
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    66
e.g::
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    67
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    68
   hlm -Dblocks.enabled=true .... blocks-create-bundles
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    69
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    70
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    71
Blocks workspace management with Helium 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    72
=======================================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    73
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    74
Helium allows you to use any build environment as Blocks workspace. The :hlm-t:`blocks-create-workspace` will handle the
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    75
automatic creation of workspace base on the current build.drive used. If the current build.drive represent an
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    76
already existing workspace then it will reuse it. The :hlm-p:blocks.workspace.id property will contain the Blocks workspace
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    77
id. Also when new workspace is created some repositories can be automatically added using the **blocks.repositories.id** reference
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    78
to an hlm:blocksRepositorySet object.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    79
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    80
::
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    81
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    82
   <hlm:blocksRepositorySet id="blocks.repositories.id">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    83
       <repository name="test-repo" url="file:E:\my-repo" />
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    84
   </hlm:blocksRepositorySet>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    85
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    86
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    87
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    88
Installing bundles
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    89
==================
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    90
The :hlm-t:`blocks-install-bundles` target will allow you to install packages under the workspace, to do so, you can configure
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    91
the following references using patternset:
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    92
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    93
::
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    94
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    95
   <patternset id="blocks.bundle.filter.id">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    96
       <include name="some.pkg.name.*" /> 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    97
       <exclude name="some.other.pkg.name.*" /> 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    98
   </patternset>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
    99
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   100
   <patternset id="blocks.group.filter.id">
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   101
       <include name="some.pkg.name.*" /> 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   102
       <exclude name="some.other.pkg.name.*" /> 
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   103
   </patternset>
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   104
   
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   105
      
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   106
The **blocks.bundle.filter.id** patternset will allow you to filter bundles based on their name. And **blocks.bundle.filter.id** patternset will allow you
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   107
to install group selected group of bundles.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   108
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   109
Finally the workspace can be updated using the :hlm-t:`blocks-update-bundles` target.
b8d81fa19e7d helium_12.0.0-63b64366f9cf
wbernard
parents:
diff changeset
   110