File tree Expand file tree Collapse file tree 4 files changed +41
-7
lines changed
Expand file tree Collapse file tree 4 files changed +41
-7
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ http://www.nodegit.org/nodegit/
2020
2121## Building and Installing. ##
2222
23- Dependencies :
23+ Minimum dependencies :
2424
2525* [ Python 2] ( https://www.python.org/ )
2626* [ CMake >= 2.8] ( http://www.cmake.org/ )
@@ -49,18 +49,46 @@ correctly.
4949
5050### Installing dependencies: ###
5151
52- Using Brew on OS X:
52+ #### OS X ####
53+
54+ Using Brew:
5355
5456``` bash
5557brew install cmake libzip
5658```
5759
58- Using APT on Ubuntu:
60+ #### Linux ####
61+
62+ Using APT in Ubuntu:
5963
6064``` bash
6165sudo apt-get install cmake libzip-dev build-essential
6266```
6367
68+ Using Pacman in Arch Linux:
69+
70+ ``` bash
71+ sudo pacman -S cmake libzip base-devel
72+ ```
73+
74+ #### Windows ####
75+
76+ For Windows users, you will have to install Visual Studio Express. You may
77+ have to add a build flag to the installation process to successfully install.
78+ Try first without, if the build fails, try again with the flag.
79+
80+ * Allegedly the order in which you install Visual Studio could trigger this
81+ error.*
82+
83+ - [ Download and install CMake] ( http://www.cmake.org/cmake/resources/software.html ) .
84+ - [ Download and install Python] ( https://www.python.org/download/windows )
85+ - [ Download and install VS Express] ( http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop )
86+
87+ ``` bash
88+ npm install nodegit --msvs_version=2013
89+ # Or whatever version you've installed.
90+ ```
91+
6492## API examples. ##
6593
6694### Cloning a repository and reading a file: ###
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ install:
2626 - cmd : SET PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%
2727 - cmd : SET PATH=c:\python27;%PATH%
2828 - cmd : npm install -g node-gyp
29- - npm install
29+ - npm install --msvs_version=2013
3030
3131test_script :
3232 - node --version
Original file line number Diff line number Diff line change 11// Core Node.js modules.
2+ var os = require ( 'os' ) ;
23var fs = require ( 'fs' ) ;
34var path = require ( 'path' ) ;
45var zlib = require ( 'zlib' ) ;
@@ -135,6 +136,11 @@ var dependencies = Q.allSettled([
135136 '-DCMAKE_C_FLAGS=-fPIC' ,
136137 '-DCMAKE_BUILD_TYPE=RelWithDebInfo'
137138 ] ) ;
139+
140+ // If the architecture is 64bit, have to change the generator.
141+ if ( os . arch ( ) === 'x64' ) {
142+ flags . push ( '-G "Visual Studio 12 Win64"' ) ;
143+ }
138144 }
139145
140146 return Q . nfcall ( exec , 'cmake .. ' + flags . join ( ' ' ) , {
@@ -169,7 +175,8 @@ var dependencies = Q.allSettled([
169175 return Q . nfcall ( exec , systemPath ( [
170176 '.' , 'node_modules' , '.bin' , 'node-gyp build'
171177 ] ) , {
172- cwd : '.'
178+ cwd : '.' ,
179+ maxBuffer : Number . MAX_VALUE
173180 } ) ;
174181} )
175182
Original file line number Diff line number Diff line change 3232 },
3333 "dependencies" : {
3434 "request" : " ~2.25.0" ,
35- "node-gyp" : " ~0.10.9 " ,
35+ "node-gyp" : " ~0.13.0 " ,
3636 "tar" : " ~0.1.18" ,
3737 "which" : " ~1.0.5" ,
3838 "q" : " ~0.9.6" ,
39- "node-gyp" : " ~0.8.2" ,
4039 "fs-extra" : " 0.6.0" ,
4140 "nan" : " 0.8.0" ,
4241 "rimraf" : " ~2.2.6"
You can’t perform that action at this time.
0 commit comments