Skip to content

Commit 4cba429

Browse files
committed
fixed a couple things with win32 build
1 parent 07e1b07 commit 4cba429

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ $ npm install java
1212
## Installation Windows
1313

1414
* [Install node.js from source](https://github.com/joyent/node/wiki/Installation)
15-
* The directory where jvm.dll exists must be in the PATH.
15+
* The directory where jvm.dll exists must be in the PATH. (e.g. C:\Program Files (x86)\Java\jdk1.6.0_18\jre\bin\client)
1616

1717
```bash
18-
$ set NODE_ROOT=C:\Program Files (x86)\nodejs
19-
$ vcbuild.bat
18+
$ set NODE_PATH=C:\dev\node-v0.6.8-0
19+
$ npm install java
2020
```
2121

2222
## Installation Mac

build.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ function Builder() {
8585
this.linker = "g++";
8686
this.objectFiles = [];
8787

88+
if(process.platform == 'win32') {
89+
if(!process.env["VCINSTALLDIR"] && !process.env["VS100COMNTOOLS"]) {
90+
this.fail("You appear to not be running in a Visual Studio prompt.");
91+
}
92+
}
93+
8894
if(process.platform == 'win32') {
8995
this.cppCompiler = "cl.exe";
9096
this.linker = "link.exe";
@@ -426,7 +432,10 @@ Builder.prototype.fail = function(message) {
426432
}
427433

428434
Builder.prototype.trimQuotes = function(str) {
429-
return str.replace(/^"/, '').replace(/"$/, '');
435+
if(str) {
436+
str = str.replace(/^"/, '').replace(/"$/, '');
437+
}
438+
return str;
430439
}
431440

432441
build(new Builder());

0 commit comments

Comments
 (0)