Allow running make_apk.py from any directory

per XWALK-2391, prepends the current location of make_apk.py when accessing files and directories assumed to be in the same directory as make_apk.py, including imports of other modules.
Yes, that works.  Earlier in the function is:

app_dir = os.path.join(xwalk_dir, app_name)

so the change would be equivalent:

app_assets_dir = os.path.join(xwalk_dir, app_name, 'assets', 'www')
app_assets_dir = os.path.join(app_dir, 'assets', 'www')

Bob

From: Shiliu Wang [mailto:notifications@github.com]
Sent: Wednesday, September 03, 2014 2:53 AM
To: crosswalk-project/crosswalk
Cc: Spencer, Bob
Subject: Re: [crosswalk] Allow running make_apk.py from any directory (#2382)


In app/tools/android/customize.py:

>    if app_root:

> -    assets_path = os.path.join(name, 'assets', 'www')

> -    if os.path.isdir(assets_path):

> -      shutil.rmtree(assets_path)

> -    shutil.copytree(app_root, assets_path)

> +    app_assets_dir = os.path.join(xwalk_dir, app_name, 'assets', 'www')

os.path.join(app_dir, 'assets', 'www') ?

—
Reply to this email directly or view it on GitHub<https://github.com/crosswalk-project/crosswalk/pull/2382/files#r17037511>.