[bt-devel] Eureka!!
Greg Hellings
greg.hellings at gmail.com
Wed Feb 25 21:16:04 MST 2009
So - it is accomplished, accomplished and built. Ends up pretty much
all of the linker errors went away when I linked all the libraries and
Bibletime itself against the same Runtime Library (funny about that,
huh?). Even the INSTALL.vcproj created by CMake worked to install
Bibletime to the proper location (except for the libsword.dll, but I
forgive it for that). See it in first-run here:
http://www.utdallas.edu/~gsh062000/pictures/First_run.png
But when I clicked on "Apply" in the dialog, this happened:
(BibleTime 1.7.1.cvs) _FATAL_: ASSERT failure in QSettings: "empty
key", file io\qsettings.cpp, line 293
Opening the executable a second time brought it up fine, so I went to
Bookshelf Manager, and got the above error again. Then I installed
"The SWORD Project for Windows" and created an environment variable to
point SWORD_HOME to those modules. Low and behold, it opens and runs
and properly displays the text (I don't seem to find how to edit the
Personal Commentary portion, but I don't know if that is available at
all in BibleTime or not, and I am too lazy to open BibleCS again and
bother with installing a different commentary). But still no luck
with Bookshelf Manager.
Attached is the total Bibletime patch file I had to use, and the full
Build.txt narrative of what I needed to do to get the system up and
running. Tortoise seems to think I edited the entire
cswordmodulesearch.h file, but if you look closely, you'll notice that
the only change is removing #include <pthread.h>. There are also some
edits to the SWORD library that I had to do, including to the .vcproj,
which I already related to the maintainer of that file on IRC earlier.
Currently it appears that the whole build is about 5 MB but I have a
feeling I might be missing some of the dependencies, so I'm going to
be moving it over to a vritual (non-developement) machine, to see how
it fares and to make sure I have all the necessary library files
included. If you would like a binary build of it, to look over things
for your own joy, please contact me off-list and I'll try to get you
the file.
For those of you who are not interested in the Windows building or who
are currently in the world of Unix/Linux, please check the attached
patch file to see if it still configures and builds properly on your
system. If that is the case (it should be, almost all of the changes
were just making casts explicit or removing unused headers) it would
be nice to get most/all of the changes integrated back into SVN.
There is also a few manual source changes to the SWORD library which I
performed in the build process - I also submit those to the SWORD
experts for their consideration (mainly to dirent.h).
Happy coding, testing and bug fixing to everyone.
--Greg
-------------- next part --------------
Install VS 2008
Download and unpack the Qt4 source into a directory
Launch the VS 2008 Command Line from your Start Menu -> Visual Studio 2008 -> Visual Studio Tools -> Visual Studio 2008 Command Line
-switch to the directory with the unpacked Qt4 source
-run the command "configure" (this might take about a half hour or so)
-run the command "nmake" (this will probably take several hours)
Set an environment variable called QTDIR and set its value equal to the root of your Qt4 folder.
Add the Qt4 subdirectory bin\ to your Path
Create a directory on your Desktop called build
Download and unpack cURL into Desktop\build
Download and unpack sword-1.5.11 source into Desktop\build
-open sword-1.5.11/lib/vcppmake/vc8/libsword.vcproj
-Right click on "Solution 'libsword' (1 project)" -> Add -> Existing Project
-Navigate to the Desktop\build\curl-<version>\lib\curllib.vcproj and open it
-Right click on the libsword project entry in Solution Explorer -> Project Dependencies
-Click the box so that libsword depends on curllib and select OK
-Right click on curllib -> Properties then navigate to Configuration Properties -> C/C++ -> Preprocessor
-Edit Preprocessor Definitions: remove _USRDLL and add CURL_STATICLIB
-Select the Release configuration and repeat editing the Preprocessor Definitions
-Select OK
-Right click libsword -> Properties then navigate to Configuration Properties -> C/C++ -> General
-Edit Additional Include Directories and add an entry for Desktop\build\curl-<version>\include
-Under Configuration Properties -> C/C++ -> Preprocessor add CURLAVAILABLE and CURL_STATICLIB and SWMAKINGDLL to Preprocessor Definitions
-Do the previous 2 steps again for the configuration Release with ICU and select OK when finished
-Select File -> Save all
-Select Build -> Batch Build -> set curllib to build both Release and Debug versions and choose Build
-Right click libsword -> Properties and choose Linker -> General
-In Additional Library Directories add an entry for Desktop\build\curl-<version>\lib\Debug
-Under Release with ICU add an entry for Desktop\build\curl-<version>\lib\Release
-Selec All Configurations from the drop down menus
-Go to Configuration Properties -> Linker -> Input, under Additional Dependencies add curllib.lib, ws2_32.lib, winmm.lib and wldap32.lib and select OK when finished
-Under libsword -> Sword Source Files right click -> Add -> Existing item and naviage to Desktop\build\sword-1.5.11\src\modules\filters\teihtmlhref.cpp
-Repeat the above step for src\mgr\installmgr.cpp and src\mgr\curlftpt.cpp and src\modules\filters\osishtmlhref.cpp
-Edit the file osishtmlhref.h and add the macro SWDLLEXPORT on line 17 between the words "class" and "MyUserData"
-Edit src\utilfuns\win32\dirent.h - add a line #include <defs.h> and then add the modifier SWDLLEXPORT before the declaration of void rewinddir(DIR *); and save your changes
-Right click libsword and select build.
-Copy src\utilfuns\win32\dirent.h to include\
Download and unpack clucene-core to Desktop\build
-In VC right click on Solution 'libsword' (2 projects) -> Add -> Existing Project and navigate to clucene-core-<version>\win32\CLucene.vcproj and open it
-Select Build -> Batch Build and choose CLucene Debug and Release versions, then click Build
Open CMake and point its source AND binary directories to your CLucene directory and click "Configure." After it is doing Configuring, click "Configure" again and select OK to the dialog that pops up.
-Copy the file clucene-core-<version>\src\CLucene\clucene-config.h to clucene-core-<version>\build\lib\CLucene\clucene-config.h (you need to make this folder)
Download the Boost library headers and simply unpack them to Desktop\build - don't bother building or installing anything, all you need are headers
Pull the latest bibletime sources into Desktop\build into a directory titled bibletime-svn
-Open Cmake and tell it the source is in the recently pulled SVN folder
-Tell it to build in a parallel folder with -build or something like that
-Click Configure and select Visual Studio 9 2008
-Tell it to create the build directory, if it asks
-When it complains about the Boost folders, click "Cancel" and check "Show Advanced Values."
-For the first entry, Boost_INCLUDE_DIR, manually point it to Desktop\build\boost_<version>\
-For CLUCENE_INCLUDE_DIR manually select Desktop\build\clucene-core-<version>\src
-For CLUCENE_LIBRARY_DEBUG manually select Desktop\build\clucene-core-<version>\build\lib\clucene-coreUDMT.lib
-For CLUCENE_LIBRARY_DIR select Desktop\build\clucene-core-<version>\build\lib
-For CLUCENE_LIBRARY_RELEASE select Desktop\build\clucene-core-<version>\build\lib\clucene-coreUMT.lib
-Click configure again and just select OK through all the error messages
-Replace bibletime-svn\cmake\FindSword.cmake with the attached file and click "Configure" again
-Once again, click "OK" through all the error messages
-Now, manually edit the variables SWORD_INCLUDE_DIR to point to Desktop\build\sword-1.5.11\include
-And finally edit SWORD_LIBRARY to point to Desktop\build\sword-1.5.11\lib\vcppmake\vc8\ICUDebug\libsword.lib
-Click Configure again and select OK when CMake complains that it can't locate QTDBUS
-Change CMAKE_INSTALL_
-Select the OK button next to the Configure button when it is available
-Now go back to VS 2008 and right click on Solution 'libsword' (3 projects) -> Add -> Existing Project
-Navigate to build\bibletime-build\bibletime.vcproj and open it
-Right-click bibletime and select Set as StartUp Project
-Right-click bibletime -> Properties; Configuration Properties -> C/C++ -> General, set Warning Level to Level 1
-Edit the Additional Include Directories order and move the two bibletime entries to the top of the list, click Apply
-Configuration Properties -> C/C++ -> Code Generation, select the Runtime Library as Multi-threaded Debug and hit Apply
-Configuration Properties -> C/C++ -> Command Line, delete -Wall -O0 -g -fexceptions and hit Apply
-Configuration Properties -> C/C++ -> General, edit Additional Include Directories and change the reference to sword-1.5.11\include\sword and just delete the final sword from it, click Apply.
-Configuration Properties -> C/C++ -> Preprocessor, add SWUSINGDLL to the Preprocessor Definitions and hit Apply
-Click OK to get out of the Properties Dialog
-Right click Bibletime and select Project Dependencies, select CLucene and libsword and click OK
-Edit src\backend\cswordmodulesearch.h and delete the line that reads #include <pthread.h>
-Edit main.cpp and comment out lines 333 and 336
-Edit src\frontend\cinfodisplay.cpp and change lines 239, 241, 249, 257, 259 references to variable 'i' to be for variable 'dummy'
-Perform a search & replace on the current project for strcasecmp and replace it with stricmp and save the files that it modifies
-Remove the file bibletime_dbus_adaptor.cpp from the project
-For each project:
-Right click on the project name -> Properties -> C/C++ -> Code Generation -> Runtime Library
-Set the entry here to the same thing for all 4 projects, I tested it with Multi-threaded Debug DLL (/MDd)
-Select OK
-Right click Bibletime and click Build
Copy your sword-1.5.11\lib\vcppmake\vc8\ICUDebug\libsword.dll into bibletime-build\Debug
Copy bibletime-svn\pics\icons into bibletime-build\Debug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bibletime.diff
Type: application/octet-stream
Size: 18125 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/bt-devel/attachments/20090225/c3bed9f6/attachment-0001.obj>
More information about the bt-devel
mailing list