From a96e1c4acce2799c5739f674ff6d90d49fd25633 Mon Sep 17 00:00:00 2001 From: "noelallen@chromium.org" Date: Sat, 11 Feb 2012 00:32:09 +0000 Subject: Remove stale files unused by NaCl SDK builder 1- Old scons artifacts 2- Move index_staging -> index 3- Remove stale hello_world_c (now just hello_world) This CL is part of the NaCl SDK and does not affect Chrome. BUG= 109207 TBR= bradnelson@xchromium.org Review URL: http://codereview.chromium.org/9378026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121584 0039d316-1c4b-4281-b951-d872f2087c98 --- native_client_sdk/src/examples/build.scons | 82 ------ .../test_helper_functions.cc | 52 ---- .../examples/hello_world_newlib/hello_world_c.c | 289 --------------------- .../examples/hello_world_newlib/hello_world_c.html | 126 --------- .../examples/hello_world_newlib/hello_world_c.nmf | 6 - native_client_sdk/src/examples/index_staging.html | 167 ------------ native_client_sdk/src/scons | 38 --- native_client_sdk/src/scons.bat | 28 -- 8 files changed, 788 deletions(-) delete mode 100644 native_client_sdk/src/examples/build.scons delete mode 100644 native_client_sdk/src/examples/hello_world_interactive/test_helper_functions.cc delete mode 100644 native_client_sdk/src/examples/hello_world_newlib/hello_world_c.c delete mode 100644 native_client_sdk/src/examples/hello_world_newlib/hello_world_c.html delete mode 100644 native_client_sdk/src/examples/hello_world_newlib/hello_world_c.nmf delete mode 100644 native_client_sdk/src/examples/index_staging.html delete mode 100755 native_client_sdk/src/scons delete mode 100755 native_client_sdk/src/scons.bat (limited to 'native_client_sdk') diff --git a/native_client_sdk/src/examples/build.scons b/native_client_sdk/src/examples/build.scons deleted file mode 100644 index 76ec08a..0000000 --- a/native_client_sdk/src/examples/build.scons +++ /dev/null @@ -1,82 +0,0 @@ -#! -*- python -*- -# -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import shutil -import sys - -""" -Build file for the NaCl SDK Examples - -This file runs all the scons files in the various example sub-directories. -Do not invoke this script directly, but instead use the scons or scons.bat -wrapper function. E.g. - -Linux or Mac: - ./scons [Options...] - -Windows: - scons.bat [Options...] -""" - -#------------------------------------------------------------------------------ -HELP_STRING = """ -=============================================================================== -Help for NaCl SDK Examples -=============================================================================== - -* cleaning: ./scons -c -* build a target: ./scons -* clean a target: ./scons -c - -Supported targets: - * fullscreen_tumbler Build the fullscreen-tumbler example. - * geturl Build the geturl example. - * hello_world Build the hello_world example. - * hello_world_c Build the hello_world_c example. - * input_events Build the input_events example. - * load_progress Build the load_progress example. - * mouselock Build the mouselock example. - * multithreaded_input_events Build the multithreaded input_events example. - * pi_generator Build the pi_generator example. - * pong Build the pong example. - * sine_synth Build the sine_synth example. - * tumbler Build the tumbler example. -""" - -example_directories = [ - 'fullscreen_tumbler', - 'geturl', - 'hello_world', - 'hello_world_c', - 'input_events', - 'load_progress', - 'mouselock', - 'multithreaded_input_events', - 'pi_generator', - 'pong', - 'sine_synth', - 'tumbler', - ] - -Help(HELP_STRING) - -staging_dir = os.path.abspath(os.getenv( - 'NACL_INSTALL_ROOT', os.path.join(os.getenv('NACL_SDK_ROOT', '.'), - 'staging'))) -general_files = Install(staging_dir, ['httpd.py']) -general_files.extend(InstallAs(os.path.join(staging_dir, 'index.html'), - 'index_staging.html')) - -if sys.platform in ['win32', 'cygwin']: - general_files.extend(Install(staging_dir, 'httpd.cmd')) - -SConscript([os.path.join(dir, 'build.scons') for dir in example_directories]) - -Default(['install'] + general_files + example_directories) -if GetOption('clean'): - print "Removing the staging directory at %s" % staging_dir - shutil.rmtree(staging_dir, ignore_errors=True) diff --git a/native_client_sdk/src/examples/hello_world_interactive/test_helper_functions.cc b/native_client_sdk/src/examples/hello_world_interactive/test_helper_functions.cc deleted file mode 100644 index 30d3f27..0000000 --- a/native_client_sdk/src/examples/hello_world_interactive/test_helper_functions.cc +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This is an example of a simple unit test to verify that the logic helper -// functions works as expected. Note that this looks like a 'normal' C++ -// program, with a main function. It is compiled and linked using the NaCl -// toolchain, so in order to run it, you must use 'sel_ldr_x86_32' or -// 'sel_ldr_x86_64' from the toolchain's bin directory. -// -// For example (assuming the toolchain bin directory is in your path): -// sel_ldr_x86_32 test_helper_functions_x86_32_dbg.nexe -// -// You can also use the 'test32', or 'test64' SCons target to run these tests. -// For example, this will run the test in 32-bit mode on Mac or Linux: -// ../scons test32 -// On Windows 64: -// ..\scons test64 - -#include "examples/hello_world/helper_functions.h" - -#include -#include -#include - -// A very simple macro to print 'passed' if boolean_expression is true and -// 'FAILED' otherwise. -// This is meant to approximate the functionality you would get from a real test -// framework. You should feel free to build and use the test framework of your -// choice. -#define EXPECT_EQUAL(left, right)\ -printf("Check: \"" #left "\" == \"" #right "\" %s\n", \ - ((left) == (right)) ? "passed" : "FAILED") - -using hello_world::FortyTwo; -using hello_world::ReverseText; - -int main() { - EXPECT_EQUAL(FortyTwo(), 42); - - std::string empty_string; - EXPECT_EQUAL(ReverseText(empty_string), empty_string); - - std::string palindrome("able was i ere i saw elba"); - EXPECT_EQUAL(ReverseText(palindrome), palindrome); - - std::string alphabet("abcdefghijklmnopqrstuvwxyz"); - std::string alphabet_backwards("zyxwvutsrqponmlkjihgfedcba"); - EXPECT_EQUAL(ReverseText(alphabet), alphabet_backwards); - return 0; -} - diff --git a/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.c b/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.c deleted file mode 100644 index 5169514..0000000 --- a/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.c +++ /dev/null @@ -1,289 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -/** @file hello_world.c - * This example demonstrates loading, running and scripting a very simple - * NaCl module. - */ -#include -#include -#include - -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/pp_module.h" -#include "ppapi/c/pp_var.h" -#include "ppapi/c/ppb.h" -#include "ppapi/c/ppb_instance.h" -#include "ppapi/c/ppb_messaging.h" -#include "ppapi/c/ppb_var.h" -#include "ppapi/c/ppp.h" -#include "ppapi/c/ppp_instance.h" -#include "ppapi/c/ppp_messaging.h" - -struct MessageInfo { - PP_Instance instance; - struct PP_Var message; -}; - -static const char* const kReverseTextMethodId = "reverseText"; -static const char* const kFortyTwoMethodId = "fortyTwo"; -static const char kMessageArgumentSeparator = ':'; -static const char kNullTerminator = '\0'; - -static PPB_Messaging* ppb_messaging_interface = NULL; -static PPB_Var* ppb_var_interface = NULL; -static PP_Module module_id = 0; - - -/** - * Returns a mutable C string contained in the @a var or NULL if @a var is not - * string. This makes a copy of the string in the @ var and adds a NULL - * terminator. Note that VarToUtf8() does not guarantee the NULL terminator on - * the returned string. See the comments for VatToUtf8() in ppapi/c/ppb_var.h - * for more info. The caller is responsible for freeing the returned memory. - * @param[in] var PP_Var containing string. - * @return a C string representation of @a var. - * @note The caller is responsible for freeing the returned string. - */ -static char* VarToCStr(struct PP_Var var) { - uint32_t len = 0; - if (ppb_var_interface != NULL) { - const char* var_c_str = ppb_var_interface->VarToUtf8(var, &len); - if (len > 0) { - char* c_str = (char*)malloc(len + 1); - memcpy(c_str, var_c_str, len); - c_str[len] = kNullTerminator; - return c_str; - } - } - return NULL; -} - -/** - * Creates new string PP_Var from C string. The resulting object will be a - * refcounted string object. It will be AddRef()ed for the caller. When the - * caller is done with it, it should be Release()d. - * @param[in] str C string to be converted to PP_Var - * @return PP_Var containing string. - */ -static struct PP_Var CStrToVar(const char* str) { - if (ppb_var_interface != NULL) { - return ppb_var_interface->VarFromUtf8(str, strlen(str)); - } - return PP_MakeUndefined(); -} - -/** - * Reverse C string in-place. - * @param[in,out] str C string to be reversed - */ -static void ReverseStr(char* str) { - char* right = str + strlen(str) - 1; - char* left = str; - while (left < right) { - char tmp = *left; - *left++ = *right; - *right-- = tmp; - } -} - -/** - * A simple function that always returns 42. - * @return always returns the integer 42 - */ -static struct PP_Var FortyTwo() { - return PP_MakeInt32(42); -} - -/** - * Called when the NaCl module is instantiated on the web page. The identifier - * of the new instance will be passed in as the first argument (this value is - * generated by the browser and is an opaque handle). This is called for each - * instantiation of the NaCl module, which is each time the tag for - * this module is encountered. - * - * If this function reports a failure (by returning @a PP_FALSE), the NaCl - * module will be deleted and DidDestroy will be called. - * @param[in] instance The identifier of the new instance representing this - * NaCl module. - * @param[in] argc The number of arguments contained in @a argn and @a argv. - * @param[in] argn An array of argument names. These argument names are - * supplied in the tag, for example: - * - * will produce two arguments, one named "id" and one named "dimensions". - * @param[in] argv An array of argument values. These are the values of the - * arguments listed in the tag. In the above example, there will - * be two elements in this array, "nacl_module" and "2". The indices of - * these values match the indices of the corresponding names in @a argn. - * @return @a PP_TRUE on success. - */ -static PP_Bool Instance_DidCreate(PP_Instance instance, - uint32_t argc, - const char* argn[], - const char* argv[]) { - return PP_TRUE; -} - -/** - * Called when the NaCl module is destroyed. This will always be called, - * even if DidCreate returned failure. This routine should deallocate any data - * associated with the instance. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - */ -static void Instance_DidDestroy(PP_Instance instance) { -} - -/** - * Called when the position, the size, or the clip rect of the element in the - * browser that corresponds to this NaCl module has changed. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - * @param[in] position The location on the page of this NaCl module. This is - * relative to the top left corner of the viewport, which changes as the - * page is scrolled. - * @param[in] clip The visible region of the NaCl module. This is relative to - * the top left of the plugin's coordinate system (not the page). If the - * plugin is invisible, @a clip will be (0, 0, 0, 0). - */ -static void Instance_DidChangeView(PP_Instance instance, - PP_Resource view_resource) { -} - -/** - * Notification that the given NaCl module has gained or lost focus. - * Having focus means that keyboard events will be sent to the NaCl module - * represented by @a instance. A NaCl module's default condition is that it - * will not have focus. - * - * Note: clicks on NaCl modules will give focus only if you handle the - * click event. You signal if you handled it by returning @a true from - * HandleInputEvent. Otherwise the browser will bubble the event and give - * focus to the element on the page that actually did end up consuming it. - * If you're not getting focus, check to make sure you're returning true from - * the mouse click in HandleInputEvent. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - * @param[in] has_focus Indicates whether this NaCl module gained or lost - * event focus. - */ -static void Instance_DidChangeFocus(PP_Instance instance, - PP_Bool has_focus) { -} - -/** - * Handler that gets called after a full-frame module is instantiated based on - * registered MIME types. This function is not called on NaCl modules. This - * function is essentially a place-holder for the required function pointer in - * the PPP_Instance structure. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - * @param[in] url_loader A PP_Resource an open PPB_URLLoader instance. - * @return PP_FALSE. - */ -static PP_Bool Instance_HandleDocumentLoad(PP_Instance instance, - PP_Resource url_loader) { - /* NaCl modules do not need to handle the document load function. */ - return PP_FALSE; -} - -/** - * Handler for messages coming in from the browser via postMessage. Extracts - * the method call from @a message, parses it for method name and value, then - * calls the appropriate function. In the case of the reverseString method, the - * message format is a simple colon-separated string. The first part of the - * string up to the colon is the method name; after that is the string argument. - * @param[in] instance The instance ID. - * @param[in] message The contents, copied by value, of the message sent from - * browser via postMessage. - */ -void Messaging_HandleMessage(PP_Instance instance, struct PP_Var var_message) { - struct PP_Var var_result = PP_MakeUndefined(); - char* message; - - if (var_message.type != PP_VARTYPE_STRING) { - /* Only handle string messages */ - return; - } - message = VarToCStr(var_message); - if (message == NULL) - return; - - if (strncmp(message, kFortyTwoMethodId, strlen(kFortyTwoMethodId)) == 0) { - var_result = FortyTwo(); - } else if (strncmp(message, - kReverseTextMethodId, - strlen(kReverseTextMethodId)) == 0) { - /* Use everything after the ':' in |message| as the string argument. */ - char* string_arg = strchr(message, kMessageArgumentSeparator); - if (string_arg != NULL) { - string_arg += 1; /* Advance past the ':' separator. */ - ReverseStr(string_arg); - var_result = CStrToVar(string_arg); - } - } - free(message); - - /* Echo the return result back to browser. Note that HandleMessage is always - * called on the main thread, so it's OK to post the message back to the - * browser directly from here. This return post is asynchronous. - */ - ppb_messaging_interface->PostMessage(instance, var_result); - /* If the message was created using VarFromUtf8() it needs to be released. - * See the comments about VarFromUtf8() in ppapi/c/ppb_var.h for more - * information. - */ - if (var_result.type == PP_VARTYPE_STRING) { - ppb_var_interface->Release(var_result); - } -} - -/** - * Entry points for the module. - * Initialize needed interfaces: PPB_Core, PPB_Messaging and PPB_Var. - * @param[in] a_module_id module ID - * @param[in] get_browser pointer to PPB_GetInterface - * @return PP_OK on success, any other value on failure. - */ -PP_EXPORT int32_t PPP_InitializeModule(PP_Module a_module_id, - PPB_GetInterface get_browser) { - module_id = a_module_id; - ppb_messaging_interface = - (PPB_Messaging*)(get_browser(PPB_MESSAGING_INTERFACE)); - ppb_var_interface = (PPB_Var*)(get_browser(PPB_VAR_INTERFACE)); - - return PP_OK; -} - -/** - * Returns an interface pointer for the interface of the given name, or NULL - * if the interface is not supported. - * @param[in] interface_name name of the interface - * @return pointer to the interface - */ -PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { - if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) { - static PPP_Instance instance_interface = { - &Instance_DidCreate, - &Instance_DidDestroy, - &Instance_DidChangeView, - &Instance_DidChangeFocus, - &Instance_HandleDocumentLoad, - }; - return &instance_interface; - } else if (strcmp(interface_name, PPP_MESSAGING_INTERFACE) == 0) { - static PPP_Messaging messaging_interface = { - &Messaging_HandleMessage - }; - return &messaging_interface; - } - return NULL; -} - -/** - * Called before the plugin module is unloaded. - */ -PP_EXPORT void PPP_ShutdownModule() { -} diff --git a/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.html b/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.html deleted file mode 100644 index ff43841..0000000 --- a/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Hello, World! - - - - - -

Native Client Simple Module

-

-

-

- - -

- -
- - - -
- -

- -

If the module is working correctly, a click on the "Call fortyTwo()" button - should open a popup dialog containing 42 as its value.

- -

Clicking on the "Call reverseText()" button - should open a popup dialog containing the textbox contents and its reverse - as its value.

- -

Status

-
NO-STATUS
- - diff --git a/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.nmf b/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.nmf deleted file mode 100644 index 377d01e..0000000 --- a/native_client_sdk/src/examples/hello_world_newlib/hello_world_c.nmf +++ /dev/null @@ -1,6 +0,0 @@ -{ - "program": { - "x86-64": {"url": "hello_world_c_x86_64.nexe"}, - "x86-32": {"url": "hello_world_c_x86_32.nexe"} - } -} diff --git a/native_client_sdk/src/examples/index_staging.html b/native_client_sdk/src/examples/index_staging.html deleted file mode 100644 index a3d2a88..0000000 --- a/native_client_sdk/src/examples/index_staging.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - -Native Client Examples - - -

Native Client Examples

-

This page lists all of the examples available in the most recent Native - Client SDK bundle. Each example is designed to teach a few specific Native - Client programming concepts. You will need to setup the build environment - including a path to 'make' which can be found in the 'tools' directory for - Windows, and the variable NACL_SDK_ROOT which points to one of the pepper - bundles found under the SDK install location. Calling make from the examples - directory will build all the projects, while calling make from and individual - example directory will build only that example. -

-
-

Using the Tools

-

The following "hello_world" examples, show the basic outline of a Native -Client application. The make files in each of the examples bellow show a -simple way to build a NaCl application using -GNU Make. -See the link for further information. -

-
-
- Hello World (NEWLIB)
-
The Hello World In C example demonstrates the basic structure of all - Native Client applications. This example loads a Native Client module. The - page tracks the status of the module as it load. On a successful load, the - module will post a message containing the string "Hello World" back to - JavaScript which will display it as an alert. -

Teaching focus: Basic HTML, JavaScript, and module architecture.

-
-
- Hello World (GLIBC)
-
The Hello World (GLIBC) example is identical to the one above, with the - exception that it used the GLIBC toolchain which uses Shared Objects. The use - of Shared Objects means a more complicated manifest file (NMF) which is needed - to allow the application to find the libraries. The NMF is automatically - generated as part of the build process, by scanning the application for - dependencies. -

Teaching focus: Basic HTML, JavaScript, Shared Objects, and module - architecture.

-
-
- Interactive Hello World in C++
-
The Interactive Hello World C++ example demonstrates the basic structure - of all Native Client applications. This example loads a Native Client module - which uses two way interaction with JavaScript whenever a button is clicked. - The NaCl module will respond with the number 42 or the reversed version of the - string in the text box when the appropriate button is clicked. -

Teaching focus: Basic HTML, JavaScript, C++ PPAPI, and module - architecture; Messaging API.

-
- -

Common APIs

-

The following set of examples illustrate various Pepper APIs including -audio, 2D, 3D, input and urls.

-
Sine Wave Synthesizer
-
The Sine Wave Synthesizer example demonstrates playing sound (a sine - wave). Enter the desired frequency and hit play to start, stop to end. The - frequency box will display "Loading, please wait." while the module loads. -

Teaching focus: Audio.

-
-
Input Events
-
The Input Events example demonstrates how to handle events triggered by the user. This example allows a user - to interact with a square representing a module instance. Events are displayed on the screen as the user clicks, scrolls, types, inside or outside - of the square. - -

Teaching focus: Keyboard and mouse input, view change, and focus events.

-
-
Pi Generator
-
The Pi Generator example demonstrates creating a helper thread that estimate pi using the Monte Carlo - method while randomly putting 1,000,000,000 points inside a 2D square that shares two - sides with a quarter circle. - -

Teaching focus: Thread creation, 2D graphics, view change events.

-
-
Tumbler
-
The Tumbler example demonstrates how to create a 3D cube that you can rotate with your mouse while pressing the - left mouse button. This example creates a 3D context and draws to it using - OpenGL ES. The JavaScript implements a virtual trackball interface to - map mouse movements into 3D rotations using simple 3D vector math and - quaternions. - -

Teaching focus: 3D graphics

-
-
Get URL
-
The Get URL example demonstrates fetching an URL and then displaying its contents. - -

Teaching focus: URL loading.

-
- -

Common Concepts

-

The following set of examples illustrate various common concepts such as -showing load progress, using Shared Objects (dynamic libraries), -mulithreading...

-
Shared Object Loading (GLIBC)
-
The Load Progress example demonstrates how to listen for and handle - events that occur while a NaCl module loads. This example listens for - different load event types and dispatches different events to their - respective handler. This example also checks for valid browser version and - shows how to calculate and display loading progress. -

Teaching focus: Using shared objects.

-
-
Load Progress
-
The Load Progress example demonstrates how to listen for and handle events that occur while a - NaCl module loads. This example listens for different load event types and dispatches different events to their respective handler. This example also checks for valid browser - version and shows how to calculate and display loading progress. - -

Teaching focus: Progress event handling.

-
-
Pong
-
The Pong example demonstrates how to create a basic 2D video game and how to store application - information in a local persistent file. This game uses up and - down arrow keyboard input events to move the paddle. - -

Teaching focus: File I/O, 2D graphics, input events.

-
-
Multi-threaded Input Events
-
The Multithreaded Input Events example combines HTML, Javascript, - and C++ (the C++ is compiled to create a .nexe file). - The C++ shows how to handle input events in a multi-threaded application. - The main thread converts input events to non-pepper events and puts them on - a queue. The worker thread pulls them off of the queue, converts them to a - string, and then uses CallOnMainThread so that PostMessage can be send the - result of the worker thread to the browser. -

Teaching focus: Multithreaded event handling.

-
-
Full-screen Tumbler
-
This is a modified version of the Tumbler example above that supports - full-screen display. It is in every way identical to Tumbler in - functionality, except that it adds the ability to switch to/from - full-screen display by pressing the Enter key. -

Teaching focus: Full-screen

-
-
Mouse Locker
-
The Mouselock example demonstrates how to use the MouseLock API to hide - the mouse cursor. Mouse lock is only available in full-screen mode. You can - lock and unlock the mouse while in full-screen mode by pressing the Enter key. - -

Teaching focus: Mouse lock, Full-screen

-
-
- - diff --git a/native_client_sdk/src/scons b/native_client_sdk/src/scons deleted file mode 100755 index 63c19d3..0000000 --- a/native_client_sdk/src/scons +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -readonly SCRIPT_DIR="$(dirname "$0")" -readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd -P)" -readonly SRC_DIR="$(dirname $(dirname ${SCRIPT_DIR_ABS}))" - -# Use the batch file as an entry point if on cygwin. -if [ "x${OSTYPE}" = "xcygwin" ]; then - # Use extended globbing (cygwin should always have it). - shopt -s extglob - # Filter out cygwin python (everything under /usr or /bin, or *cygwin*). - export PATH=${PATH/#\/bin*([^:])/} - export PATH=${PATH//:\/bin*([^:])/} - export PATH=${PATH/#\/usr*([^:])/} - export PATH=${PATH//:\/usr*([^:])/} - export PATH=${PATH/#*([^:])cygwin*([^:])/} - export PATH=${PATH//:*([^:])cygwin*([^:])/} - "${SCRIPT_DIR_ABS}/scons.bat" $* - exit -fi - -readonly BASE_SCRIPT="${SRC_DIR}/third_party/scons-2.0.1/script/scons" - -export NACL_SDK_ROOT="${SCRIPT_DIR_ABS}/../../native_client" - -export SCONS_LIB_DIR="${SRC_DIR}/third_party/scons-2.0.1/engine" -export PYTHONPATH="${SCONS_LIB_DIR}:${SRC_DIR}/native_client/build:${SCRIPT_DIR_ABS}" -# We have to do this because scons overrides PYTHONPATH and does not preserve -# what is provided by the OS. The custom variable name won't be overwritten. -export PYMOX="${SRC_DIR}/third_party/pymox/src" - -"${BASE_SCRIPT}" --file=main.scons $* - diff --git a/native_client_sdk/src/scons.bat b/native_client_sdk/src/scons.bat deleted file mode 100755 index e836ad1..0000000 --- a/native_client_sdk/src/scons.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off - -:: Copyright (c) 2011 The Chromium Authors. All rights reserved. -:: Use of this source code is governed by a BSD-style license that can be -:: found in the LICENSE file. - -setlocal - -set NACL_SDK_ROOT=%~dp0..\..\native_client - -:: Preserve a copy of the PATH (in case we need it later, mainly for cygwin). -set PRESCONS_PATH=%PATH% - -:: Set the PYTHONPATH and SCONS_LIB_DIR so we can import SCons modules -set SCONS_LIB_DIR=%~dp0..\..\third_party\scons-2.0.1\engine -set PYTHONPATH=%~dp0..\..\third_party\scons-2.0.1\engine;%~dp0..\..\native_client\build;%~dp0 - -:: We have to do this because scons overrides PYTHONPATH and does not preserve -:: what is provided by the OS. The custom variable name won't be overwritten. -set PYMOX=%~dp0..\..\third_party\pymox\src - -:: Stop incessant CYGWIN complains about "MS-DOS style path" -set CYGWIN=nodosfilewarning %CYGWIN% - -:: Run the included copy of scons. -python -O -OO "%~dp0..\..\third_party\scons-2.0.1\script\scons" --file=main.scons %* - -:end -- cgit v1.1