diff options
author | Bert Belder <bertbelder@gmail.com> | 2010-11-25 04:14:53 +0300 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2010-12-21 01:51:09 +0300 |
commit | 9f9332963afeb21914812c25dca49973a99f377c (patch) | |
tree | 6c536d4037e42b32accaaeabdca911a3ce41d21a /wscript | |
parent | 9a9edb0e8e6120b3b8a3868d0c44577111dd1857 (diff) |
wscript: use "node.exe" and avoid symlinks on windows
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -720,10 +720,20 @@ def shutdown(): print "WARNING: Platform not fully supported. Using src/platform_none.cc" elif not Options.commands['clean']: - if os.path.exists('build/default/node') and not os.path.exists('node'): - os.symlink('build/default/node', 'node') - if os.path.exists('build/debug/node_g') and not os.path.exists('node_g'): - os.symlink('build/debug/node_g', 'node_g') + if sys.platform.startswith("win32"): + if os.path.exists('build/default/node.exe') and not os.path.exists('node.exe'): + os.system('cp build/default/node.exe .') + if os.path.exists('build/debug/node_g.exe') and not os.path.exists('node_g.exe'): + os.system('cp build/debug/node_g.exe .') + else: + if os.path.exists('build/default/node') and not os.path.exists('node'): + os.symlink('build/default/node', 'node') + if os.path.exists('build/debug/node_g') and not os.path.exists('node_g'): + os.symlink('build/debug/node_g', 'node_g') else: - if os.path.exists('node'): os.unlink('node') - if os.path.exists('node_g'): os.unlink('node_g') + if sys.platform.startswith("win32"): + if os.path.exists('node.exe'): os.unlink('node.exe') + if os.path.exists('node_g.exe'): os.unlink('node_g.exe') + else: + if os.path.exists('node'): os.unlink('node') + if os.path.exists('node_g'): os.unlink('node_g') |