Skip to content

HavenDV/clucene

Repository files navigation

0) Building Clucene requires installing CMake first. Install from http://www.cmake.org/
Latest versision is cmake-3.4.2-win32-x86.exe for windows

1)  Go to the temp directory(c:\alpha-tpe-apps\temp) 

 Export source codes of clucene to c:\alpha-tpe-apps\temp\clucene. Take the latest stable revision (clucene-2.3.3.4) from <BUILD_ROOT>/Resources/Sources/clucene, and just copy it to the specified folder.

Alternatevely: Take the latest stable revision (clucene-2.3.3.4) from the internet.
(http://sourceforge.net/projects/clucene/)
NOTE: While there is no official support for VS2015, the source code here:
https://github.com/HavenDV/clucene


2) Open cmake gui by going to Start Menu->Programs->CMake Gui 
[there is a problem to build clucene from cmd line that's why we are not using it]
  Set the following values
  -Where the source code is : C:/alpha-tpe-apps/temp/clucene
  -Where to build binaries : C:/alpha-tpe-apps/temp/clucene/build

3) Press "Configure" button
   -In "Specify the generator for the project" choose "Visual Studio 14 2015" 
   -"Use Default Native Compilers" radio button should be checked
   -Press finish and wait for configure to complete
   - You will see errors of not found paths. It is expected on step 4 we will correct them.

4a) Create empty folder "clucene", so we have the path "C:/alpha-tpe-apps/lib/win32/clucene"
We will need to use it on next step.

4b) Check "Advanced" checkbox and put the following values once the configuration is complete
You can use the "Search" textbox to quickly search for each of these properties.
  ZLIB_INCLUDE_DIR=C:/alpha-tpe-apps/temp/clucene/src/ext/zlib
  ZLIB_LIBRARY_DEBUG=C:/alpha-tpe-apps/temp/zlib-1.2.8/build_2/zlibd.lib  --> Ensure to select .lib and not .dll!
  ZLIB_LIBRARY_RELEASE=C:/alpha-tpe-apps/temp/zlib-1.2.8/build_1/zlib.lib  --> Ensure to select .lib and not .dll! 
  Boost_DIR=C:/alpha-tpe-apps/temp/clucene/src/ext/boost
  CMAKE_INSTALL_PREFIX=C:/alpha-tpe-apps/lib/win32/clucene

5) Press "Configure" and once finished Press "Generate" button.

6) Go to the C:/alpha-tpe-apps/temp/clucene/build

7) Open clucene solution in the MS Visual C++ Express 2015 Community Edition IDE.
  (C:/alpha-tpe-apps/temp/clucene/build/clucene.sln)
  
  Accept project upgrade to 2015 version if needed.

8) Build project clucene-core with debug and release configurations.
  - build only clucene-core by right-clicking on "clucene-core" on Solution Explorer and clicking on Build.
  
Do this twice, first by selecting "Release" on and then selecting "Debug" on the TOOLBAR.


9) Build project INSTALL with debug and release configurations.
 - build only INSTALL by right-clicking on "INSTALL" on Solution Explorer and clicking on Build.
 
Do this twice, first by selecting "Release" on and then selecting "Debug" on the TOOLBAR.

10) Now the previously empty folder, "C:\alpha-tpe-apps\lib\win32\clucene\lib",
 will have all libraries needed to compile our project.
copy clucene-core.dll and clucene-shared.dll to C:\alpha-tpe-apps\dev\release-producer\assets\win\clucene