issue102:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue102:c_c [2015/11/01 18:52] – créée auntiee | issue102:c_c [2015/11/07 23:30] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | I recently received a BQ Aquaris E4.5 device running Ubuntu. Part of the reason for getting it was a promise to write a series of articles about developing for the phone. This will be part 1, covering setup and a basic ‘hello world’ program. | + | **I recently received a BQ Aquaris E4.5 device running Ubuntu. Part of the reason for getting it was a promise to write a series of articles about developing for the phone. This will be part 1, covering setup and a basic ‘hello world’ program. |
Install the SDK | Install the SDK | ||
Ligne 16: | Ligne 16: | ||
sudo apt update && sudo apt install ubuntu-sdk | sudo apt update && sudo apt install ubuntu-sdk | ||
- | This command updates the package list, and immediately afterwards installs the ubuntu-sdk package. | + | This command updates the package list, and immediately afterwards installs the ubuntu-sdk package.** |
- | The official install page notes that anyone running a development version of 15.10 should ensure their packages are all up-to-date, before installing ubuntu-sdk, with a “sudo apt dist-upgrade”. | + | Coder pour les téléphones Ubuntu |
+ | |||
+ | Récemment, j'ai reçu un BQ AQuaris E4.5 sous Ubuntu. Je l'ai eu en partie parce que j'ai promis d' | ||
+ | |||
+ | Installer le SDK | ||
+ | |||
+ | Ubuntu a publié le SDK Ubuntu afin de faciliter le développement. Dans cette série, je vais me concentrer sur ce programme. Si vous n' | ||
+ | |||
+ | Ajouter le dépôt | ||
+ | |||
+ | sudo add-apt-repository ppa: | ||
+ | |||
+ | Cette commande ajoutera le PPA ubuntu-sdk officiel pour vous permettre d' | ||
+ | |||
+ | Installer le paquet | ||
+ | |||
+ | sudo apt update && sudo apt install ubuntu-sdk | ||
+ | |||
+ | Cette commande met à jour la liste des paquets et, dans la foulée, installe le paquet ubuntu-sdk. | ||
+ | |||
+ | **The official install page notes that anyone running a development version of 15.10 should ensure their packages are all up-to-date, before installing ubuntu-sdk, with a “sudo apt dist-upgrade”. | ||
Launch the Application | Launch the Application | ||
Ligne 32: | Ligne 52: | ||
The SDK will first ask you for a name and a save location. I chose HelloWorld and ~/Ubuntu SDK Projects/, but you’re welcome to choose anything you want. | The SDK will first ask you for a name and a save location. I chose HelloWorld and ~/Ubuntu SDK Projects/, but you’re welcome to choose anything you want. | ||
- | The next page will ask for personal information - your nickname, full name, email, the app name, and the framework you want to develop for. I chose the ubuntu-sdk-15.04 framework (as I am running 15.04). | + | The next page will ask for personal information - your nickname, full name, email, the app name, and the framework you want to develop for. I chose the ubuntu-sdk-15.04 framework (as I am running 15.04).** |
- | Build Targets | + | La page officielle d' |
+ | |||
+ | Lancez le programme | ||
+ | |||
+ | ubuntu-sdk | ||
+ | |||
+ | ou, tout simplement, trouvez l' | ||
+ | |||
+ | Une fois l' | ||
+ | |||
+ | Créer votre projet | ||
+ | |||
+ | D' | ||
+ | |||
+ | La page suivante vous demandera quelques informations personnelles - votre pseudo, votre nom complet, une adresse mail, le nom de l' | ||
+ | |||
+ | **Build Targets | ||
By default, there is only the Desktop kit available. So you’ll need to choose “create new kit”, and choose “armhf” if you’re planning to run it on a phone. Once you select the architecture, | By default, there is only the Desktop kit available. So you’ll need to choose “create new kit”, and choose “armhf” if you’re planning to run it on a phone. Once you select the architecture, | ||
Ligne 46: | Ligne 82: | ||
The Hello World Application | The Hello World Application | ||
- | As it turns out, the basic HTML5 app is already a Hello World application. As such, we won’t be doing any actual coding. Instead, I will focus on running the device locally, and on the physical device. If you want to adjust the HTML, feel free. | + | As it turns out, the basic HTML5 app is already a Hello World application. As such, we won’t be doing any actual coding. Instead, I will focus on running the device locally, and on the physical device. If you want to adjust the HTML, feel free.** |
- | Desktop | + | Choix de l' |
+ | |||
+ | Par défaut, seul le kit Desktop est disponible. Vous devez choisir « create new kit », puis « armhf » si vous voulez l' | ||
+ | |||
+ | Note : Si vous ne voulez pas d' | ||
+ | |||
+ | Après la création du kit | ||
+ | |||
+ | L' | ||
+ | |||
+ | L' | ||
+ | |||
+ | Il s' | ||
+ | |||
+ | **Desktop | ||
If you look in the lower left of the SDK window (shown below), you’ll see an image of a Desktop (or an Ubuntu logo, depending on which kit you selected). Below that are two green arrows, and a hammer. The first green arrow is “run”, the other is “debug”, | If you look in the lower left of the SDK window (shown below), you’ll see an image of a Desktop (or an Ubuntu logo, depending on which kit you selected). Below that are two green arrows, and a hammer. The first green arrow is “run”, the other is “debug”, | ||
Ligne 58: | Ligne 108: | ||
Once you enter the information, | Once you enter the information, | ||
- | Once the emulator is created, simply click on the Icon above the green arrow, and select (with your arrow keys) the kit you want to use. In the case of the example, it’s the armhf kit you want. Then clicking “run” will launch the emulator, and eventually load the app into the emulator. | + | Once the emulator is created, simply click on the Icon above the green arrow, and select (with your arrow keys) the kit you want to use. In the case of the example, it’s the armhf kit you want. Then clicking “run” will launch the emulator, and eventually load the app into the emulator.** |
- | Ubuntu Phone (physical) | + | Bureau |
+ | |||
+ | En bas à gauche de la fenêtre SDK (ci-dessous), | ||
+ | |||
+ | Le téléphone Ubuntu (émulé) | ||
+ | |||
+ | Afin de pouvoir le faire tourner sur un téléphone Ubuntu, vous devez créer un émulateur. Pour ce faire, allez à Devices et cliquez sur le gros symbole plus (+). Là, vous devez le nommer (sans espaces), choisir l' | ||
+ | |||
+ | Une fois les informations rentrées et votre mot de passe fourni, il commencera à créer l' | ||
+ | |||
+ | Une fois l' | ||
+ | |||
+ | **Ubuntu Phone (physical) | ||
The Ubuntu Devices section from the emulated section will also display any usb connected Ubuntu devices. However, my Aquaris E4.5 was not recognized at first. It turns out I had forgotten to enable developer mode. On the phone, go to Settings -> About This Phone, and then Developer Mode. Make sure there is a green checkmark. Then plug it in. You can check to see if it’s connected properly by running adb devices in the list. Or lsusb (to see if the device is even recognized). It should also appear as an MTP device. Once the physical device is connected, switch to the Ubuntu Devices panel, and ensure it’s listed here too. Also, make sure it’s unlocked. If it isn’t, you’ll see something similar to this in your log: arch: | The Ubuntu Devices section from the emulated section will also display any usb connected Ubuntu devices. However, my Aquaris E4.5 was not recognized at first. It turns out I had forgotten to enable developer mode. On the phone, go to Settings -> About This Phone, and then Developer Mode. Make sure there is a green checkmark. Then plug it in. You can check to see if it’s connected properly by running adb devices in the list. Or lsusb (to see if the device is even recognized). It should also appear as an MTP device. Once the physical device is connected, switch to the Ubuntu Devices panel, and ensure it’s listed here too. Also, make sure it’s unlocked. If it isn’t, you’ll see something similar to this in your log: arch: | ||
Ligne 67: | Ligne 129: | ||
Once the kit is added, you must select it (the icon above the green arrow in the bottom left), and run the project. This will then open the app on your phone. | Once the kit is added, you must select it (the icon above the green arrow in the bottom left), and run the project. This will then open the app on your phone. | ||
- | In order to stop the application, | + | In order to stop the application, |
+ | |||
+ | Téléphone Ubuntu (physique) | ||
+ | |||
+ | La section « Ubuntu Devices » de la section émulée affichera également tous les dispositifs Ubuntu connectés par USB. Toutefois, mon Aquaris E4.5 n'a pas été reconnu au départ. Il s' | ||
+ | |||
+ | Une fois affiché dans le panneau « Ubuntu Devices », vous verrez un message au sujet de frameworks. Il suffit de le laisser sélectionner un framework automatiquement ; c'est tout. Cela créera un nouveau kit appelé « Ubuntu Device ». Pour pouvoir construire et lancer une application sur le téléphone, | ||
+ | |||
+ | Pour arrêter l' | ||
+ | |||
+ | **Wrap-Up | ||
+ | |||
+ | That was it for this month. Now that we’ve gotten the basics out of the way (running applications), | ||
- | Wrap-Up | + | Récapitulatif |
- | That was it for this month. Now that we’ve gotten the basics out of the way (running | + | C'est tout pour ce mois-ci. Maintenant que nous avons traité les fondamentaux |
issue102/c_c.txt · Dernière modification : 2015/11/07 23:30 de d52fr