Fix checking the wrong directory for smsdk_ext.cpp. Updated some comments.
This commit is contained in:
parent
0022b750b5
commit
43f4a2f7b7
@ -1,9 +1,7 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os, sys
|
||||
|
||||
###############
|
||||
# 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 this file.
|
||||
|
||||
class SDK(object):
|
||||
def __init__(self, sdk, ext, aDef, name, platform, dir):
|
||||
|
@ -3,16 +3,20 @@ import os, sys
|
||||
|
||||
projectName = 'sample'
|
||||
|
||||
#smsdk_ext.cpp will be automatically added later
|
||||
# smsdk_ext.cpp will be automatically added later
|
||||
sourceFiles = [
|
||||
'extension.cpp',
|
||||
]
|
||||
|
||||
###############
|
||||
# Make sure to edit PackageScript, which copies your files to their appropriate locations
|
||||
# Simple extensions do not need to modify past this point.
|
||||
|
||||
project = Extension.HL2Project(builder, projectName + '.ext')
|
||||
|
||||
if os.path.isfile(os.path.join(builder.currentSourcePath, 'smsdk_ext.cpp')):
|
||||
if os.path.isfile(os.path.join(builder.currentSourcePath, 'sdk', 'smsdk_ext.cpp')):
|
||||
# Use the copy included in the project
|
||||
project.sources += ['smsdk_ext.cpp']
|
||||
project.sources += [os.path.join('sdk', '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')]
|
||||
|
@ -2,6 +2,8 @@
|
||||
import sys
|
||||
from ambuild2 import run
|
||||
|
||||
# Simple extensions do not need to modify this file.
|
||||
|
||||
builder = run.PrepareBuild(sourcePath = sys.path[0])
|
||||
|
||||
builder.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None,
|
||||
|
Loading…
Reference in New Issue
Block a user