scons: Generate Windows installer
Also: - scons: Fix copying wrong scenario graphics on Windows - MSVC: Fix output filenames for release builds
This commit is contained in:
34
pkg/win/gen-data.py
Normal file
34
pkg/win/gen-data.py
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
from os.path import normpath as makepath
|
||||
from glob import glob
|
||||
import sys
|
||||
|
||||
root = makepath(sys.argv[1])
|
||||
|
||||
# To add directories to the list of sources to generate file lists from,
|
||||
# simply edit this dictionary. The key is the directory path (relative to
|
||||
# the build output directory), and the value is either a glob pattern to include,
|
||||
# or an explicit list of files to include.
|
||||
|
||||
# All paths should be in UNIX format, since makepath() will be used to convert them.
|
||||
# There should be no trailing slashes.
|
||||
|
||||
files = {
|
||||
'data/dialogs': '*.xml',
|
||||
'data/strings': '*.txt',
|
||||
'data/fonts': '*.ttf',
|
||||
'data/shaders': ['mask.frag', 'mask.vert'],
|
||||
'data/graphics': '*.png',
|
||||
'data/cursors': '*.gif',
|
||||
'data/sounds': '*.WAV',
|
||||
}
|
||||
|
||||
for path, pattern in files.items():
|
||||
print 'SetOutPath', '"' + makepath("$INSTDIR/" + path + '/') + '"'
|
||||
if type(pattern) == list:
|
||||
check_files = [root + '/' + path + '/' + x for x in pattern]
|
||||
else:
|
||||
check_files = glob(makepath(root + '/' + path + '/' + pattern))
|
||||
for fname in check_files:
|
||||
print 'File', '"' + makepath(fname.replace(root, '${RELEASE_DIR}')) + '"'
|
||||
|
Reference in New Issue
Block a user