os.makedirs(libs_folder) """ Apparently not required anymore src_libs_dir = os.path.join(TIMOBILE_SRC, "dist", "android", "libs") if os.path.exists(src_libs_dir): for root, dirs, files in os.walk(src_libs_dir): for filename in files: full_path = os.path.join(root, filename) rel_path = os.path.relpath(full_path, src_libs_dir) dest_file = os.path.join(os.path.abspath(libs_folder), rel_path) if not os.path.exists(dest_file): if not os.path.exists(os.path.dirname(dest_file)): os.makedirs(os.path.dirname(dest_file)) shutil.copyfile(full_path, dest_file) """ app_info = ticommon.get_app_info('.') appid = app_info["id"] project_name = app_info["name"] gen_folder = os.path.join(android_folder, 'gen', ticommon.appid_to_path(appid)) if not os.path.exists(gen_folder): os.makedirs(gen_folder) src_folder = os.path.abspath(os.path.join(android_folder, 'src', ticommon.appid_to_path(appid))) r_file = os.path.join(src_folder, 'R.java') if os.path.exists(r_file): shutil.copyfile(r_file, os.path.join(gen_folder, 'R.java')) os.remove(r_file) # put everything that's in gen/, except R.java, into src/. Eclipse (or the ADT plugin, whatever) # likes to cleanout the gen/ folder when building, which is really annoying when suddenly all of
error("Android SDK directory doesn't exist: %s" % androidSDK) if "TI_VERSION" in os.environ: tiDevSDK = ticommon.find_ti_sdk(version=os.environ["TI_VERSION"])[0] else: tiDevSDK = ticommon.find_ti_sdk()[0] if not os.path.exists(tiDevSDK): error("Titanium Mobile SDK directory doesn't exist: %s" % tiDevSDK) builderScript = os.path.join(tiDevSDK, "android", "builder.py") if not os.path.exists(builderScript): error("Builder script doesn't exist: %s" % builderScript) appInfo = ticommon.get_app_info(projectPath) name = appInfo["name"] id = appInfo["id"] command = "build" debug = False if len(sys.argv) > 1: if sys.argv[1] == "debug": del sys.argv[1] debug = True if len(sys.argv) > 1: command = sys.argv[1] args = [sys.executable] if debug:
# same folder as this file, then you can override this ECLIPSE_PROJ_BOOTSTRAP_PATH = "" # /e.g., /Users/bill/projects/ti_eclipse_project_defaults ################################################# if os.path.exists(os.path.join(this_path, "tidevtools_settings.py")): execfile(os.path.join(this_path, "tidevtools_settings.py")) if ( ECLIPSE_PROJ_BOOTSTRAP_PATH is None or len(ECLIPSE_PROJ_BOOTSTRAP_PATH) == 0 or not os.path.exists(ECLIPSE_PROJ_BOOTSTRAP_PATH) ): log.error("ECLIPSE_PROJ_BOOTSTRAP_PATH setting not set property: %s" % ECLIPSE_PROJ_BOOTSTRAP_PATH) sys.exit(1) appid = ticommon.get_appid(".") app_info = ticommon.get_app_info(".") appid = app_info["id"] project_name = app_info["name"] gen_folder = os.path.join(android_folder, "gen", ticommon.appid_to_path(appid)) if not os.path.exists(gen_folder): os.makedirs(gen_folder) src_folder = os.path.abspath(os.path.join(android_folder, "src", ticommon.appid_to_path(appid))) r_file = os.path.join(src_folder, "R.java") if os.path.exists(r_file): shutil.copyfile(r_file, os.path.join(gen_folder, "R.java")) os.remove(r_file) # put everything that's in gen/, except R.java, into src/. Eclipse (or the ADT plugin, whatever) # likes to cleanout the gen/ folder when building, which is really annoying when suddenly all of