Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
59554c12
Commit
59554c12
authored
Apr 02, 2016
by
Oleg Korshul
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
переход на новую версию v8 (master)
parent
51f8d63e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
115 additions
and
19 deletions
+115
-19
DesktopEditor/doctrenderer/build_v8.txt
DesktopEditor/doctrenderer/build_v8.txt
+70
-0
DesktopEditor/doctrenderer/doctrenderer.cpp
DesktopEditor/doctrenderer/doctrenderer.cpp
+2
-1
DesktopEditor/doctrenderer/doctrenderer.pro
DesktopEditor/doctrenderer/doctrenderer.pro
+9
-11
DesktopEditor/doctrenderer/nativecontrol.cpp
DesktopEditor/doctrenderer/nativecontrol.cpp
+10
-7
DesktopEditor/doctrenderer/nativecontrol.h
DesktopEditor/doctrenderer/nativecontrol.h
+24
-0
No files found.
DesktopEditor/doctrenderer/build_v8.txt
0 → 100644
View file @
59554c12
1) install git:
windows:
http://msysgit.github.io/
linux:
sudo apt-get install git
2) create folder for work
example:
mkdir build_v8
cd build_v8
3)
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
add PATH to depot_tools
linux/mac:
export PATH=`pwd`/depot_tools:"$PATH"
4)
gclient
windows:
add to PATH variable ...build_v8/depot_tools/python276_bin;
5)
. . fetch
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
fetch v8
cd v8
6) build
linux:
CFLAGS="-fPIC" CXXFLAGS="-fPIC" make native
mac:
CFLAGS="-fPIC" CXXFLAGS="-fPIC -stdlib=libc++" LDFLAGS="-stdlib=libc++" make native
windows:
generate visual studio project
32bit: python build/gyp_v8
64bit: python build/gyp_v8 -Dtarget_arch=x64
build project in visual studio ( - , )
a) open all.sln
b) select projects:
icui18n
icuuc
mksnapshot
v8_base_0
v8_base_1
v8_base_2
v8_base_3
v8_libbase
v8_libplatform
v8_nosnapshot
v8_external_snapshot
) Project Properies -> Configuration Properties -> C/C++ ->Code Generation
for Debug Configuration change "Runtime Library" to "Multi-threaded Debug DLL (/MDd)"
for Release Configuration change "Runtime Library" to "Multi-threaded DLL(/MD)"
Rebuild All
7) Rebuild doctrenderer project
DesktopEditor/doctrenderer/doctrenderer.cpp
View file @
59554c12
...
...
@@ -1021,7 +1021,8 @@ namespace NSDoctRenderer
strScript
+=
"
\n\n
"
;
}
strScript
+=
m_pInternal
->
ReadScriptFile
(
sResourceFile
);
//strScript += m_pInternal->ReadScriptFile(sResourceFile);
strScript
+=
(
"(function(){"
+
m_pInternal
->
ReadScriptFile
(
sResourceFile
)
+
"})();"
);
if
(
m_pInternal
->
m_strEditorType
==
L"spreadsheet"
)
strScript
+=
"
\n
$.ready();"
;
...
...
DesktopEditor/doctrenderer/doctrenderer.pro
View file @
59554c12
...
...
@@ -58,17 +58,14 @@ static_link_libstd {
}
win32
{
V8_CHECKOUT_PATH
=
$$
PWD
/
v8_windows
/
v8
V8_CHECKOUT_PATH
=
D
:/
GIT
/
v8
/
v8
}
linux
-
g
++
|
linux
-
g
++-
64
|
linux
-
g
++-
32
{
V8_CHECKOUT_PATH
=
/
home
/
oleg
/
v8
V8_CHECKOUT_PATH
=
/
home
/
oleg
/
v8
_build
/
v8
}
mac
{
DEFINES
+=
NEW_V8_ENGINE
#
V8_CHECKOUT_PATH
=
/
Users
/
Oleg
/
Desktop
/
GIT
/
v8_mac_work
/
v8
V8_CHECKOUT_PATH
=
/
Users
/
Oleg
/
Desktop
/
GIT
/
v8_mac
/
v8
}
...
...
@@ -100,6 +97,8 @@ INCLUDEPATH += \
$$
V8_CHECKOUT_PATH
\
$$
V8_CHECKOUT_PATH
/
include
DEFINES
+=
NEW_V8_ENGINE
####################
WINDOWS
#####################
DESKTOPEDITOR_PATH
=
..
include
(..
/
Qt_build
/
graphics
/
project
/
graphics_fonts
.
pri
)
...
...
@@ -113,10 +112,10 @@ include(../../OfficeUtils/OfficeUtils.pri)
win32
:
contains
(
QMAKE_TARGET
.
arch
,
x86_64
)
:
{
CONFIG
(
debug
,
debug
|
release
)
{
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Debug
/
lib
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Debug
/
lib
-
lv8_base
_0
-
lv8_base_1
-
lv8_base_2
-
lv8_base_3
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_external
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Debug
/
lib
-
licui18n
-
licuuc
}
else
{
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Release
/
lib
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Release
/
lib
-
lv8_base
_0
-
lv8_base_1
-
lv8_base_2
-
lv8_base_3
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_external
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Release
/
lib
-
licui18n
-
licuuc
}
...
...
@@ -125,10 +124,10 @@ CONFIG(debug, debug|release) {
win32
:
!
contains
(
QMAKE_TARGET
.
arch
,
x86_64
)
:
{
CONFIG
(
debug
,
debug
|
release
)
{
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Debug
/
lib
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Debug
/
lib
-
lv8_base
_0
-
lv8_base_1
-
lv8_base_2
-
lv8_base_3
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_external
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Debug
/
lib
-
licui18n
-
licuuc
}
else
{
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Release
/
lib
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Release
/
lib
-
lv8_base
_0
-
lv8_base_1
-
lv8_base_2
-
lv8_base_3
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_external
_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
build
/
Release
/
lib
-
licui18n
-
licuuc
}
...
...
@@ -144,7 +143,7 @@ linux-g++ | linux-g++-64 | linux-g++-32 {
_LINUX
\
_LINUX_QT
\
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
out
/
native
/
obj
.
target
/
tools
/
gyp
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
out
/
native
/
obj
.
target
/
tools
/
gyp
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_
external_
snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
out
/
native
/
obj
.
target
/
third_party
/
icu
-
licui18n
-
licuuc
-
licudata
}
...
...
@@ -167,7 +166,6 @@ mac {
MAC
\
QT_MAC
#
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
out
/
native
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
out
/
native
-
lv8_base
-
lv8_libbase
-
lv8_libplatform
-
lv8_nosnapshot
-
lv8_external_snapshot
LIBS
+=
-
L
$$
V8_CHECKOUT_PATH
/
out
/
native
-
licui18n
-
licuuc
-
licudata
...
...
DesktopEditor/doctrenderer/nativecontrol.cpp
View file @
59554c12
...
...
@@ -376,21 +376,24 @@ v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplateBuilder(v8::Isolate* i
void
CV8Worker
::
Initialize
()
{
if
(
NULL
==
CV8Worker
::
m_pInitializer
)
CV8Worker
::
m_pInitializer
=
new
CV8Initializer
();
if
(
NULL
==
m_pInitializer
)
m_pInitializer
=
new
CV8Initializer
();
}
void
CV8Worker
::
Dispose
()
{
if
(
NULL
!=
CV8Worker
::
m_pInitializer
)
delete
CV8Worker
::
m_pInitializer
;
CV8Worker
::
m_pInitializer
=
NULL
;
if
(
NULL
!=
m_pInitializer
)
delete
m_pInitializer
;
m_pInitializer
=
NULL
;
}
CV8Initializer
*
CV8Worker
::
getInitializer
()
{
if
(
NULL
==
CV8Worker
::
m_pInitializer
)
CV8Worker
::
m_pInitializer
=
new
CV8Initializer
();
if
(
NULL
==
m_pInitializer
)
{
m_pInitializer
=
new
CV8Initializer
();
}
return
CV8Worker
::
m_pInitializer
;
}
...
...
DesktopEditor/doctrenderer/nativecontrol.h
View file @
59554c12
...
...
@@ -5,6 +5,7 @@
#include <map>
#include "../fontengine/ApplicationFonts.h"
#include <iostream>
#include "../../graphics/Timer.h"
// string convert
std
::
wstring
to_cstring
(
v8
::
Local
<
v8
::
Value
>
v
);
...
...
@@ -849,6 +850,29 @@ void CreateNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args);
void
CreateNativeObjectBuilder
(
const
v8
::
FunctionCallbackInfo
<
v8
::
Value
>&
args
);
void
CreateNativeMemoryStream
(
const
v8
::
FunctionCallbackInfo
<
v8
::
Value
>&
args
);
#if 0
class CLoggerSpeed
{
public:
DWORD m_dwTime;
public:
CLoggerSpeed()
{
m_dwTime = NSTimers::GetTickCount();
}
void Lap(const std::string& details)
{
DWORD dwCur = NSTimers::GetTickCount();
FILE* f = fopen("D:\\doctrenderer.speed", "a+");
std::string sTmp = details + ": %d\n";
fprintf(f, sTmp.c_str(), (int)(dwCur - m_dwTime));
fclose(f);
m_dwTime = dwCur;
}
};
#endif
//////////////////////////////////////////////////////////////////////////////
class
CV8Initializer
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment