- Notifications
You must be signed in to change notification settings - Fork34
C++ implementation of ua-parser
License
ua-parser/uap-cpp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A recent (GCC >= 5.4 or Clang >= 3.9 both work) C++14 compiler is required.
cd uap-cppmkdir buildcd buildcmake ..make uap-cpp-staticmake uap-cpp-sharedPrepare gtest:
apt-get install libgtest-devapt-get install cmakecd /usr/src/gtestcmake CMakeLists.txtmakecp *.a /usr/libRun from build directory:
make testRun from uap-cpp directory:
./build/uap-cpp-testsRun from build directory:
make benchRun from uap-cpp directory:
time ./build/UaParserBench uap-core/regexes.yaml benchmarks/useragents.txt 1000First, openuap-cpp.sln with MSVC 15 (Visual Studio 2017).
To build the (static) library:
build the "UaParser" projectTo build and run the tests:
build the "UaParserTest" projectThe MSVC projects assume boost to be installed at:C:\boost_1_69_0 and yaml to be installed at:C:\yaml-cpp. Change these paths if needed.boost_regex needs to be built from source in advance. For yaml-cpp, you can built it from source, or use a prebuilthere.
- re2, yaml-cpp (>=0.5)
- gtest (for testing)
- uap-core, same directory level as uap-cpp. You can clone this repo with --recurse-submodules to get it. Alternatively, run
git submodule update --init.
Pull requests are welcome. Useclang-format -i *.cpp *.h to format the sources before sending the patch.
Inspired from the D implementation by Shripad K and using agent data from BrowserScope.
About
C++ implementation of ua-parser
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.