Author: [email protected]
Date: Tue Mar 31 04:45:20 2009
New Revision: 1649

Modified:
    branches/bleeding_edge/src/SConscript
    branches/bleeding_edge/src/d8-posix.cc   (contents, props changed)
    branches/bleeding_edge/src/d8-windows.cc   (contents, props changed)
    branches/bleeding_edge/src/d8.cc
    branches/bleeding_edge/tools/visual_studio/d8.vcproj

Log:
Fix developer shell build on Windows.

Fixed the OS check in the SCons build. Moved SetEnvironment to platform  
file as Windows does not have setenv. Added the d8-windows.cc to the Visual  
Studio project.
Review URL: http://codereview.chromium.org/57050

Modified: branches/bleeding_edge/src/SConscript
==============================================================================
--- branches/bleeding_edge/src/SConscript       (original)
+++ branches/bleeding_edge/src/SConscript       Tue Mar 31 04:45:20 2009
@@ -95,7 +95,7 @@
    'os:freebsd': [
      'd8-posix.cc'
    ],
-  'os:windows': [
+  'os:win32': [
      'd8-windows.cc'
    ],
    'os:nullos': [

Modified: branches/bleeding_edge/src/d8-posix.cc
==============================================================================
--- branches/bleeding_edge/src/d8-posix.cc      (original)
+++ branches/bleeding_edge/src/d8-posix.cc      Tue Mar 31 04:45:20 2009
@@ -538,4 +538,26 @@
  }


+Handle<Value> Shell::SetEnvironment(const Arguments& args) {
+  if (args.Length() != 2) {
+    const char* message = "setenv() takes two arguments";
+    return ThrowException(String::New(message));
+  }
+  String::Utf8Value var(args[0]);
+  String::Utf8Value value(args[1]);
+  if (*var == NULL) {
+    const char* message =
+        "os.setenv(): String conversion of variable name failed.";
+    return ThrowException(String::New(message));
+  }
+  if (*value == NULL) {
+    const char* message =
+        "os.setenv(): String conversion of variable contents failed.";
+    return ThrowException(String::New(message));
+  }
+  setenv(*var, *value, 1);
+  return v8::Undefined();
+}
+
+
  }  // namespace v8

Modified: branches/bleeding_edge/src/d8-windows.cc
==============================================================================
--- branches/bleeding_edge/src/d8-windows.cc    (original)
+++ branches/bleeding_edge/src/d8-windows.cc    Tue Mar 31 04:45:20 2009
@@ -49,4 +49,11 @@
  }


+Handle<Value> Shell::SetEnvironment(const Arguments& args) {
+  Handle<String> error_message =
+      String::New("setenv() is not yet supported on your OS");
+  return ThrowException(error_message);
+}
+
+
  }  // namespace v8

Modified: branches/bleeding_edge/src/d8.cc
==============================================================================
--- branches/bleeding_edge/src/d8.cc    (original)
+++ branches/bleeding_edge/src/d8.cc    Tue Mar 31 04:45:20 2009
@@ -163,28 +163,6 @@
  }


-Handle<Value> Shell::SetEnvironment(const Arguments& args) {
-  if (args.Length() != 2) {
-    const char* message = "setenv() takes two arguments";
-    return ThrowException(String::New(message));
-  }
-  String::Utf8Value var(args[0]);
-  String::Utf8Value value(args[1]);
-  if (*var == NULL) {
-    const char* message =
-        "os.setenv(): String conversion of variable name failed.";
-    return ThrowException(String::New(message));
-  }
-  if (*value == NULL) {
-    const char* message =
-        "os.setenv(): String conversion of variable contents failed.";
-    return ThrowException(String::New(message));
-  }
-  setenv(*var, *value, 1);
-  return v8::Undefined();
-}
-
-
  Handle<Value> Shell::Load(const Arguments& args) {
    for (int i = 0; i < args.Length(); i++) {
      HandleScope handle_scope;

Modified: branches/bleeding_edge/tools/visual_studio/d8.vcproj
==============================================================================
--- branches/bleeding_edge/tools/visual_studio/d8.vcproj        (original)
+++ branches/bleeding_edge/tools/visual_studio/d8.vcproj        Tue Mar 31  
04:45:20 2009
@@ -158,6 +158,10 @@
                        >
                </File>
                <File
+                       RelativePath="..\..\src\d8-windows.cc"
+                       >
+               </File>
+               <File
                        RelativePath="..\..\src\d8.js"
                        >
                                <FileConfiguration

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to