mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-16 12:00:13 +01:00
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:
parent
be70d00429
commit
82ad2b6a0b
@ -9,11 +9,7 @@
|
||||
[ 'OS=="mac"', {
|
||||
# Don't use clang with CEF binary releases due to Chromium tree structure dependency.
|
||||
'clang': 0,
|
||||
}],
|
||||
[ 'OS=="win"', {
|
||||
# Keep the build output in the root directory.
|
||||
'build_dir_prefix': '..\\',
|
||||
}],
|
||||
}]
|
||||
]
|
||||
},
|
||||
'includes': [
|
||||
|
@ -67,11 +67,11 @@ def move_file(src, dst, quiet = True):
|
||||
def copy_files(src_glob, dst_folder, quiet = True):
|
||||
""" Copy multiple files. """
|
||||
for fname in iglob(src_glob):
|
||||
dst = os.path.join(dst_folder, os.path.basename(fname))
|
||||
if os.path.isdir(fname):
|
||||
copy_dir(fname, dst, quiet)
|
||||
else:
|
||||
copy_file(fname, dst, quiet)
|
||||
dst = os.path.join(dst_folder, os.path.basename(fname))
|
||||
if os.path.isdir(fname):
|
||||
copy_dir(fname, dst, quiet)
|
||||
else:
|
||||
copy_file(fname, dst, quiet)
|
||||
|
||||
def copy_dir(src, dst, quiet = True):
|
||||
""" Copy a directory tree. """
|
||||
@ -104,4 +104,8 @@ def make_dir(name, quiet = True):
|
||||
os.makedirs(name)
|
||||
except IOError, (errno, 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)
|
||||
|
@ -96,7 +96,19 @@ def generate_msvs_projects(version):
|
||||
RunAction(cef_dir, gyper);
|
||||
move_file(os.path.relpath(os.path.join(output_dir, 'cefclient.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
|
||||
if __name__ != "__main__":
|
||||
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('2008');
|
||||
generate_msvs_projects('2010');
|
||||
fix_msvs_projects();
|
||||
|
||||
elif platform == 'macosx':
|
||||
# create the README.TXT file
|
||||
|
Loading…
x
Reference in New Issue
Block a user