@@ -125,23 +125,14 @@ def addArguments(parser):
125125 action = "store_true" ,
126126 help = "Print `docker build` commands instead of running them" ,
127127 )
128- parser .add_argument (
129- "--no-minimal" ,
130- action = "store_true" ,
131- help = "Don't build the ue4-minimal image (deprecated, use --target instead)" ,
132- )
133- parser .add_argument (
134- "--no-full" ,
135- action = "store_true" ,
136- help = "Don't build the ue4-full image (deprecated, use --target instead)" ,
137- )
138128 parser .add_argument (
139129 "--no-cache" , action = "store_true" , help = "Disable Docker build cache"
140130 )
141131 parser .add_argument (
142132 "--target" ,
143133 action = "append" ,
144- help = "Add a target to the build list. Valid targets are `build-prerequisites`, `source`, `engine`, `minimal`, `full`, and `all`. May be specified multiple times or comma-separated. Defaults to `all`." ,
134+ default = [],
135+ help = "Add a target to the build list. Valid targets are `build-prerequisites`, `source`, `engine`, `minimal`, `full`, and `all`. May be specified multiple times or comma-separated. Defaults to `minimal`." ,
145136 )
146137 parser .add_argument (
147138 "--random-memory" ,
@@ -282,47 +273,12 @@ def __init__(self, parser, argv, logger):
282273 self .args = parser .parse_args (argv )
283274 self .changelist = self .args .changelist
284275
285- # Figure out what targets we have; this is needed to find out if we need --ue-version.
286- using_target_specifier_old = self .args .no_minimal or self .args .no_full
287- using_target_specifier_new = self .args .target is not None
288-
289- # If we specified nothing, it's the same as specifying `minimal`
290- if not using_target_specifier_old and not using_target_specifier_new :
276+ if len (self .args .target ) <= 0 :
291277 self .args .target = ["minimal" ]
292- elif using_target_specifier_old and not using_target_specifier_new :
293- # Convert these to the new style
294- logger .warning (
295- "Using deprecated `--no-*` target specifiers; recommend changing to `--target`" ,
296- False ,
297- )
298-
299- # no-minimal implies no-full
300- if self .args .no_minimal :
301- self .args .no_full = True
302278
303- # Change into target descriptors
304- self .args .target = []
305-
306- if not self .args .no_full :
307- self .args .target += ["full" ]
308-
309- if not self .args .no_minimal :
310- self .args .target += ["minimal" ]
311-
312- # disabling these was never supported
313- self .args .target += ["source" ]
314- self .args .target += ["build-prerequisites" ]
315-
316- elif using_target_specifier_new and not using_target_specifier_old :
317- # these can be token-delimited, so let's just split them apart and then remerge them into one list
318- split = [item .split ("," ) for item in self .args .target ]
319- self .args .target = [item for sublist in split for item in sublist ]
320-
321- elif using_target_specifier_old and using_target_specifier_new :
322- # uhoh
323- raise RuntimeError (
324- "specified both `--target` and the old `--no-*` options; please use only `--target`!"
325- )
279+ # these can be token-delimited, so let's just split them apart and then remerge them into one list
280+ split_target = [item .split ("," ) for item in self .args .target ]
281+ self .args .target = [item for sublist in split_target for item in sublist ]
326282
327283 # Now that we have our options in `self.args.target`, evaluate our dependencies
328284 # In a theoretical ideal world this should be code-driven; if you find yourself adding a lot more code to this, consider a redesign!
@@ -336,6 +292,7 @@ def __init__(self, parser, argv, logger):
336292 self .buildTargets = {
337293 "build-prerequisites" : False ,
338294 "source" : False ,
295+ "engine" : False ,
339296 "minimal" : False ,
340297 "full" : False ,
341298 }
@@ -355,6 +312,10 @@ def __init__(self, parser, argv, logger):
355312 self .buildTargets ["minimal" ] = True
356313 active_targets .add ("source" )
357314
315+ if "engine" in active_targets or "all" in active_targets :
316+ self .buildTargets ["engine" ] = True
317+ active_targets .add ("source" )
318+
358319 if "source" in active_targets or "all" in active_targets :
359320 self .buildTargets ["source" ] = True
360321 active_targets .add ("build-prerequisites" )
0 commit comments