Skip to content

Commit 6f7a1dc

Browse files
make_distrib improvements:
- Windows: Change the directory and build structure to match other platforms. - Windows: Create archives of both Debug and Release symbols. - Windows: Create a separate archive for documentation. - Add a new "client" mode flag that creates a distribution of cefclient. - Add "no-docs" and "no-archive" flags. - Break README.txt files into separate components that can be shared between platforms and distribution modes. git-svn-id: http://chromiumembedded.googlecode.com/svn/trunk/cef1@1217 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
1 parent 96cba70 commit 6f7a1dc

18 files changed

+646
-489
lines changed

tools/automate/automate.py

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ def onerror(func, path, exc_info):
127127
parser.add_option('--minimal-distrib-only',
128128
action='store_true', dest='minimaldistribonly', default=False,
129129
help='create a minimal CEF binary distribution only')
130+
parser.add_option('--client-distrib',
131+
action='store_true', dest='clientdistrib', default=False,
132+
help='create a client CEF binary distribution')
133+
parser.add_option('--client-distrib-only',
134+
action='store_true', dest='clientdistribonly', default=False,
135+
help='create a client CEF binary distribution only')
136+
parser.add_option('--no-distrib-docs',
137+
action='store_true', dest='nodistribdocs', default=False,
138+
help="don't create CEF documentation")
139+
parser.add_option('--no-distrib-archive',
140+
action='store_true', dest='nodistribarchive', default=False,
141+
help="don't create archives for output directories")
130142
parser.add_option('--ninja-build',
131143
action='store_true', dest='ninjabuild', default=False,
132144
help="build using ninja")
@@ -140,7 +152,9 @@ def onerror(func, path, exc_info):
140152
parser.print_help(sys.stderr)
141153
sys.exit()
142154

143-
if options.noreleasebuild and (options.minimaldistrib or options.minimaldistribonly):
155+
if (options.noreleasebuild and (options.minimaldistrib or options.minimaldistribonly or \
156+
options.clientdistrib or options.clientdistribonly)) or \
157+
(options.minimaldistribonly and options.clientdistribonly):
144158
print 'Invalid combination of options'
145159
parser.print_help(sys.stderr)
146160
sys.exit()
@@ -424,22 +438,43 @@ def onerror(func, path, exc_info):
424438
run(path+' Release', cef_tools_dir, depot_tools_dir)
425439

426440
if (any_changed or options.forcedistrib) and not options.nodistrib:
427-
# make a CEF binary distribution
428-
make_minimal = options.minimaldistrib or options.minimaldistribonly
429-
path = os.path.join(cef_tools_dir, 'make_distrib'+script_ext)
430-
if options.ninjabuild:
431-
path = path + ' --ninja-build'
432-
if options.nodebugbuild or options.noreleasebuild or make_minimal:
433-
path = path + ' --allow-partial'
434-
435-
if not options.minimaldistribonly:
436-
# create the full distribution
437-
run(path, cef_tools_dir, depot_tools_dir)
438-
439-
if make_minimal:
440-
# create the minimial distribution
441-
path = path + ' --minimal'
442-
if not options.minimaldistribonly:
443-
# don't create the symbol archive twice
444-
path = path + ' --no-symbols'
441+
# determine the requested distribution types
442+
distrib_types = []
443+
if options.minimaldistribonly:
444+
distrib_types.append('minimal')
445+
elif options.clientdistribonly:
446+
distrib_types.append('client')
447+
else:
448+
distrib_types.append('standard')
449+
if options.minimaldistrib:
450+
distrib_types.append('minimal')
451+
if options.clientdistrib:
452+
distrib_types.append('client')
453+
454+
first_type = True
455+
456+
# create the requested distribution types
457+
for type in distrib_types:
458+
path = os.path.join(cef_tools_dir, 'make_distrib'+script_ext)
459+
if options.nodebugbuild or options.noreleasebuild or type != 'standard':
460+
path = path + ' --allow-partial'
461+
if options.ninjabuild:
462+
path = path + ' --ninja-build'
463+
464+
if type == 'minimal':
465+
path = path + ' --minimal'
466+
elif type == 'client':
467+
path = path + ' --client'
468+
469+
if first_type:
470+
if options.nodistribdocs:
471+
path = path + ' --no-docs'
472+
if options.nodistribarchive:
473+
path = path + ' --no-archive'
474+
first_type = False
475+
else:
476+
# don't create the symbol archives or documentation more than once
477+
path = path + ' --no-symbols --no-docs'
478+
479+
# create the distribution
445480
run(path, cef_tools_dir, depot_tools_dir)

tools/distrib/README.client.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CONTENTS
2+
--------
3+
4+
Release Contains a release build of the cefclient sample application.
5+
6+
7+
USAGE
8+
-----
9+
10+
Please visit the CEF Website for additional usage information.
11+
12+
http://code.google.com/p/chromiumembedded

tools/distrib/README.footer.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
LICENSING
2+
---------
3+
4+
The CEF project is BSD licensed. Please read the LICENSE.txt file included with
5+
this binary distribution for licensing terms and conditions. Other software
6+
included in this distribution is provided under other licenses.

tools/distrib/README.header.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Chromium Embedded Framework (CEF) $DISTRIB_TYPE$ Binary Distribution for $PLATFORM$
2+
-------------------------------------------------------------------------------
3+
4+
Date: $DATE$
5+
6+
CEF Version: $CEF_VER$
7+
CEF URL: $CEF_URL$@$CEF_REV$
8+
9+
Chromium Verison: $CHROMIUM_VER$
10+
Chromium URL: $CHROMIUM_URL$@$CHROMIUM_REV$
11+
12+
$DISTRIB_DESC$

tools/distrib/cefclient.gyp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,34 @@
5959
},
6060
'conditions': [
6161
['OS=="win"', {
62+
'actions': [
63+
{
64+
'action_name': 'copy_resources',
65+
'msvs_cygwin_shell': 0,
66+
'inputs': [],
67+
'outputs': [
68+
'<(PRODUCT_DIR)/copy_resources.stamp',
69+
],
70+
'action': [
71+
'xcopy /efy',
72+
'Resources\*',
73+
'$(OutDir)',
74+
],
75+
},
76+
{
77+
'action_name': 'copy_libraries',
78+
'msvs_cygwin_shell': 0,
79+
'inputs': [],
80+
'outputs': [
81+
'<(PRODUCT_DIR)/copy_resources.stamp',
82+
],
83+
'action': [
84+
'xcopy /efy',
85+
'$(ConfigurationName)\*.dll',
86+
'$(OutDir)',
87+
],
88+
},
89+
],
6290
'msvs_settings': {
6391
'VCLinkerTool': {
6492
# Set /SUBSYSTEM:WINDOWS.
@@ -73,7 +101,7 @@
73101
'-lrpcrt4.lib',
74102
'-lopengl32.lib',
75103
'-lglu32.lib',
76-
'-llib/$(ConfigurationName)/libcef.lib'
104+
'-l$(ConfigurationName)/libcef.lib'
77105
],
78106
},
79107
'sources': [
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CONTENTS
2+
--------
3+
4+
Release Contains libcef.so and other components required to run the release
5+
version of CEF-based applications. By default these files should be
6+
placed in the same directory as the executable.
7+
8+
Resources Contains resources required by libcef.so. By default these files
9+
should be placed in the same directory as libcef.so.
10+
11+
12+
USAGE
13+
-----
14+
15+
Please visit the CEF Website for additional usage information.
16+
17+
http://code.google.com/p/chromiumembedded
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
REDISTRIBUTION
2+
--------------
3+
4+
This binary distribution contains the below components. Components listed under
5+
the "required" section must be redistributed with all applications using CEF.
6+
Components listed under the "optional" section may be excluded if the related
7+
features will not be used.
8+
9+
Required components:
10+
11+
* CEF core library
12+
libcef.so
13+
14+
Optional components:
15+
16+
* Localized resources
17+
locales/
18+
Note: Contains localized strings for WebKit UI controls. A .pak file is loaded
19+
from this folder based on the value of environment variables which are read
20+
with the following precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG.
21+
Only configured locales need to be distributed. If no locale is configured the
22+
default locale of "en-US" will be used. Locale file loading can be disabled
23+
completely using CefSettings.pack_loading_disabled. The locales folder path
24+
can be customized using CefSettings.locales_dir_path.
25+
26+
* Other resources
27+
chrome.pak
28+
devtools_resources.pak
29+
Note: Contains WebKit image and inspector resources. Pack file loading can be
30+
disabled completely using CefSettings.pack_loading_disabled. The resources
31+
directory path can be customized using CefSettings.resources_dir_path.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
CONTENTS
2+
--------
3+
4+
cefclient Contains the cefclient sample application configured to build
5+
using the files in this distribution.
6+
7+
Debug Contains libcef.so and other components required to run the debug
8+
version of CEF-based applications. By default these files should be
9+
placed in the same directory as the executable and will be copied
10+
there as part of the build process.
11+
12+
include Contains all required CEF header files.
13+
14+
libcef_dll Contains the source code for the libcef_dll_wrapper static library
15+
that all applications using the CEF C++ API must link against.
16+
17+
Release Contains libcef.so and other components required to run the release
18+
version of CEF-based applications. By default these files should be
19+
placed in the same directory as the executable and will be copied
20+
there as part of the build process.
21+
22+
Resources Contains resources required by libcef.so. By default these files
23+
should be placed in the same directory as libcef.so and will be
24+
copied there as part of the build process.
25+
26+
27+
USAGE
28+
-----
29+
30+
Run 'build.sh Debug' to build the cefclient target in Debug mode.
31+
32+
Please visit the CEF Website for additional usage information.
33+
34+
http://code.google.com/p/chromiumembedded

tools/distrib/linux/README.txt

Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CONTENTS
2+
--------
3+
4+
Release Contains libcef.dylib and other components required to run the
5+
release version of CEF-based applications.
6+
7+
Resources Contains images and resources required by applications using CEF.
8+
The contents of this folder should be transferred to the
9+
Contents/Resources folder in the app bundle.
10+
11+
12+
USAGE
13+
-----
14+
15+
Please visit the CEF Website for additional usage information.
16+
17+
http://code.google.com/p/chromiumembedded

0 commit comments

Comments
 (0)