~faenil/telegram/new_build_system

« back to all changes in this revision

Viewing changes to README.md

  • Committer: Andrea Bernabei
  • Date: 2015-11-02 15:30:52 UTC
  • Revision ID: andrea.bernabei@canonical.com-20151102153052-bdwmpxoit9ahz6m7
[BUILD] Improve build system, add automatic desktop build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Telegram for Ubuntu
2
2
 
 
3
### TLDR;
 
4
    "./setup.sh -t mobile -dbc"  for a full mobile build
 
5
OR  "./setup.sh -t desktop -db" for a full desktop build
 
6
 
3
7
### How to build
4
8
 
5
 
The following instructions assume you have gotten Telegram for Ubunt source and changed to the project's root directory.
6
 
 
7
 
If you don't have a 15.04 click chroot yet:
8
 
 
9
 
    click chroot --arch armhf --framework ubuntu-sdk-15.04 create
10
 
 
11
 
#### Get and build dependencies.
12
 
 
13
 
In the above click chroot, install:
14
 
    libthumbnailer-qt-dev libthumbnailer-qt1.0:armhf thumbnailer-service:armhf
15
 
 
16
 
This app requires:
17
 
- libqtelegram-aseman-edition library and
18
 
- TelegramQML plugin
19
 
 
20
 
Simply run:
21
 
 
22
 
./bootstrap.sh
23
 
 
24
 
It'll git clone both projects to the deps directory and build them inside the click chroot.
25
 
You can use same command to re-build, if you have changed them, too.
26
 
 
27
 
#### Build Telegram for Ubuntu
28
 
 
29
 
Simply run:
30
 
 
31
 
./build.sh
32
 
 
33
 
This will build the app and prepare everything in a directory named click
34
 
in the project's root directory.
35
 
 
36
 
To build the click package and install, run:
37
 
 
38
 
./click.sh
39
 
 
40
 
This step uses your armhf click chroot.
41
 
 
 
9
This build setup has been tested on:
 
10
- Ubuntu Vivid 15.04 with Overlay PPA enabled
 
11
 
 
12
The following instructions assume you downloaded Telegram for Ubuntu source and changed ("cd") to the project's root directory.
 
13
 
 
14
1)  Install build dependencies
 
15
    If you're building for mobile devices:
 
16
        If you don't have a 15.04 click chroot yet:
 
17
            click chroot --arch armhf --framework ubuntu-sdk-15.04 create
 
18
        In the above click chroot, install:
 
19
            libthumbnailer-qt-dev:armhf libthumbnailer-qt1.0:armhf thumbnailer-service:armhf
 
20
    Else if you're building for desktop, install:
 
21
        libthumbnailer-qt-dev libthumbnailer-qt1.0 thumbnailer-service
 
22
 
 
23
2)  Download and build the source of libqtelegram-aseman-edition library and TelegramQML plugin:
 
24
    - Run ./setup.sh -t <build_type> -d
 
25
    
 
26
    The help command will show the available values for <build_type>.
 
27
    It'll git clone both projects to the deps directory and build them (inside the click chroot, if
 
28
    the build type chosen was "mobile").
 
29
    You can use same command to re-build, if you have changed them, too.
 
30
    NOTE: it may be required to modify some environment variables that drive the build process, such
 
31
    as the path to qmake or make, the path to system libraries, the name of the chroot, etc.
 
32
    The env variables are grouped at the beginning of setup.sh, to make the customization easier.
 
33
    
 
34
3)  Build Telegram for Ubuntu
 
35
    - Run ./setup.sh -t <build_type> -b
 
36
    
 
37
    This will build the app in the build path defined by setup.sh 
 
38
    and prepare everything in a directory named click in the project's root directory.
 
39
    NOTE: it may be required to modify some environment variables that drive the build process, such
 
40
    as the path to qmake or make, the path to system libraries, the name of the chroot, etc.
 
41
    The env variables are grouped at the beginning of setup.sh, to make the customization easier.
 
42
    
 
43
4)  (Optional) Build the click package and install it using adb (requires an Ubuntu Touch 
 
44
    mobile device connected via USB with developer mode enabled):
 
45
    - Run ./setup.sh -t mobile -c
 
46
    
 
47
    
 
48
### How to run (DESKTOP VERSION only)
 
49
 
 
50
- cd to the build directory (e.g build_desktop)
 
51
- run "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./telegram"
 
52
 
 
53
### How to delete the build files
 
54
 
 
55
- Run ./setup -t <build_type> -e
 
56
 
 
57
### How to get help
 
58
 
 
59
- Run ./setup -h