Skip to content

Commit 7e28940

Browse files
committed
Added basic quickstart doc
1 parent a323c35 commit 7e28940

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

doc/source/quickstart.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,55 @@ These simple steps run through the most simple procedure to create an
66
APK with some simple default parameters. See the :doc:`commands
77
documentation <commands>` for all the different commands and build
88
options 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.

doc/source/recipes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,18 @@ what the jni dir folder name should be. If it is omitted, the recipe
374374
name is used. Be careful here, sometimes the folder name is important,
375375
especially if this folder is a dependency of something else.
376376

377+
Examples of recipes
378+
-------------------
379+
380+
The above documentation has included a number of snippets
381+
demonstrating different behaviour. Together, these cover most of what
382+
is ever necessary to make a recipe work.
383+
384+
The following short sections further demonstrate a few full recipes from p4a's
385+
internal recipes folder. Unless your own module has some unusual
386+
complication, following these templates should be all you need to make
387+
your own recipes work.
388+
377389
.. _recipe_class:
378390

379391
The ``Recipe`` class

0 commit comments

Comments
 (0)