issue67:tutoriel_-_python_p._38
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue67:tutoriel_-_python_p._38 [2012/12/08 17:16] – créée andre_domenech | issue67:tutoriel_-_python_p._38 [2013/01/14 15:27] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | will take the transposer app that we created, and create an APK to install it on your android device. | + | **As I promised in part 37, we will take the transposer app that we created, and create an APK to install it on your android device. |
Before we get started, let’s make sure we have everything ready. First thing we need is the two files we created last time in a folder that you can easily access. Let’s call it “transposer”. Create it in your home directory. Next, copy the two files (transpose.kv and transpose.py) into that folder. Now rename transpose.py to main.py. This part is important. | Before we get started, let’s make sure we have everything ready. First thing we need is the two files we created last time in a folder that you can easily access. Let’s call it “transposer”. Create it in your home directory. Next, copy the two files (transpose.kv and transpose.py) into that folder. Now rename transpose.py to main.py. This part is important. | ||
Ligne 5: | Ligne 5: | ||
Next, we need to reference the kivy packaging instructions in a web browser. The link is http:// | Next, we need to reference the kivy packaging instructions in a web browser. The link is http:// | ||
- | git clone git:// | + | < |
- | This will download and set up the software that we need to continue. Now, in a terminal window, change your directory to the python-for-android/ | + | Comme je l'ai promis la dernière fois, nous allons reprendre l' |
+ | |||
+ | Avant de commencer, assurons-nous que tout soit prêt. La première chose dont nous avons besoin est de placer les deux fichiers que nous avons créés la dernière fois dans un dossier auquel vous pouvez facilement accéder. Appelons-le « transposer ». Créez-le dans votre répertoire personnel. Ensuite, copiez les deux fichiers (transpose.kv et transpose.py) dans ce dossier. Maintenant renommez transpose.py en main.py. Cette partie est importante. | ||
+ | |||
+ | Ensuite, nous avons besoin de faire référence aux instructions d' | ||
+ | |||
+ | < | ||
+ | |||
+ | **This will download and set up the software that we need to continue. Now, in a terminal window, change your directory to the python-for-android/ | ||
Now you will find a file called build.py. This is what will do all the work for us. Now comes the magic. | Now you will find a file called build.py. This is what will do all the work for us. Now comes the magic. | ||
Ligne 14: | Ligne 22: | ||
For our use, we will use the following command (the “\” is a line continuation character): | For our use, we will use the following command (the “\” is a line continuation character): | ||
+ | |||
+ | ./build.py --dir ~/ | ||
+ | | ||
+ | |||
+ | Ceci va télécharger et installer le logiciel dont nous avons besoin pour continuer. Maintenant, dans un terminal, allez dans le répertoire du dossier python-for-android/ | ||
+ | |||
+ | Vous allez y trouver un fichier appelé build.py. C'est lui qui va faire tout le travail pour nous. Et maintenant, voici la magie. | ||
+ | |||
+ | Le programme build.py prend divers arguments sur la ligne de commande et créera l'APK pour vous. Ci-dessus se trouve la syntaxe pour build.py prise directement dans la documentation Kivy. | ||
+ | |||
+ | Pour nos besoins, nous allons utiliser la commande suivante (le « \ » est un caractère de continuation de ligne) : | ||
./build.py --dir ~/ | ./build.py --dir ~/ | ||
| | ||
- | Let’s look at the pieces of the command... | + | **Let’s look at the pieces of the command... |
./build.py - this is the application | ./build.py - this is the application | ||
Ligne 25: | Ligne 44: | ||
--name “RainyDay Transposer” - this is the name of the application that will show up in the apps drawer. | --name “RainyDay Transposer” - this is the name of the application that will show up in the apps drawer. | ||
--version 1.0.0 - the version of our application | --version 1.0.0 - the version of our application | ||
- | debug - this is the level of release (debug or release) | + | debug - this is the level of release (debug or release)** |
+ | |||
+ | Regardons les morceaux de la commande... | ||
+ | |||
+ | ./build.py - c'est l' | ||
+ | --dir ~/ | ||
+ | --package org.RainyDay.transposer - c'est le nom du paquet ; | ||
+ | --name " | ||
+ | --version 1.0.0 - la version de notre application ; | ||
+ | debug - c'est le niveau de sortie (debug ou release). | ||
+ | |||
+ | **Once you execute this, assuming that everything worked as expected, you should have a number of files in the /bin folder. The one you are looking for is titled “RainyDayTransposer-1.0.0-debug.apk”. You can copy this to your android device using your favorite file manager app, and install it just like any other application from the various app stores. | ||
+ | |||
+ | That’s all I have time for this month.** | ||
- | Once you execute this, assuming that everything worked as expected, you should have a number of files in the /bin folder. The one you are looking for is titled “RainyDayTransposer-1.0.0-debug.apk”. You can copy this to your android device using your favorite file manager app, and install it just like any other application | + | Une fois que vous aurez exécuté ceci, en supposant que tout a fonctionné comme prévu, vous devriez avoir un certain nombre de fichiers dans le dossier |
- | That’s all I have time for this month. | + | C'est tout le temps dont je dispose pour ce mois-ci. |
issue67/tutoriel_-_python_p._38.1354983360.txt.gz · Dernière modification : 2012/12/08 17:16 de andre_domenech