Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for --presplash-lottie option of p4a #1208

Merged
merged 1 commit into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,19 @@ osx.kivy_version = 1.9.1
# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0

# (string) Presplash background color (for new android toolchain)
# (string) Presplash background color (for android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
#android.presplash_color = #FFFFFF

# (string) Presplash animation using Lottie format.
# see https://lottiefiles.com/ for examples and https://airbnb.design/lottie/
# for general documentation.
# Lottie files can be created using various tools, like Adobe After Effect or Synfig.
#android.presplash_lottie = "path/to/lottie/file.json"

# (list) Permissions
#android.permissions = INTERNET

Expand Down
13 changes: 9 additions & 4 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,11 +1092,16 @@ def build_package(self):
for activity in add_activities:
build_cmd += [("--add-activity", activity)]

# add presplash
presplash = config.getdefault('app', 'presplash.filename', '')
# add presplash, lottie animation or static
presplash = config.getdefault('app', 'android.presplash_lottie', '')
if presplash:
build_cmd += [("--presplash", join(self.buildozer.root_dir,
presplash))]
build_cmd += [("--presplash-lottie", join(self.buildozer.root_dir,
presplash))]
else:
presplash = config.getdefault('app', 'presplash.filename', '')
if presplash:
build_cmd += [("--presplash", join(self.buildozer.root_dir,
presplash))]

# add icon
icon = config.getdefault('app', 'icon.filename', '')
Expand Down