/[ascend]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 828 by johnpye, Thu Aug 17 16:30:24 2006 UTC revision 829 by johnpye, Wed Aug 23 03:23:41 2006 UTC
# Line 1298  if env.has_key('HAVE_GCCVISIBILITY'): Line 1298  if env.has_key('HAVE_GCCVISIBILITY'):
1298  env.Append(SUBST_DICT=subst_dict)  env.Append(SUBST_DICT=subst_dict)
1299    
1300  #------------------------------------------------------  #------------------------------------------------------
1301    # RECIPE: Fix up long command-line bug on Win2k
1302    
1303    # Currently this is broken, awaiting help from the SCons users list
1304    
1305    if 0 and env['PLATFORM'] == 'win32':
1306        import win32file
1307        import win32event
1308        import win32process
1309        import win32security
1310        import string
1311    
1312        def my_spawn(sh, escape, cmd, args, spawnenv):
1313            for var in spawnenv:
1314                spawnenv[var] = spawnenv[var].encode('ascii', 'replace')
1315    
1316            sAttrs = win32security.SECURITY_ATTRIBUTES()
1317            StartupInfo = win32process.STARTUPINFO()
1318            newargs = string.join(map(escape, args[1:]), ' ')
1319            cmdline = cmd + " " + newargs
1320    
1321            # check for any special operating system commands
1322            if cmd == 'del':
1323                for arg in args[1:]:
1324                    win32file.DeleteFile(arg)
1325                exit_code = 0
1326            else:
1327                # otherwise execute the command.
1328                hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo)
1329                win32event.WaitForSingleObject(hProcess, win32event.INFINITE)
1330                exit_code = win32process.GetExitCodeProcess(hProcess)
1331                win32file.CloseHandle(hProcess);
1332                win32file.CloseHandle(hThread);
1333            return exit_code
1334    
1335        env['SPAWN'] = my_spawn
1336    
1337    #------------------------------------------------------
1338  # RECIPE: SWIG scanner  # RECIPE: SWIG scanner
1339    
1340  import SCons.Script  import SCons.Script

Legend:
Removed from v.828  
changed lines
  Added in v.829

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22