17
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

kivy-iosメモ kivy v1.8.0(MAC)

Last updated at Posted at 2014-02-27

#Deprecated this article (Reference to New article)

Mac環境(osx 10.10)上でkivy-iosをビルドしてデバイス上で動作させるメモ
※現状はarmv7対応のみの対応なので2015年2月1日からは App Store には新規登録できなくなる。登録できれば、2015年5月末までは更新可能。

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.HomeBrew環境のクリア

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インストール

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インストール

console
brew install python
brew link --overwrite python

###4.kivy インストール

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インストール

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動作確認(プロジェクト作成&ビルド)

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

##iOS deviceで動作したら完了

Apple Store に登録する際は、以下のコマンドを実行してスリムにする必要がある。

console
tools/reduce-python.sh

17
17
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?