diff --git a/Common/3dParty/v8/fetch.sh b/Common/3dParty/v8/fetch.sh index 36a5ac6e00..83406f9248 100755 --- a/Common/3dParty/v8/fetch.sh +++ b/Common/3dParty/v8/fetch.sh @@ -11,11 +11,23 @@ fi export PATH=`pwd`/depot_tools:"$PATH" gclient +#detect gcc version +currentver="$(gcc -dumpversion)" +requiredver="6.0.0" +v8_version="6.0" + +if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ] +then +v8_version="7.0" +fi + +echo "v8 version: $v8_version" + if [ ! -d "./v8" ] then fetch v8 cd v8 -git checkout -b 6.0 -t branch-heads/6.0 +git checkout -b $v8_version -t branch-heads/$v8_version else cd v8 fi diff --git a/Common/DocxFormat/Source/DocxFormat/ContentTypes.h b/Common/DocxFormat/Source/DocxFormat/ContentTypes.h index f228ae3527..95c62cdbc4 100644 --- a/Common/DocxFormat/Source/DocxFormat/ContentTypes.h +++ b/Common/DocxFormat/Source/DocxFormat/ContentTypes.h @@ -75,7 +75,8 @@ namespace OOX m_mTable.insert( std::make_pair( _T("mov"), _T("video/unknown"))); m_mTable.insert( std::make_pair( _T("m4v"), _T("video/unknown"))); m_mTable.insert( std::make_pair( _T("mkv"), _T("video/unknown"))); - m_mTable.insert( std::make_pair( _T("avi"), _T("video/avi"))); + m_mTable.insert( std::make_pair( _T("avi"), _T("video/avi"))); + m_mTable.insert( std::make_pair( _T("flv"), _T("video/x-flv"))); m_mTable.insert( std::make_pair( _T("wmv"), _T("video/x-wmv"))); m_mTable.insert( std::make_pair( _T("webm"), _T("video/webm"))); m_mTable.insert( std::make_pair( _T("xls"), _T("application/vnd.ms-excel"))); diff --git a/DesktopEditor/doctrenderer/memorystream.cpp b/DesktopEditor/doctrenderer/memorystream.cpp index 50d2a6bfb0..0f938f7d53 100644 --- a/DesktopEditor/doctrenderer/memorystream.cpp +++ b/DesktopEditor/doctrenderer/memorystream.cpp @@ -42,7 +42,7 @@ void _ms_write_byte(const v8::FunctionCallbackInfo& args) { CMemoryStream* pNative = unwrap_memorystream(args.This()); - BYTE arg = (BYTE)args[0]->Int32Value(); + BYTE arg = (BYTE)args[0]->ToInt32()->Value(); pNative->WriteBYTE(arg); args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent())); @@ -60,7 +60,7 @@ void _ms_write_long(const v8::FunctionCallbackInfo& args) { CMemoryStream* pNative = unwrap_memorystream(args.This()); - LONG arg = (LONG)args[0]->Int32Value(); + LONG arg = (LONG)args[0]->ToInt32()->Value(); pNative->WriteLONG(arg); args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent())); @@ -69,7 +69,7 @@ void _ms_write_double(const v8::FunctionCallbackInfo& args) { CMemoryStream* pNative = unwrap_memorystream(args.This()); - double arg = (double)args[0]->NumberValue(); + double arg = args[0]->ToNumber()->Value(); pNative->WriteLONG((LONG)(arg * 100000)); args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent())); @@ -95,8 +95,8 @@ void _ms_copy(const v8::FunctionCallbackInfo& args) CMemoryStream* pNative = unwrap_memorystream(args.This()); CMemoryStream* pNative2 = unwrap_memorystream(args[0]->ToObject()); - size_t pos = (size_t)args[1]->Uint32Value(); - size_t len = (size_t)args[2]->Uint32Value(); + size_t pos = (size_t)args[1]->ToUint32()->Value(); + size_t len = (size_t)args[2]->ToUint32()->Value(); pNative->Copy(pNative2, pos, len); diff --git a/DesktopEditor/doctrenderer/nativecontrol.cpp b/DesktopEditor/doctrenderer/nativecontrol.cpp index 5517965025..15de811ec1 100644 --- a/DesktopEditor/doctrenderer/nativecontrol.cpp +++ b/DesktopEditor/doctrenderer/nativecontrol.cpp @@ -262,8 +262,8 @@ void _Save_ReAllocNative(const v8::FunctionCallbackInfo& args) return; CNativeControl* pNative = unwrap_nativeobject(args.This()); - int _pos = args[0]->Int32Value(); - int _len = args[1]->Int32Value(); + int _pos = args[0]->ToInt32()->Value(); + int _len = args[1]->ToInt32()->Value(); pNative->Save_ReAlloc(_pos, _len); @@ -280,7 +280,7 @@ void _Save_End(const v8::FunctionCallbackInfo& args) CNativeControl* pNative = unwrap_nativeobject(args.This()); std::string sHeader = to_cstringA(args[0]); - int _len = args[1]->Int32Value(); + int _len = args[1]->ToInt32()->Value(); pNative->Save_End(sHeader, _len); } @@ -302,7 +302,7 @@ void _SaveChanges(const v8::FunctionCallbackInfo& args) return; CNativeControl* pNative = unwrap_nativeobject(args.This()); - pNative->DumpChanges(to_cstringA(args[0]), args[1]->Int32Value(), args[2]->Int32Value()); + pNative->DumpChanges(to_cstringA(args[0]), args[1]->ToInt32()->Value(), args[2]->ToInt32()->Value()); } /// ZIP -----