message = (
"GUI is not fully built. "
+ "Please ensure GUI is built before running this build script."
)
if not all((GUI_DIR / dir_to_check).exists() for dir_to_check in dirs_to_check):
raise RuntimeError(message)
for file in GUI_DIR.iterdir():
if any(
file.name.lower().startswith(exclude_prefix.lower())
for exclude_prefix in exclude_prefixes
):
continue
if file.is_dir():
shutil.copytree(file, gui_install_dir / file.name)
else:
shutil.copy2(file, gui_install_dir / file.name)
def main():
# check GUI built
args = parse_args()
check_gui_built()
makensis_exec = pathlib.Path(args.makensis_exec)
if not makensis_exec.is_file():
raise RuntimeError("makensis executable cannot be found")