mirror of https://github.com/kivy/kivy.git
This commit is contained in:
parent
9a0f19a2c7
commit
283a0ffadf
|
@ -92,7 +92,7 @@ adding one more argument to the `COLLECT()` method::
|
|||
gst_plugin_path = os.environ.get('GST_PLUGIN_PATH').split(':')[0]
|
||||
|
||||
coll = COLLECT( exe, Tree('../kivy/examples/demo/touchtracer/'),
|
||||
Tree(gst_plugin_path + '/../'),
|
||||
Tree(join(gst_plugin_path, '..')),
|
||||
a.binaries,
|
||||
#...
|
||||
)
|
||||
|
|
|
@ -14,19 +14,7 @@ Requirements
|
|||
------------
|
||||
|
||||
* Latest Kivy (the whole portable package, not only the github sourcecode)
|
||||
* PyInstaller 1.5: http://www.pyinstaller.org/#Downloads
|
||||
|
||||
.. _Install-configure-PyInstaller:
|
||||
|
||||
Install and configure PyInstaller
|
||||
---------------------------------
|
||||
|
||||
#. Decompress the PyInstaller in the Kivy portable package
|
||||
#. Double click on the Kivy.bat, a console will open
|
||||
#. Go to the pyinstaller directory, and run only once the Configure.py::
|
||||
|
||||
cd pyinstaller-1.5
|
||||
python Configure.py
|
||||
* PyInstaller 2.0: http://www.pyinstaller.org/#Downloads
|
||||
|
||||
.. _Create-the-spec-file:
|
||||
|
||||
|
@ -38,14 +26,14 @@ touchtracer is the `kivy/examples/demo/touchtracer/` directory, and the main
|
|||
file is named `main.py`
|
||||
|
||||
#. Double click on the Kivy.bat, a console will open
|
||||
#. Go to the pyinstaller directory, and create the initial specs::
|
||||
#. Go to the pyinstaller 2.0 directory, and create the initial specs::
|
||||
|
||||
cd pyinstaller-1.5
|
||||
python Makespec.py --name touchtracer ..\kivy\examples\demo\touchtracer\main.py
|
||||
cd pyinstaller-2.0
|
||||
python pyinstaller.py --name touchtracer ..\kivy\examples\demo\touchtracer\main.py
|
||||
|
||||
Alternatively, you can add an icon.ico to the main executable. If you don't have an .ico file available, you can convert your icon.png file to ico with the http://www.convertico.com/. Save the icon.ico in the touchtracer directory and do::
|
||||
|
||||
python Makespec.py --name touchtracer --icon ..\kivy\examples\demo\touchtracer\icon.ico ..\kivy\examples\demo\touchtracer\main.py
|
||||
python pyinstaller.py --name touchtracer --icon ..\kivy\examples\demo\touchtracer\icon.ico ..\kivy\examples\demo\touchtracer\main.py
|
||||
|
||||
#. The specs file is located on `touchtracer/touchtracer.spec` inside the
|
||||
pyinstaller directory. Now we need to edit the spec file to add kivy hooks
|
||||
|
@ -56,6 +44,9 @@ file is named `main.py`
|
|||
from kivy.tools.packaging.pyinstaller_hooks import install_hooks
|
||||
install_hooks(globals())
|
||||
|
||||
In the `Analysis()` command, remove the `hookspath=None` parameters.
|
||||
Otherwise, the kivy package hook will not be used at all.
|
||||
|
||||
Then, you need to change the `COLLECT()` call to add the data of touchtracer
|
||||
(`touchtracer.kv`, `particle.png`, ...). Change the line to add a Tree()
|
||||
object. This Tree will search and add every file found in the touchtracer
|
||||
|
@ -76,8 +67,14 @@ Build the spec
|
|||
#. Double click on Kivy.bat
|
||||
#. Go to the pyinstaller directory, and build the spec::
|
||||
|
||||
cd pyinstaller-1.5
|
||||
cd pyinstaller-2.0
|
||||
python Build.py touchtracer\\touchtracer.spec
|
||||
|
||||
#. The package will be in the `touchtracer\\dist\\touchtracer` directory !
|
||||
|
||||
|
||||
Including Gstreamer
|
||||
-------------------
|
||||
|
||||
If you wish to use Gstreamer, refer to the most up-to-date documentation in the
|
||||
:doc:`/guide/packaging-macosx.rst`.
|
||||
|
|
Loading…
Reference in New Issue