From cd45ae3d0f8da00f0be69dee015e3298acce1367 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 19 Jul 2011 20:02:31 +0200 Subject: Use system sqlite3/jthread libs if available --- src/CMakeLists.txt | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fd1591423..e1de23663 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,6 +43,8 @@ else() find_package(JPEG REQUIRED) find_package(BZip2 REQUIRED) find_package(PNG REQUIRED) + find_package(Jthread REQUIRED) + find_package(Sqlite3 REQUIRED) if(APPLE) FIND_LIBRARY(CARBON_LIB Carbon) FIND_LIBRARY(COCOA_LIB Cocoa) @@ -143,8 +145,8 @@ include_directories( ${CMAKE_BUILD_TYPE} ${PNG_INCLUDE_DIR} ${GETTEXT_INCLUDE_DIR} - "${PROJECT_SOURCE_DIR}/jthread" - "${PROJECT_SOURCE_DIR}/sqlite" + ${JTHREAD_INCLUDE_DIR} + ${SQLITE3_INCLUDE_DIR} ) set(EXECUTABLE_OUTPUT_PATH ../bin) @@ -163,8 +165,8 @@ if(BUILD_CLIENT) ${GETTEXT_LIBRARIES} ${PLATFORM_LIBS} ${CLIENT_PLATFORM_LIBS} - jthread - sqlite3 + ${JTHREAD_LIBRARY} + ${SQLITE3_LIBRARY} ) endif(BUILD_CLIENT) @@ -174,8 +176,8 @@ if(BUILD_SERVER) minetestserver ${ZLIB_LIBRARIES} ${PLATFORM_LIBS} - jthread - sqlite3 + ${JTHREAD_LIBRARY} + ${SQLITE3_LIBRARY} ) endif(BUILD_SERVER) @@ -296,7 +298,14 @@ add_custom_target(translation_de ALL COMMENT "mo update [de]" DEPENDS ${CMAKE_BI # Subdirectories -add_subdirectory(jthread) +if (JTHREAD_FOUND) +else (JTHREAD_FOUND) + add_subdirectory(jthread) +endif (JTHREAD_FOUND) + +if (SQLITE3_FOUND) +else (SQLITE3_FOUND) add_subdirectory(sqlite) +endif (SQLITE3_FOUND) #end -- cgit v1.2.3 From bcd3e1af2f2d2f29ca739ee138ef72357b5b7b3a Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 8 Jun 2011 17:27:30 +0200 Subject: Check the data path before usage When not running in place, check if the assumed data path in ../share/APPNAME exists. If it doesn't exist, fall back to ../data instead. This allows the program to run successfully from the checkout directory even without the run-in-place flag active. --- src/porting.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/porting.cpp b/src/porting.cpp index 7de042ab5..ff8cb3862 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "porting.h" #include "config.h" #include "debug.h" +#include "filesys.h" #ifdef __APPLE__ #include "CoreFoundation/CoreFoundation.h" @@ -210,6 +211,11 @@ void initializePaths() path_data = std::string(buf) + "/../share/" + APPNAME; //path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME; + if (!fs::PathExists(path_data)) { + dstream<<"WARNING: data path " << path_data << " not found!"; + path_data = std::string(buf) + "/../data"; + dstream<<" Trying " << path_data << std::endl; + } path_userdata = std::string(getenv("HOME")) + "/." + APPNAME; -- cgit v1.2.3 From 3fb5b7a3bd95eb6327c6894072739a7c28c711ce Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 9 Jun 2011 22:31:40 +0200 Subject: Set the window caption for the initial window too --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 1cc479d65..7d0ea12ab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1350,6 +1350,9 @@ int main(int argc, char *argv[]) // Set device in game parameters device = device; + + // Set the window caption + device->setWindowCaption(L"Minetest [Main Menu]"); // Create time getter g_timegetter = new IrrlichtTimeGetter(device); -- cgit v1.2.3