Upstream version 10.38.208.0
[platform/framework/web/crosswalk.git] / src / xwalk / app / tools / android / customize_launch_screen.py
index 719d02f..c85d0fd 100755 (executable)
@@ -7,8 +7,7 @@
 import os
 import shutil
 import sys
-
-xwalk_dir = os.path.dirname(os.path.abspath(__file__))
+import tempfile
 
 def CopyToPathWithName(root, name, final_path, rename):
   if name == '':
@@ -30,7 +29,8 @@ def CopyToPathWithName(root, name, final_path, rename):
 
 
 def CopyDrawables(image_dict, orientation, sanitized_name, name, app_root):
-  drawable = os.path.join(xwalk_dir, sanitized_name, 'res', 'drawable')
+  drawable = os.path.join(tempfile.gettempdir(), sanitized_name, 'res',
+                          'drawable')
   if orientation == 'landscape':
     drawable = drawable + '-land'
   elif orientation == 'portrait':
@@ -114,7 +114,7 @@ def CustomizeBackground(background_color,
                         orientation,
                         sanitized_name,
                         app_root):
-  background_path = os.path.join(xwalk_dir, sanitized_name, 'res',
+  background_path = os.path.join(tempfile.gettempdir(), sanitized_name, 'res',
                                  'drawable', 'launchscreen_bg.xml')
   if not os.path.isfile(background_path):
     print('Error: launchscreen_bg.xml is missing in the build tool.')