-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackageScript
More file actions
34 lines (24 loc) · 923 Bytes
/
PackageScript
File metadata and controls
34 lines (24 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python:
import os
builder.SetBuildFolder('package')
smPath = 'addons/sourcemod/'
folder_list = [
'translations'
]
arch_subdirs = {
'x86_64': 'x64'
}
for cxx_task in Extension.extensions:
folder_list += ['extensions/' + arch_subdirs.get(cxx_task.target.arch, '')]
# Create the distribution folder hierarchy
folder_map = {}
for folder in folder_list:
norm_folder = os.path.normpath(os.path.join(smPath, folder))
folder_map[folder] = builder.AddFolder(norm_folder)
# Translations
builder.AddCopy(os.path.join('translations', 'hl2dm.ext.phrases.txt'), folder_map['translations'])
# Copy binaries
for cxx_task in Extension.extensions:
builder.AddCopy(cxx_task.binary, folder_map['extensions/' + arch_subdirs.get(cxx_task.target.arch, '')])
# Copy special .autoload file (only required under extensions root dir)
builder.AddCopy('hl2dm.autoload', folder_map['extensions/'])