Ubuntu SDK installation

Ubuntu SDK installation is a very important step for developers. The reason being installation can take quite some time depending on the network speed. We strongly recommend installing Ubuntu before coming to the event in order to save time during the Hackathon.

Most of the information can be found on our developer website: www.developer.ubuntu.com.


Ubuntu Desktop OS


Annually, Canonical releases two versions in April and October. 15.04 is recommended for desktop OS installation during the Hackthon event though 15.10 is coming in Oct of 2015. 

For 14.04 LTS Ubuntu desktop, the scope development cannot be running on the desktop due to API changes, and it can be only tested on the emulator and on a real phone. 

Install SDK 


Developers can visit our developer website link “ Installing the SDK”. Just follow the instructions there to install the SDK.


Install chroots


In this step, we are going to install the chroots which will be used for cross-building the Ubuntu projects.

The chroots are classified into two categories:
  • i386 - for emulator target
  • armhf - for phone target (ARM is the chipset for the phone)
The chroots will be part of the Kits to deploy our apps onto the emulator and the phone targets.

When the Ubuntu SDK is launched for the very first time (look for “ ubuntu” in the dash),





it normally prompts the following dialog:




We can choose to install the chroots (i386/armhf) during the installation wizard.  As shown above, at any point of time (after the SDK is launched), we can go to menu “ Tools-> Options-> Ubuntu” setting page to install the chroots (i386 and armhf).







The installation for the armhf/i386 chroots may take quite some time to finish depending on the network speed. Each of the chroots may take up to 1.7G disk space in the desktop.

Alternatively,  a developer may remove an installed or partially-installed chroots using the following commands (this is normally used when the installation in the above step cannot be removed by selecting the " Delete" for some reasons):

$ sudo click chroot -a i386 -f ubuntu-sdk-15.04  destroy
$ sudo click chroot -a armhf -f ubuntu-sdk-15.04  destroy  

A developer may use the following commands to install the chroots using the following commands:

$sudo click chroot -ai386 -f ubuntu-sdk-15.04 create  
$sudo click chroot -aarmhf -f ubuntu-sdk-15.04 create

A developer may list all of the installed chroots using the following commands:

~$ schroot -l
chroot:click-ubuntu-sdk-15.04-armhf
chroot:trusty-amd64-armhf
chroot:utopic-amd64-armhf

If a developer wants to install extra packages (for example some libs are needed for your application development) for the chroots (although this is normally not needed), a developer can use the following way to do it:




In the terminal, you can use " apt-get install <packages>" to install whatever packages you want to install as long as the libs are supported by the phone.

Alternatively, a developer can use the following command to maintain chroots. We launch a terminal in the desktop, then type the following command:

$sudo click chroot -aarmhf -fubuntu-sdk-15.04 maint apt-get install libaccounts-glib-dev:armhf

In the above command, it shows how to install "libaccounts-glib-dev" to the armhf chroot, or use the following command in a terminal:

$sudo click chroot -a armhf -f ubuntu-sdk-15.04 maint

Then, we can install whatever packages we want to install/remove to the chroot:



Install emulator


Emulator is used to test and verify your applications ( HTML 5 and QML) and  Scopes if you do not have a Ubuntu phone with you. It emulates a real phone although GPS/sensors/telephony etc. are not emulated so far in the emulator.

In order to install an emulator, we need to do as follows:




Once the SDK is launched, we select “ Devices”, then select “ +”, which is located at the bottom-left of the SDK screen. We choose the i386 (which is faster than the armhf emulation). Normally, “ devel” channel is selected though “ devel-proposed” has the most updated features and it could be the latest Ubuntu phone image (depending on the installation time, for now, it should be 15.10) in which case it may not be compatible with our 15.04 chroot. The installation of the emulator may take some while depending on the network speed.

In order to deploy an app/scope to your emulator, you need to turn on the “ developer mode” in the  emulator. We can launch the emulator like the following way:




Remember the default password for the emulator is “ 0000”.



We can use the following way to turn on the developer mode:


   


For phone target, we need to do the same on the phone in order to let our apps deployed onto the target.

Once we have done all these, basically, the installation is finished. We probably need to follow the article “ creating an sdk app project” to see whether you can create and launch an app/scope into the emulator successfully. This step is to ensure whether your SDK installation is successful or not.


Install Qt help document


We use the following command to install the Qt help document:

sudo apt-get install qt5-doc

In Ubuntu SDK, we can position our cursor on an API or keywords in the editor, then press " F1", you will be able to see the usage of the API.

Further reading



IRC support Channel


#ubuntu-hackathon, #ubuntu-app-devel and #ubuntu-touch on freenode




More channels like " #ubuntu-app-devel" and " ubuntu-touch" can be used for getting answers. A developer can simply type "/join #ubuntu-hackathon" to join a channel. In addition, you may also subscribe the Ubuntu developer support mailinglist.

Training slides


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值