diff --git a/public/sample_ext/AMBuildScript b/public/sample_ext/AMBuildScript index cbb61a8e..8351eb15 100644 --- a/public/sample_ext/AMBuildScript +++ b/public/sample_ext/AMBuildScript @@ -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): diff --git a/public/sample_ext/AMBuilder b/public/sample_ext/AMBuilder index da129ac2..a4c106f3 100644 --- a/public/sample_ext/AMBuilder +++ b/public/sample_ext/AMBuilder @@ -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')] diff --git a/public/sample_ext/configure.py b/public/sample_ext/configure.py index 8af0e91e..57910e85 100644 --- a/public/sample_ext/configure.py +++ b/public/sample_ext/configure.py @@ -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,