diff --git a/uv.gyp b/uv.gyp index 5087bd183d..176b5b32bf 100644 --- a/uv.gyp +++ b/uv.gyp @@ -353,6 +353,51 @@ '_XOPEN_SOURCE=500', ], }], + ['OS=="win" and library=="shared_library"', { + 'sources': [ + 'include/uv-private/uv-win.h', + 'src/uv-common.c', + 'src/fs-poll.c', + 'src/inet.c', + 'src/win/async.c', + 'src/win/atomicops-inl.h', + 'src/win/core.c', + 'src/win/dl.c', + 'src/win/error.c', + 'src/win/fs.c', + 'src/win/fs-event.c', + 'src/win/getaddrinfo.c', + 'src/win/handle.c', + 'src/win/handle-inl.h', + 'src/win/internal.h', + 'src/win/loop-watcher.c', + 'src/win/pipe.c', + 'src/win/thread.c', + 'src/win/poll.c', + 'src/win/process.c', + 'src/win/process-stdio.c', + 'src/win/req.c', + 'src/win/req-inl.h', + 'src/win/signal.c', + 'src/win/stream.c', + 'src/win/stream-inl.h', + 'src/win/tcp.c', + 'src/win/tty.c', + 'src/win/threadpool.c', + 'src/win/timer.c', + 'src/win/udp.c', + 'src/win/util.c', + 'src/win/winapi.c', + 'src/win/winapi.h', + 'src/win/winsock.c', + 'src/win/winsock.h', + ], + 'include_dirs': [ + 'include', + 'include/uv-private', + 'src/', + ], + }], ], 'msvs-settings': { 'VCLinkerTool': { diff --git a/vcbuild.bat b/vcbuild.bat index 678a910714..f167cfd528 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -24,6 +24,12 @@ set library=static_library :next-arg if "%1"=="" goto args-done + +if "%1"=="help" goto help +if "%1"=="/?" goto help +if "%1"=="-h" goto help +if "%1"=="--help" goto help + if /i "%1"=="debug" set config=Debug&goto arg-ok if /i "%1"=="release" set config=Release&goto arg-ok if /i "%1"=="test" set run=run-tests.exe&goto arg-ok @@ -41,21 +47,42 @@ shift goto next-arg :args-done +@rem Find a Visual Studio version +@rem If multiple versions are installed on the system the lookup order is: 2010, 2008, 2012 + +@rem You can force a specific Visual Studio version uncommenting the following line +@rem and changing the version to the one to force +@rem goto vc-set-2012 + +:vc-set-2010 @rem Look for Visual Studio 2010 if not defined VS100COMNTOOLS goto vc-set-2008 if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2008 call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% +echo Visul Studio 2010 found set GYP_MSVS_VERSION=2010 goto select-target :vc-set-2008 @rem Look for Visual Studio 2008 -if not defined VS90COMNTOOLS goto vc-set-notfound -if not exist "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-notfound +if not defined VS90COMNTOOLS goto vc-set-2012 +if not exist "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-2012 call "%VS90COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% +echo Visul Studio 2008 found set GYP_MSVS_VERSION=2008 goto select-target +:vc-set-2012 +@rem Look for Visual Studio 2012 +if not defined VS110COMNTOOLS goto vc-set-notfound +if not exist "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vc-set-notfound +call "%VS110COMNTOOLS%\..\..\vc\vcvarsall.bat" %vs_toolset% +@rem Using Visual Studio 2010 project format until the gyp version linked to +@rem the project will support Visual Studio 2012 +echo Visul Studio 2012 found +set GYP_MSVS_VERSION=2012 +goto select-target + :vc-set-notfound echo Warning: Visual Studio not found @@ -71,8 +98,9 @@ if defined noprojgen goto msbuild @rem Generate the VS project. if exist build\gyp goto have_gyp -echo svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp -svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp +@rem used to be 983 +echo svn co http://gyp.googlecode.com/svn/trunk@1556 build/gyp +svn co http://gyp.googlecode.com/svn/trunk@1556 build/gyp if errorlevel 1 goto gyp_install_failed goto have_gyp @@ -117,11 +145,23 @@ echo Failed to create vc project files. goto exit :help -echo vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [x86/x64] [static/shared] +echo Usage: vcbuild [option(s)] +echo. +echo Available options: +echo [debug/release] +echo [test/bench] +echo [clean] +echo [noprojgen] +echo [nobuild] +echo [x86/x64] +echo [static/shared] +echo. echo Examples: -echo vcbuild.bat : builds debug build -echo vcbuild.bat test : builds debug build and runs tests -echo vcbuild.bat release bench: builds release build and runs benchmarks +echo vcbuild : builds static debug build +echo vcbuild test : builds static debug build and runs tests +echo vcbuild release bench : builds static release build and runs benchmarks +echo vcbuild release shared : builds dll release build + goto exit :exit