From: Alexis Laferrière Date: Sat, 10 May 2014 11:55:58 +0000 (-0400) Subject: android: support use of -m X-Git-Tag: v0.6.6~69^2~1 X-Git-Url: http://nitlanguage.org android: support use of -m Signed-off-by: Alexis Laferrière --- diff --git a/src/android_platform.nit b/src/android_platform.nit index bc0ab3f..60acc94 100644 --- a/src/android_platform.nit +++ b/src/android_platform.nit @@ -216,9 +216,14 @@ $(call import-module,android/native_app_glue) ### Link to assets (for mnit and others) # This will be accessed from `android_project_root` - var mainmodule_dir = compiler.mainmodule.location.file.filename.dirname - var assets_dir = "{mainmodule_dir}/../assets" - if not assets_dir.file_exists then assets_dir = "{mainmodule_dir}/assets" + var assets_dir + if compiler.mainmodule.location.file != null then + # it is a real file, use "{file}/../assets" + assets_dir = "{compiler.mainmodule.location.file.filename.dirname}/../assets" + else + # probably used -m, use "." + assets_dir = "assets" + end if assets_dir.file_exists then assets_dir = assets_dir.realpath var target_assets_dir = "{android_project_root}/assets"