From fffc8a1436f83a5b4a22ed6165e38fc67c9c4535 Mon Sep 17 00:00:00 2001 From: Peter Badida Date: Sun, 3 Jul 2016 12:39:55 +0200 Subject: [PATCH] Enable launcher for pygame --- .../bootstraps/pygame/build/build.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pythonforandroid/bootstraps/pygame/build/build.py b/pythonforandroid/bootstraps/pygame/build/build.py index 896fc50f2a..908a4ff42c 100755 --- a/pythonforandroid/bootstraps/pygame/build/build.py +++ b/pythonforandroid/bootstraps/pygame/build/build.py @@ -255,16 +255,19 @@ def make_package(args): else: intent_filters = '' - # Figure out if application has service part - service = False directory = args.dir if public_version else args.private - if not (exists(join(realpath(directory), 'main.py')) or - exists(join(realpath(directory), 'main.pyo'))): - print('''BUILD FAILURE: No main.py(o) found in your app directory. This -file must exist to act as the entry point for you app. If your app is + # Ignore warning if the launcher is in args + if not args.launcher: + if not (exists(join(realpath(directory), 'main.py')) or + exists(join(realpath(directory), 'main.pyo'))): + print('''BUILD FAILURE: No main.py(o) found in your app directory. +This file must exist to act as the entry point for you app. If your app is started by a file with a different name, rename it to main.py or add a main.py that loads it.''') - exit(1) + exit(1) + + # Figure out if application has service part + service = False if directory: service_main = join(realpath(directory), 'service', 'main.py') if os.path.exists(service_main) or os.path.exists(service_main + 'o'):