Gary Oberbrunner  committed 80dad87

Added comment (minor)

  • Participants
  • Parent commits ab98379

Comments (0)

Files changed (1)

File src/engine/SCons/Tool/MSCommon/

 def is_win64():
     """Return true if running on windows 64 bits.
     Works whether python itself runs in 64 bits or 32 bits."""
     # Unfortunately, python does not provide a useful way to determine
     # if the underlying Windows OS is 32-bit or 64-bit.  Worse, whether
     # the Python itself is 32-bit or 64-bit affects what it returns,
-    # so nothing in sys.* or os.* help.  
+    # so nothing in sys.* or os.* help.
     # Apparently the best solution is to use env vars that Windows
     # sets.  If PROCESSOR_ARCHITECTURE is not x86, then the python
             if k in os.environ and (force or not k in normenv):
                 normenv[k] = os.environ[k].encode('mbcs')
+    # This shouldn't be necessary, since the default environment should include system32,
+    # but keep this here to be safe, since it's needed to find reg.exe which the MSVC
+    # bat scripts use.
     sys32_dir = os.path.join(os.environ.get("SystemRoot", os.environ.get("windir",r"C:\Windows\system32")),"System32")
     if sys32_dir not in normenv['PATH']:
         normenv['PATH'] = normenv['PATH'] + os.pathsep + sys32_dir
     debug("PATH: %s"%normenv['PATH'])
     return normenv
 def get_output(vcbat, args = None, env = None):
     """Parse the output of given bat file, with given args."""
     if env is None:
         # Create a blank environment, for use in launching the tools
         env = SCons.Environment.Environment(tools=[])
     # and won't work under Pythons not built with threading.
     stdout =
     stderr =
     # Extra debug logic, uncomment if necessar
 #     debug('get_output():stdout:%s'%stdout)
 #     debug('get_output():stderr:%s'%stderr)
     if stderr:
         # TODO: find something better to do with stderr;
         # this at least prevents errors from getting swallowed.
                 p = p.encode('mbcs')
                 # XXX: For some reason, VC98 .bat file adds "" around the PATH
                 # values, and it screws up the environment later, so we strip
-                # it. 
+                # it.
                 p = p.strip('"')