mirror of
https://github.com/encounter/dtk-template.git
synced 2025-09-22 18:39:37 +00:00
add --ninja argument to set ninja binary if not on system PATH (#59)
This commit is contained in:
parent
840261985b
commit
5e2fa2a574
@ -102,6 +102,12 @@ parser.add_argument(
|
|||||||
type=Path,
|
type=Path,
|
||||||
help="path to sjiswrap.exe (optional)",
|
help="path to sjiswrap.exe (optional)",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--ninja",
|
||||||
|
metavar="BINARY",
|
||||||
|
type=Path,
|
||||||
|
help="path to ninja binary (optional)"
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--verbose",
|
"--verbose",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
@ -141,6 +147,7 @@ config.compilers_path = args.compilers
|
|||||||
config.generate_map = args.map
|
config.generate_map = args.map
|
||||||
config.non_matching = args.non_matching
|
config.non_matching = args.non_matching
|
||||||
config.sjiswrap_path = args.sjiswrap
|
config.sjiswrap_path = args.sjiswrap
|
||||||
|
config.ninja_path = args.ninja
|
||||||
config.progress = args.progress
|
config.progress = args.progress
|
||||||
if not is_windows():
|
if not is_windows():
|
||||||
config.wrapper = args.wrapper
|
config.wrapper = args.wrapper
|
||||||
|
@ -151,6 +151,7 @@ class ProjectConfig:
|
|||||||
self.wrapper: Optional[Path] = None # If None, download wibo on Linux
|
self.wrapper: Optional[Path] = None # If None, download wibo on Linux
|
||||||
self.sjiswrap_tag: Optional[str] = None # Git tag
|
self.sjiswrap_tag: Optional[str] = None # Git tag
|
||||||
self.sjiswrap_path: Optional[Path] = None # If None, download
|
self.sjiswrap_path: Optional[Path] = None # If None, download
|
||||||
|
self.ninja_path: Optional[Path] = None # If None, use system PATH
|
||||||
self.objdiff_tag: Optional[str] = None # Git tag
|
self.objdiff_tag: Optional[str] = None # Git tag
|
||||||
self.objdiff_path: Optional[Path] = None # If None, download
|
self.objdiff_path: Optional[Path] = None # If None, download
|
||||||
|
|
||||||
@ -1452,9 +1453,14 @@ def generate_objdiff_config(
|
|||||||
existing_config = json.load(r)
|
existing_config = json.load(r)
|
||||||
existing_units = {unit["name"]: unit for unit in existing_config["units"]}
|
existing_units = {unit["name"]: unit for unit in existing_config["units"]}
|
||||||
|
|
||||||
|
if config.ninja_path:
|
||||||
|
ninja = str(config.ninja_path.absolute())
|
||||||
|
else:
|
||||||
|
ninja = "ninja"
|
||||||
|
|
||||||
objdiff_config: Dict[str, Any] = {
|
objdiff_config: Dict[str, Any] = {
|
||||||
"min_version": "2.0.0-beta.5",
|
"min_version": "2.0.0-beta.5",
|
||||||
"custom_make": "ninja",
|
"custom_make": ninja,
|
||||||
"build_target": False,
|
"build_target": False,
|
||||||
"watch_patterns": [
|
"watch_patterns": [
|
||||||
"*.c",
|
"*.c",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user