Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: goopdate/resources/build.scons

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/python2.4
2 # Copyright 2009 Google Inc.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 # ========================================================================
16
17 Import('env')
18
19
20 local_env = env.Clone(
21 PRECOMPILE_STOPFILE = '',
22 PRECOMPILE_BUILDER = '',
23 COMPONENT_STATIC = False,
24 )
25
26 # We disable runtime stack check to avoid increasing the code size.
27 # There is a compiler pragma to programmatically disable the stack checks
28 # but for some reason it did not work.
29 local_env.FilterOut(CPPFLAGS = ['/GS'])
30
31 # Disable stack checks for VC80. Stack checks are on by default.
32 if local_env['msc_ver'] >= 1400:
33 local_env['CCFLAGS'] += ['/GS-']
34
35
36 for omaha_version_info in local_env['omaha_versions_info']:
37 prefix = omaha_version_info.filename_prefix
38
39 for lang in omaha_version_info.GetSupportedLanguages():
40 lang_env = local_env.Clone()
41 lang_env.Append(
42 RCFLAGS = [
43 '/DVERSION_MAJOR=%d' % omaha_version_info.version_major,
44 '/DVERSION_MINOR=%d' % omaha_version_info.version_minor,
45 '/DVERSION_BUILD=%d' % omaha_version_info.version_build,
46 '/DVERSION_PATCH=%d' % omaha_version_info.version_patch,
47 '/DVERSION_NUMBER_STRING=\\"%s\\"' % (
48 omaha_version_info.GetVersionString()),
49 '/DLANGUAGE_STRING=\\"%s\\"' % lang
50 ],
51 CPPPATH = [
52 '$OBJ_ROOT/goopdate', # Needed for the tlb
53 ],
54 LINKFLAGS = [
55 '/NODEFAULTLIB',
56 '/ENTRY:DllEntry',
57 '/MERGE:.rdata=.text',
58 '/BASE:0x19000000',
59 ],
60 )
61
62 # Avoid conflicts in obj targets
63 lang_env['OBJSUFFIX'] = '_' + lang + lang_env['OBJSUFFIX']
64 lang_env['OBJPREFIX'] = '%s/%s' % (lang, prefix) + lang_env['OBJPREFIX']
65
66 lang_base_name = 'generated_resources_' + lang
67 lang_res = lang_env.RES(
68 target='%s%s.res' % (prefix, lang_base_name),
69 source='goopdateres/%s.rc' % (lang_base_name),
70 )
71
72 # Force a rebuild when the version changes.
73 lang_env.Depends(lang_res, '$MAIN_DIR/VERSION')
74
75 lang_inputs = [
76 'resdll_main.cc',
77 lang_res,
78 # Needed to prevent rebuilding of the lib.
79 'resource_only_dll.def'
80 ]
81
82 # Build the (unsigned) DLL
83 unsigned_dll = lang_env.ComponentLibrary(
84 lib_name='%s/%sgoopdateres_unsigned_%s' % (lang, prefix, lang),
85 source=lang_inputs
86 )
87
88 signed_dll = lang_env.SignedBinary(
89 target='%s/%sgoopdateres_%s.dll' % (lang, prefix, lang),
90 source=unsigned_dll,
91 )
92
93 env.Replicate('$STAGING_DIR', signed_dll)
OLDNEW
« no previous file with comments | « goopdate/resource_manager_unittest.cc ('k') | goopdate/resources/goopdate_dll/generated_resources_am.rc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698