win32.py (scons-4.2.0) | : | win32.py (SCons-4.3.0) | ||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
"""Platform-specific initialization for Win32 systems. | """Platform-specific initialization for Win32 systems. | |||
There normally shouldn't be any need to import this module directly. It | There normally shouldn't be any need to import this module directly. It | |||
will usually be imported through the generic SCons.Platform.Platform() | will usually be imported through the generic SCons.Platform.Platform() | |||
selection method. | selection method. | |||
""" | """ | |||
import os | import os | |||
import os.path | import os.path | |||
import platform | ||||
import sys | import sys | |||
import tempfile | import tempfile | |||
from SCons.Platform.posix import exitvalmap | from SCons.Platform.posix import exitvalmap | |||
from SCons.Platform import TempFileMunge | from SCons.Platform import TempFileMunge | |||
from SCons.Platform.virtualenv import ImportVirtualenv | from SCons.Platform.virtualenv import ImportVirtualenv | |||
from SCons.Platform.virtualenv import ignore_virtualenv, enable_virtualenv | from SCons.Platform.virtualenv import ignore_virtualenv, enable_virtualenv | |||
import SCons.Util | import SCons.Util | |||
CHOCO_DEFAULT_PATH = [ | CHOCO_DEFAULT_PATH = [ | |||
skipping to change at line 311 | skipping to change at line 312 | |||
"""Returns the definition for the specified architecture string. | """Returns the definition for the specified architecture string. | |||
If no string is specified, the system default is returned (as defined | If no string is specified, the system default is returned (as defined | |||
by the PROCESSOR_ARCHITEW6432 or PROCESSOR_ARCHITECTURE environment | by the PROCESSOR_ARCHITEW6432 or PROCESSOR_ARCHITECTURE environment | |||
variables). | variables). | |||
""" | """ | |||
if arch is None: | if arch is None: | |||
arch = os.environ.get('PROCESSOR_ARCHITEW6432') | arch = os.environ.get('PROCESSOR_ARCHITEW6432') | |||
if not arch: | if not arch: | |||
arch = os.environ.get('PROCESSOR_ARCHITECTURE') | arch = os.environ.get('PROCESSOR_ARCHITECTURE') | |||
return SupportedArchitectureMap.get(arch, ArchDefinition('', [''])) | return SupportedArchitectureMap.get(arch, ArchDefinition(platform.machine(), [platform.machine()])) | |||
def generate(env): | def generate(env): | |||
# Attempt to find cmd.exe (for WinNT/2k/XP) or | # Attempt to find cmd.exe (for WinNT/2k/XP) or | |||
# command.com for Win9x | # command.com for Win9x | |||
cmd_interp = '' | cmd_interp = '' | |||
# First see if we can look in the registry... | # First see if we can look in the registry... | |||
if SCons.Util.can_read_reg: | if SCons.Util.can_read_reg: | |||
try: | try: | |||
# Look for Windows NT system root | # Look for Windows NT system root | |||
k=SCons.Util.RegOpenKeyEx(SCons.Util.hkey_mod.HKEY_LOCAL_MACHINE, | k=SCons.Util.RegOpenKeyEx(SCons.Util.hkey_mod.HKEY_LOCAL_MACHINE, | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added |