FS-10436 [mod_v8] Upgrade javascript libv8 from 3.24.14 to 5.6.326 on windows.

This commit is contained in:
Andrey Volk 2017-06-29 03:04:18 +03:00
parent b55cb389fe
commit 4455893e0e
4 changed files with 37 additions and 14 deletions

View File

@ -67,12 +67,12 @@
<CustomBuild Include="cleancount"> <CustomBuild Include="cleancount">
<FileType>Document</FileType> <FileType>Document</FileType>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Downloading V8.</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Downloading V8.</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-vs2015.tar.bz2 "$(ProjectDir).." <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version).tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).." if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).."
</Command> </Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Downloading V8.</Message> <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Downloading V8.</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-vs2015.tar.bz2 "$(ProjectDir).." <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">if not exist "$(ProjectDir)..\v8-$(V8Version)" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version).tar.bz2 "$(ProjectDir).."
if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).." if not exist "$(ProjectDir)..\v8-$(V8Version)\third_party\cygwin" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://files.freeswitch.org/downloads/libs/v8-$(V8Version)-win.tar.bz2 "$(ProjectDir).."
</Command> </Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)..\v8-$(V8Version);%(Outputs)</Outputs>

View File

@ -22,18 +22,28 @@ IF "%1-%2" == "%LAST_BUILD_INFO%" (
) )
SET LIB_DEST_DIR= SET LIB_DEST_DIR=
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
SET GYP_GENERATORS=msvs
REM Bake snapshot blobs (natives_blob.bin and snapshot_blob.bin) into the library
SET GYPFLAGS="-Dv8_use_external_startup_data=0"
CALL .\third_party\python_26\setup_env.bat
IF "%VisualStudioVersion%" == "11.0" ( IF "%VisualStudioVersion%" == "11.0" (
SET VS_VERSION=-Gmsvs_version=2012 REM SET VS_VERSION=-Gmsvs_version=2012
SET GYP_MSVS_VERSION=2012
ECHO Forcing build to use Visual Studio 2012 ECHO Forcing build to use Visual Studio 2012
) ELSE IF "%VisualStudioVersion%" == "12.0" ( ) ELSE IF "%VisualStudioVersion%" == "12.0" (
SET VS_VERSION=-Gmsvs_version=2013 REM SET VS_VERSION=-Gmsvs_version=2013
SET GYP_MSVS_VERSION=2013
ECHO Forcing build to use Visual Studio 2013 ECHO Forcing build to use Visual Studio 2013
) ELSE IF "%VisualStudioVersion%" == "14.0" ( ) ELSE IF "%VisualStudioVersion%" == "14.0" (
SET VS_VERSION=-Gmsvs_version=2015 REM SET VS_VERSION=-Gmsvs_version=2015
SET GYP_MSVS_VERSION=2015
ECHO Forcing build to use Visual Studio 2015 ECHO Forcing build to use Visual Studio 2015
) ELSE IF NOT "%4" == "" ( ) ELSE IF NOT "%4" == "" (
SET VS_VERSION=-Gmsvs_version=%4 REM SET VS_VERSION=-Gmsvs_version=%4
SET GYP_MSVS_VERSION=%4
ECHO Forcing build to use Visual Studio %4 ECHO Forcing build to use Visual Studio %4
) )
@ -46,13 +56,15 @@ IF "%1" == "x64" (
IF "%1" == "x64" ( IF "%1" == "x64" (
IF NOT "%SKIP_V8_SNAPSHOT%" == "" ECHO Targeting x64 platform on a x86 system, disabling V8 snapshout feature to make this work [%SKIP_V8_SNAPSHOT%] IF NOT "%SKIP_V8_SNAPSHOT%" == "" ECHO Targeting x64 platform on a x86 system, disabling V8 snapshout feature to make this work [%SKIP_V8_SNAPSHOT%]
IF NOT "%COPY_FILES_ONLY%" == "1" .\third_party\python_26\python.exe build\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library %SKIP_V8_SNAPSHOT% %VS_VERSION% REM IF NOT "%COPY_FILES_ONLY%" == "1" .\third_party\python_26\python.exe build\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library %SKIP_V8_SNAPSHOT% %VS_VERSION%
IF NOT "%COPY_FILES_ONLY%" == "1" .\third_party\python_26\python.exe gypfiles\gyp_v8 -Dtarget_arch=x64 -Dcomponent=shared_library %GYPFLAGS%
IF ERRORLEVEL 1 GOTO Fail IF ERRORLEVEL 1 GOTO Fail
SET LIB_DEST_DIR=..\..\x64\%2\ SET LIB_DEST_DIR=..\..\x64\%2\
) )
IF "%1" == "x86" ( IF "%1" == "x86" (
IF NOT "%COPY_FILES_ONLY%" == "1" .\third_party\python_26\python.exe build\gyp_v8 -Dcomponent=shared_library %VS_VERSION% REM IF NOT "%COPY_FILES_ONLY%" == "1" .\third_party\python_26\python.exe build\gyp_v8 -Dcomponent=shared_library %VS_VERSION%
IF NOT "%COPY_FILES_ONLY%" == "1" .\third_party\python_26\python.exe gypfiles\gyp_v8 -Dcomponent=shared_library %GYPFLAGS%
IF ERRORLEVEL 1 GOTO Fail IF ERRORLEVEL 1 GOTO Fail
SET LIB_DEST_DIR=..\..\Win32\%2\ SET LIB_DEST_DIR=..\..\Win32\%2\
) )
@ -63,10 +75,12 @@ IF "%COPY_FILES_ONLY%" == "1" GOTO CopyFiles
REM Clean build before we continue REM Clean build before we continue
REM First try to clean using the solution path (works for most VS versions) REM First try to clean using the solution path (works for most VS versions)
msbuild "tools\gyp\v8.sln" /t:"_tools_\_gyp_\v8:Clean" /p:Configuration=%2 /clp:WarningsOnly REM msbuild "tools\gyp\v8.sln" /t:"_tools_\_gyp_\v8:Clean" /p:Configuration=%2 /clp:WarningsOnly
msbuild "src\v8.sln" /t:"_src_\v8:Clean" /p:Configuration=%2 /clp:WarningsOnly
IF NOT ERRORLEVEL 1 GOTO CleanDone IF NOT ERRORLEVEL 1 GOTO CleanDone
REM If clean using solution path didn't work, try to build without the path (works for some VS versions...) REM If clean using solution path didn't work, try to build without the path (works for some VS versions...)
msbuild "tools\gyp\v8.sln" /t:v8:Clean /p:Configuration=%2 REM msbuild "tools\gyp\v8.sln" /t:v8:Clean /p:Configuration=%2
msbuild "src\v8.sln" /t:v8:Clean /p:Configuration=%2
IF ERRORLEVEL 1 GOTO Fail IF ERRORLEVEL 1 GOTO Fail
:CleanDone :CleanDone
@ -75,10 +89,13 @@ rmdir /S /Q .\build\%2
REM Build the V8 library REM Build the V8 library
REM First try to build using the solution path (works for most VS versions) REM First try to build using the solution path (works for most VS versions)
msbuild "tools\gyp\v8.sln" /t:"_tools_\_gyp_\v8:Rebuild" /p:Configuration=%2 /clp:WarningsOnly REM msbuild "tools\gyp\v8.sln" /t:"_tools_\_gyp_\v8:Rebuild" /p:Configuration=%2 /clp:WarningsOnly
REM msbuild "src\v8.sln" /t:"_src_\v8_libpaltfrom:Rebuild" /p:Configuration=%2 /clp:WarningsOnly
msbuild "src\v8.sln" /t:"_src_\v8:Rebuild" /p:Configuration=%2 /clp:WarningsOnly
IF NOT ERRORLEVEL 1 GOTO CopyFiles IF NOT ERRORLEVEL 1 GOTO CopyFiles
REM If build using solution path didn't work, try to build without the path (works for some VS versions...) REM If build using solution path didn't work, try to build without the path (works for some VS versions...)
msbuild "tools\gyp\v8.sln" /t:v8:Rebuild /p:Configuration=%2 REM msbuild "tools\gyp\v8.sln" /t:v8:Rebuild /p:Configuration=%2
msbuild "src\v8.sln" /t:v8:Rebuild /p:Configuration=%2
IF ERRORLEVEL 1 GOTO Fail IF ERRORLEVEL 1 GOTO Fail
:CopyFiles :CopyFiles
@ -92,6 +109,12 @@ IF ERRORLEVEL 1 GOTO Fail
xcopy /C /F /R /Y .\build\%2\v8.dll %LIB_DEST_DIR% xcopy /C /F /R /Y .\build\%2\v8.dll %LIB_DEST_DIR%
IF ERRORLEVEL 1 GOTO Fail IF ERRORLEVEL 1 GOTO Fail
xcopy /C /F /R /Y .\build\%2\v8_libplatform.dll %LIB_DEST_DIR%
IF ERRORLEVEL 1 GOTO Fail
xcopy /C /F /R /Y .\build\%2\v8_libbase.dll %LIB_DEST_DIR%
IF ERRORLEVEL 1 GOTO Fail
ECHO %1-%2> last_build ECHO %1-%2> last_build
exit /b 0 exit /b 0

View File

@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" /> <ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros"> <PropertyGroup Label="UserMacros">
<V8Version>3.24.14</V8Version> <V8Version>5.6.326</V8Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<V8VersionImported>true</V8VersionImported> <V8VersionImported>true</V8VersionImported>

View File

@ -13,7 +13,7 @@
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalLibraryDirectories>$(SolutionDir)libs\v8-$(V8Version)\build\$(Configuration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(SolutionDir)libs\v8-$(V8Version)\build\$(Configuration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>icui18n.lib;icuuc.lib;v8.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>icui18n.lib;icuuc.lib;v8.lib;v8_libplatform.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
</Project> </Project>