diff --git a/3rdParty/Makefile.v8-windows b/3rdParty/Makefile.v8-windows index d4086e266f..27496fb037 100644 --- a/3rdParty/Makefile.v8-windows +++ b/3rdParty/Makefile.v8-windows @@ -39,6 +39,7 @@ install_bits: cp -a V8-3.29.59/build/Release$(BITS)/lib/*.lib ../WindowsLibraries/$(BITS)/lib/Release cp -a V8-3.29.59/build/Debug$(BITS)/lib/*.lib ../WindowsLibraries/$(BITS)/lib/Debug cp -a V8-3.29.59/include/* ../WindowsLibraries/$(BITS)/include + cp V8-3.29.59/third_party/icu/source/data/in/icudtl.dat ../WindowsLibraries/$(BITS)/icudtl.dat for f in common i18n io; do \ cp -a V8-3.29.59/third_party/icu/source/$${f}/unicode/* ../WindowsLibraries/$(BITS)/include/unicode/; \ diff --git a/3rdParty/Makefile.v8-windows.bak b/3rdParty/Makefile.v8-windows.bak new file mode 100644 index 0000000000..3133642920 --- /dev/null +++ b/3rdParty/Makefile.v8-windows.bak @@ -0,0 +1,70 @@ +.PHONY: all install + +all: build64 build32 + + +build64: + ./v8-build.bat x86_amd64 x64 x64 64 + +build32: + ./v8-build.bat x86 ia32 Win32 32 + + +clean: clean32 clean64 + +clean64: + ./v8-clean.bat cmd x86_amd64 x64 x64 64 + +clean32: + ./v8-clean.bat x86 ia32 Win32 32 + + +distclean: distclean32 distclean64 + +distclean64: + ./v8-distclean.bat x86_amd64 x64 x64 64 + +distclean32: + ./v8-distclean.bat x86 ia32 Win32 32 + + +install: + $(MAKE) -f Makefile.v8-windows install_bits BITS=32 + $(MAKE) -f Makefile.v8-windows install_bits BITS=64 + +install_bits: + mkdir -p ../WindowsLibraries/$(BITS)/lib + mkdir -p ../WindowsLibraries/$(BITS)/include/unicode + + cp -a V8-3.29.59/build/Release$(BITS)/lib/*.lib ../WindowsLibraries/$(BITS)/lib + cp -a V8-3.29.59/include/* ../WindowsLibraries/$(BITS)/include + + for f in common i18n io; do \ + cp -a V8-3.29.59/third_party/icu/source/$${f}/unicode/* ../WindowsLibraries/$(BITS)/include/unicode/; \ + done + + +emil: + for f in common i18n extra/uconv tools/ctestfw io; do + rm -rf ../out/vs2013-V8-$(BITS) + + mkdir ../out/vs2013-V8-$(BITS) + mkdir ../out/vs2013-V8-$(BITS)/include + mkdir ../out/vs2013-V8-$(BITS)/lib + mkdir ../out/vs2013-V8-$(BITS)/lib/Release + mkdir ../out/vs2013-V8-$(BITS)/lib/Debug + mkdir -p ../out/vs2013-icu-$(BITS)/include/layout/ + mkdir -p ../out/vs2013-icu-$(BITS)/include/unicode/ + + cp -a V8-3.29.59/build/Debug$(BITS)/lib/*.lib ../out/vs2013-V8-$(BITS)/lib/Debug + cp -a V8-3.29.59/build/Release$(BITS)/lib/*.lib ../out/vs2013-V8-$(BITS)/lib/Release + cp -a V8-3.29.59/include/* ../out/vs2013-V8-$(BITS)/include + + for FOLDER in common \ + i18n \ + extra/uconv \ + tools/ctestfw \ + io ; \ + do \ + cp -a V8-3.29.59/third_party/icu/source/$${FOLDER}/unicode/* ../out/vs2013-icu-$(BITS)/include/unicode/ ;\ + done diff --git a/CMakeLists.txt b/CMakeLists.txt index e0759ec9f7..0de5328841 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -449,7 +449,7 @@ endif () ################################################################################ if (MSVC) - set(ICU_LIBS "icui18n;icuuc;icudata" CACHE path "ICU libraries") + set(ICU_LIBS "icui18n;icuuc" CACHE path "ICU libraries") add_definitions("-DU_STATIC_IMPLEMENTATION=1") elseif (RASPBIAN) @@ -835,9 +835,17 @@ if (MSVC) if(CMAKE_CL_64) install(PROGRAMS WindowsLibraries/64/bin/etcd-arango.exe DESTINATION ${TRI_SBINDIR_INSTALL}) + + install(FILES WindowsLibraries/64/icudtl.dat + DESTINATION share/arangodb + RENAME icudt52l.dat) else() install(PROGRAMS WindowsLibraries/32/bin/etcd-arango.exe DESTINATION ${TRI_SBINDIR_INSTALL}) + + install(FILES WindowsLibraries/32/icudtl.dat + DESTINATION share/arangodb + RENAME icudt52l.dat) endif() endif () diff --git a/Documentation/Books/Users/Arangoimp/README.mdpp b/Documentation/Books/Users/Arangoimp/README.mdpp index fa98958be4..0661ea1f01 100644 --- a/Documentation/Books/Users/Arangoimp/README.mdpp +++ b/Documentation/Books/Users/Arangoimp/README.mdpp @@ -22,7 +22,7 @@ existing collection named "users" on the server. Let's further assume the import at hand is encoded in JSON. We'll be using these example user records to import: -``` js +```js { "name" : { "first" : "John", "last" : "Connor" }, "active" : true, "age" : 25, "likes" : [ "swimming"] } { "name" : { "first" : "Jim", "last" : "O'Brady" }, "age" : 19, "likes" : [ "hiking", "singing" ] } { "name" : { "first" : "Lisa", "last" : "Jones" }, "dob" : "1981-04-09", "likes" : [ "running" ] } diff --git a/Documentation/Books/Users/ModuleJavaScript/README.mdpp b/Documentation/Books/Users/ModuleJavaScript/README.mdpp index ead9b6d380..5c67a89c4d 100644 --- a/Documentation/Books/Users/ModuleJavaScript/README.mdpp +++ b/Documentation/Books/Users/ModuleJavaScript/README.mdpp @@ -156,7 +156,7 @@ follows * If no file can be found, ArangoDB will check if the collection *_modules* contains a document of the form -```js +```js { path: "/com/example/extension", content: "...." diff --git a/Documentation/Books/Users/NewFeatures/NewFeatures24.mdpp b/Documentation/Books/Users/NewFeatures/NewFeatures24.mdpp index 99a0d09dd8..7b94e94ae5 100644 --- a/Documentation/Books/Users/NewFeatures/NewFeatures24.mdpp +++ b/Documentation/Books/Users/NewFeatures/NewFeatures24.mdpp @@ -42,10 +42,17 @@ More details on the available ES6 features can be found in !SECTION FoxxGenerator -ArangoDB 2.4 is shipped with FoxxGenerator, a framework for building -standardized Hypermedia APIs easily. The generated APIs can be consumed with +ArangoDB 2.4 is shipped with FoxxGenerator, a framework for building +standardized Hypermedia APIs easily. The generated APIs can be consumed with client tools that understand [Siren](https://github.com/kevinswiber/siren). +Hypermedia is the simple idea that our HTTP APIs should have links between their +endpoints in the same way that our web sites have links between +them. FoxxGenerator is based on the idea that you can represent an API as a +statechart: Every endpoint is a state and the links are the transitions between +them. Using your description of states and transitions, it can then create an +API for you. + The FoxxGenerator can create APIs based on a semantic description of entities and transitions. A blog series on the use cases and how to use the Foxx generator is here: diff --git a/Documentation/Books/Users/Transactions/TransactionInvocation.mdpp b/Documentation/Books/Users/Transactions/TransactionInvocation.mdpp index 8022e7af0e..4e2ddc1685 100644 --- a/Documentation/Books/Users/Transactions/TransactionInvocation.mdpp +++ b/Documentation/Books/Users/Transactions/TransactionInvocation.mdpp @@ -66,7 +66,7 @@ the operations inside the transactions demand for it. The contents of *read* or *write* can each be lists with collection names or a single collection name (as a string): -```js +```js db._executeTransaction({ collections: { write: "users", @@ -202,7 +202,8 @@ db._executeTransaction({ Aborting the transaction by throwing an exception in the *action* function will revert all changes, so as if the transaction never happened: -``` js + +```js // setup db._create("c1"); diff --git a/Documentation/Books/Users/book.json b/Documentation/Books/Users/book.json index 34db1cb42d..528dc7fc8e 100644 --- a/Documentation/Books/Users/book.json +++ b/Documentation/Books/Users/book.json @@ -1,6 +1,13 @@ { "theme": "./localtheme", "plugins":["-mathjax"], + "plugins": ["piwik"], + "pluginsConfig": { + "piwik": { + "URL": "www.arangodb.org/piwik/", + "siteId": 12 + } + }, "pdf": { "fontSize": 12, "toc": true, diff --git a/lib/Basics/Utf8Helper.cpp b/lib/Basics/Utf8Helper.cpp index 0122a192d8..c86783cf6b 100644 --- a/lib/Basics/Utf8Helper.cpp +++ b/lib/Basics/Utf8Helper.cpp @@ -39,6 +39,10 @@ #include "Basics/tri-strings.h" #include "Basics/utf8-helper.h" +#ifdef _WIN32 +#include "Basics/win-utils.h" +#endif + using namespace triagens::basics; using namespace std; @@ -107,6 +111,10 @@ int Utf8Helper::compareUtf16 (const uint16_t* left, size_t leftLength, const uin } void Utf8Helper::setCollatorLanguage (std::string const& lang) { +#ifdef _WIN32 + TRI_FixIcuDataEnv(); +#endif + UErrorCode status = U_ZERO_ERROR; if (_coll) { diff --git a/lib/Basics/files.cpp b/lib/Basics/files.cpp index e382edc23c..2888d06d7a 100644 --- a/lib/Basics/files.cpp +++ b/lib/Basics/files.cpp @@ -1618,7 +1618,32 @@ char* TRI_BinaryName (const char* argv0) { char* TRI_LocateBinaryPath (char const* argv0) { char const* p; - char* binaryPath = NULL; + char* binaryPath = nullptr; + +#if _WIN32 + if (argv0 == nullptr) { + char buff[4096]; + int res = GetModuleFileName(NULL, buff, sizeof(buff)); + + if (res != 0) { + buff[4095] = '\0'; + + char* q = buff + res; + while (buff < q) { + if (*q == '\\' || *q == '/') { + *q = '\0'; + break; + } + + --q; + } + + return TRI_DuplicateString(buff); + } + + return nullptr; + } +#endif // check if name contains a '/' ( or '\' for windows) p = argv0; @@ -1630,7 +1655,7 @@ char* TRI_LocateBinaryPath (char const* argv0) { if (*p) { binaryPath = TRI_Dirname(argv0); - if (binaryPath == 0) { + if (binaryPath == nullptr) { binaryPath = TRI_DuplicateString(""); } } @@ -1639,7 +1664,7 @@ char* TRI_LocateBinaryPath (char const* argv0) { else { p = getenv("PATH"); - if (p == 0) { + if (p == nullptr) { binaryPath = TRI_DuplicateString(""); } else { @@ -2075,7 +2100,7 @@ char * __LocateInstallDirectory_In(HKEY rootKey) { // open the key for reading long lResult = RegOpenKeyEx( rootKey, - "SOFTWARE\\triAGENS GmbH\\ArangoDB " TRI_VERSION, + "SOFTWARE\\ArangoDB GmbH\\ArangoDB " TRI_VERSION, 0, KEY_READ, &key); diff --git a/lib/Basics/win-utils.cpp b/lib/Basics/win-utils.cpp index f16d0355a4..7a88cfd103 100644 --- a/lib/Basics/win-utils.cpp +++ b/lib/Basics/win-utils.cpp @@ -28,13 +28,22 @@ //////////////////////////////////////////////////////////////////////////////// #include + #include "win-utils.h" -#include "Basics/logging.h" + #include #include #include #include +#include "Basics/logging.h" +#include "Basics/files.h" +#include "Basics/StringUtils.h" +#include "Basics/tri-strings.h" + +using namespace std; +using namespace triagens::basics; + // ............................................................................. // Some global variables which may be required throughout the lifetime of the // server @@ -339,6 +348,42 @@ int TRI_OPEN_WIN32 (const char* filename, int openFlags) { return fileDescriptor; } +//////////////////////////////////////////////////////////////////////////////// +/// @brief fixes the ICU_DATA environment path +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FixIcuDataEnv () { + if (getenv("ICU_DATA") != nullptr) { + return; + } + + char* p = nullptr; + + p = TRI_LocateInstallDirectory(); + + if (p != nullptr) { + string e = string("ICU_DATA=") + p + "\\share\\arangodb\\"; + e = StringUtils::replace(e, "\\", "\\\\"); + putenv(e.c_str()); + } + else { + p = TRI_LocateBinaryPath(nullptr); + + if (p != nullptr) { + string e = string("ICU_DATA=") + p + "\\"; + e = StringUtils::replace(e, "\\", "\\\\"); + putenv(e.c_str()); + } + else { + putenv("ICU_DATA=.\\\\"); + } + } + + if (p != nullptr) { + TRI_FreeString(TRI_CORE_MEM_ZONE, p); + } +} + // ----------------------------------------------------------------------------- // --SECTION-- END-OF-FILE // ----------------------------------------------------------------------------- diff --git a/lib/Basics/win-utils.h b/lib/Basics/win-utils.h index 340953f258..d8fc7a1fd9 100644 --- a/lib/Basics/win-utils.h +++ b/lib/Basics/win-utils.h @@ -95,6 +95,12 @@ void TRI_sleep (unsigned long); void TRI_usleep (unsigned long); +//////////////////////////////////////////////////////////////////////////////// +/// @brief fixes the ICU_DATA environment path +//////////////////////////////////////////////////////////////////////////////// + +void TRI_FixIcuDataEnv (); + #endif // -----------------------------------------------------------------------------