How to create a multi-platform app with kivy

Last summary

Kivy has been introduced. (End)

It will be the second time of the irregular serialization as soon as possible.

What I want to do this time

I want to create an extension app or an extension exe and start it with one click! Or even if you can't start it, you want to reach the point where you can generate it!

Preparation again

It seems that buildozer and pyinstaller are required to create apps and exes. Hmm ... Can you show me how to use it? I thought, so please see the following article.

Creating packages for OS X Create a package for Windows

If you write about each environment, it looks like the following.

Mac OS

Since it is a Mac OS environment, creating a Mac OS application seems easy </ s>. You can install buildozer by doing the following:

pip install git+http://github.com/kivy/buildozer cd /to/where/I/Want/to/package buildozer init
$ pip install git+http://github.com/kivy/buildozer cd /to/where/I/Want/to/package buildozer init
Invalid requirement: '/to/where/I/Want/to/package'
It looks like a path. Does it exist ?

??? !? cd / to / where / I / Want / to / package Hey!

Please do this again

pip install git+http://github.com/kivy/buildozer

Operation check

Use the previous sample.

$ python xxx.py
$ buildozer osx release

The result is here.

$ buildozer osx release
# Ensure build layout
No buildozer.spec found in the current directory. Abandon.
$ buildozer osx debug
# Ensure build layout
No buildozer.spec found in the current directory. Abandon.

It seems that you need a .spec file whether you debug or release it. It takes about 1 minute to follow the site to get information.

pip install -U pyinstaller

I will find that, so I will execute it.

And I feel like I was told to hit this, so I'll try it.

pyinstaller -y --clean --windowed --name touchtracer \
  --exclude-module _tkinter \
  --exclude-module Tkinter \
  --exclude-module enchant \
  --exclude-module twisted \
  ./xxx.py

The log is flowing ... pounding.

22442 INFO: moving BUNDLE data files to Resource directory

If the log is output, it seems that it was done. There are folders called build and dist.

I was able to do it, but the content is not an application that starts, so I can make it for the time being. I will do my best in the contents after this article.

It feels like I've tried it, and learning to start kivi from the command line is different from the description that can be generated from kivi and the application can be used. The ultimate goal is to create apps on multiple platforms, so it seems that we have to learn the latter.

Windows

Next is windows. It seems that windows should actually have a pyinstaller, but it has already been installed.

So what should I do?

When I looked it up, I found the answer in a few seconds.

Operation check

python -m PyInstaller --name touchtracer ./xxx.py

Or

python -m PyInstaller --name touchtracer --icon ./icon.ico ./xxx.py

It's okay.

There was a touchtracer in build / touchtracer /.

It's easier than a Mac.

Finally

Next time, I would like to generate a command line-free kivy app that works on both windows and mac. Ora, I'm excited!

iOS and Android are another opportunity Let's try it. It seems that you can build with a similar feeling.

Recommended Posts

How to create a multi-platform app with kivy
How to develop a cart app with Django
How to create a Kivy 1-line input box
How to create a submenu with the [Blender] plugin
[Python] How to create a 2D histogram with Matplotlib
How to create a Conda package
How to create a virtual bridge
How to create a config file
How to deploy a web app made with Flask to Heroku
How to create a flow mesh around a cylinder with snappyHexMesh
[Python Kivy] How to create a simple pop up window
[Python Kivy] How to create an exe file with pyinstaller
How to create a clone from Github
How to create a git clone folder
How to add a package with PyCharm
Create a GUI app with Python's Tkinter
Create a simple web app with flask
How to create a repository from media
How to create a heatmap with an arbitrary domain in Python
How to create a label (mask) for segmentation with labelme (semantic segmentation mask)
How to write a docstring to create a named tuple document with sphinx
How to create a serverless machine learning API with AWS Lambda
How to create sample CSV data with hypothesis
How to read a CSV file with Python 2/3
How to send a message to LINE with curl
How to create a Python virtual environment (venv)
How to draw a 2-axis graph with pyplot
How to create a function object from a string
How to create a JSON file in Python
How to make a dictionary with a hierarchical structure.
Steps to create a Twitter bot with python
How to create a shortcut command for LINUX
[Note] How to create a Ruby development environment
How to create a Rest Api in Django
[Note] How to create a Mac development environment
3. Natural language processing with Python 1-2. How to create a corpus: Aozora Bunko
How to create random numbers with NumPy's random module
[Tentative] How to convert a character string to Shift_jis with kivy-ios Memo kivy v1.8.0
[Python] How to create a local web server environment with SimpleHTTPServer and CGIHTTPServer
A new form of app that works with GitHub: How to make GitHub Apps
Read the Python-Markdown source: How to create a parser
Create a Todo app with Django REST Framework + Angular
I tried to create a table only with Django
[Python] How to draw a line graph with Matplotlib
Create a native GUI app with Py2app and Tkinter
Try to dynamically create a Checkbutton with Python's Tkinter
How to convert a class object to a dictionary with SQLAlchemy
How to make a shooting game with toio (Part 1)
Create a Todo app with the Django REST framework
[Go] How to create a custom error for Sentry
Create a Todo app with Django ③ Create a task list page
How to create a local repository for Linux OS
I want to manually create a legend with matplotlib
How to create a simple TCP server / client script
To myself as a Django beginner (1) --Create a project app--
To myself as a Django beginner (4) --Create a memo app--
Create a Todo app with Django ⑤ Create a task editing function
How to create a kubernetes pod from python code
[Python] How to draw a scatter plot with Matplotlib
Deploy a web app created with Streamlit to Heroku
How to call a function