Skip to content

Commit 12fb385

Browse files
committed
Merge pull request nwjs#475 from owenc4a4/tools
fix build native node cause error on cygwin
2 parents 3f0701b + 5f8246a commit 12fb385

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tools/build_native_modules.py

100644100755
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python
12
import os, re, sys
23
import subprocess
34

@@ -19,10 +20,9 @@
1920
'bin',
2021
'nw-gyp.js'))
2122

22-
nw_gyp_script = os.path.abspath(nw_gyp_script)
23+
nw_gyp_script = os.path.abspath(nw_gyp_script)
2324
cur_dir = os.getcwd()
2425

25-
2626
#get node-webkit target version
2727
nw_readme_md = os.path.join(os.path.dirname(__file__), '..', 'README.md')
2828

@@ -34,7 +34,11 @@
3434
break
3535

3636

37-
exec_args = ['node', nw_gyp_script, 'configure', '--target=%s'%(target), 'build']
37+
exec_args = ['node',
38+
nw_gyp_script,
39+
'configure',
40+
'--target=%s'%(target),
41+
'build']
3842

3943
win = sys.platform in ('win32', 'cygwin')
4044

@@ -49,7 +53,7 @@
4953

5054
native_dir = os.path.join(native_root, dir)
5155
os.chdir(native_dir)
52-
56+
exec_args[1] = os.path.relpath(nw_gyp_script, os.getcwd())
5357
subprocess.call(exec_args)
5458
#os.execl(node_gyp_script, '', 'build')
5559

tools/package_binaries.py

100644100755
File mode changed.

0 commit comments

Comments
 (0)