00001 //---------------------------------------------------------------------------- 00002 /** @file FuegoMainUtil.h */ 00003 //---------------------------------------------------------------------------- 00004 00005 #ifndef FUEGOMAIN_UTIL_H 00006 #define FUEGOMAIN_UTIL_H 00007 00008 #include <string> 00009 #include "boost/filesystem/path.hpp" 00010 00011 class GoBook; 00012 00013 //---------------------------------------------------------------------------- 00014 00015 namespace FuegoMainUtil 00016 { 00017 /** Try to load opening book from a set of known paths. 00018 The file name is "book.dat". The paths tried are (in this order): 00019 - the directory of the executable 00020 - ABS_TOP_SRCDIR/book 00021 - DATADIR/PACKAGE 00022 @param book The opening book to load 00023 @param programDir the directory of the executable (may be a relative 00024 path or an empty string) 00025 @throws SgException, if book is not found 00026 */ 00027 void LoadBook(GoBook& book, const boost::filesystem::path& programDir); 00028 00029 /** Return Fuego version. 00030 If the macro VERSION was defined by the build system during compile 00031 time, its value is used as the version, otherwise the version 00032 is "(__DATE__)". 00033 If SVNREV is defined, ( SVNREV ) is added. 00034 If compiled in debug mode, " (dbg)" is added. 00035 */ 00036 std::string Version(); 00037 } 00038 00039 //---------------------------------------------------------------------------- 00040 00041 #endif // FUEGOMAIN_UTIL_H