def go(): stack_build.create_bin_dirs() if not dry_run: stack_build.build_ghcjs(frontend_args, dev_mode) atom_prepare.run(dev_mode) atom_apm.run(gui_url, frontend_args, dev_mode) copy_configs.run()
def copy_studio(package_path, gui_url, frontend_args): if gui_url: try: print("copy studio from url") r = requests.get(gui_url) z = zipfile.ZipFile(io.BytesIO(r.content)) z.extractall(package_path) except: print("Can not download gui from given url") print("Building Luna Studio") stack_build.build_ghcjs(frontend_args, dev_mode=True) atom_prepare.run(dev_mode=True) print("Preparing gui package") os.makedirs(dist_package_folder, exist_ok=True) with zipfile.ZipFile(gui_package_path, 'w') as zf: with working_directory(studio_folder): for dirname, subdirs, files in os.walk('./'): for filename in files: zf.write(os.path.join(dirname, filename)) else: print("Building Luna Studio") stack_build.build_ghcjs(frontend_args, dev_mode=True) atom_prepare.run(dev_mode=True) dir_util.copy_tree(studio_atom_source_path, package_path)
def build_frontend(frontend_args, gui_url, dev_mode): try: print("Building frontend") stack_build.create_bin_dirs() stack_build.build_ghcjs(frontend_args, dev_mode) atom_prepare.run(dev_mode) atom_apm.run(gui_url, frontend_args, dev_mode) copy_configs.run() except subprocess.CalledProcessError: print("Status : FAIL") sys.exit(1)