diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-06 18:36:28 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-06 18:36:28 +0000 |
commit | 07ec0acf438dd4b53dbb27fbc4a55db25d8459c2 (patch) | |
tree | e4bd799ce5469ba8ffa0be1f304decf702d6f775 | |
parent | ae3b19fcd7fc940f8141408c7ee5cf913ec35004 (diff) | |
download | chromium_src-07ec0acf438dd4b53dbb27fbc4a55db25d8459c2.zip chromium_src-07ec0acf438dd4b53dbb27fbc4a55db25d8459c2.tar.gz chromium_src-07ec0acf438dd4b53dbb27fbc4a55db25d8459c2.tar.bz2 |
[NaCl SDK] Create a resources/ directory and move files to it.
* Move files out of the roout of examples/ to resources/
* Move files from examples/resources to resources/
* Move Makefile templates to resources/ and rename them.
BUG=none
R=sbc@chromium.org
Review URL: https://codereview.chromium.org/23919004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221741 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | native_client_sdk/src/build_tools/build_app.py | 6 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/build_paths.py | 1 | ||||
-rwxr-xr-x | native_client_sdk/src/build_tools/build_projects.py | 18 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/generate_make.py | 13 | ||||
-rw-r--r-- | native_client_sdk/src/examples/tutorial/debugging/example.dsc | 4 | ||||
-rw-r--r-- | native_client_sdk/src/libraries/gmock/library.dsc | 1 | ||||
-rw-r--r-- | native_client_sdk/src/libraries/ppapi_cpp/library.dsc | 1 | ||||
-rw-r--r-- | native_client_sdk/src/libraries/sdk_util/library.dsc | 3 | ||||
-rw-r--r-- | native_client_sdk/src/libraries/xray/library.dsc | 3 | ||||
-rw-r--r-- | native_client_sdk/src/resources/Makefile.example.template (renamed from native_client_sdk/src/build_tools/template.mk) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/Makefile.index.template (renamed from native_client_sdk/src/examples/Makefile) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/Makefile.library.template (renamed from native_client_sdk/src/build_tools/library.mk) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/Makefile_gyp (renamed from native_client_sdk/src/examples/Makefile_gyp) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/background.js (renamed from native_client_sdk/src/examples/resources/background.js) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/button_close.png (renamed from native_client_sdk/src/examples/resources/button_close.png) | bin | 326 -> 326 bytes | |||
-rw-r--r-- | native_client_sdk/src/resources/button_close_hover.png (renamed from native_client_sdk/src/examples/resources/button_close_hover.png) | bin | 405 -> 405 bytes | |||
-rw-r--r-- | native_client_sdk/src/resources/common.js (renamed from native_client_sdk/src/examples/common.js) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/favicon.ico (renamed from native_client_sdk/src/examples/favicon.ico) | bin | 1150 -> 1150 bytes | |||
-rw-r--r-- | native_client_sdk/src/resources/httpd.cmd (renamed from native_client_sdk/src/examples/httpd.cmd) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/icon128.png (renamed from native_client_sdk/src/examples/resources/icon128.png) | bin | 10729 -> 10729 bytes | |||
-rw-r--r-- | native_client_sdk/src/resources/index.css (renamed from native_client_sdk/src/examples/resources/index.css) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/index.html.template (renamed from native_client_sdk/src/examples/resources/index.html.template) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/index.js (renamed from native_client_sdk/src/examples/resources/index.js) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/manifest.json.template (renamed from native_client_sdk/src/examples/resources/manifest.json.template) | 0 | ||||
-rw-r--r-- | native_client_sdk/src/resources/promo440.png (renamed from native_client_sdk/src/examples/resources/promo440.png) | bin | 86991 -> 86991 bytes | |||
-rw-r--r-- | native_client_sdk/src/resources/screenshot_gles_1280.png (renamed from native_client_sdk/src/examples/resources/screenshot_gles_1280.png) | bin | 60899 -> 60899 bytes | |||
-rw-r--r-- | native_client_sdk/src/resources/screenshot_pi_1280.png (renamed from native_client_sdk/src/examples/resources/screenshot_pi_1280.png) | bin | 100971 -> 100971 bytes | |||
-rw-r--r-- | native_client_sdk/src/tests/nacl_io_socket_test/example.dsc | 3 | ||||
-rw-r--r-- | native_client_sdk/src/tests/nacl_io_test/example.dsc | 2 | ||||
-rw-r--r-- | native_client_sdk/src/tests/sdk_util_test/example.dsc | 2 |
30 files changed, 16 insertions, 41 deletions
diff --git a/native_client_sdk/src/build_tools/build_app.py b/native_client_sdk/src/build_tools/build_app.py index 5ed0fb6..cf16f881 100755 --- a/native_client_sdk/src/build_tools/build_app.py +++ b/native_client_sdk/src/build_tools/build_app.py @@ -19,7 +19,7 @@ import build_version import easy_template import parse_dsc -from build_paths import SDK_SRC_DIR, OUT_DIR, SDK_EXAMPLE_DIR +from build_paths import SDK_SRC_DIR, OUT_DIR, SDK_RESOURCE_DIR sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) import getos @@ -81,7 +81,7 @@ def main(args): pepperdir = os.path.join(OUT_DIR, 'pepper_' + pepper_ver) app_dir = os.path.join(OUT_DIR, 'naclsdk_app') app_examples_dir = os.path.join(app_dir, 'examples') - sdk_resources_dir = os.path.join(SDK_EXAMPLE_DIR, 'resources') + sdk_resources_dir = SDK_RESOURCE_DIR platform = getos.GetPlatform() buildbot_common.RemoveDir(app_dir) @@ -138,7 +138,7 @@ def main(args): os.environ['NACL_SDK_ROOT'] = pepperdir - build_projects.BuildProjects(app_dir, tree, deps=True, clean=False, + build_projects.BuildProjects(app_dir, tree, deps=False, clean=False, config=config) RemoveBuildCruft(app_dir) diff --git a/native_client_sdk/src/build_tools/build_paths.py b/native_client_sdk/src/build_tools/build_paths.py index a01671b..941f91b 100644 --- a/native_client_sdk/src/build_tools/build_paths.py +++ b/native_client_sdk/src/build_tools/build_paths.py @@ -9,6 +9,7 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) SDK_SRC_DIR = os.path.dirname(SCRIPT_DIR) SDK_EXAMPLE_DIR = os.path.join(SDK_SRC_DIR, 'examples') SDK_LIBRARY_DIR = os.path.join(SDK_SRC_DIR, 'libraries') +SDK_RESOURCE_DIR = os.path.join(SDK_SRC_DIR, 'resources') SDK_DIR = os.path.dirname(SDK_SRC_DIR) SRC_DIR = os.path.dirname(SDK_DIR) NACL_DIR = os.path.join(SRC_DIR, 'native_client') diff --git a/native_client_sdk/src/build_tools/build_projects.py b/native_client_sdk/src/build_tools/build_projects.py index 953b56f..4758460 100755 --- a/native_client_sdk/src/build_tools/build_projects.py +++ b/native_client_sdk/src/build_tools/build_projects.py @@ -13,7 +13,7 @@ import build_version import generate_make import parse_dsc -from build_paths import NACL_DIR, SDK_SRC_DIR, OUT_DIR, SDK_EXAMPLE_DIR +from build_paths import NACL_DIR, SDK_SRC_DIR, OUT_DIR, SDK_RESOURCE_DIR from build_paths import GSTORE from generate_index import LandingPage @@ -54,14 +54,10 @@ def UpdateHelpers(pepperdir, clobber=False): buildbot_common.RemoveDir(exampledir) buildbot_common.MakeDir(exampledir) - # Copy files for individual bild and landing page - files = ['favicon.ico', 'httpd.cmd'] - CopyFilesFromTo(files, SDK_EXAMPLE_DIR, exampledir) - - resourcesdir = os.path.join(SDK_EXAMPLE_DIR, 'resources') - files = ['index.css', 'index.js', 'button_close.png', - 'button_close_hover.png'] - CopyFilesFromTo(files, resourcesdir, exampledir) + # Copy files for individual build and landing page + files = ['favicon.ico', 'httpd.cmd', 'index.css', 'index.js', + 'button_close.png', 'button_close_hover.png'] + CopyFilesFromTo(files, SDK_RESOURCE_DIR, exampledir) # Copy tools scripts and make includes buildbot_common.CopyDir(os.path.join(SDK_SRC_DIR, 'tools', '*.py'), @@ -133,9 +129,7 @@ def UpdateProjects(pepperdir, project_tree, toolchains, if landing_page: # Generate the landing page text file. index_html = os.path.join(pepperdir, 'examples', 'index.html') - example_resources_dir = os.path.join(SDK_EXAMPLE_DIR, 'resources') - index_template = os.path.join(example_resources_dir, - 'index.html.template') + index_template = os.path.join(SDK_RESOURCE_DIR, 'index.html.template') with open(index_html, 'w') as fh: out = landing_page.GeneratePage(index_template) fh.write(out) diff --git a/native_client_sdk/src/build_tools/generate_make.py b/native_client_sdk/src/build_tools/generate_make.py index db12444..17fbcc9 100644 --- a/native_client_sdk/src/build_tools/generate_make.py +++ b/native_client_sdk/src/build_tools/generate_make.py @@ -11,7 +11,7 @@ import build_version import getos from buildbot_common import ErrorExit from easy_template import RunTemplateFileIfChanged -from build_paths import SCRIPT_DIR, SDK_EXAMPLE_DIR +from build_paths import SDK_RESOURCE_DIR def Trace(msg): if Trace.verbose: @@ -137,7 +137,7 @@ def ProcessHTML(srcroot, dstroot, desc, toolchains, configs, first_toolchain): def GenerateManifest(srcroot, dstroot, desc): outdir = os.path.join(dstroot, desc['DEST'], desc['NAME']) - srcpath = os.path.join(SDK_EXAMPLE_DIR, 'resources', 'manifest.json.template') + srcpath = os.path.join(SDK_RESOURCE_DIR, 'manifest.json.template') dstpath = os.path.join(outdir, 'manifest.json') permissions = desc.get('PERMISSIONS', []) socket_permissions = desc.get('SOCKET_PERMISSIONS', []) @@ -182,8 +182,7 @@ def ProcessProject(pepperdir, srcroot, dstroot, desc, toolchains, configs=None, name = desc['NAME'] out_dir = os.path.join(dstroot, desc['DEST'], name) buildbot_common.MakeDir(out_dir) - srcdirs = desc.get('SEARCH', ['.', '..', '../..']) - srcdirs.append(os.path.join(SDK_EXAMPLE_DIR, 'resources')) + srcdirs = desc.get('SEARCH', ['.', SDK_RESOURCE_DIR]) # Copy sources to example directory sources = GenerateSourceCopyList(desc) @@ -198,9 +197,9 @@ def ProcessProject(pepperdir, srcroot, dstroot, desc, toolchains, configs=None, make_path = os.path.join(out_dir, 'Makefile') if IsNexe(desc): - template = os.path.join(SCRIPT_DIR, 'template.mk') + template = os.path.join(SDK_RESOURCE_DIR, 'Makefile.example.template') else: - template = os.path.join(SCRIPT_DIR, 'library.mk') + template = os.path.join(SDK_RESOURCE_DIR, 'Makefile.library.template') # Ensure the order of |tools| is the same as toolchains; that way if # first_toolchain is set, it will choose based on the order of |toolchains|. @@ -240,7 +239,7 @@ def GenerateMasterMakefile(pepperdir, out_path, targets): out_path: Root for output such that out_path+NAME = full path targets: List of targets names """ - in_path = os.path.join(SDK_EXAMPLE_DIR, 'Makefile') + in_path = os.path.join(SDK_RESOURCE_DIR, 'Makefile.index.template') out_path = os.path.join(out_path, 'Makefile') rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path)) template_dict = { diff --git a/native_client_sdk/src/examples/tutorial/debugging/example.dsc b/native_client_sdk/src/examples/tutorial/debugging/example.dsc index 36ef726..a9233e4 100644 --- a/native_client_sdk/src/examples/tutorial/debugging/example.dsc +++ b/native_client_sdk/src/examples/tutorial/debugging/example.dsc @@ -1,10 +1,6 @@ { 'DISABLE_PACKAGE': True, # Doesn't work in packaged apps yet. 'TOOLS': ['newlib'], - 'SEARCH': [ - '.', - '../..', - ], 'TARGETS': [ { 'NAME' : 'debugging', diff --git a/native_client_sdk/src/libraries/gmock/library.dsc b/native_client_sdk/src/libraries/gmock/library.dsc index 4cbbb85..a61ffeb 100644 --- a/native_client_sdk/src/libraries/gmock/library.dsc +++ b/native_client_sdk/src/libraries/gmock/library.dsc @@ -1,7 +1,6 @@ { 'TOOLS': ['newlib', 'glibc', 'pnacl', 'linux', 'win'], 'SEARCH': [ - '.', '../../../../testing/gmock/include/gmock', '../../../../testing/gmock/include/gmock/internal', '../../../../testing/gmock/src', diff --git a/native_client_sdk/src/libraries/ppapi_cpp/library.dsc b/native_client_sdk/src/libraries/ppapi_cpp/library.dsc index cd1ae06..16db397 100644 --- a/native_client_sdk/src/libraries/ppapi_cpp/library.dsc +++ b/native_client_sdk/src/libraries/ppapi_cpp/library.dsc @@ -1,7 +1,6 @@ { 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'], 'SEARCH': [ - '.', '../../../../ppapi/cpp', '../../../../ppapi/cpp/dev', '../../../../ppapi/cpp/extensions', diff --git a/native_client_sdk/src/libraries/sdk_util/library.dsc b/native_client_sdk/src/libraries/sdk_util/library.dsc index 38cad6a..7d14db1 100644 --- a/native_client_sdk/src/libraries/sdk_util/library.dsc +++ b/native_client_sdk/src/libraries/sdk_util/library.dsc @@ -1,8 +1,5 @@ { 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win'], - 'SEARCH': [ - '.' - ], 'TARGETS': [ { 'NAME' : 'sdk_util', diff --git a/native_client_sdk/src/libraries/xray/library.dsc b/native_client_sdk/src/libraries/xray/library.dsc index f7e23ef..64daf75 100644 --- a/native_client_sdk/src/libraries/xray/library.dsc +++ b/native_client_sdk/src/libraries/xray/library.dsc @@ -1,8 +1,5 @@ { 'TOOLS': ['newlib', 'glibc', 'pnacl'], - 'SEARCH': [ - '.' - ], 'TARGETS': [ { 'NAME' : 'xray', diff --git a/native_client_sdk/src/build_tools/template.mk b/native_client_sdk/src/resources/Makefile.example.template index 8c63756..8c63756 100644 --- a/native_client_sdk/src/build_tools/template.mk +++ b/native_client_sdk/src/resources/Makefile.example.template diff --git a/native_client_sdk/src/examples/Makefile b/native_client_sdk/src/resources/Makefile.index.template index 84110b5..84110b5 100644 --- a/native_client_sdk/src/examples/Makefile +++ b/native_client_sdk/src/resources/Makefile.index.template diff --git a/native_client_sdk/src/build_tools/library.mk b/native_client_sdk/src/resources/Makefile.library.template index ff991aa..ff991aa 100644 --- a/native_client_sdk/src/build_tools/library.mk +++ b/native_client_sdk/src/resources/Makefile.library.template diff --git a/native_client_sdk/src/examples/Makefile_gyp b/native_client_sdk/src/resources/Makefile_gyp index 84b0cf4..84b0cf4 100644 --- a/native_client_sdk/src/examples/Makefile_gyp +++ b/native_client_sdk/src/resources/Makefile_gyp diff --git a/native_client_sdk/src/examples/resources/background.js b/native_client_sdk/src/resources/background.js index 1fc5a19b..1fc5a19b 100644 --- a/native_client_sdk/src/examples/resources/background.js +++ b/native_client_sdk/src/resources/background.js diff --git a/native_client_sdk/src/examples/resources/button_close.png b/native_client_sdk/src/resources/button_close.png Binary files differindex 02a927e..02a927e 100644 --- a/native_client_sdk/src/examples/resources/button_close.png +++ b/native_client_sdk/src/resources/button_close.png diff --git a/native_client_sdk/src/examples/resources/button_close_hover.png b/native_client_sdk/src/resources/button_close_hover.png Binary files differindex 2df566d..2df566d 100644 --- a/native_client_sdk/src/examples/resources/button_close_hover.png +++ b/native_client_sdk/src/resources/button_close_hover.png diff --git a/native_client_sdk/src/examples/common.js b/native_client_sdk/src/resources/common.js index dc5328f..dc5328f 100644 --- a/native_client_sdk/src/examples/common.js +++ b/native_client_sdk/src/resources/common.js diff --git a/native_client_sdk/src/examples/favicon.ico b/native_client_sdk/src/resources/favicon.ico Binary files differindex ee7c943..ee7c943 100644 --- a/native_client_sdk/src/examples/favicon.ico +++ b/native_client_sdk/src/resources/favicon.ico diff --git a/native_client_sdk/src/examples/httpd.cmd b/native_client_sdk/src/resources/httpd.cmd index d7aec88..d7aec88 100644 --- a/native_client_sdk/src/examples/httpd.cmd +++ b/native_client_sdk/src/resources/httpd.cmd diff --git a/native_client_sdk/src/examples/resources/icon128.png b/native_client_sdk/src/resources/icon128.png Binary files differindex a10c52a..a10c52a 100644 --- a/native_client_sdk/src/examples/resources/icon128.png +++ b/native_client_sdk/src/resources/icon128.png diff --git a/native_client_sdk/src/examples/resources/index.css b/native_client_sdk/src/resources/index.css index 93f2663..93f2663 100644 --- a/native_client_sdk/src/examples/resources/index.css +++ b/native_client_sdk/src/resources/index.css diff --git a/native_client_sdk/src/examples/resources/index.html.template b/native_client_sdk/src/resources/index.html.template index 207afdb..207afdb 100644 --- a/native_client_sdk/src/examples/resources/index.html.template +++ b/native_client_sdk/src/resources/index.html.template diff --git a/native_client_sdk/src/examples/resources/index.js b/native_client_sdk/src/resources/index.js index ab4b4ff..ab4b4ff 100644 --- a/native_client_sdk/src/examples/resources/index.js +++ b/native_client_sdk/src/resources/index.js diff --git a/native_client_sdk/src/examples/resources/manifest.json.template b/native_client_sdk/src/resources/manifest.json.template index e7e9760..e7e9760 100644 --- a/native_client_sdk/src/examples/resources/manifest.json.template +++ b/native_client_sdk/src/resources/manifest.json.template diff --git a/native_client_sdk/src/examples/resources/promo440.png b/native_client_sdk/src/resources/promo440.png Binary files differindex 2d9b521..2d9b521 100644 --- a/native_client_sdk/src/examples/resources/promo440.png +++ b/native_client_sdk/src/resources/promo440.png diff --git a/native_client_sdk/src/examples/resources/screenshot_gles_1280.png b/native_client_sdk/src/resources/screenshot_gles_1280.png Binary files differindex 853a6bc..853a6bc 100644 --- a/native_client_sdk/src/examples/resources/screenshot_gles_1280.png +++ b/native_client_sdk/src/resources/screenshot_gles_1280.png diff --git a/native_client_sdk/src/examples/resources/screenshot_pi_1280.png b/native_client_sdk/src/resources/screenshot_pi_1280.png Binary files differindex 4dad188..4dad188 100644 --- a/native_client_sdk/src/examples/resources/screenshot_pi_1280.png +++ b/native_client_sdk/src/resources/screenshot_pi_1280.png diff --git a/native_client_sdk/src/tests/nacl_io_socket_test/example.dsc b/native_client_sdk/src/tests/nacl_io_socket_test/example.dsc index 6340d66..842a84c 100644 --- a/native_client_sdk/src/tests/nacl_io_socket_test/example.dsc +++ b/native_client_sdk/src/tests/nacl_io_socket_test/example.dsc @@ -1,8 +1,5 @@ { 'TOOLS': ['newlib', 'glibc', 'pnacl'], - - # Need to add ../../examples for common.js - 'SEARCH': ['.', '../../examples'], 'TARGETS': [ { 'NAME' : 'nacl_io_socket_test', diff --git a/native_client_sdk/src/tests/nacl_io_test/example.dsc b/native_client_sdk/src/tests/nacl_io_test/example.dsc index 1afb68a..7dbbfbc 100644 --- a/native_client_sdk/src/tests/nacl_io_test/example.dsc +++ b/native_client_sdk/src/tests/nacl_io_test/example.dsc @@ -2,8 +2,6 @@ 'TOOLS': ['newlib', 'glibc', 'pnacl'], 'SEL_LDR': True, - # Need to add ../../examples for common.js - 'SEARCH': ['.', '../../examples'], 'TARGETS': [ { 'NAME' : 'nacl_io_test', diff --git a/native_client_sdk/src/tests/sdk_util_test/example.dsc b/native_client_sdk/src/tests/sdk_util_test/example.dsc index 86f7635..2073d3f 100644 --- a/native_client_sdk/src/tests/sdk_util_test/example.dsc +++ b/native_client_sdk/src/tests/sdk_util_test/example.dsc @@ -2,8 +2,6 @@ 'TOOLS': ['newlib', 'glibc', 'pnacl'], 'SEL_LDR': True, - # Need to add ../../examples for common.js - 'SEARCH': ['.', '../../examples'], 'TARGETS': [ { 'NAME' : 'sdk_util_test', |