Commit c5227af0 authored by tc@google.com's avatar tc@google.com

Fix grit include dependencies in the scons build.

Re-enable the scons code that walks a grd file and adds its dependencies as
build dependencies.  This requires that all our dependencies are files in our
source tree (which is what motivated getting rid of the tld data as a
generated resource).  I had to fix up the terms of service for this.

Also remove some code that disabled .pak file generation on windows which was
broken because it couldn't find the tld data.

Review URL: http://codereview.chromium.org/28194


git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10494 0039d316-1c4b-4281-b951-d872f2087c98
parent d9d709e0
...@@ -62,11 +62,57 @@ ...@@ -62,11 +62,57 @@
<release seq="1" allow_pseudo="false"> <release seq="1" allow_pseudo="false">
<includes> <includes>
<!-- The HTML for the about:terms page --> <!-- The HTML for the about:terms page -->
<if expr="pp_ifdef('_google_chrome')"> <if expr="pp_ifdef('_google_chrome') and 'ar' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ar.html" type="BINDATA" /></if>
<!-- TODO(tc): This won't work yet since we don't substitute <if expr="pp_ifdef('_google_chrome') and 'bg' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_bg.html" type="BINDATA" /></if>
GRITLANGCODE in random attributes. --> <if expr="pp_ifdef('_google_chrome') and 'bn' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_bn.html" type="BINDATA" /></if>
<include name="IDR_TERMS_HTML" file="terms\terms_[GRITLANGCODE].html" type="BINDATA" /> <if expr="pp_ifdef('_google_chrome') and 'ca' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ca.html" type="BINDATA" /></if>
</if> <if expr="pp_ifdef('_google_chrome') and 'cs' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_cs.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'da' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_da.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'de' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_de.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'el' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_el.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'en-GB' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_en-GB.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'en-US' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_en.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'es' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_es.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'es-419' == lang"><include name="IDR_TERMS_HTML" file="terms\terms_es-419.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'et' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_et.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'fi' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_fi.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'fil' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_fil.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'fr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_fr.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'gu' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_gu.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'he' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_he.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'hi' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_hi.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'hr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_hr.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'hu' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_hu.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'id' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_id.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'it' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_it.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'ja' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ja.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'kn' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_kn.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'ko' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ko.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'lt' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_lt.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'lv' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_lv.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'ml' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ml.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'mr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_mr.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'nl' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_nl.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'no' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_nb.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'or' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_or.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'pl' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_pl.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'pt-BR' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_pt-BR.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'pt-PT' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_pt-PT.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'ro' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ro.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'ru' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ru.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'sk' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sk.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'sl' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sl.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'sr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sr.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'sv' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_sv.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'ta' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_ta.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'te' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_te.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'th' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_th.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'tr' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_tr.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'uk' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_uk.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'vi' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_vi.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'zh-CN' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_zh-CN.html" type="BINDATA" /></if>
<if expr="pp_ifdef('_google_chrome') and 'zh-TW' == lang"> <include name="IDR_TERMS_HTML" file="terms\terms_zh-TW.html" type="BINDATA" /></if>
<if expr="not pp_ifdef('_google_chrome')"> <if expr="not pp_ifdef('_google_chrome')">
<include name="IDR_TERMS_HTML" file="terms\terms_chromium.html" type="BINDATA" /> <include name="IDR_TERMS_HTML" file="terms\terms_chromium.html" type="BINDATA" />
</if> </if>
......
...@@ -138,17 +138,16 @@ def _Scanner(file_node, env, path): ...@@ -138,17 +138,16 @@ def _Scanner(file_node, env, path):
# line to get this to work with Repository() directories. # line to get this to work with Repository() directories.
# Get this functionality folded back into the upstream grit tool. # Get this functionality folded back into the upstream grit tool.
#grd = grd_reader.Parse(str(file_node)), debug=_IsDebugEnabled()) #grd = grd_reader.Parse(str(file_node)), debug=_IsDebugEnabled())
grd = grd_reader.Parse(str(file_node.rfile()), debug=_IsDebugEnabled()) grd = grd_reader.Parse(os.path.abspath(_SourceToFile(file_node)),
debug=_IsDebugEnabled())
files = [] files = []
for node in grd: for node in grd:
if (node.name == 'structure' or node.name == 'skeleton' or if (node.name == 'structure' or node.name == 'skeleton' or
(node.name == 'file' and node.parent and (node.name == 'file' and node.parent and
node.parent.name == 'translations')): node.parent.name == 'translations')):
files.append(os.path.abspath(node.GetFilePath())) files.append(os.path.abspath(node.GetFilePath()))
elif node.name == 'include' and node.attrs['filenameonly'] == 'false': elif node.name == 'include':
# TODO(tc): This doesn't work because the path is often relative to files.append(node.FilenameToOpen())
#files.append(node.FilenameToOpen())
pass
# Add in the grit source files. If one of these change, we want to re-run # Add in the grit source files. If one of these change, we want to re-run
# grit. # grit.
......
...@@ -157,15 +157,6 @@ are exported to translation interchange files (e.g. XMB files), etc. ...@@ -157,15 +157,6 @@ are exported to translation interchange files (e.g. XMB files), etc.
for output in self.res.GetOutputFiles(): for output in self.res.GetOutputFiles():
self.VerboseOut('Creating %s...' % output.GetFilename()) self.VerboseOut('Creating %s...' % output.GetFilename())
# Don't build data package files on windows because it's not used and
# there are project dependency issues. We still need to create the file
# to satisfy build dependencies.
linux_or_mac = (sys.platform == 'linux2' or sys.platform == 'darwin')
if output.GetType() == 'data_package' and not linux_or_mac:
f = open(output.GetOutputFilename(), 'wb')
f.close()
continue
# Microsoft's RC compiler can only deal with single-byte or double-byte # Microsoft's RC compiler can only deal with single-byte or double-byte
# files (no UTF-8), so we make all RC files UTF-16 to support all # files (no UTF-8), so we make all RC files UTF-16 to support all
# character sets. # character sets.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment