mirror of https://github.com/kivy/kivy.git
Update OS X install instructions using kivy.app
This commit is contained in:
parent
c55ba1171c
commit
d60bedf650
|
@ -8,26 +8,32 @@ Using The Kivy.app
|
|||
|
||||
.. note::
|
||||
|
||||
This method has only been tested on OS X 10.7 Lion 64-bit.
|
||||
This method has only been tested on OS X 10.7 and above (64-bit).
|
||||
For versions prior to 10.7 or 10.7 32-bit, you have to install the
|
||||
components yourself. We suggest using
|
||||
`homebrew <http://brew.sh>`_ to do that.
|
||||
|
||||
For OS X 10.7 and later, we provide a Kivy.app with all dependencies
|
||||
bundled. Download it from our `Download Page <http://kivy.org/#download>`_.
|
||||
It comes as a .dmg file that contains:
|
||||
It comes as a .7z file that contains:
|
||||
|
||||
* Kivy.app
|
||||
* Readme.txt
|
||||
* An Examples folder
|
||||
* A script to install a `kivy` command for shell usage
|
||||
|
||||
To install Kivy, you must:
|
||||
|
||||
1. Download the latest version from http://kivy.org/#download
|
||||
2. Double-click to open it
|
||||
3. Drag the Kivy.app into your Applications folder
|
||||
4. Double click the makesymlinks script.
|
||||
Kivy2.7z is using using python2(SystemPython), Kivy3.7z
|
||||
2. Extract it using a Unarchiver programme like http://www.kekaosx.com/en/.
|
||||
3. Copy the Kivy2.app or Kivy3.app as Kivy.app to /Applications.
|
||||
Paste the following line onto the terminal::
|
||||
|
||||
$ sudo mv Kivy2.app /Applications/Kivy.app
|
||||
|
||||
4. Create a symlink named `kivy` to easily launch apps with kivy venv::
|
||||
|
||||
$ ln -s /Applications/Kivy.app/Contents/Resources/script /usr/local/bin/kivy
|
||||
|
||||
5. Examples and all the normal kivy tools are present in the Kivy.app/Contents/Resources/kivy dir
|
||||
|
||||
You should now have a `kivy` script that you can use to launch your kivy app from terminal.
|
||||
|
||||
|
@ -42,6 +48,43 @@ To install any module you need to install the module like so::
|
|||
|
||||
$ kivy -m pip install <modulename>
|
||||
|
||||
Where are the modules/files installed?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Inside the relocatable venv within the app at::
|
||||
|
||||
Kivy.app/Contents/Resources/venv/
|
||||
|
||||
If you install a module that install's a binary for example like kivy-garden
|
||||
That binary will be only available from the venv above, as in after you do::
|
||||
|
||||
kivy -m pip install kivy-garden
|
||||
|
||||
The garden lib will be only available when you activate this env.
|
||||
|
||||
source /Applications/Kivy.app/Contents/Resources/venv/bin/activate
|
||||
garden install mapview
|
||||
deactivate
|
||||
|
||||
To install binary files
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Just copy the binary to the /Applications/Kivy.app/Contents/Resources/venv/bin/ directory.
|
||||
|
||||
To Include other frameworks
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Kivy.app comes with SDL2 and Gstreamer frameworks provided.
|
||||
To Include frameworks other than the ones provided do the following::
|
||||
|
||||
git clone http://github.com/tito/osxrelocator
|
||||
export PYTHONPATH=~/path/to/osxrelocator
|
||||
cd /Applications/Kivy.app
|
||||
python -m osxrelocator -r . /Library/Frameworks/<Framework_name>.framework/ \
|
||||
@executable_path/../Frameworks/<Framework_name>.framework/
|
||||
|
||||
Do not forget to replace <Framework_name> with your framework.
|
||||
This tool `osxrelocator` essentially changes the path for the
|
||||
libs in the framework such that they are relative to the executable
|
||||
within the .app. Making the Framework relocatable with the .app.
|
||||
|
||||
Start any Kivy Application
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -85,7 +128,7 @@ Alternatively you can install Kivy using the following steps:
|
|||
|
||||
$ brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer
|
||||
|
||||
2. Install cython 0.21.2 and kivy using pip::
|
||||
2. Install cython 0.23 and kivy using pip::
|
||||
|
||||
$ pip install -I Cython==0.21.2
|
||||
$ USE_OSX_FRAMEWORKS=0 pip install git+https://github.com/kivy/kivy.git@1.9.0
|
||||
$ USE_OSX_FRAMEWORKS=0 pip install git+https://github.com/kivy/kivy.git@1.9.1
|
||||
|
|
Loading…
Reference in New Issue