Split AMBuildScript into AMBulde and AMBuildScript
This commit is contained in:
parent
d49714bb10
commit
0022b750b5
@ -1,13 +1,6 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
projectName = 'sample'
|
|
||||||
|
|
||||||
#smsdk_ext.cpp will be automatically added later
|
|
||||||
sourceFiles = [
|
|
||||||
'extension.cpp',
|
|
||||||
]
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Make sure to edit PackageScript, which copies your files to their appropriate locations
|
# Make sure to edit PackageScript, which copies your files to their appropriate locations
|
||||||
# Simple extensions do not need to modify past this point.
|
# Simple extensions do not need to modify past this point.
|
||||||
@ -422,26 +415,10 @@ Extension = ExtensionConfig()
|
|||||||
Extension.detectSDKs()
|
Extension.detectSDKs()
|
||||||
Extension.configure()
|
Extension.configure()
|
||||||
|
|
||||||
project = Extension.HL2Project(builder, projectName + '.ext')
|
|
||||||
|
|
||||||
if os.path.isfile(os.path.join(builder.currentSourcePath, 'smsdk_ext.cpp')):
|
|
||||||
# Use the copy included in the project
|
|
||||||
project.sources += ['smsdk_ext.cpp']
|
|
||||||
else:
|
|
||||||
# Use the copy included with SM 1.6 and newer
|
|
||||||
project.sources += [os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')]
|
|
||||||
|
|
||||||
project.sources += sourceFiles
|
|
||||||
|
|
||||||
for sdk_name in Extension.sdks:
|
|
||||||
sdk = Extension.sdks[sdk_name]
|
|
||||||
|
|
||||||
binary = Extension.HL2Config(project, projectName + '.ext.' + sdk.ext, sdk)
|
|
||||||
|
|
||||||
Extension.extensions = builder.Add(project)
|
|
||||||
|
|
||||||
# Add additional buildscripts here
|
# Add additional buildscripts here
|
||||||
BuildScripts = []
|
BuildScripts = [
|
||||||
|
'AMBuilder',
|
||||||
|
]
|
||||||
|
|
||||||
if builder.backend == 'amb2':
|
if builder.backend == 'amb2':
|
||||||
BuildScripts += [
|
BuildScripts += [
|
||||||
|
27
public/sample_ext/AMBuilder
Normal file
27
public/sample_ext/AMBuilder
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
|
import os, sys
|
||||||
|
|
||||||
|
projectName = 'sample'
|
||||||
|
|
||||||
|
#smsdk_ext.cpp will be automatically added later
|
||||||
|
sourceFiles = [
|
||||||
|
'extension.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
|
project = Extension.HL2Project(builder, projectName + '.ext')
|
||||||
|
|
||||||
|
if os.path.isfile(os.path.join(builder.currentSourcePath, 'smsdk_ext.cpp')):
|
||||||
|
# Use the copy included in the project
|
||||||
|
project.sources += ['smsdk_ext.cpp']
|
||||||
|
else:
|
||||||
|
# Use the copy included with SM 1.6 and newer
|
||||||
|
project.sources += [os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')]
|
||||||
|
|
||||||
|
project.sources += sourceFiles
|
||||||
|
|
||||||
|
for sdk_name in Extension.sdks:
|
||||||
|
sdk = Extension.sdks[sdk_name]
|
||||||
|
|
||||||
|
binary = Extension.HL2Config(project, projectName + '.ext.' + sdk.ext, sdk)
|
||||||
|
|
||||||
|
Extension.extensions = builder.Add(project)
|
Loading…
Reference in New Issue
Block a user