PackageScript 862 B

123456789101112131415161718192021222324252627282930
  1. # vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
  2. import os
  3. # This is where the files will be output to
  4. # package is the default
  5. builder.SetBuildFolder('package')
  6. # Add any folders you need to this list
  7. folder_list = [
  8. 'addons/sourcemod/extensions'
  9. ]
  10. # Create the distribution folder hierarchy.
  11. folder_map = {}
  12. for folder in folder_list:
  13. norm_folder = os.path.normpath(folder)
  14. folder_map[folder] = builder.AddFolder(norm_folder)
  15. # Do all straight-up file copies from the source tree.
  16. def CopyFiles(src, dest, files):
  17. if not dest:
  18. dest = src
  19. dest_entry = folder_map[dest]
  20. for source_file in files:
  21. source_path = os.path.join(builder.sourcePath, src, source_file)
  22. builder.AddCopy(source_path, dest_entry)
  23. # Copy binaries.
  24. for cxx_task in Extension.extensions:
  25. builder.AddCopy(cxx_task.binary, folder_map['addons/sourcemod/extensions'])