Win: Fix the build output directory path for binary distributions.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@366 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-11-08 17:35:59 +00:00
parent be70d00429
commit 82ad2b6a0b
3 changed files with 25 additions and 12 deletions

View File

@ -9,11 +9,7 @@
[ 'OS=="mac"', { [ 'OS=="mac"', {
# Don't use clang with CEF binary releases due to Chromium tree structure dependency. # Don't use clang with CEF binary releases due to Chromium tree structure dependency.
'clang': 0, 'clang': 0,
}], }]
[ 'OS=="win"', {
# Keep the build output in the root directory.
'build_dir_prefix': '..\\',
}],
] ]
}, },
'includes': [ 'includes': [

View File

@ -105,3 +105,7 @@ def make_dir(name, quiet = True):
except IOError, (errno, strerror): except IOError, (errno, strerror):
sys.stderr.write('Failed to create directory '+name+': '+strerror) sys.stderr.write('Failed to create directory '+name+': '+strerror)
raise raise
def get_files(search_glob):
""" Returns all files matching the search glob. """
return iglob(search_glob)

View File

@ -97,6 +97,18 @@ def generate_msvs_projects(version):
move_file(os.path.relpath(os.path.join(output_dir, 'cefclient.sln')), \ move_file(os.path.relpath(os.path.join(output_dir, 'cefclient.sln')), \
os.path.relpath(os.path.join(output_dir, 'cefclient'+version+'.sln'))) os.path.relpath(os.path.join(output_dir, 'cefclient'+version+'.sln')))
def fix_msvs_projects():
""" Fix the output directory path in all .vcproj and .vcxproj files. """
files = []
for file in get_files(os.path.join(output_dir, '*.vcproj')):
files.append(file)
for file in get_files(os.path.join(output_dir, '*.vcxproj')):
files.append(file)
for file in files:
data = read_file(file)
data = data.replace('../../..\\build\\', '')
write_file(file, data)
# cannot be loaded as a module # cannot be loaded as a module
if __name__ != "__main__": if __name__ != "__main__":
sys.stderr.write('This file cannot be loaded as a module!') sys.stderr.write('This file cannot be loaded as a module!')
@ -257,6 +269,7 @@ if platform == 'windows':
generate_msvs_projects('2005'); generate_msvs_projects('2005');
generate_msvs_projects('2008'); generate_msvs_projects('2008');
generate_msvs_projects('2010'); generate_msvs_projects('2010');
fix_msvs_projects();
elif platform == 'macosx': elif platform == 'macosx':
# create the README.TXT file # create the README.TXT file