import argparse from ct_common import execute, get_root_path, rmdir, cmake, build, install parser = argparse.ArgumentParser() parser.add_argument("--clean", help="clean before build", action="store_true") parser.add_argument("--config", help="configuration", default="debug") parser.add_argument("--ninja", help="build using ninja", action="store_true") args = parser.parse_args() source_dir = get_root_path().joinpath("client_gui") build_dir = get_root_path().joinpath("build/build_client_gui") install_dir = get_root_path().joinpath(f"build/client_gui/{args.config}") if args.clean: rmdir(build_dir) exit() cmake(source_dir, build_dir, args.ninja) build(build_dir, args.config) install(build_dir, install_dir, args.config) execute(str(install_dir.joinpath("bin/client_gui.exe")))
import argparse from ct_common import execute, get_root_path, rmdir, cmake, build, install parser = argparse.ArgumentParser() parser.add_argument("--clean", help="clean before build", action="store_true") parser.add_argument("--config", help="configuration", default="debug") parser.add_argument("--ninja", help="build using ninja", action="store_true") parser.add_argument("--no-run", help="build only, not run", action="store_true") args = parser.parse_args() source_dir = get_root_path().joinpath("server") build_dir = get_root_path().joinpath("build/build_server") install_dir = get_root_path().joinpath(f"build/server/{args.config}") if args.clean: rmdir(build_dir) exit() cmake(source_dir, build_dir, args.ninja) build(build_dir, args.config) install(build_dir, install_dir, args.config) if args.no_run: exit() execute(str(install_dir.joinpath("bin/server")))
import os import argparse from ct_common import execute, get_root_path, rmdir, cmake, build, install parser = argparse.ArgumentParser() parser.add_argument("--clean", help="clean before build", action="store_true") parser.add_argument("--config", help="configuration", default="debug") parser.add_argument("--ninja", help="build using ninja", action="store_true") args = parser.parse_args() source_dir = get_root_path().joinpath("test") build_dir = get_root_path().joinpath("build/build_test") install_dir = get_root_path().joinpath(f"build/test/{args.config}") if args.clean: rmdir(build_dir) exit() cmake(source_dir, build_dir, args.ninja) build(build_dir, args.config) install(build_dir, install_dir, args.config) with os.scandir(install_dir.joinpath("bin")) as it: for entry in it: if entry.name.endswith('.exe') and entry.is_file(): execute(entry.path)
import argparse from ct_common import execute, get_root_path, rmdir, cmake, build parser = argparse.ArgumentParser() parser.add_argument("--clean", help="clean before build", action="store_true") parser.add_argument("--config", help="configuration", default="debug") parser.add_argument("--ninja", help="build using ninja", action="store_true") args = parser.parse_args() source_dir = get_root_path().joinpath("client_core") build_dir = get_root_path().joinpath("build/client_core") if args.clean: rmdir(build_dir) exit() cmake(source_dir, build_dir, args.ninja) build(build_dir, args.config)