diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..d0b262aca --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,107 @@ +cmake_minimum_required (VERSION 2.6) +project (j2v8) + +# adding cmake directory for includes +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) + +include (BuildUtils) +include (NodeJsUtils) +include (Policies) + +#----------------------------------------------------------------------- +# CMAKE OPTIONS +#----------------------------------------------------------------------- +option(J2V8_NODE_COMPATIBLE "Build the J2V8 native bridge with Node.js support enabled" ON) +option(J2V8_BUILD_ONLY_DEBUG_RELEASE "Generate only Debug and Release configurations (exclude RelWithDebInfo and MinSizeRel)" ON) + +# set up the module path +set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + +# remove the MinSizeRel and RelWithDebInfo configurations +if (J2V8_BUILD_ONLY_DEBUG_RELEASE) +#{ + set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "limited configs" FORCE) +#} +endif () + +#----------------------------------------------------------------------- +# DEPENDENCY SETTINGS & DISCOVERY +#----------------------------------------------------------------------- + +# look for dependencies +find_package(Java) + +# overridable settings +set (J2V8_JDK_DIR ${Java_ROOT} CACHE STRING "Path to the Java JDK dependency") +set (J2V8_NODEJS_DIR "./node" CACHE STRING "Path to the Node.js dependency") + +# get lists of the required Node.js link libraries +get_njs_libs (${J2V8_NODEJS_DIR} "Debug") +get_njs_libs (${J2V8_NODEJS_DIR} "Release") + +#----------------------------------------------------------------------- +# INCLUDE DIRECTORIES & SOURCE FILES +#----------------------------------------------------------------------- + +# project include directories +set (include_dirs + ${J2V8_JDK_DIR}/include + ${J2V8_JDK_DIR}/include/win32 + ${J2V8_NODEJS_DIR} + ${J2V8_NODEJS_DIR}/src + ${J2V8_NODEJS_DIR}/deps/v8 + ${J2V8_NODEJS_DIR}/deps/v8/include +) + +# project source files +set (src_files + jni/com_eclipsesource_v8_V8Impl.cpp + jni/com_eclipsesource_v8_V8Impl.h +) + +source_group("" FILES ${src_files}) + +#----------------------------------------------------------------------- +# BUILD SETTINGS & COMPILATION +#----------------------------------------------------------------------- + +link_static_crt() + +# create the j2v8 library +add_library (j2v8 SHARED ${src_files}) + +# enable Node.js if requested by the set options +if (J2V8_NODE_COMPATIBLE) +#{ + set_property (TARGET j2v8 PROPERTY COMPILE_DEFINITIONS ${COMPILE_DEFINITIONS} NODE_COMPATIBLE=1) +#} +endif () + +# build output directory +set (LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib) + +# set the include directories +include_directories (${include_dirs}) + +# link the necessary libraries +target_link_libraries (j2v8 + debug "${njs_Debug_libs}" + optimized "${njs_Release_libs}" +) + +#----------------------------------------------------------------------- +# OUTPUT SETTINGS & POST-BUILD +#----------------------------------------------------------------------- + +if (CMAKE_CL_64) + set (ARCH_SUFFIX "_64") +endif () + +set_target_properties (j2v8 PROPERTIES OUTPUT_NAME "${PROJECT_NAME}_win32_x86${ARCH_SUFFIX}") + +# copy native lib to Java project resources directory +add_custom_command (TARGET j2v8 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ + ${CMAKE_SOURCE_DIR}/src/main/resources/lib$ +) diff --git a/cmake/BuildUtils.cmake b/cmake/BuildUtils.cmake new file mode 100644 index 000000000..b65180262 --- /dev/null +++ b/cmake/BuildUtils.cmake @@ -0,0 +1,11 @@ + +macro (link_static_crt) + foreach(flag_var + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) + + if(${flag_var} MATCHES "/MD") + string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + endif(${flag_var} MATCHES "/MD") + endforeach(flag_var) +endmacro (link_static_crt) diff --git a/cmake/FindJava.cmake b/cmake/FindJava.cmake new file mode 100644 index 000000000..1451fd5f1 --- /dev/null +++ b/cmake/FindJava.cmake @@ -0,0 +1,79 @@ + +SET(_JAVA_HINTS $ENV{JAVA_HOME}/bin) + +SET(_JAVA_PATHS + /usr/lib/java/bin + /usr/share/java/bin + /usr/local/java/bin + /usr/local/java/share/bin + /usr/java/j2sdk1.4.2_04 + /usr/lib/j2sdk1.4-sun/bin + /usr/java/j2sdk1.4.2_09/bin + /usr/lib/j2sdk1.5-sun/bin + /opt/sun-jdk-1.5.0.04/bin + ) + +FIND_PROGRAM(JAVA_EXECUTABLE + NAMES java + HINTS ${_JAVA_HINTS} + PATHS ${_JAVA_PATHS} +) + +IF(JAVA_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${JAVA_EXECUTABLE} -version + RESULT_VARIABLE res + OUTPUT_VARIABLE var + ERROR_VARIABLE var + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + + IF( res ) + IF(${Java_FIND_REQUIRED}) + MESSAGE( FATAL_ERROR "Error executing java -version" ) + ELSE() + MESSAGE( STATUS "Warning, could not run java --version") + ENDIF() + + ELSE( res ) + IF(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+[oem-]*\".*") + STRING( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+)[oem-]*\".*" + "\\1" Java_VERSION_STRING "${var}" ) + ELSEIF(var MATCHES "java full version \"kaffe-[0-9]+\\.[0-9]+\\.[0-9_]+\".*") + STRING( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*" + "\\1" Java_VERSION_STRING "${var}" ) + ELSE() + IF(NOT Java_FIND_QUIETLY) + message(WARNING "regex not supported: ${var}. Please report") + ENDIF(NOT Java_FIND_QUIETLY) + ENDIF() + STRING( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" ) + STRING( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" ) + STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_PATCH "${Java_VERSION_STRING}" ) + STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+\\_?\\.?([0-9]*)$" "\\1" Java_VERSION_TWEAK "${Java_VERSION_STRING}" ) + if( Java_VERSION_TWEAK STREQUAL "" ) + set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}) + else( ) + set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK}) + endif( ) + + IF(NOT Java_FIND_QUIETLY) + MESSAGE( STATUS "Java version ${Java_VERSION} found!" ) + ENDIF(NOT Java_FIND_QUIETLY) + + ENDIF( res ) +ENDIF(JAVA_EXECUTABLE) + +UNSET(JAVA_EXECUTABLE CACHE) + +if( Java_VERSION_MINOR LESS 6 ) + message("-- WARNING: Your system is running Java ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}. Java JDK 1.6+ is required for compiling ${PROGNAME}.") + set(Java_OLD_VERSION TRUE) +else() + set(Java_OLD_VERSION FALSE) +endif() + +if(!$ENV{JAVA_HOME}) + message("Cannot find JAVA_HOME. Please setup the path to the base of the Java JDK to JAVA_HOME before compiling.") +endif() + +set(Java_ROOT "$ENV{JAVA_HOME}") diff --git a/cmake/NodeJsUtils.cmake b/cmake/NodeJsUtils.cmake new file mode 100644 index 000000000..609dadc4b --- /dev/null +++ b/cmake/NodeJsUtils.cmake @@ -0,0 +1,41 @@ + +function (get_njs_libs nodejs_dir config_name) +#{ + # base directories for Node.js link libraries + set (njs_build ${nodejs_dir}/build/${config_name}) + set (njs_build_lib ${nodejs_dir}/build/${config_name}/lib) + + set (njs_extra ${nodejs_dir}/${config_name}) + set (njs_extra_lib ${nodejs_dir}/${config_name}/lib) + + # project link libraries + set (njs_libs + # nodejs/build/$Config/lib + ${njs_build_lib}/v8_base_0.lib + ${njs_build_lib}/v8_base_1.lib + ${njs_build_lib}/v8_base_2.lib + ${njs_build_lib}/v8_base_3.lib + ${njs_build_lib}/v8_libbase.lib + ${njs_build_lib}/v8_libplatform.lib + ${njs_build_lib}/v8_nosnapshot.lib + ${njs_build_lib}/v8_snapshot.lib + + # nodejs/build/$Config + ${njs_build}/mksnapshot.lib + + # nodejs/$Config/lib + ${njs_extra_lib}/cares.lib + ${njs_extra_lib}/gtest.lib + ${njs_extra_lib}/http_parser.lib + ${njs_extra_lib}/libuv.lib + ${njs_extra_lib}/node.lib + ${njs_extra_lib}/openssl.lib + ${njs_extra_lib}/zlib.lib + + # nodejs/$Config + ${njs_extra}/cctest.lib + ) + + set (njs_${config_name}_libs ${njs_libs} PARENT_SCOPE) +#} +endfunction (get_njs_libs) diff --git a/cmake/Policies.cmake b/cmake/Policies.cmake new file mode 100644 index 000000000..4cceb6f69 --- /dev/null +++ b/cmake/Policies.cmake @@ -0,0 +1,14 @@ + +if (COMMAND cmake_policy) +#{ + # NEW = Libraries linked by full-path must have a valid library file name. + if (POLICY CMP0008) + cmake_policy (SET CMP0008 NEW) + endif (POLICY CMP0008) + + # NEW = Included scripts do automatic cmake_policy PUSH and POP. + if (POLICY CMP0011) + cmake_policy (SET CMP0011 NEW) + endif(POLICY CMP0011) +#} +endif (COMMAND cmake_policy) diff --git a/j2v8.sdf b/j2v8.sdf deleted file mode 100644 index d0823eff1..000000000 Binary files a/j2v8.sdf and /dev/null differ diff --git a/j2v8.sln b/j2v8.sln deleted file mode 100644 index 2d6fe3de2..000000000 --- a/j2v8.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25029.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libj2v8", "jni\j2v8.vcxproj", "{728E0E59-F8CC-4E24-88AC-BB091F33F3DA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Debug|Win32.ActiveCfg = Debug|Win32 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Debug|Win32.Build.0 = Debug|Win32 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Debug|x64.ActiveCfg = Debug|x64 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Debug|x64.Build.0 = Debug|x64 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Release|Win32.ActiveCfg = Release|Win32 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Release|Win32.Build.0 = Release|Win32 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Release|x64.ActiveCfg = Release|x64 - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/j2v8.v12.suo b/j2v8.v12.suo deleted file mode 100644 index 7b4c12f82..000000000 Binary files a/j2v8.v12.suo and /dev/null differ diff --git a/jni/j2v8.filters b/jni/j2v8.filters deleted file mode 100644 index 9238f7cb5..000000000 --- a/jni/j2v8.filters +++ /dev/null @@ -1,33 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/jni/j2v8.sdf b/jni/j2v8.sdf deleted file mode 100644 index e5a273439..000000000 Binary files a/jni/j2v8.sdf and /dev/null differ diff --git a/jni/j2v8.user b/jni/j2v8.user deleted file mode 100644 index 2a22e69ac..000000000 --- a/jni/j2v8.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/jni/j2v8.v12.suo b/jni/j2v8.v12.suo deleted file mode 100644 index b5d87f4c7..000000000 Binary files a/jni/j2v8.v12.suo and /dev/null differ diff --git a/jni/j2v8.vcxproj b/jni/j2v8.vcxproj deleted file mode 100644 index 48b2299f3..000000000 --- a/jni/j2v8.vcxproj +++ /dev/null @@ -1,192 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {728E0E59-F8CC-4E24-88AC-BB091F33F3DA} - Win32Proj - j2v8 - libj2v8 - 8.1 - - - - DynamicLibrary - true - v140 - Unicode - false - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - false - Unicode - - - StaticLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - C:\Users\Ian Bull\git\node\build\Debug;C:\Users\Ian Bull\git\node\Debug;C:\Users\Ian Bull\git\node\Debug\lib ;C:\Users\Ian Bull\git\node\build\Debug\lib;$(LibraryPath) - $(ProjectName) - _win32_x86.dll - - - C:\Users\Ian Bull\git\node\Release;C:\Users\Ian Bull\git\node\Release\lib;C:\Users\Ian Bull\git\node\build\Release;C:\Users\Ian Bull\git\node\build\Release\lib;$(LibraryPath) - $(ProjectName) - _win32_x86_64.dll - - - C:\Users\Ian\git\node\Release;C:\Users\Ian\git\node\Release\lib;C:\Users\Ian\git\node\build\Release\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64 - - - C:\Users\Ian Bull\git\node\build\Release;C:\Users\Ian Bull\git\node\Release;C:\Users\Ian Bull\git\node\Release\lib;C:\Users\Ian Bull\git\node\build\Release\lib;$(LibraryPath) - _win32_x86.dll - - - - NotUsing - Level3 - Disabled - WIN32;_LIB - true - C:\Program Files %28x86%29\Java\jdk1.8.0_31\include\win32;C:\Program Files %28x86%29\Java\jdk1.8.0_31\include;C:\Users\Ian Bull\git\node;C:\Users\Ian Bull\git\node\src;C:\Users\Ian Bull\git\node\deps\v8;C:\Users\Ian Bull\git\node\deps\v8\include;%(AdditionalIncludeDirectories) - OldStyle - MultiThreaded - /D NODE_COMPATIBLE=1 - - - Windows - true - v8_base_0.lib;v8_base_1.lib;v8_base_2.lib;v8_base_3.lib;v8_libbase.lib;v8_nosnapshot.lib;v8_snapshot.lib;v8_libplatform.lib;mksnapshot.lib;openssl.lib;http_parser.lib;gtest.lib;zlib.lib;cares.lib;cctest.lib;node.lib;libuv.lib;%(AdditionalDependencies) - - - - - - NotUsing - Level3 - Disabled - WIN32;_LIB;_ITERATOR_DEBUG_LEVEL=0 - true - C:\Program Files\Java\jdk1.8.0_25\include\win32;C:\Program Files\Java\jdk1.8.0_25\include;C:\Users\Ian Bull\git\node\deps\v8\include;C:\Users\Ian Bull\git\node\deps\v8;C:\Users\Ian Bull\git\node;C:\Users\Ian Bull\git\node\src;%(AdditionalIncludeDirectories) - None - MultiThreaded - /D NODE_COMPATIBLE=1 - - - Windows - true - v8_base_0.lib;v8_base_1.lib;v8_base_2.lib;v8_base_3.lib;v8_libbase.lib;v8_nosnapshot.lib;v8_snapshot.lib;v8_libplatform.lib;mksnapshot.lib;openssl.lib;http_parser.lib;gtest.lib;zlib.lib;cares.lib;cctest.lib;libuv.lib;node.lib;%(AdditionalDependencies) - - - - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB - true - C:\Program Files %28x86%29\Java\jdk1.8.0_31\include\win32;C:\Program Files %28x86%29\Java\jdk1.8.0_31\include;C:\Users\Ian Bull\git\node;C:\Users\Ian Bull\git\node\src;C:\Users\Ian Bull\git\node\deps\v8;C:\Users\Ian Bull\git\node\deps\v8\include;%(AdditionalIncludeDirectories) - /D NODE_COMPATIBLE=1 - MultiThreaded - - - Windows - true - true - true - v8_base_0.lib;v8_base_1.lib;v8_base_2.lib;v8_base_3.lib;v8_libbase.lib;v8_nosnapshot.lib;v8_snapshot.lib;v8_libplatform.lib;mksnapshot.lib;openssl.lib;http_parser.lib;gtest.lib;zlib.lib;cares.lib;cctest.lib;node.lib;libuv.lib;%(AdditionalDependencies) - - - v8_base_0.lib;v8_base_1.lib;v8_base_2.lib;v8_base_3.lib;v8_libbase.lib;v8_nosnapshot.lib;v8_snapshot.lib;v8_libplatform.lib;mksnapshot.lib;openssl.lib;http_parser.lib;gtest.lib;zlib.lib;cares.lib;cctest.lib;node.lib;libuv.lib;%(AdditionalDependencies) - - - true - true - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB - true - C:\Program Files\Java\jdk1.8.0_60\include\win32;C:\Program Files\Java\jdk1.8.0_60\include;C:\Users\Ian\git\node\deps\v8\include;C:\Users\Ian\git\node\deps\v8;C:\Users\Ian\git\node\src;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - - - v8_base_0.lib;v8_base_1.lib;v8_base_2.lib;v8_base_3.lib;v8_libbase.lib;v8_nosnapshot.lib;v8_libplatform.lib;libuv.lib;openssl.lib;http_parser.lib;gtest.lib;zlib.lib;cares.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jni/j2v8.vcxproj.user b/jni/j2v8.vcxproj.user deleted file mode 100644 index 2a22e69ac..000000000 --- a/jni/j2v8.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/main/java/com/eclipsesource/v8/V8Locker.java b/src/main/java/com/eclipsesource/v8/V8Locker.java index f0ab0749f..97192ddfe 100644 --- a/src/main/java/com/eclipsesource/v8/V8Locker.java +++ b/src/main/java/com/eclipsesource/v8/V8Locker.java @@ -30,8 +30,10 @@ public class V8Locker { * Error will be thrown. */ public synchronized void acquire() { - if ((thread != null) && (thread != Thread.currentThread())) { - throw new Error("Invalid V8 thread access"); + Thread caller = Thread.currentThread(); + + if ((thread != null) && (thread != caller)) { + throw new Error("Unable to acquire V8 thread access (caller: " + caller.getName() + ", lock-owner: " + thread.getName() + ")"); } thread = Thread.currentThread(); } @@ -52,8 +54,10 @@ public synchronized void release() { * is thrown. */ public void checkThread() { - if ((thread != Thread.currentThread())) { - throw new Error("Invalid V8 thread access"); + Thread caller = Thread.currentThread(); + + if ((thread != caller)) { + throw new Error("Invalid V8 thread access (caller: " + caller.getName() + ", lock-owner: " + (thread != null ? thread.getName() : "null") + ")"); } } diff --git a/src/main/resources/.keepme b/src/main/resources/.keepme new file mode 100644 index 000000000..e69de29bb diff --git a/src/test/java/com/eclipsesource/v8/V8LockerTest.java b/src/test/java/com/eclipsesource/v8/V8LockerTest.java index a3096f6f9..3f0aa90df 100644 --- a/src/test/java/com/eclipsesource/v8/V8LockerTest.java +++ b/src/test/java/com/eclipsesource/v8/V8LockerTest.java @@ -17,6 +17,9 @@ import org.junit.Test; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + public class V8LockerTest { private boolean passed = false; @@ -62,7 +65,9 @@ public void run() { try { v8Locker.checkThread(); } catch (Error e) { - assertEquals("Invalid V8 thread access", e.getMessage()); + Pattern p = Pattern.compile("Invalid V8 thread access \\(caller: Thread-[0-9], lock-owner: main\\)"); + Matcher m = p.matcher(e.getMessage()); + assertTrue("Unexpected exception message format: " + e.getMessage(), m.matches()); passed = true; } } @@ -81,7 +86,7 @@ public void testCannotUseReleasedLocker() { try { v8Locker.checkThread(); } catch (Error e) { - assertEquals("Invalid V8 thread access", e.getMessage()); + assertEquals("Invalid V8 thread access (caller: main, lock-owner: null)", e.getMessage()); return; } fail("Expected exception"); diff --git a/winbuild.bat b/winbuild.bat deleted file mode 100644 index 57f3a4531..000000000 --- a/winbuild.bat +++ /dev/null @@ -1,4 +0,0 @@ -SET VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE -"%VS_PATH%\devenv.com" /build "Debug|x64" j2v8.sln - -"%VS_PATH%\devenv.com" /build "Debug|Win32" j2v8.sln