add minimal docs

This commit is contained in:
Robert Niederreiter 2016-10-14 09:58:41 +02:00
parent d6f2e3f8d2
commit 7ff3e7982f
3 changed files with 61 additions and 11 deletions

2
.gitignore vendored
View file

@ -2,6 +2,8 @@
*.pyc *.pyc
*.pyo *.pyo
*.swp *.swp
.project
.pydevproject
freetype-* freetype-*
build/* build/*
dist/* dist/*

View file

@ -87,6 +87,7 @@ For a complete list of available commands, type::
$ ./toolchain.py $ ./toolchain.py
Create the Xcode project Create the Xcode project
------------------------ ------------------------
@ -109,6 +110,7 @@ Then click on `Play`, and enjoy.
the `<title>-ios/YourApp` directory. Don't make changes in the -ios the `<title>-ios/YourApp` directory. Don't make changes in the -ios
directory directly. directory directly.
Configuring your App Configuring your App
-------------------- --------------------
@ -123,6 +125,7 @@ launch environment.
the 'export_orientation' function in 'main.m'. The XCode orientation the 'export_orientation' function in 'main.m'. The XCode orientation
settings should be set to support all. settings should be set to support all.
FAQ FAQ
--- ---
@ -132,6 +135,7 @@ Fatal error: "stdio.h" file not found
You must build with bitcode disabled (Xcode setting ENABLE_BITCODE should be No). You must build with bitcode disabled (Xcode setting ENABLE_BITCODE should be No).
We don't support bitcode. You need to go to the project setting, and disable bitcode. We don't support bitcode. You need to go to the project setting, and disable bitcode.
Support Support
------- -------
@ -146,6 +150,7 @@ We also have an IRC channel:
* Port : 6667, 6697 (SSL only) * Port : 6667, 6697 (SSL only)
* Channel : #kivy * Channel : #kivy
Contributing Contributing
------------ ------------
@ -165,6 +170,7 @@ IRC channel:
* Port : 6667, 6697 (SSL only) * Port : 6667, 6697 (SSL only)
* Channel : #kivy-dev * Channel : #kivy-dev
License License
------- -------

View file

@ -118,7 +118,9 @@ class JsonStore(object):
with io.open(self.filename, 'w', encoding='utf-8') as fd: with io.open(self.filename, 'w', encoding='utf-8') as fd:
fd.write(unicode(json.dumps(self.data, ensure_ascii=False))) fd.write(unicode(json.dumps(self.data, ensure_ascii=False)))
class Arch(object): class Arch(object):
def __init__(self, ctx): def __init__(self, ctx):
super(Arch, self).__init__() super(Arch, self).__init__()
self.ctx = ctx self.ctx = ctx
@ -135,7 +137,6 @@ class Arch(object):
d.format(arch=self)) d.format(arch=self))
for d in self.ctx.include_dirs] for d in self.ctx.include_dirs]
def get_env(self): def get_env(self):
include_dirs = [ include_dirs = [
"-I{}/{}".format( "-I{}/{}".format(
@ -196,7 +197,6 @@ class Arch(object):
return env return env
class ArchSimulator(Arch): class ArchSimulator(Arch):
sdk = "iphonesimulator" sdk = "iphonesimulator"
arch = "i386" arch = "i386"
@ -375,19 +375,60 @@ class Context(object):
class Recipe(object): class Recipe(object):
version = None """Base recipe for compiling and installing dependency libraries and
packages to kivy iOS build.
"""
url = None url = None
"""Either folder name relative to recipe or download URL.
"""
version = None
"""Gets formatted with ``url`` if download URL.
"""
archs = [] archs = []
"""Architectures this recipe applies, empty list means all.
"""
depends = [] depends = []
"""Dependency recipes.
"""
optional_depends = [] optional_depends = []
"""???
"""
library = None library = None
"""???
"""
libraries = [] libraries = []
"""???
"""
include_dir = None include_dir = None
"""Include directory for compilation"""
include_per_arch = False include_per_arch = False
"""???
"""
frameworks = [] frameworks = []
"""OS X frameworks.
"""
sources = [] sources = []
"""???
"""
pbx_frameworks = [] pbx_frameworks = []
"""???
"""
pbx_libraries = [] pbx_libraries = []
"""???
"""
# API available for recipes # API available for recipes
def download_file(self, url, filename, cwd=None): def download_file(self, url, filename, cwd=None):
@ -396,6 +437,7 @@ class Recipe(object):
""" """
if not url: if not url:
return return
def report_hook(index, blksize, size): def report_hook(index, blksize, size):
if size <= 0: if size <= 0:
progression = '{0} bytes'.format(index * blksize) progression = '{0} bytes'.format(index * blksize)
@ -847,7 +889,8 @@ class PythonRecipe(Recipe):
"""Automate the installation of a Python package into the target """Automate the installation of a Python package into the target
site-packages. site-packages.
It will works with the first filtered_archs, and the name of the recipe. It will works with the first filtered_archs, and the name of the
recipe.
""" """
arch = self.filtered_archs[0] arch = self.filtered_archs[0]
if name is None: if name is None:
@ -1044,7 +1087,6 @@ def update_pbxproj(filename):
fn = join(ctx.dist_dir, "sources", name) fn = join(ctx.dist_dir, "sources", name)
project.add_folder(fn, parent=g_classes) project.add_folder(fn, parent=g_classes)
if project.modified: if project.modified:
project.backup() project.backup()
project.save() project.save()