← Back to team overview

ubuntu-phone team mailing list archive

Re: Manually deploying app to device

 

Am 24.03.2015 um 19:17 schrieb Bogdan Cuza:
Thank you very much, this worked flawlessly (you just forgot to put "run" and there must be a dash, not a point in "ubuntu-sdk.15.10").
Perfect :). Sorry for the typos I did not actually test the commands  ;)

------------------------------------------------------------------------
Date: Mon, 23 Mar 2015 00:36:17 +0100
From: benjamin.zeller@xxxxxxxxxxxxx
To: michal.sawicz@xxxxxxxxxxxxx; bogdan.cuza@xxxxxxxxxxx; nikwen.developer@xxxxxxxxx; ubuntu-phone@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Ubuntu-phone] Manually deploying app to device

Am 22.03.2015 um 22:18 schrieb Michal Sawicz:

    W dniu 22.03.2015 o 20:45, Bogdan Cuza pisze:

        Well, this seems quite complicated, I think I'll stick to auto
        deployment for now, but thanks anyway.

Not so complicated, you need:

1. armhf chroot (click chroot -a armhf -f ubuntu-sdk-15.10 create)
2. create your project (/home/user/project)
3. cd /home/user/project
4. mkdir build-armhf
5. cd build-armhf
6. click chroot -a armhf -f ubuntu-sdk.15.10 cmake ..
7. click chroot -a armhf -f ubuntu-sdk.15.10 make
8. click chroot -a armhf -f ubuntu-sdk.15.10 make DESTDIR=/tmp/package install
9. click build /tmp/package

The finished package will be in the cwd. You will need a valid manifest.json file of course. The make install step should install it into the root of the click package (/tmp/package).

You can check out how to write a valid manifest.json file by creating a example project
with QtCreator.

    It's actually quite much easier by reusing the bits we use for
    cross-building .deb packages:

    $ eval $(dpkg-architecture --print-set --host-arch armhf)

    This exports a set of environment variables that a cmake module1 then
    interprets and sets all the needed variables for you.

    Which means you can then use cmake alone and all should be set up for you.

    1 /usr/share/cmake-3.0/Modules/MultiArchCross.cmake


I might be wrong, but this won't use the official click build chroots, which means you can not be sure you are linking against the supported libraries.
I would suggest to use the chroots.

    HTH,






References