{"action":"opened","issue":{"url":"https://api.github.com/repos/google/leveldb/issues/475","repository_url":"https://api.github.com/repos/google/leveldb","labels_url":"https://api.github.com/repos/google/leveldb/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/google/leveldb/issues/475/comments","events_url":"https://api.github.com/repos/google/leveldb/issues/475/events","html_url":"https://github.com/google/leveldb/issues/475","id":232956796,"number":475,"title":"Adding Windows Support","user":{"login":"Netzeband","id":26524132,"avatar_url":"https://avatars1.githubusercontent.com/u/26524132?v=3","gravatar_id":"","url":"https://api.github.com/users/Netzeband","html_url":"https://github.com/Netzeband","followers_url":"https://api.github.com/users/Netzeband/followers","following_url":"https://api.github.com/users/Netzeband/following{/other_user}","gists_url":"https://api.github.com/users/Netzeband/gists{/gist_id}","starred_url":"https://api.github.com/users/Netzeband/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netzeband/subscriptions","organizations_url":"https://api.github.com/users/Netzeband/orgs","repos_url":"https://api.github.com/users/Netzeband/repos","events_url":"https://api.github.com/users/Netzeband/events{/privacy}","received_events_url":"https://api.github.com/users/Netzeband/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-01T17:43:27Z","updated_at":"2017-06-01T17:43:27Z","closed_at":null,"body":"Unfortunately the developers of this library did not spend any amount on effort to make this library compilable on Windows. Even the build-system, it not portable.\r\n\r\nI updated the windows port from https://github.com/bureau14/leveldb/blob/master, which was based on levelDB 1.18 to version 1.20. The following patches are necessary:\r\n\r\n1.) The CMakeList file from https://github.com/bureau14/leveldb/blob/master which works with 1.18\r\n2.) Some changes to this file to make it compatible with 1.20\r\n3.) Several files, which are necessary for windows (also taken form https://github.com/bureau14/leveldb/blob/master) combined with some adoptions to make everything compatible to 1.20.\r\n4.) Some adoptions to the tests. Windows don't like to delete a file, which is currently in use by the same process.\r\n\r\nYou can find the patches in the attached ZIP.\r\n[patches.zip](https://github.com/google/leveldb/files/1045595/patches.zip)\r\n\r\nFurthermore this is a appveyor.yml file, which compiles levelDB 1.20 on AppVeyor CI Build system for Windows 64bit, 32bit as Release and Debug build:\r\n\r\n```\r\nimage: Visual Studio 2015\r\nversion: 1.0.{build}\r\n\r\nenvironment:\r\n  matrix:\r\n    - PLATFORM: x86\r\n      BUILDTYPE: Debug\r\n    - PLATFORM: x64\r\n      BUILDTYPE: Debug\t\r\n    - PLATFORM: x86\r\n      BUILDTYPE: Release\r\n    - PLATFORM: x64\r\n      BUILDTYPE: Release\t\r\n\r\nclone_folder: c:\\projects\\leveldb\r\ninit:\r\n- if \"%PLATFORM%\"==\"x64\" call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" amd64\r\n- if \"%PLATFORM%\"==\"x86\" call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86\r\nbuild_script:\r\n- cmd: >-\r\n    cd c:\\projects\\leveldb\r\n\r\n    mkdir build\r\n\r\n    cd build\r\n\r\n    cmake --version\r\n\r\n    cmake -G \"NMake Makefiles\" .. -DCMAKE_INSTALL_PREFIX=../../install/appveyor -DCMAKE_BUILD_TYPE=%BUILDTYPE% -DBOOST_ROOT=C:\\Libraries\\boost_1_62_0\r\n\r\n    nmake install\r\ntest_script:\r\n- cmd: nmake test\r\n```\r\n\r\nI have not tested the CMake-build system on linux so far. But I will do it within the next weeks. If I see issues, I will release some additional patches.\r\n\r\nBy the way: Even on *nix systems CMake is a better choice as build system than pure Makefiles. It solves many dependencies by itself and on top of it will give you cross-compile possibility for free. Yeah I know, it is hard to use something different, when you are used to pure Makefiles. But give it a try.\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"Netzeband"}}