def modify_binary_mk(self): android_libs = os.path.join(self.lib_dir, "android") android_mks = self.config_json[ CocosBinTemplateGenerator.KEY_ANDROID_MKS] for mk_file in android_mks: mk_file_path = os.path.join(self.repo_x, mk_file) dst_file_path = os.path.join(os.path.dirname(mk_file_path), "prebuilt-mk", os.path.basename(mk_file_path)) tmp_obj = gen_prebuilt_mk.MKGenerator(mk_file_path, android_libs, dst_file_path) tmp_obj.do_generate() def process_file(sour, dest): f = open(sour) file_content = f.read() f.close() file_content = file_content.replace("__LIBS_DIR__", self.lib_dir) f = open(os.path.join(dest, os.path.basename(sour)), "w") f.write(file_content) f.close() utils_cocos.copy_files_with_cb( os.path.join(self.cur_dir, os.path.pardir, "x-modified"), self.repo_x, process_file)
def modify_binary_mk(self): android_libs = os.path.join(self.lib_dir, "android") android_mks = self.cfg_info[LibsCompiler.KEY_ANDROID_MKS] for mk_file in android_mks: mk_file_path = os.path.join(self.repo_x, mk_file) dst_file_path = os.path.join(os.path.dirname(mk_file_path), "prebuilt-mk", os.path.basename(mk_file_path)) tmp_obj = gen_prebuilt_mk.MKGenerator(mk_file_path, android_libs, dst_file_path) tmp_obj.do_generate()
def modify_binary_mk(self): android_libs = os.path.join(self.lib_dir, "android") android_mks = self.cfg_info[LibsCompiler.KEY_ANDROID_MKS] for mk_file in android_mks: mk_file_path = os.path.normpath(os.path.join(self.repo_x, mk_file)) if not os.path.isfile(mk_file_path): Logging.warning(MultiLanguage.get_string('COMPILE_ERROR_GRALEW_NOT_EXIST_FMT', mk_file_path)) continue dst_file_path = os.path.join(os.path.dirname(mk_file_path), "prebuilt-mk", os.path.basename(mk_file_path)) tmp_obj = gen_prebuilt_mk.MKGenerator(mk_file_path, android_libs, dst_file_path) tmp_obj.do_generate()