Add an ambuild configure option to disable auto versioning.
This commit is contained in:
parent
e6f6e6df70
commit
d4f4a7eed0
@ -73,7 +73,7 @@ class SMConfig(object):
|
||||
self.versionlib = None
|
||||
|
||||
def use_auto_versioning(self):
|
||||
return builder.backend == 'amb2'
|
||||
return builder.backend == 'amb2' and not builder.options.disable_auto_versioning
|
||||
|
||||
@property
|
||||
def tag(self):
|
||||
|
@ -31,4 +31,6 @@ run.options.add_option('-s', '--sdks', default='all', dest='sdks',
|
||||
'comma-delimited list of engine names (default: %default)')
|
||||
run.options.add_option('--breakpad-dump', action='store_true', dest='breakpad_dump',
|
||||
default=False, help='Dump and upload breakpad symbols')
|
||||
run.options.add_option('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning',
|
||||
default=False, help='Disable the auto versioning script')
|
||||
run.Configure()
|
||||
|
@ -51,7 +51,7 @@ def build_plugin(script_path, smx_file):
|
||||
argv = argv,
|
||||
outputs = outputs,
|
||||
dep_type = 'msvc',
|
||||
weak_inputs = SM.generated_headers
|
||||
weak_inputs = SM.generated_headers or []
|
||||
)
|
||||
SM.smx_files[smx_file] = smx_entry
|
||||
|
||||
|
@ -51,8 +51,10 @@ for cxx_task in SM.extensions:
|
||||
builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions'])
|
||||
builder.AddCopy(SM.spcomp.binary, folder_map['addons/sourcemod/scripting'])
|
||||
|
||||
# Copy version_auto.inc.
|
||||
for header in SM.generated_headers:
|
||||
|
||||
if SM.use_auto_versioning():
|
||||
# Copy version_auto.inc.
|
||||
for header in SM.generated_headers:
|
||||
if 'version_auto.inc' in header.path:
|
||||
builder.AddCopy(header, folder_map['addons/sourcemod/scripting/include'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user