[PYTHON] kivy-ios memo kivy v1.8.0 (MAC)

Deprecated this article (Reference to New article)

A memo to build kivy-ios on Mac environment (osx 10.10) and run it on the device

http://qiita.com/b4b4r07/items/6efebc2f3d1cbbd393fc http://stackoverflow.com/questions/21242107/pip-install-pil-dont-install-into-virtualenv http://www.renedohmen.nl/blog/2013/08/installing-kivy-on-mac-osx-10-6-with-brew/ http://kivy.org/docs/guide/packaging-ios.html

1. Clear HomeBrew environment

console


cd `brew --prefix`
rm -rf Cellar
brew prune
rm `git ls-files`
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew

2. HomeBrew installation

console


cd
sudo chown -R $USER:admin /usr/local
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor

3. Python installation

console


brew install python
brew link --overwrite python

4. Kivy installation

console


brew install mercurial
brew link --overwrite mercurial
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
pip install -Iv http://cython.org/release/Cython-0.20.2.tar.gz
ln -s /usr/local/include/freetype2 /usr/local/include/freetype
pip install PIL --allow-external PIL --allow-unverified PIL
pip install kivy

5. Kivy-ios installation

console


brew install autoconf automake libtool pkg-config
git clone git://github.com/kivy/kivy-ios
cd kivy-ios
tools/build-all.sh

6. Kivy-ios operation check (project creation & build)

console


tools/create-xcode-project.sh test test
cd app-test
mkdir test
mkdir YourApp
cd test
vi main.py

main.py


import kivy
kivy.require('1.0.7')
from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
    def build(self):
        roodWidget = Button(text='hello world')
        # return a Button() as a root widget
        return roodWidget
if __name__ == '__main__':
    TestApp().run()

console


cd ..
open test.xcodeproj

Done when working on iOS device

When registering with the Apple Store, you need to run the following command to slim down.

console


tools/reduce-python.sh

Recommended Posts

kivy-ios memo kivy v1.8.0 (MAC)
kivy-ios memo kivy v1.8.0 URL linkage (MAC)
kivy-ios memo kivy v1.8.0 for new toolchain (MAC)
kivy-ios memo kivy v1.9.0-dev URL linkage (MAC)
Kivy-Android Memo (MAC)
[My memo] python -v / python -V
[Tentative] How to convert a character string to Shift_jis with kivy-ios Memo kivy v1.8.0
Memo on Mac OS X
Python environment construction memo on Mac
Python memo Anaconda installation (Mac only)