@@ -6,3 +6,55 @@ These simple steps run through the most simple procedure to create an
66APK with some simple default parameters. See the :doc: `commands
77documentation <commands>` for all the different commands and build
88options available.
9+
10+ .. warning :: These instructions are quite preliminary. The
11+ installation and use process will become more standard in
12+ the near future.
13+
14+
15+ Installation
16+ ------------
17+
18+ You can obtain python-for-android from Github, either via git::
19+
20+ git clone [email protected] :inclement/python-for-android-revamp.git 21+ cd python-for-android
22+
23+ Or by direct download::
24+
25+ wget https://github.com/inclement/python-for-android-revamp/archive/master.zip
26+ unzip master.zip
27+ cd python-for-android-revamp-master
28+
29+
30+ Basic use
31+ ---------
32+
33+ Navigate to the ``pythonforandroid `` directory within the downloaded package.
34+
35+ .. note :: This will soon be replaced with a normal call to setup.py,
36+ but this hasn't been finished and tested yet.
37+
38+ You need to set ANDROIDSDK and ANDROIDNDK env vars to point to these.
39+
40+ To create a basic distribution, run .e.g::
41+
42+ python2 toolchain.py create --name=testproject --bootstrap=pygame --recipes=sdl,python2
43+
44+ These arguments relate to the old python-for-android; ``name `` is the
45+ dist name, and ``recipes `` is a list of recipes to use. The build
46+ should proceed and eventually finish, and will print the location of
47+ the dist.
48+
49+ .. note :: Compiled dists are not located in the same place as with old
50+ python-for-android, but instead in an OS-dependent
51+ location. The build process will print this location when it
52+ finishes.
53+
54+ To build an APK, navigate to the dist dir and run build.py just as with old p4a.
55+
56+ You can build an SDL2 APK similarly, first making a dist::
57+
58+ python2 toolchain.py create --name=testsdl2 --bootstrap=sdl2 --recipes=sdl2,python2
59+
60+ This will have a build.py in the same way, but currently doesn't support many options.
0 commit comments