File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
pythonforandroid/bootstraps/common/build Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -340,14 +340,23 @@ def make_package(args):
340
340
341
341
# Prepare some variables for templating process
342
342
res_dir = "src/main/res"
343
+ res_dir_initial = "src/res_initial"
344
+ # make res_dir stateless
345
+ if exists (res_dir_initial ):
346
+ shutil .rmtree (res_dir , ignore_errors = True )
347
+ shutil .copytree (res_dir_initial , res_dir )
348
+ else :
349
+ shutil .copytree (res_dir , res_dir_initial )
350
+
343
351
# Add user resouces
344
352
for resource in args .resources :
345
353
resource_src , resource_dest = resource .split (":" )
346
354
if isfile (realpath (resource_src )):
347
355
ensure_dir (dirname (join (res_dir , resource_dest )))
348
356
shutil .copy (realpath (resource_src ), join (res_dir , resource_dest ))
349
357
else :
350
- shutil .copytree (realpath (resource_src ), join (res_dir , resource_dest ))
358
+ shutil .copytree (realpath (resource_src ),
359
+ join (res_dir , resource_dest ), dirs_exist_ok = True )
351
360
352
361
default_icon = 'templates/kivy-icon.png'
353
362
default_presplash = 'templates/kivy-presplash.jpg'
You can’t perform that action at this time.
0 commit comments