forked from TryGhost/node-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 0
Building on Windows
kkaefer edited this page Nov 19, 2011
·
2 revisions
NOTE: Requires Visual Studio 2010. I didn't test with the Express version, but it should do.
NOTE 2: Windows support is currently only in the windows branch
- Download node (either the tarball or via a git clone; THE INSTALLER WON'T DO!)
- Run
vcbuild.batfrom the command line. This should be completely automated and you'll end up with a working node.exe in the Debug folder - Add the absolute path to the
Debugfolder inside your node checkout to%PATH%. To do this, right-clicking on "Computer" in the right side of the task bar, then hit "Properties". In that dialog, hit "Advanced system settings" in the left column and click on the "Environment Variables..." button. In the lower last, look forPath, and using the "Edit..." button, add the path separated with a semicolon. - Log out and in.
- In the
depsfolder of yournode-sqlite3folder, unzipsqlite-autoconf-3070800.tar.gz(e.g. using 7-Zip) and rename the extracted folder tosqlite3. Directly in that folder, you should seesqlite3.candsqlite3.h.
- Create a copy of
node_extension.SAMPLE.propsand name itnode_extension.props. - Open the
node-sqlite3.slnsolution file in Visual Studio 2010 - Go to the "Property Manager" pane (if you can't see it, it's in the View menu), right-click on the "node_extension" property sheet, and open its properties. In C/C++ → General, change all three paths in "Additional Include Directories" to match those on your system. Do the same in Linker → General and change the path in "Additional Library Directories". Close the window with "OK".
- Now, click Build → Build Solution.