← Back to team overview

ubuntu-phone team mailing list archive

Re: Manually deploying app to device

 

Am 22.03.2015 um 22:18 schrieb Michał 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 module¹ 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.

¹ /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,




Follow ups

References