mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Restore original file permissions after patching a file (issue #387).
- Add the ability to selectively apply patches based on the presence of an environment variable (issue #388). - Add a patch to disable scrollbar bounce and scrollbar overlay on Lion based on the presence of the CEF_SPI_BUILD environment variable (issue #364). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@339 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
|
||||
import pickle
|
||||
from optparse import OptionParser
|
||||
import os.path
|
||||
import os
|
||||
import sys
|
||||
from file_util import *
|
||||
from patch_util import *
|
||||
@ -51,16 +51,25 @@ else:
|
||||
execfile(options.patchconfig, scope)
|
||||
patches = scope["patches"]
|
||||
|
||||
for name in patches.keys():
|
||||
file = patchdir+'patches/'+name+'.patch'
|
||||
if not os.path.isfile(file):
|
||||
sys.stderr.write('Patch file '+file+' does not exist.\n')
|
||||
else:
|
||||
sys.stderr.write('Reading patch file '+file+'\n')
|
||||
dir = patches[name]
|
||||
patchObj = from_file(file)
|
||||
patchObj.apply(dir)
|
||||
|
||||
for patch in patches:
|
||||
file = patchdir+'patches/'+patch['name']+'.patch'
|
||||
dopatch = True
|
||||
|
||||
if 'condition' in patch:
|
||||
# Check that the environment variable is set.
|
||||
if patch['condition'] not in os.environ:
|
||||
sys.stderr.write('Skipping patch file '+file+'\n')
|
||||
dopatch = False
|
||||
|
||||
if dopatch:
|
||||
if not os.path.isfile(file):
|
||||
sys.stderr.write('Patch file '+file+' does not exist.\n')
|
||||
else:
|
||||
sys.stderr.write('Reading patch file '+file+'\n')
|
||||
dir = patch['path']
|
||||
patchObj = from_file(file)
|
||||
patchObj.apply(dir)
|
||||
|
||||
# read the current include file, if any
|
||||
incfile = patchdir + 'patch_state.h'
|
||||
if nopatch:
|
||||
|
Reference in New Issue
Block a user