mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
V8 windows xp support
This commit is contained in:
64
Common/3dParty/v8/v8_xp/build.bat
Normal file
64
Common/3dParty/v8/v8_xp/build.bat
Normal file
@ -0,0 +1,64 @@
|
||||
SET SCRIPTPATH=%~dp0
|
||||
CD /D %~dp0
|
||||
|
||||
SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\win_tools-2_7_6_bin\python\bin;%PATH%
|
||||
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
SET GYP_MSVS_VERSION=2015
|
||||
|
||||
SET VC64_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE
|
||||
SET VC32_PATH=%ProgramFiles%\Microsoft Visual Studio 14.0\Common7\IDE
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
if defined ProgramFiles(x86) (
|
||||
SET PATH=!VC64_PATH!;!PATH!
|
||||
) else (
|
||||
SET PATH=!VC32_PATH!;!PATH!
|
||||
)
|
||||
|
||||
if not exist "win_32" (
|
||||
echo "building x86... -------------------------------------------"
|
||||
|
||||
md win_32
|
||||
md win_32\debug
|
||||
md win_32\release
|
||||
|
||||
call python v8\build\gyp_v8
|
||||
call .\change_projects.bat
|
||||
|
||||
cd "%SCRIPTPATH%v8\tools\gyp"
|
||||
|
||||
call devenv v8.sln /Rebuild "Release"
|
||||
call devenv v8.sln /Rebuild "Debug"
|
||||
|
||||
cd "%SCRIPTPATH%"
|
||||
|
||||
XCOPY /Y "v8\build\Release\lib\*" "win_32\release\"
|
||||
XCOPY /Y "v8\build\Release\icudt.dll" "win_32\release\"
|
||||
|
||||
XCOPY /Y "v8\build\Debug\lib\*" "win_32\debug\"
|
||||
XCOPY /Y "v8\build\Debug\icudt.dll" "win_32\debug\"
|
||||
)
|
||||
|
||||
if not exist "win_64" (
|
||||
echo "building x64... -------------------------------------------"
|
||||
|
||||
md win_64
|
||||
md win_64\debug
|
||||
md win_64\release
|
||||
|
||||
call python v8\build\gyp_v8 -Dtarget_arch=x64
|
||||
call .\change_projects.bat
|
||||
|
||||
cd "%SCRIPTPATH%v8\tools\gyp"
|
||||
|
||||
call devenv v8.sln /Rebuild "Release"
|
||||
call devenv v8.sln /Rebuild "Debug"
|
||||
|
||||
cd "%SCRIPTPATH%"
|
||||
|
||||
XCOPY /Y "v8\build\Release\lib\*" "win_64\release\"
|
||||
XCOPY /Y "v8\build\Release\icudt.dll" "win_64\release\"
|
||||
|
||||
XCOPY /Y "v8\build\Debug\lib\*" "win_64\debug\"
|
||||
XCOPY /Y "v8\build\Debug\icudt.dll" "win_64\debug\"
|
||||
)
|
||||
34
Common/3dParty/v8/v8_xp/change_projects.bat
Normal file
34
Common/3dParty/v8/v8_xp/change_projects.bat
Normal file
@ -0,0 +1,34 @@
|
||||
SET SCRIPTPATH=%~dp0
|
||||
CD /D %~dp0
|
||||
|
||||
cd "%SCRIPTPATH%v8\tools\gyp"
|
||||
call powershell -Command "(gc v8_base_0.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_0.vcxproj"
|
||||
call powershell -Command "(gc v8_base_0.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_0.vcxproj"
|
||||
|
||||
call powershell -Command "(gc v8_base_1.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_1.vcxproj"
|
||||
call powershell -Command "(gc v8_base_1.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_1.vcxproj"
|
||||
|
||||
call powershell -Command "(gc v8_base_2.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_2.vcxproj"
|
||||
call powershell -Command "(gc v8_base_2.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_2.vcxproj"
|
||||
|
||||
call powershell -Command "(gc v8_base_3.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_3.vcxproj"
|
||||
call powershell -Command "(gc v8_base_3.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_base_3.vcxproj"
|
||||
|
||||
call powershell -Command "(gc v8_libbase.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_libbase.vcxproj"
|
||||
call powershell -Command "(gc v8_libbase.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_libbase.vcxproj"
|
||||
|
||||
call powershell -Command "(gc v8_libplatform.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_libplatform.vcxproj"
|
||||
call powershell -Command "(gc v8_libplatform.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_libplatform.vcxproj"
|
||||
|
||||
call powershell -Command "(gc v8_nosnapshot.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_nosnapshot.vcxproj"
|
||||
call powershell -Command "(gc v8_nosnapshot.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' v8_nosnapshot.vcxproj"
|
||||
|
||||
call powershell -Command "(gc mksnapshot.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' mksnapshot.vcxproj"
|
||||
call powershell -Command "(gc mksnapshot.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' mksnapshot.vcxproj"
|
||||
|
||||
cd "%SCRIPTPATH%v8\third_party\icu"
|
||||
call powershell -Command "(gc icui18n.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' icui18n.vcxproj"
|
||||
call powershell -Command "(gc icui18n.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' icui18n.vcxproj"
|
||||
|
||||
call powershell -Command "(gc icuuc.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' icuuc.vcxproj"
|
||||
call powershell -Command "(gc icuuc.vcxproj) -replace '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>', '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>' | Out-File -Encoding 'UTF8' icuuc.vcxproj"
|
||||
19
Common/3dParty/v8/v8_xp/fetch.bat
Normal file
19
Common/3dParty/v8/v8_xp/fetch.bat
Normal file
@ -0,0 +1,19 @@
|
||||
SET SCRIPTPATH=%~dp0
|
||||
CD /D %~dp0
|
||||
|
||||
if exist "depot_tools" (
|
||||
echo "depot_tools already fetched"
|
||||
) else (
|
||||
call git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
call powershell -File .\fix-depot_tools.ps1
|
||||
)
|
||||
|
||||
SET PATH=%SCRIPTPATH%depot_tools;%SCRIPTPATH%depot_tools\python276_bin;%PATH%
|
||||
SET DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
SET GYP_MSVS_VERSION=2015
|
||||
|
||||
if not exist "%SCRIPTPATH%v8" (
|
||||
call .\depot_tools\fetch v8
|
||||
)
|
||||
|
||||
call depot_tools\gclient sync -r 4.10.253
|
||||
4
Common/3dParty/v8/v8_xp/fix-depot_tools.ps1
Normal file
4
Common/3dParty/v8/v8_xp/fix-depot_tools.ps1
Normal file
@ -0,0 +1,4 @@
|
||||
$gclient_path = "depot_tools\gclient.bat"
|
||||
$fetch_path = "depot_tools\fetch.bat"
|
||||
(Get-Content $gclient_path) | ForEach-Object { $_ -replace "^(`"%~dp0python`")", "call $&" } | Set-Content $gclient_path
|
||||
(Get-Content $fetch_path) | ForEach-Object { $_ -replace "^(%~dp0python)", "call $&" } | Set-Content $fetch_path
|
||||
30
Common/3dParty/v8/v8_xp/v8.pri
Normal file
30
Common/3dParty/v8/v8_xp/v8.pri
Normal file
@ -0,0 +1,30 @@
|
||||
CORE_V8_PATH_INCLUDE = $$PWD/v8
|
||||
CORE_V8_PATH_LIBS = $$PWD/$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$CORE_V8_PATH_INCLUDE \
|
||||
$$CORE_V8_PATH_INCLUDE/include
|
||||
|
||||
core_windows {
|
||||
CORE_V8_PATH_LIBS = $$CORE_V8_PATH_LIBS/$$CORE_BUILDS_CONFIGURATION_PREFIX
|
||||
|
||||
LIBS += -L$$CORE_V8_PATH_LIBS -lv8_base_0 -lv8_base_1 -lv8_base_2 -lv8_base_3 -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_external_snapshot
|
||||
LIBS += -L$$CORE_V8_PATH_LIBS -licui18n -licuuc
|
||||
|
||||
LIBS += -lwinmm
|
||||
LIBS += -ladvapi32
|
||||
LIBS += -lShell32
|
||||
}
|
||||
|
||||
core_linux {
|
||||
LIBS += -L$$CORE_V8_PATH_LIBS -lv8_base -lv8_libplatform -lv8_libbase -lv8_nosnapshot -lv8_external_snapshot
|
||||
LIBS += -L$$CORE_V8_PATH_LIBS -licui18n -licuuc -licudata
|
||||
}
|
||||
|
||||
core_mac {
|
||||
LIBS += -L$$CORE_V8_PATH_LIBS -lv8_base -lv8_libbase -lv8_libplatform -lv8_nosnapshot -lv8_external_snapshot
|
||||
LIBS += -L$$CORE_V8_PATH_LIBS -licui18n -licuuc -lv8_libsampler
|
||||
|
||||
QMAKE_CXXFLAGS += -Wall -Wno-inconsistent-missing-override
|
||||
QMAKE_CFLAGS += -Wall -Wno-inconsistent-missing-override
|
||||
}
|
||||
Reference in New Issue
Block a user