diff --git a/.travis.yml b/.travis.yml index 4bce211f7..d17af5463 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ compiler: - gcc - clang env: - - WINDOWS=32 - - WINDOWS=64 - - WINDOWS=no + - PLATFORM=Win32 + - PLATFORM=Win64 + - PLATFORM=Linux before_install: ./util/travis/before_install.sh script: ./util/travis/script.sh notifications: @@ -13,7 +13,7 @@ notifications: matrix: fast_finish: true exclude: - - env: WINDOWS=32 + - env: PLATFORM=Win32 compiler: clang - - env: WINDOWS=64 + - env: PLATFORM=Win64 compiler: clang diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d799f9ca..2561d1917 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,69 +1,62 @@ cmake_minimum_required(VERSION 2.6) + if(${CMAKE_VERSION} STREQUAL "2.8.2") - # bug http://vtk.org/Bug/view.php?id=11020 - message( WARNING "CMake/CPack version 2.8.2 will not create working .deb packages!") -endif(${CMAKE_VERSION} STREQUAL "2.8.2") + # Bug http://vtk.org/Bug/view.php?id=11020 + message(WARNING "CMake/CPack version 2.8.2 will not create working .deb packages!") +endif() # This can be read from ${PROJECT_NAME} after project() is called -project(minetest) +project(Minetest) +string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) -set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string") -# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing +# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing set(VERSION_MAJOR 0) set(VERSION_MINOR 4) set(VERSION_PATCH 12) -set(VERSION_PATCH_ORIG ${VERSION_PATCH}) +set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string") +set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") if(VERSION_EXTRA) - set(VERSION_PATCH ${VERSION_PATCH}-${VERSION_EXTRA}) + set(VERSION_STRING ${VERSION_STRING}-${VERSION_EXTRA}) else() # Comment the following line during release - set(VERSION_PATCH ${VERSION_PATCH}-dev) + set(VERSION_STRING "${VERSION_STRING}-dev") endif() -set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") -MESSAGE(STATUS "*** Will build version ${VERSION_STRING} ***") +message(STATUS "*** Will build version ${VERSION_STRING} ***") + # Configuration options - +set(DEFAULT_RUN_IN_PLACE FALSE) if(WIN32) - set(RUN_IN_PLACE 1 CACHE BOOL "Run directly in source directory structure") -else() - set(RUN_IN_PLACE 0 CACHE BOOL "Run directly in source directory structure") + set(DEFAULT_RUN_IN_PLACE TRUE) endif() +set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL + "Run directly in source directory structure") -# RUN_IN_PLACE is exported as a #define value, ensure it's 1/0 instead of ON/OFF -if(RUN_IN_PLACE) - set(RUN_IN_PLACE 1) -else() - set(RUN_IN_PLACE 0) -endif() -set(BUILD_CLIENT 1 CACHE BOOL "Build client") -if(WIN32 OR APPLE) - set(BUILD_SERVER 0 CACHE BOOL "Build server") -else() - set(BUILD_SERVER 1 CACHE BOOL "Build server") -endif() +set(BUILD_CLIENT TRUE CACHE BOOL "Build client") +set(BUILD_SERVER FALSE CACHE BOOL "Build server") -set(WARN_ALL 1 CACHE BOOL "Enable -Wall for Release build") + +set(WARN_ALL TRUE CACHE BOOL "Enable -Wall for Release build") if(NOT CMAKE_BUILD_TYPE) # Default to release set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Debug or Release" FORCE) endif() + # Included stuff set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") -include(${CMAKE_SOURCE_DIR}/cmake/Modules/misc.cmake) + # This is done here so that relative search paths are more reasnable find_package(Irrlicht) -# + # Installation -# if(WIN32) set(SHAREDIR ".") @@ -72,11 +65,11 @@ if(WIN32) set(EXAMPLE_CONF_DIR ".") set(LOCALEDIR "locale") elseif(APPLE) - set(BUNDLE_NAME ${PROJECT_NAME}.app) + set(BUNDLE_NAME ${PROJECT_NAME_LOWER}.app) set(BUNDLE_PATH "${BUNDLE_NAME}") set(BINDIR ${BUNDLE_NAME}/Contents/MacOS) set(SHAREDIR ${BUNDLE_NAME}/Contents/Resources) - set(DOCDIR "${SHAREDIR}/${PROJECT_NAME}") + set(DOCDIR "${SHAREDIR}/${PROJECT_NAME_LOWER}") set(EXAMPLE_CONF_DIR ${DOCDIR}) set(LOCALEDIR "${SHAREDIR}/locale") elseif(UNIX) # Linux, BSD etc @@ -91,15 +84,15 @@ elseif(UNIX) # Linux, BSD etc set(ICONDIR "unix/icons") set(LOCALEDIR "locale") else() - set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}") + set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}") set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") - set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}") + set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME_LOWER}") set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man") set(EXAMPLE_CONF_DIR ${DOCDIR}) set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications") set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata") set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons") - set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/locale") + set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME_LOWER}/locale") endif() endif() @@ -108,42 +101,50 @@ if(NOT CUSTOM_SHAREDIR STREQUAL "") set(SHAREDIR "${CUSTOM_SHAREDIR}") message(STATUS "Using SHAREDIR=${SHAREDIR}") endif() + set(CUSTOM_BINDIR "" CACHE STRING "Directory to install binaries into") if(NOT CUSTOM_BINDIR STREQUAL "") set(BINDIR "${CUSTOM_BINDIR}") message(STATUS "Using BINDIR=${BINDIR}") endif() + set(CUSTOM_DOCDIR "" CACHE STRING "Directory to install documentation into") if(NOT CUSTOM_DOCDIR STREQUAL "") set(DOCDIR "${CUSTOM_DOCDIR}") message(STATUS "Using DOCDIR=${DOCDIR}") endif() + set(CUSTOM_MANDIR "" CACHE STRING "Directory to install manpages into") if(NOT CUSTOM_MANDIR STREQUAL "") set(MANDIR "${CUSTOM_MANDIR}") message(STATUS "Using MANDIR=${MANDIR}") endif() + set(CUSTOM_EXAMPLE_CONF_DIR "" CACHE STRING "Directory to install example config file into") if(NOT CUSTOM_EXAMPLE_CONF_DIR STREQUAL "") set(EXAMPLE_CONF_DIR "${CUSTOM_EXAMPLE_CONF_DIR}") message(STATUS "Using EXAMPLE_CONF_DIR=${EXAMPLE_CONF_DIR}") endif() + set(CUSTOM_XDG_APPS_DIR "" CACHE STRING "Directory to install .desktop files into") if(NOT CUSTOM_XDG_APPS_DIR STREQUAL "") set(XDG_APPS_DIR "${CUSTOM_XDG_APPS_DIR}") message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}") endif() + set(CUSTOM_ICONDIR "" CACHE STRING "Directory to install icons into") if(NOT CUSTOM_ICONDIR STREQUAL "") set(ICONDIR "${CUSTOM_ICONDIR}") message(STATUS "Using ICONDIR=${ICONDIR}") endif() + set(CUSTOM_LOCALEDIR "" CACHE STRING "Directory to install l10n files into") if(NOT CUSTOM_LOCALEDIR STREQUAL "") set(LOCALEDIR "${CUSTOM_LOCALEDIR}") message(STATUS "Using LOCALEDIR=${LOCALEDIR}") endif() + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builtin" DESTINATION "${SHAREDIR}") install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client" DESTINATION "${SHAREDIR}") install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/minimal" DESTINATION "${SHAREDIR}/games") @@ -183,13 +184,13 @@ if(APPLE) install(FILES "misc/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents") endif() -# + # Subdirectories # Be sure to add all relevant definitions above this -# add_subdirectory(src) + # CPack set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An InfiniMiner/Minecraft inspired game") @@ -202,9 +203,9 @@ set(CPACK_PACKAGE_CONTACT "Perttu Ahola ") if(WIN32) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win64") - else(CMAKE_SIZEOF_VOID_P EQUAL 8) + else() set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32") - endif(CMAKE_SIZEOF_VOID_P EQUAL 8) + endif() set(CPACK_GENERATOR ZIP) elseif(APPLE) @@ -219,14 +220,16 @@ endif() include(CPack) + # Add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY) add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc COMMENT "Generating API documentation with Doxygen" VERBATIM ) -endif(DOXYGEN_FOUND) +endif() diff --git a/README.txt b/README.txt index d9eb9fe4b..0fadcaa2f 100644 --- a/README.txt +++ b/README.txt @@ -130,18 +130,21 @@ $ mv minetest_game-master minetest_game $ cd .. Build a version that runs directly from the source directory: -$ cmake . -DRUN_IN_PLACE=1 -$ make -j2 +$ cmake . -DRUN_IN_PLACE=TRUE +$ make -j Run it: $ ./bin/minetest - Use cmake . -LH to see all CMake options and their current state -- If you want to install it system-wide (or are making a distribution package), you will want to use -DRUN_IN_PLACE=0 -- You can build a bare server or a bare client by specifying -DBUILD_CLIENT=0 or -DBUILD_SERVER=0 +- If you want to install it system-wide (or are making a distribution package), + you will want to use -DRUN_IN_PLACE=FALSE +- You can build a bare server by specifying -DBUILD_SERVER=TRUE +- You can disable the client build by specifying -DBUILD_CLIENT=FALSE - You can select between Release and Debug build by -DCMAKE_BUILD_TYPE= - Debug build is slower, but gives much more useful output in a debugger -- If you build a bare server, you don't need to have Irrlicht installed. In that case use -DIRRLICHT_SOURCE_DIR=/the/irrlicht/source +- If you build a bare server, you don't need to have Irrlicht installed. + In that case use -DIRRLICHT_SOURCE_DIR=/the/irrlicht/source CMake options ------------- @@ -152,16 +155,17 @@ BUILD_SERVER - Build Minetest server CMAKE_BUILD_TYPE - Type of build (Release vs. Debug) Release - Release build Debug - Debug build + SemiDebug - Partially optimized debug build RelWithDebInfo - Release build with Debug information MinSizeRel - Release build with -Os passed to compiler to make executable as small as possible ENABLE_CURL - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http -ENABLE_FREETYPE - Build with Freetype2; Allows using TTF fonts +ENABLE_FREETYPE - Build with FreeType2; Allows using TTF fonts ENABLE_GETTEXT - Build with Gettext; Allows using translations ENABLE_GLES - Search for Open GLES headers & libraries and use them -ENABLE_LEVELDB - Build with LevelDB; Enables use of LevelDB, which is much faster than SQLite, as map backend -ENABLE_REDIS - Build with libhiredis; Enables use of redis map backend +ENABLE_LEVELDB - Build with LevelDB; Enables use of LevelDB map backend (faster than SQLite3) +ENABLE_REDIS - Build with libhiredis; Enables use of Redis map backend ENABLE_SOUND - Build with OpenAL, libogg & libvorbis; in-game Sounds -DISABLE_LUAJIT - Do not search for LuaJIT headers & library +ENABLE_LUAJIT - Build with LuaJIT (much faster than non-JIT Lua) RUN_IN_PLACE - Create a portable install (worlds, settings etc. in current directory) USE_GPROF - Enable profiling using GProf VERSION_EXTRA - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar) @@ -174,7 +178,7 @@ CURL_DLL - Only if building with cURL on Windows; path to CURL_INCLUDE_DIR - Only if building with cURL; directory where curl.h is located CURL_LIBRARY - Only if building with cURL; path to libcurl.a/libcurl.so/libcurl.lib EGL_INCLUDE_DIR - Only if building with GLES; directory that contains egl.h -EGL_egl_LIBRARY - Only if building with GLES; path to libEGL.a/libEGL.so +EGL_LIBRARY - Only if building with GLES; path to libEGL.a/libEGL.so FREETYPE_INCLUDE_DIR_freetype2 - Only if building with Freetype2; directory that contains an freetype directory with files such as ftimage.h in it FREETYPE_INCLUDE_DIR_ft2build - Only if building with Freetype2; directory that contains ft2build.h FREETYPE_LIBRARY - Only if building with Freetype2; path to libfreetype.a/libfreetype.so/freetype.lib @@ -190,8 +194,8 @@ IRRLICHT_LIBRARY - path to libIrrlicht.a/libIrrlicht.so/libIrrlic LEVELDB_INCLUDE_DIR - Only when building with LevelDB; directory that contains db.h LEVELDB_LIBRARY - Only when building with LevelDB; path to libleveldb.a/libleveldb.so/libleveldb.dll.a LEVELDB_DLL - Only when building with LevelDB on Windows; path to libleveldb.dll -REDIS_INCLUDE_DIR - Only when building with redis support; directory that contains hiredis.h -REDIS_LIBRARY - Only when building with redis support; path to libhiredis.a/libhiredis.so +REDIS_INCLUDE_DIR - Only when building with Redis support; directory that contains hiredis.h +REDIS_LIBRARY - Only when building with Redis support; path to libhiredis.a/libhiredis.so LUA_INCLUDE_DIR - Only if you want to use LuaJIT; directory where luajit.h is located LUA_LIBRARY - Only if you want to use LuaJIT; path to libluajit.a/libluajit.so MINGWM10_DLL - Only if compiling with MinGW; path to mingwm10.dll @@ -202,7 +206,7 @@ OPENAL_DLL - Only if building with sound on Windows; path t OPENAL_INCLUDE_DIR - Only if building with sound; directory where al.h is located OPENAL_LIBRARY - Only if building with sound; path to libopenal.a/libopenal.so/OpenAL32.lib OPENGLES2_INCLUDE_DIR - Only if building with GLES; directory that contains gl2.h -OPENGLES2_gl_LIBRARY - Only if building with GLES; path to libGLESv2.a/libGLESv2.so +OPENGLES2_LIBRARY - Only if building with GLES; path to libGLESv2.a/libGLESv2.so SQLITE3_INCLUDE_DIR - Only if you want to use SQLite from your OS; directory that contains sqlite3.h SQLITE3_LIBRARY - Only if you want to use the SQLite from your OS; path to libsqlite3.a/libsqlite3.so VORBISFILE_DLL - Only if building with sound on Windows; path to libvorbisfile-3.dll @@ -336,7 +340,7 @@ set irrlichtpath="C:\tmp\irrlicht-1.7.2" set builddir=%sourcedir%\bvc10 mkdir %builddir% pushd %builddir% -cmake %sourcedir% -G "Visual Studio 10" -DIRRLICHT_SOURCE_DIR=%irrlichtpath% -DRUN_IN_PLACE=1 -DCMAKE_INSTALL_PREFIX=%installpath% +cmake %sourcedir% -G "Visual Studio 10" -DIRRLICHT_SOURCE_DIR=%irrlichtpath% -DRUN_IN_PLACE=TRUE -DCMAKE_INSTALL_PREFIX=%installpath% if %errorlevel% neq 0 goto fail "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" ALL_BUILD.vcxproj /p:Configuration=Release if %errorlevel% neq 0 goto fail diff --git a/build/android/Makefile b/build/android/Makefile index 43ce24712..569a45a68 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -717,11 +717,11 @@ clean_all : clean_openal clean_ogg clean_manifest; \ sleep 1; \ $(RM) -r gen libs obj deps bin Debug and_env - + $(ROOT)/jni/src/android_version.h : - @echo "#define STR_HELPER(x) #x" \ + @echo "#ifndef ANDROID_MT_VERSION_H" \ >${ROOT}/jni/src/android_version.h; \ - echo "#define STR(x) STR_HELPER(x)" \ + echo "#define ANDROID_MT_VERSION_H" \ >> ${ROOT}/jni/src/android_version.h; \ echo "#define VERSION_MAJOR $$(cat ${ROOT}/../../CMakeLists.txt | \ grep ^set\(VERSION_MAJOR\ | sed 's/)/ /' | awk '{print $$2;}')" \ @@ -732,17 +732,16 @@ $(ROOT)/jni/src/android_version.h : echo "#define VERSION_PATCH $$(cat ${ROOT}/../../CMakeLists.txt | \ grep ^set\(VERSION_PATCH\ | sed 's/)/ /' | awk '{print $$2;}')" \ >> ${ROOT}/jni/src/android_version.h; \ - echo "#define VERSION_PATCH_ORIG $$(cat ${ROOT}/../../CMakeLists.txt | \ - grep ^set\(VERSION_PATCH\ | sed 's/)/ /' | awk '{print $$2;}')" \ - >> ${ROOT}/jni/src/android_version.h; \ export GITHASH=$$(git rev-parse --short=8 HEAD); \ export GITTAG=$$(git describe --abbrev=0 --tags); \ - echo "#define CMAKE_VERSION_GITHASH \"$$GITTAG-$$GITHASH-Android\"" \ + echo "#define VERSION_GITHASH \"$$GITTAG-$$GITHASH-Android\"" \ >> ${ROOT}/jni/src/android_version.h; \ - echo "#define CMAKE_VERSION_STRING STR(VERSION_MAJOR)\".\"STR(VERSION_MINOR)\ + echo "#define VERSION_STRING STR(VERSION_MAJOR)\".\"STR(VERSION_MINOR)\ \".\"STR(VERSION_PATCH)" \ + >> ${ROOT}/jni/src/android_version.h; \ + echo "#endif" \ >> ${ROOT}/jni/src/android_version.h; - + manifest : @VERS_MAJOR=$$(cat ${ROOT}/../../CMakeLists.txt | \ grep ^set\(VERSION_MAJOR\ | sed 's/)/ /' | awk '{print $$2;}'); \ diff --git a/builtin/mainmenu/common.lua b/builtin/mainmenu/common.lua index c1e8ee9c4..d6e2588fa 100644 --- a/builtin/mainmenu/common.lua +++ b/builtin/mainmenu/common.lua @@ -40,6 +40,18 @@ local function render_client_count(n) end end +local function configure_selected_world_params(idx) + local worldconfig = modmgr.get_worldconfig( + menudata.worldlist:get_list()[idx].path) + + if worldconfig.creative_mode ~= nil then + core.setting_set("creative_mode", worldconfig.creative_mode) + end + if worldconfig.enable_damage ~= nil then + core.setting_set("enable_damage", worldconfig.enable_damage) + end +end + -------------------------------------------------------------------------------- function image_column(tooltip, flagname) return "image," .. @@ -197,15 +209,7 @@ function menu_handle_key_up_down(fields,textlist,settingname) core.setting_set(settingname, menudata.worldlist:get_raw_index(newidx)) - local worldconfig = modmgr.get_worldconfig( - menudata.worldlist:get_list()[newidx].path) - - if worldconfig.creative_mode ~= nil then - core.setting_set("creative_mode", worldconfig.creative_mode) - end - if worldconfig.enable_damage ~= nil then - core.setting_set("enable_damage", worldconfig.enable_damage) - end + configure_selected_world_params(newidx) end return true end @@ -217,15 +221,8 @@ function menu_handle_key_up_down(fields,textlist,settingname) local newidx = oldidx + 1 core.setting_set(settingname, menudata.worldlist:get_raw_index(newidx)) - local worldconfig = modmgr.get_worldconfig( - menudata.worldlist:get_list()[newidx].path) - if worldconfig.creative_mode ~= nil then - core.setting_set("creative_mode", worldconfig.creative_mode) - end - if worldconfig.enable_damage ~= nil then - core.setting_set("enable_damage", worldconfig.enable_damage) - end + configure_selected_world_params(newidx) end return true diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index d008ec8b0..176796bef 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -139,11 +139,8 @@ local function init_globals() tv_main:add(tab_credits) tv_main:set_global_event_handler(main_event_handler) - if PLATFORM ~= "Android" then - tv_main:set_fixed_size(true) - else - tv_main:set_fixed_size(false) - end + + tv_main:set_fixed_size(false) if not (PLATFORM == "Android") then tv_main:set_tab(core.setting_get("maintab_LAST")) diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index 2a7aa26a5..77cd355dc 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -39,10 +39,15 @@ tab_credits = { "Nathanael Courant (Nore/Novatux) ,".. "BlockMen,".. "Craig Robbins (Zeno),".. + "Loic Blot (nerzhul/nrz),".. + "paramat,".. ",".. "#FFFF00" .. fgettext("Active Contributors") .. "," .. + "SmallJoker ," .. + "est31 ," .. + "gregorycu,".. + "Andrew Ward (rubenwardy) ," .. "TriBlade9 ,".. - "SmallJoker ,".. "Zefram ,".. "," .. "#FFFF00" .. fgettext("Previous Contributors") .. "," .. diff --git a/cmake/Modules/FindCURL.cmake b/cmake/Modules/FindCURL.cmake index 975b8088c..2ec866ef9 100644 --- a/cmake/Modules/FindCURL.cmake +++ b/cmake/Modules/FindCURL.cmake @@ -1,47 +1,19 @@ -# - Find curl -# Find the native CURL headers and libraries. -# -# CURL_INCLUDE_DIR - where to find curl/curl.h, etc. -# CURL_LIBRARY - List of libraries when using curl. -# CURL_FOUND - True if curl found. +mark_as_advanced(CURL_LIBRARY CURL_INCLUDE_DIR) -if( UNIX ) - FIND_PATH(CURL_INCLUDE_DIR NAMES curl.h - PATHS - /usr/local/include/curl - /usr/include/curl - ) +find_library(CURL_LIBRARY NAMES curl) +find_path(CURL_INCLUDE_DIR NAMES curl/curl.h) - FIND_LIBRARY(CURL_LIBRARY NAMES curl - PATHS - /usr/local/lib - /usr/lib - ) -else( UNIX ) - FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h) # Look for the header file. - FIND_LIBRARY(CURL_LIBRARY NAMES curl) # Look for the library. - FIND_FILE(CURL_DLL NAMES libcurl.dll - PATHS - "c:/windows/system32" - DOC "Path of the cURL dll (for installation)") - INCLUDE(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if - FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR) # all listed variables are TRUE -endif( UNIX ) +set(CURL_REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR) -if( WIN32 ) - if( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL ) # libcurl.dll is required on Windows - SET(CURL_FOUND TRUE) - else( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL ) - SET(CURL_FOUND FALSE) - endif( CURL_LIBRARY AND CURL_INCLUDE_DIR AND CURL_DLL ) -else ( WIN32 ) - if( CURL_LIBRARY AND CURL_INCLUDE_DIR ) - SET(CURL_FOUND TRUE) - else( CURL_LIBRARY AND CURL_INCLUDE_DIR ) - SET(CURL_FOUND FALSE) - endif( CURL_LIBRARY AND CURL_INCLUDE_DIR ) -endif ( WIN32 ) +if(WIN32) + find_file(CURL_DLL NAMES libcurl-4.dll + PATHS + "C:/Windows/System32" + DOC "Path to the cURL DLL (for installation)") + mark_as_advanced(CURL_DLL) + set(CURL_REQUIRED_VARS ${CURL_REQUIRED_VARS} CURL_DLL) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CURL DEFAULT_MSG ${CURL_REQUIRED_VARS}) -MESSAGE(STATUS "CURL_INCLUDE_DIR = ${CURL_INCLUDE_DIR}") -MESSAGE(STATUS "CURL_LIBRARY = ${CURL_LIBRARY}") -MESSAGE(STATUS "CURL_DLL = ${CURL_DLL}") diff --git a/cmake/Modules/FindGettextLib.cmake b/cmake/Modules/FindGettextLib.cmake index 5c992f0fa..cb1ce7b91 100644 --- a/cmake/Modules/FindGettextLib.cmake +++ b/cmake/Modules/FindGettextLib.cmake @@ -1,85 +1,78 @@ -# Package finder for gettext libs and include files -SET(CUSTOM_GETTEXT_PATH "${PROJECT_SOURCE_DIR}/../../gettext" +set(CUSTOM_GETTEXT_PATH "${PROJECT_SOURCE_DIR}/../../gettext" CACHE FILEPATH "path to custom gettext") -# by default -SET(GETTEXT_FOUND FALSE) - -FIND_PATH(GETTEXT_INCLUDE_DIR +find_path(GETTEXT_INCLUDE_DIR NAMES libintl.h PATHS "${CUSTOM_GETTEXT_PATH}/include" - DOC "gettext include directory") + DOC "GetText include directory") -FIND_PROGRAM(GETTEXT_MSGFMT +find_program(GETTEXT_MSGFMT NAMES msgfmt PATHS "${CUSTOM_GETTEXT_PATH}/bin" - DOC "path to msgfmt") + DOC "Path to msgfmt") + +set(GETTEXT_REQUIRED_VARS GETTEXT_INCLUDE_DIR GETTEXT_MSGFMT) if(APPLE) - FIND_LIBRARY(GETTEXT_LIBRARY + find_library(GETTEXT_LIBRARY NAMES libintl.a PATHS "${CUSTOM_GETTEXT_PATH}/lib" - DOC "gettext *intl*.lib") + DOC "GetText library") - FIND_LIBRARY(ICONV_LIBRARY + find_library(ICONV_LIBRARY NAMES libiconv.dylib PATHS "/usr/lib" - DOC "iconv lib") + DOC "IConv library") + set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_LIBRARY ICONV_LIBRARY) endif(APPLE) -# modern Linux, as well as Mac, seem to not need require special linking -# they do not because gettext is part of glibc -# TODO check the requirements on other BSDs and older Linux -IF (WIN32) - IF(MSVC) - SET(GETTEXT_LIB_NAMES +# Modern Linux, as well as OSX, does not require special linking because +# GetText is part of glibc. +# TODO: check the requirements on other BSDs and older Linux +if(WIN32) + if(MSVC) + set(GETTEXT_LIB_NAMES libintl.lib intl.lib libintl3.lib intl3.lib) - ELSE() - SET(GETTEXT_LIB_NAMES + else() + set(GETTEXT_LIB_NAMES libintl.dll.a intl.dll.a libintl3.dll.a intl3.dll.a) - ENDIF() - FIND_LIBRARY(GETTEXT_LIBRARY + endif() + find_library(GETTEXT_LIBRARY NAMES ${GETTEXT_LIB_NAMES} PATHS "${CUSTOM_GETTEXT_PATH}/lib" - DOC "gettext *intl*.lib") - FIND_FILE(GETTEXT_DLL + DOC "GetText library") + find_file(GETTEXT_DLL NAMES libintl.dll intl.dll libintl3.dll intl3.dll PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib" DOC "gettext *intl*.dll") - FIND_FILE(GETTEXT_ICONV_DLL + find_file(GETTEXT_ICONV_DLL NAMES libiconv2.dll PATHS "${CUSTOM_GETTEXT_PATH}/bin" "${CUSTOM_GETTEXT_PATH}/lib" DOC "gettext *iconv*.lib") -ENDIF(WIN32) + set(GETTEXT_REQUIRED_VARS ${GETTEXT_REQUIRED_VARS} GETTEXT_DLL GETTEXT_ICONV_DLL) +endif(WIN32) -IF(GETTEXT_INCLUDE_DIR AND GETTEXT_MSGFMT) - IF (WIN32) - # in the Win32 case check also for the extra linking requirements - IF(GETTEXT_LIBRARY AND GETTEXT_DLL AND GETTEXT_ICONV_DLL) - SET(GETTEXT_FOUND TRUE) - ENDIF() - ELSE(WIN32) - # *BSD variants require special linkage as they don't use glibc - IF(${CMAKE_SYSTEM_NAME} MATCHES "BSD") - SET(GETTEXT_LIBRARY "intl") - ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "BSD") - SET(GETTEXT_FOUND TRUE) - ENDIF(WIN32) -ENDIF() -IF(GETTEXT_FOUND) - SET(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po) - SET(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale//LC_MESSAGES) - SET(GETTEXT_MO_DEST_PATH ${LOCALEDIR}//LC_MESSAGES) - FILE(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*") - LIST(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot) - LIST(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES timestamp) - MACRO(SET_MO_PATHS _buildvar _destvar _locale) - STRING(REPLACE "" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH}) - STRING(REPLACE "" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH}) - ENDMACRO(SET_MO_PATHS) -ELSE() - SET(GETTEXT_INCLUDE_DIR "") - SET(GETTEXT_LIBRARY "") -ENDIF() +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GetText DEFAULT_MSG ${GETTEXT_REQUIRED_VARS}) + + +if(GETTEXT_FOUND) + # BSD variants require special linkage as they don't use glibc + if(${CMAKE_SYSTEM_NAME} MATCHES "BSD") + set(GETTEXT_LIBRARY "intl") + endif() + + set(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po) + set(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale//LC_MESSAGES) + set(GETTEXT_MO_DEST_PATH ${LOCALEDIR}//LC_MESSAGES) + file(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*") + list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot) + list(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES timestamp) + macro(SET_MO_PATHS _buildvar _destvar _locale) + string(REPLACE "" ${_locale} ${_buildvar} ${GETTEXT_MO_BUILD_PATH}) + string(REPLACE "" ${_locale} ${_destvar} ${GETTEXT_MO_DEST_PATH}) + endmacro() +endif() + diff --git a/cmake/Modules/FindIrrlicht.cmake b/cmake/Modules/FindIrrlicht.cmake index a84765d4e..8dda15722 100644 --- a/cmake/Modules/FindIrrlicht.cmake +++ b/cmake/Modules/FindIrrlicht.cmake @@ -1,7 +1,8 @@ -#FindIrrlicht.cmake +mark_as_advanced(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR IRRLICHT_DLL) set(IRRLICHT_SOURCE_DIR "" CACHE PATH "Path to irrlicht source directory (optional)") + # Find include directory if(NOT IRRLICHT_SOURCE_DIR STREQUAL "") @@ -24,65 +25,47 @@ if(NOT IRRLICHT_SOURCE_DIR STREQUAL "") set(IRRLICHT_LIBRARY_NAMES libIrrlicht.a) endif() - FIND_PATH(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h + find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h PATHS ${IRRLICHT_SOURCE_DIR_INCLUDE} NO_DEFAULT_PATH ) - FIND_LIBRARY(IRRLICHT_LIBRARY NAMES ${IRRLICHT_LIBRARY_NAMES} + find_library(IRRLICHT_LIBRARY NAMES ${IRRLICHT_LIBRARY_NAMES} PATHS ${IRRLICHT_SOURCE_DIR_LIBS} NO_DEFAULT_PATH ) else() - - FIND_PATH(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h + find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h PATHS /usr/local/include/irrlicht /usr/include/irrlicht ) - FIND_LIBRARY(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht + find_library(IRRLICHT_LIBRARY NAMES libIrrlicht.so libIrrlicht.a Irrlicht PATHS /usr/local/lib /usr/lib ) endif() -MESSAGE(STATUS "IRRLICHT_SOURCE_DIR = ${IRRLICHT_SOURCE_DIR}") -MESSAGE(STATUS "IRRLICHT_INCLUDE_DIR = ${IRRLICHT_INCLUDE_DIR}") -MESSAGE(STATUS "IRRLICHT_LIBRARY = ${IRRLICHT_LIBRARY}") -# On windows, find the dll for installation +# On Windows, find the DLL for installation if(WIN32) if(MSVC) - FIND_FILE(IRRLICHT_DLL NAMES Irrlicht.dll - PATHS - "${IRRLICHT_SOURCE_DIR}/bin/Win32-VisualStudio" - DOC "Path of the Irrlicht dll (for installation)" - ) + set(IRRLICHT_COMPILER "VisualStudio") else() - FIND_FILE(IRRLICHT_DLL NAMES Irrlicht.dll - PATHS - "${IRRLICHT_SOURCE_DIR}/bin/Win32-gcc" - DOC "Path of the Irrlicht dll (for installation)" - ) + set(IRRLICHT_COMPILER "gcc") endif() - MESSAGE(STATUS "IRRLICHT_DLL = ${IRRLICHT_DLL}") + find_file(IRRLICHT_DLL NAMES Irrlicht.dll + PATHS + "${IRRLICHT_SOURCE_DIR}/bin/Win32-${IRRLICHT_COMPILER}" + DOC "Path of the Irrlicht dll (for installation)" + ) endif(WIN32) -# handle the QUIETLY and REQUIRED arguments and set IRRLICHT_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Irrlicht DEFAULT_MSG IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) - -IF(IRRLICHT_FOUND) - SET(IRRLICHT_LIBRARIES ${IRRLICHT_LIBRARY}) -ELSE(IRRLICHT_FOUND) - SET(IRRLICHT_LIBRARIES) -ENDIF(IRRLICHT_FOUND) - -MARK_AS_ADVANCED(IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR IRRLICHT_DLL) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Irrlicht DEFAULT_MSG IRRLICHT_LIBRARY IRRLICHT_INCLUDE_DIR) diff --git a/cmake/Modules/FindJson.cmake b/cmake/Modules/FindJson.cmake index a9178a225..8e355b93f 100644 --- a/cmake/Modules/FindJson.cmake +++ b/cmake/Modules/FindJson.cmake @@ -1,18 +1,27 @@ -# Look for json, use our own if not found +# Look for JSONCPP if asked to. +# We use a bundled version by default because some distros ship versions of +# JSONCPP that cause segfaults and other memory errors when we link with them. +# See https://github.com/minetest/minetest/issues/1793 -#FIND_PATH(JSON_INCLUDE_DIR json.h) +mark_as_advanced(JSON_LIBRARY JSON_INCLUDE_DIR) +option(ENABLE_SYSTEM_JSONCPP "Enable using a system-wide JSONCPP. May cause segfaults and other memory errors!" FALSE) -#FIND_LIBRARY(JSON_LIBRARY NAMES jsoncpp) +if(ENABLE_SYSTEM_JSONCPP) + find_library(JSON_LIBRARY NAMES jsoncpp) + find_path(JSON_INCLUDE_DIR json/features.h) -#IF(JSON_LIBRARY AND JSON_INCLUDE_DIR) -# SET( JSON_FOUND TRUE ) -#ENDIF(JSON_LIBRARY AND JSON_INCLUDE_DIR) + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(JSONCPP DEFAULT_MSG JSON_LIBRARY JSON_INCLUDE_DIR) + + if(JSONCPP_FOUND) + message(STATUS "Using system JSONCPP library.") + endif() +endif() + +if(NOT JSONCPP_FOUND) + message(STATUS "Using bundled JSONCPP library.") + set(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json) + set(JSON_LIBRARY jsoncpp) + add_subdirectory(json) +endif() -#IF(JSON_FOUND) -# MESSAGE(STATUS "Found system jsoncpp header file in ${JSON_INCLUDE_DIR}") -# MESSAGE(STATUS "Found system jsoncpp library ${JSON_LIBRARY}") -#ELSE(JSON_FOUND) - SET(JSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/json) - SET(JSON_LIBRARY jsoncpp) - MESSAGE(STATUS "Using project jsoncpp library") -#ENDIF(JSON_FOUND) diff --git a/cmake/Modules/FindLua.cmake b/cmake/Modules/FindLua.cmake new file mode 100644 index 000000000..479dfcf41 --- /dev/null +++ b/cmake/Modules/FindLua.cmake @@ -0,0 +1,25 @@ + +option(ENABLE_LUAJIT "Enable LuaJIT support" TRUE) +mark_as_advanced(LUA_LIBRARY LUA_INCLUDE_DIR) +set(USE_LUAJIT FALSE) + +if(ENABLE_LUAJIT) + find_library(LUA_LIBRARY luajit + NAMES luajit-5.1) + find_path(LUA_INCLUDE_DIR luajit.h + NAMES luajit.h + PATH_SUFFIXES luajit-2.0) + if(LUA_LIBRARY AND LUA_INCLUDE_DIR) + set(USE_LUAJIT TRUE) + endif() +else() + message (STATUS "LuaJIT detection disabled! (ENABLE_LUAJIT=0)") +endif() + +if(NOT USE_LUAJIT) + message(STATUS "LuaJIT not found, using bundled Lua.") + set(LUA_LIBRARY "lua") + set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") + add_subdirectory(lua) +endif() + diff --git a/cmake/Modules/FindOpenGLES2.cmake b/cmake/Modules/FindOpenGLES2.cmake index 42d31c898..a8622f3b2 100644 --- a/cmake/Modules/FindOpenGLES2.cmake +++ b/cmake/Modules/FindOpenGLES2.cmake @@ -16,115 +16,97 @@ # EGL_INCLUDE_DIR - the EGL include directory # EGL_LIBRARIES - Link these to use EGL -# win32, apple, android NOT TESED -# linux tested and works - -IF (WIN32) - IF (CYGWIN) - - FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h ) - - FIND_LIBRARY(OPENGLES2_gl_LIBRARY libGLESv2 ) - - ELSE (CYGWIN) - - IF(BORLAND) - SET (OPENGLES2_gl_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for win32") - ELSE(BORLAND) - # todo - # SET (OPENGLES_gl_LIBRARY ${SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32" - ENDIF(BORLAND) - - ENDIF (CYGWIN) - -ELSE (WIN32) - - IF (APPLE) +# Win32, Apple, and Android are not tested! +# Linux tested and works +if(WIN32) + if(CYGWIN) + find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h) + find_library(OPENGLES2_LIBRARY libGLESv2) + else() + if(BORLAND) + set(OPENGLES2_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for Win32") + else() + # TODO + # set(OPENGLES_LIBRARY ${SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32" + endif() + endif() +elseif(APPLE) create_search_paths(/Developer/Platforms) findpkg_framework(OpenGLES2) - set(OPENGLES2_gl_LIBRARY "-framework OpenGLES") + set(OPENGLES2_LIBRARY "-framework OpenGLES") +else() + find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h + PATHS /usr/openwin/share/include + /opt/graphics/OpenGL/include + /usr/X11R6/include + /usr/include + ) - ELSE(APPLE) + find_library(OPENGLES2_LIBRARY + NAMES GLESv2 + PATHS /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib /usr/X11R6/lib + /usr/lib + ) - FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h - /usr/openwin/share/include - /opt/graphics/OpenGL/include /usr/X11R6/include - /usr/include - ) - - FIND_LIBRARY(OPENGLES2_gl_LIBRARY - NAMES GLESv2 - PATHS /opt/graphics/OpenGL/lib - /usr/openwin/lib - /usr/shlib /usr/X11R6/lib - /usr/lib - ) - - IF (NOT BUILD_ANDROID) - FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h - /usr/openwin/share/include - /opt/graphics/OpenGL/include /usr/X11R6/include - /usr/include + if(NOT BUILD_ANDROID) + find_path(EGL_INCLUDE_DIR EGL/egl.h + PATHS /usr/openwin/share/include + /opt/graphics/OpenGL/include + /usr/X11R6/include + /usr/include ) - FIND_LIBRARY(EGL_egl_LIBRARY - NAMES EGL - PATHS /opt/graphics/OpenGL/lib + find_library(EGL_LIBRARY + NAMES EGL + PATHS /opt/graphics/OpenGL/lib /usr/openwin/lib - /usr/shlib /usr/X11R6/lib + /usr/shlib + /usr/X11R6/lib /usr/lib ) - # On Unix OpenGL most certainly always requires X11. - # Feel free to tighten up these conditions if you don't - # think this is always true. - # It's not true on OSX. + # On Unix OpenGL usually requires X11. + # It doesn't require X11 on OSX. - IF (OPENGLES2_gl_LIBRARY) - IF(NOT X11_FOUND) - INCLUDE(FindX11) - ENDIF(NOT X11_FOUND) - IF (X11_FOUND) - IF (NOT APPLE) - SET (OPENGLES2_LIBRARIES ${X11_LIBRARIES}) - ENDIF (NOT APPLE) - ENDIF (X11_FOUND) - ENDIF (OPENGLES2_gl_LIBRARY) - ENDIF () + if(OPENGLES2_LIBRARY) + if(NOT X11_FOUND) + include(FindX11) + endif() + if(X11_FOUND) + set(OPENGLES2_LIBRARIES ${X11_LIBRARIES}) + endif() + endif() + endif() +endif() - ENDIF(APPLE) -ENDIF (WIN32) +set(OPENGLES2_LIBRARIES ${OPENGLES2_LIBRARIES} ${OPENGLES2_LIBRARY}) -#SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES}) +if(BUILD_ANDROID) + if(OPENGLES2_LIBRARY) + set(EGL_LIBRARIES) + set(OPENGLES2_FOUND TRUE) + endif() +else() + if(OPENGLES2_LIBRARY AND EGL_LIBRARY) + set(OPENGLES2_LIBRARIES ${OPENGLES2_LIBRARY} ${OPENGLES2_LIBRARIES}) + set(EGL_LIBRARIES ${EGL_LIBRARY} ${EGL_LIBRARIES}) + set(OPENGLES2_FOUND TRUE) + endif() +endif() -IF (BUILD_ANDROID) - IF(OPENGLES2_gl_LIBRARY) - SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES}) - SET( EGL_LIBRARIES) - SET( OPENGLES2_FOUND "YES" ) - ENDIF(OPENGLES2_gl_LIBRARY) -ELSE () - - SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES}) - - IF(OPENGLES2_gl_LIBRARY AND EGL_egl_LIBRARY) - SET( OPENGLES2_LIBRARIES ${OPENGLES2_gl_LIBRARY} ${OPENGLES2_LIBRARIES}) - SET( EGL_LIBRARIES ${EGL_egl_LIBRARY} ${EGL_LIBRARIES}) - SET( OPENGLES2_FOUND "YES" ) - ENDIF(OPENGLES2_gl_LIBRARY AND EGL_egl_LIBRARY) - -ENDIF () - -MARK_AS_ADVANCED( - OPENGLES2_INCLUDE_DIR - OPENGLES2_gl_LIBRARY - EGL_INCLUDE_DIR - EGL_egl_LIBRARY +mark_as_advanced( + OPENGLES2_INCLUDE_DIR + OPENGLES2_LIBRARY + EGL_INCLUDE_DIR + EGL_LIBRARY ) -IF(OPENGLES2_FOUND) - MESSAGE(STATUS "Found system opengles2 library ${OPENGLES2_LIBRARIES}") -ELSE () - SET(OPENGLES2_LIBRARIES "") -ENDIF () +if(OPENGLES2_FOUND) + message(STATUS "Found system OpenGL ES 2 library: ${OPENGLES2_LIBRARIES}") +else() + set(OPENGLES2_LIBRARIES "") +endif() + diff --git a/cmake/Modules/GenerateVersion.cmake b/cmake/Modules/GenerateVersion.cmake index 4a7f183da..76a0a90c6 100644 --- a/cmake/Modules/GenerateVersion.cmake +++ b/cmake/Modules/GenerateVersion.cmake @@ -2,14 +2,14 @@ if(VERSION_EXTRA) set(VERSION_GITHASH "${VERSION_STRING}") -else(VERSION_EXTRA) +else() execute_process(COMMAND git describe --always --tag --dirty WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}" OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) if(VERSION_GITHASH) - message(STATUS "*** Detected git version ${VERSION_GITHASH} ***") + message(STATUS "*** Detected Git version ${VERSION_GITHASH} ***") else() set(VERSION_GITHASH "${VERSION_STRING}") endif() @@ -18,3 +18,4 @@ endif() configure_file( ${GENERATE_VERSION_SOURCE_DIR}/cmake_config_githash.h.in ${GENERATE_VERSION_BINARY_DIR}/cmake_config_githash.h) + diff --git a/cmake/Modules/misc.cmake b/cmake/Modules/misc.cmake deleted file mode 100644 index 0bd2e3fce..000000000 --- a/cmake/Modules/misc.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# -# Random macros -# - -# Not used ATM - -MACRO (GETDATETIME RESULT) - IF (WIN32) - EXECUTE_PROCESS(COMMAND "cmd" /C echo %date% %time% OUTPUT_VARIABLE ${RESULT}) - string(REGEX REPLACE "\n" "" ${RESULT} "${${RESULT}}") - ELSEIF(UNIX) - EXECUTE_PROCESS(COMMAND "date" "+%Y-%m-%d_%H:%M:%S" OUTPUT_VARIABLE ${RESULT}) - string(REGEX REPLACE "\n" "" ${RESULT} "${${RESULT}}") - ELSE (WIN32) - MESSAGE(SEND_ERROR "date not implemented") - SET(${RESULT} "Unknown") - ENDIF (WIN32) - - string(REGEX REPLACE " " "_" ${RESULT} "${${RESULT}}") -ENDMACRO (GETDATETIME) - diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 0b12652f1..1431181f1 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1903,10 +1903,12 @@ and `minetest.auth_reload` call the authetification handler. * Sets the noiseparams setting of `name` to the noiseparams table specified in `noiseparams`. * `set_default` is an optional boolean (default: `true`) that specifies whether the setting should be applied to the default config or current active config -* `minetest.generate_ores(vm, p1, p2)` - * Generate all registered ores within the VoxelManip `vm` and in the area from p1 to p2. -* `minetest.generate_decorations(vm, p1, p2)` - * Generate all registered decorations within the VoxelManip `vm` and in the area from p1 to p2. +* `minetest.generate_ores(vm, pos1, pos2)` + * Generate all registered ores within the VoxelManip `vm` and in the area from `pos1` to `pos2`. + * `pos1` and `pos2` are optional and default to mapchunk minp and maxp. +* `minetest.generate_decorations(vm, pos1, pos2)` + * Generate all registered decorations within the VoxelManip `vm` and in the area from `pos1` to `pos2`. + * `pos1` and `pos2` are optional and default to mapchunk minp and maxp. * `minetest.clear_objects()` * clear all objects in the environments * `minetest.delete_area(pos1, pos2)` @@ -3021,7 +3023,7 @@ Definition tables ^ Called after destructing node when node was dug using minetest.node_dig / minetest.dig_node ^ default: nil ]] - can_dig = function(pos,player) --[[ + can_dig = function(pos, [player]) --[[ ^ returns true if node can be dug, or false if not ^ default: nil ]] diff --git a/doc/minetest.6 b/doc/minetest.6 index cd818e1d8..036cea6c9 100644 --- a/doc/minetest.6 +++ b/doc/minetest.6 @@ -1,12 +1,18 @@ -.\" Minetest man page .TH minetest 6 "10 September 2013" "" "" .SH NAME -minetest \- Multiplayer infinite-world block sandbox +minetest, minetestserver \- Multiplayer infinite-world block sandbox .SH SYNOPSIS .B minetest -[ OPTION ... ] +[\fB--server SERVER OPTIONS\fR | \fBCLIENT OPTIONS\fR] +[\fBCOMMON OPTIONS\fR] +[\fBWORLD PATH\fR] + +.B minetestserver +[\fBSERVER OPTIONS\fR] +[\fBCOMMON OPTIONS\fR] +[\fBWORLD PATH\fR] .SH DESCRIPTION .B Minetest @@ -14,79 +20,79 @@ is one of the first InfiniMiner/Minecraft(/whatever) inspired games (started Oct .PP The main design philosophy is to keep it technically simple, stable and portable. It will be kept lightweight enough to run on fairly old hardware. -.SH OPTIONS +.SH COMMON OPTIONS .TP -\-\-address -Address to connect to +.B \-\-help +Print allowed options and exit .TP -\-\-config +.B \-\-version +Print version information and exit +.TP +.B \-\-config Load configuration from specified file .TP -\-\-disable\-unittests -Disable unit tests -.TP -\-\-enable\-unittests -Enable unit tests -.TP -\-\-gameid -Set gameid -.TP -\-\-go -Disable main menu -.TP -\-\-help -Show allowed options -.TP -\-\-version -Show version information -.TP -\-\-logfile +.B \-\-logfile Set logfile path (debug.txt) .TP -\-\-map\-dir -Same as \-\-world (deprecated) -.TP -\-\-name -Set player name -.TP -\-\-password -Set password -.TP -\-\-port -Set network port (UDP) to use -.TP -\-\-random\-input -Enable random user input, for testing -.TP -\-\-server -Run dedicated server -.TP -\-\-speedtests -Run speed tests -.TP -\-\-videomodes -List available video modes -.TP -\-\-info +.B \-\-info Print more information to console .TP -\-\-verbose +.B \-\-verbose Print even more information to console .TP -\-\-trace +.B \-\-trace Print enormous amounts of information to console .TP -\-\-world -Set world path +.B \-\-gameid +Set gameid .TP -\-\-migrate -Migrate from current map backend to another. Possible values are sqlite3 -and leveldb. Only works when using \-\-server. - -.SH ENVIRONMENT VARIABLES - +.B \-\-worldname +Set world path by name .TP -MINETEST_SUBGAME_PATH +.B \-\-world | list +Set world path or list worlds +.TP +.B \-\-map\-dir +Same as \-\-world (deprecated) +.TP +.B \-\-port +Set network port (UDP) to use +.TP +.B \-\-run\-unittests +Run unit tests and exit + +.SH CLIENT OPTIONS +.TP +.B \-\-address +Address to connect to +.TP +.B \-\-go +Disable main menu +.TP +.B \-\-name +Set player name +.TP +.B \-\-password +Set password +.TP +.B \-\-random\-input +Enable random user input, for testing (client only) +.TP +.B \-\-videomodes +List available video modes (client only) +.TP +.B \-\-speedtests +Run speed tests + +.SH SERVER OPTIONS +.TP +.B \-\-migrate +Migrate from current map backend to another. Possible values are sqlite3, +leveldb, redis, and dummy. + +.SH ENVIRONMENT +.TP +.B MINETEST_SUBGAME_PATH Colon delimited list of directories to search for subgames. .SH BUGS @@ -103,5 +109,3 @@ Juhani Numminen . .SH WWW http://www.minetest.net/ -.SH "SEE ALSO" -.BR minetestserver(6) diff --git a/doc/minetestserver.6 b/doc/minetestserver.6 index 1d4a5f838..db5330d3c 100644 --- a/doc/minetestserver.6 +++ b/doc/minetestserver.6 @@ -1,77 +1,2 @@ -.\" Minetestserver man page -.TH minetestserver 6 "10 September 2013" "" "" +.so man6/minetest.6 -.SH NAME -minetestserver \- Minetest server - -.SH SYNOPSIS -.B minetestserver -[ OPTION ... ] - -.SH DESCRIPTION -.B Minetest -is one of the first InfiniMiner/Minecraft(/whatever) inspired games (started October 2010), with a goal of taking the survival multiplayer gameplay to a slightly different direction. -.PP -The main design philosophy is to keep it technically simple, stable and portable. It will be kept lightweight enough to run on fairly old hardware. - -.SH OPTIONS -.TP -\-\-config -Load configuration from specified file -.TP -\-\-disable\-unittests -Disable unit tests -.TP -\-\-enable\-unittests -Enable unit tests -.TP -\-\-gameid -Set gameid -.TP -\-\-help -Show allowed options -.TP -\-\-version -Show version information -.TP -\-\-logfile -Set logfile path (debug.txt) -.TP -\-\-map\-dir -Same as \-\-world (deprecated) -.TP -\-\-port -Set network port (UDP) to use -.TP -\-\-info -Print more information to console -.TP -\-\-verbose -Print even more information to console -.TP -\-\-trace -Print enormous amounts of information to console -.TP -\-\-world -Set world path -.TP -\-\-migrate -Migrate from current map backend to another. Possible values are sqlite3 -and leveldb. - -.SH BUGS -Please report all bugs to Perttu Ahola . - -.SH AUTHOR -.PP -Perttu Ahola -and contributors. -.PP -This man page was originally written by -Juhani Numminen . - -.SH WWW -http://www.minetest.net/ - -.SH "SEE ALSO" -.BR minetest(6) diff --git a/misc/winresource.rc b/misc/winresource.rc index ecb314c12..5f214391a 100644 --- a/misc/winresource.rc +++ b/misc/winresource.rc @@ -5,10 +5,10 @@ #include "config.h" #undef USE_CMAKE_CONFIG_H -#if RUN_IN_PLACE == 1 - #define BUILDMODE "RUN_IN_PLACE=1\0" +#if RUN_IN_PLACE + #define BUILDMODE "RUN_IN_PLACE=1" #else - #define BUILDMODE "RUN_IN_PLACE=0\0" + #define BUILDMODE "RUN_IN_PLACE=0" #endif LANGUAGE 0, SUBLANG_NEUTRAL @@ -20,8 +20,8 @@ LANGUAGE 0, SUBLANG_NEUTRAL // 1 VERSIONINFO - FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH_ORIG,0 - PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH_ORIG,0 + FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0 + PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0 FILEFLAGSMASK 0x3fL #ifndef NDEBUG FILEFLAGS 0x1L @@ -36,16 +36,16 @@ BEGIN BEGIN BLOCK "040904b0" BEGIN - VALUE "Comments", "\0" - VALUE "CompanyName", "Minetest Community\0" - VALUE "FileDescription", "Minetest engine core main application\0" + VALUE "Comments", "" + VALUE "CompanyName", PROJECT_NAME " community" + VALUE "FileDescription", PROJECT_NAME " engine main executable" VALUE "FileVersion", VERSION_STRING - VALUE "InternalName", "Minetest engine\0" - VALUE "LegalCopyright", "(c) 2014 celeron55\0" - VALUE "LegalTrademarks", """Minetest"" is property of Minetest community, don't use the name for your application without permission!\0" - VALUE "OriginalFilename", "minetest.exe\0" - VALUE "PrivateBuild", VERSION_EXTRA_STRING - VALUE "ProductName", "Minetest\0" + VALUE "InternalName", PROJECT_NAME + VALUE "LegalCopyright", "(c) 2014 celeron55" + VALUE "LegalTrademarks", """Minetest"" is the property of the Minetest community, don't use it without permission!" + VALUE "OriginalFilename", "minetest.exe" + VALUE "PrivateBuild", VERSION_EXTRA + VALUE "ProductName", PROJECT_NAME VALUE "ProductVersion", PRODUCT_VERSION_STRING VALUE "SpecialBuild", BUILDMODE END @@ -55,3 +55,4 @@ BEGIN VALUE "Translation", 0x409, 1200 END END + diff --git a/po/de/minetest.po b/po/de/minetest.po index 3789b6cc2..d32a997ab 100644 --- a/po/de/minetest.po +++ b/po/de/minetest.po @@ -7,68 +7,68 @@ msgid "" msgstr "" "Project-Id-Version: 0.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-12-13 15:24+0100\n" -"PO-Revision-Date: 2013-12-29 14:29+0200\n" -"Last-Translator: Pilz Adam \n" +"POT-Creation-Date: 2015-03-14 16:32+0100\n" +"PO-Revision-Date: 2015-03-16 15:50+0100\n" +"Last-Translator: Wuzzy \n" "Language-Team: Deutsch <>\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 1.7-dev\n" +"X-Generator: Poedit 1.7.1\n" -#: builtin/fstk/ui.lua:67 +#: builtin/fstk/ui.lua:67 builtin/mainmenu/store.lua:165 msgid "Ok" -msgstr "Ok" +msgstr "OK" -#: builtin/mainmenu/dlg_config_world.lua:26 +#: builtin/mainmenu/dlg_config_world.lua:29 msgid "World:" msgstr "Welt:" -#: builtin/mainmenu/dlg_config_world.lua:30 -#: builtin/mainmenu/dlg_config_world.lua:32 +#: builtin/mainmenu/dlg_config_world.lua:33 +#: builtin/mainmenu/dlg_config_world.lua:35 msgid "Hide Game" msgstr "Spiel verstecken" -#: builtin/mainmenu/dlg_config_world.lua:36 -#: builtin/mainmenu/dlg_config_world.lua:38 +#: builtin/mainmenu/dlg_config_world.lua:39 +#: builtin/mainmenu/dlg_config_world.lua:41 msgid "Hide mp content" -msgstr "MP mods verstecken" +msgstr "MP-Mods verstecken" -#: builtin/mainmenu/dlg_config_world.lua:46 +#: builtin/mainmenu/dlg_config_world.lua:49 msgid "Mod:" msgstr "Mod:" -#: builtin/mainmenu/dlg_config_world.lua:48 +#: builtin/mainmenu/dlg_config_world.lua:51 builtin/mainmenu/tab_mods.lua:99 msgid "Depends:" msgstr "Abhängig von:" -#: builtin/mainmenu/dlg_config_world.lua:51 src/guiKeyChangeMenu.cpp:191 +#: builtin/mainmenu/dlg_config_world.lua:54 src/guiKeyChangeMenu.cpp:192 msgid "Save" msgstr "Speichern" -#: builtin/mainmenu/dlg_config_world.lua:52 +#: builtin/mainmenu/dlg_config_world.lua:55 #: builtin/mainmenu/dlg_create_world.lua:64 -#: builtin/mainmenu/dlg_rename_modpack.lua:33 src/guiKeyChangeMenu.cpp:199 +#: builtin/mainmenu/dlg_rename_modpack.lua:33 src/guiKeyChangeMenu.cpp:200 #: src/keycode.cpp:224 msgid "Cancel" msgstr "Abbrechen" -#: builtin/mainmenu/dlg_config_world.lua:68 +#: builtin/mainmenu/dlg_config_world.lua:71 msgid "Enable MP" msgstr "MP aktivieren" -#: builtin/mainmenu/dlg_config_world.lua:70 +#: builtin/mainmenu/dlg_config_world.lua:73 msgid "Disable MP" msgstr "MP deaktivieren" -#: builtin/mainmenu/dlg_config_world.lua:74 -#: builtin/mainmenu/dlg_config_world.lua:76 +#: builtin/mainmenu/dlg_config_world.lua:77 +#: builtin/mainmenu/dlg_config_world.lua:79 msgid "enabled" msgstr "Aktiviert" -#: builtin/mainmenu/dlg_config_world.lua:82 +#: builtin/mainmenu/dlg_config_world.lua:85 msgid "Enable all" msgstr "Alle an" @@ -106,11 +106,13 @@ msgstr "Warnung: Die minimale Testversion ist für Entwickler gedacht." #: builtin/mainmenu/dlg_create_world.lua:73 msgid "Download a subgame, such as minetest_game, from minetest.net" -msgstr "Andere Spiele (wie minetest_game) können von minetest.net heruntergeladen werden" +msgstr "" +"Andere Spiele (wie minetest_game) können von minetest.net heruntergeladen " +"werden" -#: builtin/mainmenu/dlg_create_world.lua:97 +#: builtin/mainmenu/dlg_create_world.lua:99 msgid "A world named \"$1\" already exists" -msgstr "Eine Welt namens \"$1\" existiert bereits" +msgstr "Eine Welt namens „$1“ existiert bereits" #: builtin/mainmenu/dlg_create_world.lua:116 msgid "No worldname given or no game selected" @@ -118,11 +120,11 @@ msgstr "Kein Weltname gegeben oder kein Spiel ausgewählt" #: builtin/mainmenu/dlg_delete_mod.lua:26 msgid "Are you sure you want to delete \"$1\"?" -msgstr "\"$1\" wirklich löschen?" +msgstr "„$1“ wirklich löschen?" #: builtin/mainmenu/dlg_delete_mod.lua:27 #: builtin/mainmenu/dlg_delete_world.lua:25 -#: builtin/mainmenu/tab_settings.lua:25 +#: builtin/mainmenu/tab_settings.lua:79 msgid "Yes" msgstr "Ja" @@ -132,15 +134,15 @@ msgstr "Nein, natürlich nicht!" #: builtin/mainmenu/dlg_delete_mod.lua:41 msgid "Modmgr: failed to delete \"$1\"" -msgstr "Modmgr: Fehler beim löschen von \"$1\"" +msgstr "Modmgr: Fehler beim Löschen von „$1“" #: builtin/mainmenu/dlg_delete_mod.lua:45 msgid "Modmgr: invalid modpath \"$1\"" -msgstr "Modmgr: Unzulässiger Modpfad \"$1\"" +msgstr "Modmgr: Unzulässiger Modpfad „$1“" #: builtin/mainmenu/dlg_delete_world.lua:24 msgid "Delete World \"$1\"?" -msgstr "Welt \"$1\" löschen?" +msgstr "Welt „$1“ löschen?" #: builtin/mainmenu/dlg_delete_world.lua:26 msgid "No" @@ -156,7 +158,7 @@ msgstr "Annehmen" #: builtin/mainmenu/modmgr.lua:342 msgid "Install Mod: file: \"$1\"" -msgstr "Mod installieren: Datei: \"$1\"" +msgstr "Mod installieren: Datei: „$1“" #: builtin/mainmenu/modmgr.lua:343 msgid "" @@ -164,75 +166,69 @@ msgid "" "Install Mod: unsupported filetype \"$1\" or broken archive" msgstr "" "\n" -"Mod installieren: Nicht unterstützter Dateityp \"$1\" oder fehlerhaftes Archiv" +"Mod installieren: Nicht unterstützter Dateityp „$1“ oder fehlerhaftes Archiv" #: builtin/mainmenu/modmgr.lua:363 msgid "Failed to install $1 to $2" -msgstr "Fehler beim installieren von $1 zu $2" +msgstr "Fehler bei der Installation von $1 nach $2" #: builtin/mainmenu/modmgr.lua:366 msgid "Install Mod: unable to find suitable foldername for modpack $1" -msgstr "Mod installieren: Kann keinen Ordnernamen für Modpack $1 finden" +msgstr "" +"Mod installieren: Geeigneter Ordnername für Modpack $1 konnte nicht gefunden " +"werden" #: builtin/mainmenu/modmgr.lua:386 msgid "Install Mod: unable to find real modname for: $1" -msgstr "Mod installieren: Kann echten Namen für $1 nicht finden" +msgstr "Mod installieren: Echter Modname für $1 konnte nicht gefunden werden" #: builtin/mainmenu/store.lua:88 msgid "Unsorted" msgstr "Unsortiert" -#: builtin/mainmenu/store.lua:99 builtin/mainmenu/store.lua:584 +#: builtin/mainmenu/store.lua:99 builtin/mainmenu/store.lua:580 msgid "Search" msgstr "Suchen" -#: builtin/mainmenu/store.lua:125 -msgid "Downloading" -msgstr "Lade herunter" +#: builtin/mainmenu/store.lua:126 +msgid "Downloading $1, please wait..." +msgstr "$1 wird heruntergeladen, bitte warten ..." -#: builtin/mainmenu/store.lua:127 -msgid "please wait..." -msgstr "Bitte warten..." - -#: builtin/mainmenu/store.lua:159 +#: builtin/mainmenu/store.lua:160 msgid "Successfully installed:" msgstr "Erfolgreich installiert:" -#: builtin/mainmenu/store.lua:163 +#: builtin/mainmenu/store.lua:162 msgid "Shortname:" msgstr "Kurzname:" -#: builtin/mainmenu/store.lua:167 src/guiFormSpecMenu.cpp:2866 -msgid "ok" -msgstr "ok" - -#: builtin/mainmenu/store.lua:476 +#: builtin/mainmenu/store.lua:472 msgid "Rating" msgstr "Bewertung" -#: builtin/mainmenu/store.lua:501 +#: builtin/mainmenu/store.lua:497 msgid "re-Install" -msgstr "erneut installieren" +msgstr "Erneut installieren" -#: builtin/mainmenu/store.lua:503 +#: builtin/mainmenu/store.lua:499 msgid "Install" msgstr "Installieren" -#: builtin/mainmenu/store.lua:522 +#: builtin/mainmenu/store.lua:518 msgid "Close store" msgstr "Schließen" -#: builtin/mainmenu/store.lua:530 +#: builtin/mainmenu/store.lua:526 msgid "Page $1 of $2" msgstr "Seite $1 von $2" #: builtin/mainmenu/tab_credits.lua:22 msgid "Credits" -msgstr "Credits" +msgstr "Mitwirkende" #: builtin/mainmenu/tab_credits.lua:29 msgid "Core Developers" -msgstr "Kernentwickler" +msgstr "Hauptentwickler" #: builtin/mainmenu/tab_credits.lua:43 msgid "Active Contributors" @@ -248,7 +244,7 @@ msgstr "Installierte Mods:" #: builtin/mainmenu/tab_mods.lua:39 msgid "Online mod repository" -msgstr "Online-Mod-Speicher" +msgstr "Online-Mod-Archiv" #: builtin/mainmenu/tab_mods.lua:78 msgid "No mod description available" @@ -256,7 +252,7 @@ msgstr "Keine Modbeschreibung verfügbar" #: builtin/mainmenu/tab_mods.lua:82 msgid "Mod information:" -msgstr "Mod Information:" +msgstr "Modinformation:" #: builtin/mainmenu/tab_mods.lua:93 msgid "Rename" @@ -272,20 +268,19 @@ msgstr "Ausgewählte Mod deinstallieren" #: builtin/mainmenu/tab_mods.lua:121 msgid "Select Mod File:" -msgstr "Mod Datei auswählen:" +msgstr "Mod-Datei auswählen:" #: builtin/mainmenu/tab_mods.lua:165 msgid "Mods" msgstr "Mods" #: builtin/mainmenu/tab_multiplayer.lua:23 -msgid "Address/Port" -msgstr "Adresse / Port" +msgid "Address / Port :" +msgstr "Adresse/Port:" -#: builtin/mainmenu/tab_multiplayer.lua:24 builtin/mainmenu/tab_server.lua:37 -#: builtin/mainmenu/tab_simple_main.lua:25 -msgid "Name/Password" -msgstr "Name/Passwort" +#: builtin/mainmenu/tab_multiplayer.lua:24 +msgid "Name / Password :" +msgstr "Name/Passwort:" #: builtin/mainmenu/tab_multiplayer.lua:29 #: builtin/mainmenu/tab_simple_main.lua:30 @@ -302,7 +297,22 @@ msgstr "Entfernen" msgid "Connect" msgstr "Verbinden" -#: builtin/mainmenu/tab_multiplayer.lua:252 +#: builtin/mainmenu/tab_multiplayer.lua:62 +#: builtin/mainmenu/tab_simple_main.lua:45 +msgid "Creative mode" +msgstr "Kreativmodus" + +#: builtin/mainmenu/tab_multiplayer.lua:63 +#: builtin/mainmenu/tab_simple_main.lua:46 +msgid "Damage enabled" +msgstr "Schaden aktiviert" + +#: builtin/mainmenu/tab_multiplayer.lua:64 +#: builtin/mainmenu/tab_simple_main.lua:47 +msgid "PvP enabled" +msgstr "Spielerkampf aktiviert" + +#: builtin/mainmenu/tab_multiplayer.lua:257 msgid "Client" msgstr "Client" @@ -322,12 +332,12 @@ msgstr "Spiel starten" msgid "Select World:" msgstr "Welt wählen:" -#: builtin/mainmenu/tab_server.lua:31 builtin/mainmenu/tab_simple_main.lua:63 +#: builtin/mainmenu/tab_server.lua:31 builtin/mainmenu/tab_simple_main.lua:76 #: builtin/mainmenu/tab_singleplayer.lua:90 msgid "Creative Mode" -msgstr "Kreativitätsmodus" +msgstr "Kreativmodus" -#: builtin/mainmenu/tab_server.lua:33 builtin/mainmenu/tab_simple_main.lua:65 +#: builtin/mainmenu/tab_server.lua:33 builtin/mainmenu/tab_simple_main.lua:78 #: builtin/mainmenu/tab_singleplayer.lua:92 msgid "Enable Damage" msgstr "Schaden einschalten" @@ -336,9 +346,13 @@ msgstr "Schaden einschalten" msgid "Public" msgstr "Öffentlich" +#: builtin/mainmenu/tab_server.lua:37 builtin/mainmenu/tab_simple_main.lua:25 +msgid "Name/Password" +msgstr "Name/Passwort" + #: builtin/mainmenu/tab_server.lua:45 msgid "Bind Address" -msgstr "" +msgstr "Bind-Adresse" #: builtin/mainmenu/tab_server.lua:47 msgid "Port" @@ -352,131 +366,151 @@ msgstr "Serverport" msgid "Server" msgstr "Server" +#: builtin/mainmenu/tab_settings.lua:21 +msgid "No Filter" +msgstr "Kein Filter" + +#: builtin/mainmenu/tab_settings.lua:22 +msgid "Bilinear Filter" +msgstr "Bilinearer Filter" + #: builtin/mainmenu/tab_settings.lua:23 +msgid "Trilinear Filter" +msgstr "Trilinearer Filter" + +#: builtin/mainmenu/tab_settings.lua:32 +msgid "No Mipmap" +msgstr "Keine Mipmap" + +#: builtin/mainmenu/tab_settings.lua:33 +msgid "Mipmap" +msgstr "Mipmap" + +#: builtin/mainmenu/tab_settings.lua:34 +msgid "Mipmap + Aniso. Filter" +msgstr "Mipmap u. Aniso. Filter" + +#: builtin/mainmenu/tab_settings.lua:77 msgid "Are you sure to reset your singleplayer world?" msgstr "Sind Sie sicher, dass Sie die Einzelspielerwelt löschen wollen?" -#: builtin/mainmenu/tab_settings.lua:27 +#: builtin/mainmenu/tab_settings.lua:81 msgid "No!!!" msgstr "Nein!!!" -#: builtin/mainmenu/tab_settings.lua:134 +#: builtin/mainmenu/tab_settings.lua:181 msgid "Smooth Lighting" msgstr "Besseres Licht" -#: builtin/mainmenu/tab_settings.lua:136 +#: builtin/mainmenu/tab_settings.lua:183 msgid "Enable Particles" -msgstr "Aktiviere Partikel" +msgstr "Partikel aktivieren" -#: builtin/mainmenu/tab_settings.lua:138 +#: builtin/mainmenu/tab_settings.lua:185 msgid "3D Clouds" -msgstr "3D Wolken" +msgstr "3D-Wolken" -#: builtin/mainmenu/tab_settings.lua:140 +#: builtin/mainmenu/tab_settings.lua:187 msgid "Fancy Trees" msgstr "Schöne Bäume" -#: builtin/mainmenu/tab_settings.lua:142 +#: builtin/mainmenu/tab_settings.lua:189 msgid "Opaque Water" -msgstr "Undurchs. Wasser" +msgstr "Undurchsichtiges Wasser" -#: builtin/mainmenu/tab_settings.lua:144 +#: builtin/mainmenu/tab_settings.lua:191 msgid "Connected Glass" msgstr "Verbundenes Glas" -#: builtin/mainmenu/tab_settings.lua:149 +#: builtin/mainmenu/tab_settings.lua:193 +msgid "Node Highlighting" +msgstr "Blöcke hervorheben" + +#: builtin/mainmenu/tab_settings.lua:196 +msgid "Texturing:" +msgstr "Texturierung:" + +#: builtin/mainmenu/tab_settings.lua:201 +msgid "Rendering:" +msgstr "Rendering:" + +#: builtin/mainmenu/tab_settings.lua:205 msgid "Restart minetest for driver change to take effect" msgstr "Neustart nach Ändern des Treibers erforderlich" -#: builtin/mainmenu/tab_settings.lua:151 -msgid "Mip-Mapping" -msgstr "Mip-Mapping" - -#: builtin/mainmenu/tab_settings.lua:153 -msgid "Anisotropic Filtering" -msgstr "Anisotroper Filter" - -#: builtin/mainmenu/tab_settings.lua:155 -msgid "Bi-Linear Filtering" -msgstr "Bi-Linearer Filter" - -#: builtin/mainmenu/tab_settings.lua:157 -msgid "Tri-Linear Filtering" -msgstr "Tri-Linearer Filter" - -#: builtin/mainmenu/tab_settings.lua:160 +#: builtin/mainmenu/tab_settings.lua:207 msgid "Shaders" msgstr "Shader" -#: builtin/mainmenu/tab_settings.lua:164 +#: builtin/mainmenu/tab_settings.lua:212 msgid "Change keys" msgstr "Tasten ändern" -#: builtin/mainmenu/tab_settings.lua:167 +#: builtin/mainmenu/tab_settings.lua:215 msgid "Reset singleplayer world" msgstr "Einzelspielerwelt zurücksetzen" -#: builtin/mainmenu/tab_settings.lua:171 +#: builtin/mainmenu/tab_settings.lua:219 msgid "GUI scale factor" msgstr "GUI-Skalierfaktor" -#: builtin/mainmenu/tab_settings.lua:175 +#: builtin/mainmenu/tab_settings.lua:223 msgid "Scaling factor applied to menu elements: " -msgstr "Skalierfaktor:" +msgstr "Auf Menüelemente angewandter Skalierfaktor: " -#: builtin/mainmenu/tab_settings.lua:181 +#: builtin/mainmenu/tab_settings.lua:229 msgid "Touch free target" -msgstr "" +msgstr "Berührungsfreies Ziel" -#: builtin/mainmenu/tab_settings.lua:187 +#: builtin/mainmenu/tab_settings.lua:235 msgid "Touchthreshold (px)" -msgstr "" +msgstr "Berührungsempfindlichkeit (px)" -#: builtin/mainmenu/tab_settings.lua:194 builtin/mainmenu/tab_settings.lua:208 +#: builtin/mainmenu/tab_settings.lua:242 builtin/mainmenu/tab_settings.lua:256 msgid "Bumpmapping" msgstr "Bumpmapping" -#: builtin/mainmenu/tab_settings.lua:196 builtin/mainmenu/tab_settings.lua:209 +#: builtin/mainmenu/tab_settings.lua:244 builtin/mainmenu/tab_settings.lua:257 msgid "Generate Normalmaps" -msgstr "Generiere Normalmaps" +msgstr "Normalmaps generieren" -#: builtin/mainmenu/tab_settings.lua:198 builtin/mainmenu/tab_settings.lua:210 +#: builtin/mainmenu/tab_settings.lua:246 builtin/mainmenu/tab_settings.lua:258 msgid "Parallax Occlusion" msgstr "Parallax Occlusion" -#: builtin/mainmenu/tab_settings.lua:200 builtin/mainmenu/tab_settings.lua:211 +#: builtin/mainmenu/tab_settings.lua:248 builtin/mainmenu/tab_settings.lua:259 msgid "Waving Water" msgstr "Wasserwellen" -#: builtin/mainmenu/tab_settings.lua:202 builtin/mainmenu/tab_settings.lua:212 +#: builtin/mainmenu/tab_settings.lua:250 builtin/mainmenu/tab_settings.lua:260 msgid "Waving Leaves" msgstr "Wehende Blätter" -#: builtin/mainmenu/tab_settings.lua:204 builtin/mainmenu/tab_settings.lua:213 +#: builtin/mainmenu/tab_settings.lua:252 builtin/mainmenu/tab_settings.lua:261 msgid "Waving Plants" msgstr "Wogende Pflanzen" -#: builtin/mainmenu/tab_settings.lua:255 +#: builtin/mainmenu/tab_settings.lua:287 msgid "To enable shaders the OpenGL driver needs to be used." -msgstr "Um Shader zu benutzen muss der OpenGL Treiber benutzt werden." +msgstr "Um Shader zu benutzen, muss der OpenGL-Treiber benutzt werden." -#: builtin/mainmenu/tab_settings.lua:330 +#: builtin/mainmenu/tab_settings.lua:398 msgid "Settings" msgstr "Einstellungen" -#: builtin/mainmenu/tab_simple_main.lua:67 +#: builtin/mainmenu/tab_simple_main.lua:80 msgid "Fly mode" msgstr "Flugmodus" -#: builtin/mainmenu/tab_simple_main.lua:71 +#: builtin/mainmenu/tab_simple_main.lua:84 msgid "Start Singleplayer" -msgstr "Starte Einzelspieler" +msgstr "Einzelspieler starten" -#: builtin/mainmenu/tab_simple_main.lua:72 +#: builtin/mainmenu/tab_simple_main.lua:85 msgid "Config mods" msgstr "Mods konfigurieren" -#: builtin/mainmenu/tab_simple_main.lua:191 +#: builtin/mainmenu/tab_simple_main.lua:208 msgid "Main" msgstr "Hauptmenü" @@ -500,39 +534,193 @@ msgstr "Keine Informationen vorhanden" msgid "Texturepacks" msgstr "Texturpakete" -#: src/client.cpp:2726 +#: src/client.cpp:1563 +msgid "Loading textures..." +msgstr "Texturen laden ..." + +#: src/client.cpp:1573 +msgid "Rebuilding shaders..." +msgstr "Shader wiederherstellen ..." + +#: src/client.cpp:1580 +msgid "Initializing nodes..." +msgstr "Blöcke initialisieren ..." + +#: src/client.cpp:1595 msgid "Item textures..." -msgstr "Inventarbilder..." +msgstr "Inventarbilder ..." + +#: src/client.cpp:1620 +msgid "Done!" +msgstr "Fertig!" + +#: src/client/clientlauncher.cpp:172 +msgid "Main Menu" +msgstr "Hauptmenü" + +#: src/client/clientlauncher.cpp:210 +msgid "Player name too long." +msgstr "Spielername zu lang." + +#: src/client/clientlauncher.cpp:248 +msgid "Connection error (timed out?)" +msgstr "Verbindungsfehler (Zeitüberschreitung?)" + +#: src/client/clientlauncher.cpp:413 +msgid "No world selected and no address provided. Nothing to do." +msgstr "Keine Welt ausgewählt und keine Adresse angegeben. Nichts zu tun." + +#: src/client/clientlauncher.cpp:420 +msgid "Provided world path doesn't exist: " +msgstr "Angegebener Weltpfad existiert nicht: " + +#: src/client/clientlauncher.cpp:429 +msgid "Could not find or load game \"" +msgstr "Kann Spiel nicht finden/laden \"" + +#: src/client/clientlauncher.cpp:447 +msgid "Invalid gamespec." +msgstr "Ungültige Spielspezif." #: src/fontengine.cpp:70 src/fontengine.cpp:226 msgid "needs_fallback_font" msgstr "no" -#: src/game.cpp:1063 +#: src/game.cpp:1061 src/guiFormSpecMenu.cpp:2008 +msgid "Proceed" +msgstr "Fortsetzen" + +#: src/game.cpp:1081 +msgid "You died." +msgstr "Sie sind gestorben." + +#: src/game.cpp:1082 msgid "Respawn" msgstr "Wiederbeleben" -#: src/game.cpp:2250 +#: src/game.cpp:1101 +msgid "" +"Default Controls:\n" +"No menu visible:\n" +"- single tap: button activate\n" +"- double tap: place/use\n" +"- slide finger: look around\n" +"Menu/Inventory visible:\n" +"- double tap (outside):\n" +" -->close\n" +"- touch stack, touch slot:\n" +" --> move stack\n" +"- touch&drag, tap 2nd finger\n" +" --> place single item to slot\n" +msgstr "" +"Standardsteuerung:\n" +"Kein Menü sichtbar:\n" +"- einmal antippen: Knopf betätigen\n" +"- doppelt antippen: bauen/benutzen\n" +"- Finger wischen: umsehen\n" +"Menü/Inventar sichtbar:\n" +"- doppelt antippen (außen):\n" +" -->schließen\n" +"- Stapel berühren, Feld berühren:\n" +" --> Stapel verschieben\n" +"- berühren u. ziehen, mit 2. Finger antippen\n" +" --> 1 Gegenstand ins Feld platzieren\n" + +#: src/game.cpp:1115 +msgid "" +"Default Controls:\n" +"- WASD: move\n" +"- Space: jump/climb\n" +"- Shift: sneak/go down\n" +"- Q: drop item\n" +"- I: inventory\n" +"- Mouse: turn/look\n" +"- Mouse left: dig/punch\n" +"- Mouse right: place/use\n" +"- Mouse wheel: select item\n" +"- T: chat\n" +msgstr "" +"Standard-Tastenbelegung:\n" +"- WASD: Bewegen\n" +"- Leertaste: Springen/Klettern\n" +"- Umschalt: Kriechen/herunterklettern\n" +"- Q: Item fallen lassen\n" +"- I: Inventar\n" +"- Maus: drehen/umschauen\n" +"- Maus links: Abbauen/Schlagen\n" +"- Maus rechts: Platzieren/Benutzen\n" +"- Mausrad: Gegenstand auswählen\n" +"- T: Chat\n" + +#: src/game.cpp:1134 +msgid "Continue" +msgstr "Weiter" + +#: src/game.cpp:1138 +msgid "Change Password" +msgstr "Passwort ändern" + +#: src/game.cpp:1143 +msgid "Sound Volume" +msgstr "Tonlautstärke" + +#: src/game.cpp:1145 +msgid "Change Keys" +msgstr "Tasten ändern" + +#: src/game.cpp:1148 +msgid "Exit to Menu" +msgstr "Hauptmenü" + +#: src/game.cpp:1150 +msgid "Exit to OS" +msgstr "Programm beenden" + +#: src/game.cpp:1827 +msgid "Shutting down..." +msgstr "Herunterfahren ..." + +#: src/game.cpp:1876 +msgid "Loading..." +msgstr "Laden ..." + +#: src/game.cpp:1933 +msgid "Creating server..." +msgstr "Server erstellen ..." + +#: src/game.cpp:1970 +msgid "Creating client..." +msgstr "Client erstellen ..." + +#: src/game.cpp:2143 +msgid "Resolving address..." +msgstr "Adresse auflösen ..." + +#: src/game.cpp:2234 +msgid "Connecting to server..." +msgstr "Zum Server verbinden ..." + +#: src/game.cpp:2292 msgid "Item definitions..." -msgstr "Item-Definitionen..." +msgstr "Item-Definitionen ..." -#: src/game.cpp:2255 +#: src/game.cpp:2297 msgid "Node definitions..." -msgstr "Node-Definitionen..." +msgstr "Node-Definitionen ..." -#: src/game.cpp:2262 +#: src/game.cpp:2304 msgid "Media..." -msgstr "Medien..." +msgstr "Medien ..." -#: src/game.cpp:2267 +#: src/game.cpp:2309 msgid " KB/s" msgstr " KB/s" -#: src/game.cpp:2271 +#: src/game.cpp:2313 msgid " MB/s" msgstr " MB/s" -#: src/game.cpp:4220 +#: src/game.cpp:4265 msgid "" "\n" "Check debug.txt for details." @@ -540,125 +728,130 @@ msgstr "" "\n" "Siehe debug.txt für Details." -#: src/guiFormSpecMenu.cpp:2055 -msgid "Proceed" -msgstr "Fortsetzen" - -#: src/guiFormSpecMenu.cpp:2846 +#: src/guiFormSpecMenu.cpp:2799 msgid "Enter " msgstr "Enter " -#: src/guiKeyChangeMenu.cpp:125 +#: src/guiFormSpecMenu.cpp:2819 +msgid "ok" +msgstr "OK" + +#: src/guiKeyChangeMenu.cpp:126 msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)" -msgstr "Steuerung" +msgstr "" +"Steuerung (Falls dieses Menü versagt, entfernen Sie Sachen aus minetest.conf)" -#: src/guiKeyChangeMenu.cpp:165 +#: src/guiKeyChangeMenu.cpp:166 msgid "\"Use\" = climb down" -msgstr "\"Benutzen\" = herunterklettern" +msgstr "Benutzen = runterklettern" -#: src/guiKeyChangeMenu.cpp:180 +#: src/guiKeyChangeMenu.cpp:181 msgid "Double tap \"jump\" to toggle fly" -msgstr "Doppelt \"springen\" zum fliegen" +msgstr "2×Sprungtaste zum Fliegen" -#: src/guiKeyChangeMenu.cpp:296 +#: src/guiKeyChangeMenu.cpp:297 msgid "Key already in use" msgstr "Taste bereits in Benutzung" -#: src/guiKeyChangeMenu.cpp:371 +#: src/guiKeyChangeMenu.cpp:372 msgid "press key" msgstr "Taste drücken" -#: src/guiKeyChangeMenu.cpp:397 +#: src/guiKeyChangeMenu.cpp:398 msgid "Forward" msgstr "Vorwärts" -#: src/guiKeyChangeMenu.cpp:398 +#: src/guiKeyChangeMenu.cpp:399 msgid "Backward" msgstr "Rückwärts" -#: src/guiKeyChangeMenu.cpp:399 src/keycode.cpp:229 +#: src/guiKeyChangeMenu.cpp:400 src/keycode.cpp:229 msgid "Left" msgstr "Links" -#: src/guiKeyChangeMenu.cpp:400 src/keycode.cpp:229 +#: src/guiKeyChangeMenu.cpp:401 src/keycode.cpp:229 msgid "Right" msgstr "Rechts" -#: src/guiKeyChangeMenu.cpp:401 +#: src/guiKeyChangeMenu.cpp:402 msgid "Use" msgstr "Benutzen" -#: src/guiKeyChangeMenu.cpp:402 +#: src/guiKeyChangeMenu.cpp:403 msgid "Jump" msgstr "Springen" -#: src/guiKeyChangeMenu.cpp:403 +#: src/guiKeyChangeMenu.cpp:404 msgid "Sneak" msgstr "Schleichen" -#: src/guiKeyChangeMenu.cpp:404 +#: src/guiKeyChangeMenu.cpp:405 msgid "Drop" msgstr "Wegwerfen" -#: src/guiKeyChangeMenu.cpp:405 +#: src/guiKeyChangeMenu.cpp:406 msgid "Inventory" msgstr "Inventar" -#: src/guiKeyChangeMenu.cpp:406 +#: src/guiKeyChangeMenu.cpp:407 msgid "Chat" msgstr "Chat" -#: src/guiKeyChangeMenu.cpp:407 +#: src/guiKeyChangeMenu.cpp:408 msgid "Command" msgstr "Befehl" -#: src/guiKeyChangeMenu.cpp:408 +#: src/guiKeyChangeMenu.cpp:409 msgid "Console" msgstr "Konsole" -#: src/guiKeyChangeMenu.cpp:409 -msgid "Toggle fly" -msgstr "Fliegen umsch." - #: src/guiKeyChangeMenu.cpp:410 -msgid "Toggle fast" -msgstr "Speed umsch." +msgid "Toggle fly" +msgstr "Flugmodus" #: src/guiKeyChangeMenu.cpp:411 -msgid "Toggle noclip" -msgstr "Noclip umsch." +msgid "Toggle fast" +msgstr "Schnellmodus" #: src/guiKeyChangeMenu.cpp:412 -msgid "Range select" -msgstr "Entfernung wählen" +msgid "Toggle Cinematic" +msgstr "Kinomodus" #: src/guiKeyChangeMenu.cpp:413 +msgid "Toggle noclip" +msgstr "Geistmodus" + +#: src/guiKeyChangeMenu.cpp:414 +msgid "Range select" +msgstr "Weite Sicht" + +#: src/guiKeyChangeMenu.cpp:415 msgid "Print stacks" msgstr "Stack ausgeben" -#: src/guiPasswordChange.cpp:106 +#: src/guiPasswordChange.cpp:108 msgid "Old Password" msgstr "Altes Passwort" -#: src/guiPasswordChange.cpp:122 +#: src/guiPasswordChange.cpp:124 msgid "New Password" msgstr "Neues Passwort" -#: src/guiPasswordChange.cpp:137 +#: src/guiPasswordChange.cpp:139 msgid "Confirm Password" msgstr "Passwort wiederholen" -#: src/guiPasswordChange.cpp:153 +#: src/guiPasswordChange.cpp:155 msgid "Change" msgstr "Ändern" -#: src/guiPasswordChange.cpp:162 +#: src/guiPasswordChange.cpp:164 msgid "Passwords do not match!" msgstr "Passwörter passen nicht zusammen!" #: src/guiVolumeChange.cpp:106 msgid "Sound Volume: " -msgstr "Soundlautstärke: " +msgstr "Tonlautstärke: " #: src/guiVolumeChange.cpp:120 msgid "Exit" @@ -678,7 +871,7 @@ msgstr "Rechte Taste" #: src/keycode.cpp:224 msgid "X Button 1" -msgstr "X Knopf 1" +msgstr "X-Knopf 1" #: src/keycode.cpp:225 msgid "Back" @@ -686,11 +879,11 @@ msgstr "Rücktaste" #: src/keycode.cpp:225 msgid "Clear" -msgstr "löschen" +msgstr "Clear" #: src/keycode.cpp:225 msgid "Return" -msgstr "Enter" +msgstr "Eingabe" #: src/keycode.cpp:225 msgid "Tab" @@ -698,7 +891,7 @@ msgstr "Tab" #: src/keycode.cpp:225 msgid "X Button 2" -msgstr "X Knopf 2" +msgstr "X-Knopf 2" #: src/keycode.cpp:226 msgid "Capital" @@ -726,7 +919,7 @@ msgstr "Umsch." #: src/keycode.cpp:227 msgid "Convert" -msgstr "Konvertieren" +msgstr "Convert" #: src/keycode.cpp:227 msgid "Escape" @@ -746,7 +939,7 @@ msgstr "Kanji" #: src/keycode.cpp:227 msgid "Nonconvert" -msgstr "nicht konvertieren" +msgstr "Nonconvert" #: src/keycode.cpp:228 msgid "End" @@ -758,7 +951,7 @@ msgstr "Pos1" #: src/keycode.cpp:228 msgid "Mode Change" -msgstr "Modus-Änderung" +msgstr "Mode Change" #: src/keycode.cpp:228 msgid "Next" @@ -786,7 +979,7 @@ msgstr "Druck" #: src/keycode.cpp:229 msgid "Select" -msgstr "Selektiere" +msgstr "Select" #: src/keycode.cpp:229 msgid "Up" @@ -926,7 +1119,7 @@ msgstr "Plus" #: src/keycode.cpp:248 msgid "Attn" -msgstr "Attn." +msgstr "Attn" #: src/keycode.cpp:248 msgid "CrSel" @@ -934,7 +1127,7 @@ msgstr "CrSel" #: src/keycode.cpp:249 msgid "Erase OEF" -msgstr "Lösche OEF" +msgstr "Erase OEF" #: src/keycode.cpp:249 msgid "ExSel" @@ -952,84 +1145,95 @@ msgstr "PA1" msgid "Zoom" msgstr "Zoom" -#: src/main.cpp:1681 -msgid "Main Menu" -msgstr "Hauptmenü" +#~ msgid "Game Name" +#~ msgstr "Spielname" -#: src/main.cpp:1719 -msgid "Player name too long." -msgstr "Spielername zu lang." +#~ msgid "Gamemgr: Unable to copy mod \"$1\" to game \"$2\"" +#~ msgstr "Gamemgr: Kann mod \"$1\" nicht in Spiel \"$2\" kopieren" -#: src/main.cpp:1757 -msgid "Connection error (timed out?)" -msgstr "Verbindungsfehler (Zeitüberschreitung?)" +#~ msgid "GAMES" +#~ msgstr "SPIELE" -#: src/main.cpp:1919 -msgid "No world selected and no address provided. Nothing to do." -msgstr "Keine Welt ausgewählt und keine Adresse angegeben. Nichts zu tun." +#~ msgid "Games" +#~ msgstr "Spiele" -#: src/main.cpp:1926 -msgid "Provided world path doesn't exist: " -msgstr "Angegebener Weltpfad existiert nicht: " +#~ msgid "Mods:" +#~ msgstr "Mods:" -#: src/main.cpp:1935 -msgid "Could not find or load game \"" -msgstr "Kann Spiel nicht finden/laden \"" +#~ msgid "edit game" +#~ msgstr "Spiel ändern" -#: src/main.cpp:1953 -msgid "Invalid gamespec." -msgstr "Invalide Spielspezif." +#~ msgid "new game" +#~ msgstr "neues Spiel" -#~ msgid "Left click: Move all items, Right click: Move single item" -#~ msgstr "Linksklick: Alle Items bewegen, Rechtsklick: Einzelnes Item bewegen" +#~ msgid "EDIT GAME" +#~ msgstr "SPIEL ÄNDERN" -#~ msgid "is required by:" -#~ msgstr "wird benötigt von:" +#~ msgid "Remove selected mod" +#~ msgstr "Ausgewählte Mod löschen" -#~ msgid "Configuration saved. " -#~ msgstr "Konfiguration gespeichert. " +#~ msgid "<<-- Add mod" +#~ msgstr "<<-- Mod hinzufügen" -#~ msgid "Warning: Configuration not consistent. " -#~ msgstr "Warnung: Konfiguration nicht konsistent. " +#~ msgid "CLIENT" +#~ msgstr "CLIENT" -#~ msgid "Cannot create world: Name contains invalid characters" -#~ msgstr "Kann Welt nicht erstellen: Name enthält ungültige Zeichen" +#~ msgid "Favorites:" +#~ msgstr "Favoriten:" -#~ msgid "Multiplayer" -#~ msgstr "Mehrspieler" +#~ msgid "START SERVER" +#~ msgstr "SERVER STARTEN" -#~ msgid "Advanced" -#~ msgstr "Erweitert" +#~ msgid "Name" +#~ msgstr "Name" -#~ msgid "Show Public" -#~ msgstr "Zeige öffentliche" +#~ msgid "Password" +#~ msgstr "Passwort" -#~ msgid "Show Favorites" -#~ msgstr "Zeige Favoriten" +#~ msgid "SETTINGS" +#~ msgstr "EINSTELLUNGEN" -#~ msgid "Leave address blank to start a local server." -#~ msgstr "Lasse die Adresse frei um einen eigenen Server zu starten." +#~ msgid "Preload item visuals" +#~ msgstr "Lade Inventarbilder vor" -#~ msgid "Create world" -#~ msgstr "Welt erstellen" +#~ msgid "Finite Liquid" +#~ msgstr "Endliches Wasser" -#~ msgid "Address required." -#~ msgstr "Adresse benötigt." +#~ msgid "SINGLE PLAYER" +#~ msgstr "EINZELSPIELER" -#~ msgid "Cannot delete world: Nothing selected" -#~ msgstr "Kann Welt nicht löchen: Nichts ausgewählt" +#~ msgid "TEXTURE PACKS" +#~ msgstr "TEXTUREN PAKETE" -#~ msgid "Files to be deleted" -#~ msgstr "Zu löschende Dateien" +#~ msgid "MODS" +#~ msgstr "MODS" -#~ msgid "Cannot create world: No games found" -#~ msgstr "Kann Welt nicht erstellen: Keine Spiele gefunden" +#~ msgid "Add mod:" +#~ msgstr "Modifikation hinzufügen:" -#~ msgid "Cannot configure world: Nothing selected" -#~ msgstr "Kann Welt nicht konfigurieren: Nichts ausgewählt" +#~ msgid "Local install" +#~ msgstr "Lokale Install." -#~ msgid "Failed to delete all world files" -#~ msgstr "Es konnten nicht alle Welt Dateien gelöscht werden" +#~ msgid "" +#~ "Warning: Some mods are not configured yet.\n" +#~ "They will be enabled by default when you save the configuration. " +#~ msgstr "" +#~ "Warnung: Einige Mods sind noch nicht konfiguriert.\n" +#~ "Sie werden aktiviert wenn die Konfiguration gespeichert wird. " + +#~ msgid "" +#~ "Warning: Some configured mods are missing.\n" +#~ "Their setting will be removed when you save the configuration. " +#~ msgstr "" +#~ "Warnung: Einige konfigurierte Mods fehlen.\n" +#~ "Mod Einstellungen werden gelöscht wenn die Konfiguration gespeichert " +#~ "wird. " + +#~ msgid "KEYBINDINGS" +#~ msgstr "TASTEN EINST." + +#~ msgid "Delete map" +#~ msgstr "Karte löschen" #~ msgid "" #~ "Default Controls:\n" @@ -1055,153 +1259,62 @@ msgstr "Invalide Spielspezif." #~ "- I: Inventar\n" #~ "- T: Chat\n" -#~ msgid "Delete map" -#~ msgstr "Karte löschen" +#~ msgid "Failed to delete all world files" +#~ msgstr "Es konnten nicht alle Welt Dateien gelöscht werden" -#~ msgid "KEYBINDINGS" -#~ msgstr "TASTEN EINST." +#~ msgid "Cannot configure world: Nothing selected" +#~ msgstr "Kann Welt nicht konfigurieren: Nichts ausgewählt" -#~ msgid "" -#~ "Warning: Some configured mods are missing.\n" -#~ "Their setting will be removed when you save the configuration. " -#~ msgstr "" -#~ "Warnung: Einige konfigurierte Mods fehlen.\n" -#~ "Mod Einstellungen werden gelöscht wenn die Konfiguration gespeichert " -#~ "wird. " +#~ msgid "Cannot create world: No games found" +#~ msgstr "Kann Welt nicht erstellen: Keine Spiele gefunden" -#~ msgid "" -#~ "Warning: Some mods are not configured yet.\n" -#~ "They will be enabled by default when you save the configuration. " -#~ msgstr "" -#~ "Warnung: Einige Mods sind noch nicht konfiguriert.\n" -#~ "Sie werden aktiviert wenn die Konfiguration gespeichert wird. " +#~ msgid "Files to be deleted" +#~ msgstr "Zu löschende Dateien" -#~ msgid "" -#~ "Default Controls:\n" -#~ "- WASD: move\n" -#~ "- Space: jump/climb\n" -#~ "- Shift: sneak/go down\n" -#~ "- Q: drop item\n" -#~ "- I: inventory\n" -#~ "- Mouse: turn/look\n" -#~ "- Mouse left: dig/punch\n" -#~ "- Mouse right: place/use\n" -#~ "- Mouse wheel: select item\n" -#~ "- T: chat\n" -#~ msgstr "" -#~ "Standard Tastaturebelegung:\n" -#~ "- WASD: Bewegen\n" -#~ "- Leertaste: Springen/Klettern\n" -#~ "- Umschalt: Kriechen/herunterklettern\n" -#~ "- Q: Item droppen\n" -#~ "- I: Inventar\n" -#~ "- Maus: drehen/umschauen\n" -#~ "- Maus links: Abbauen/Schlagen\n" -#~ "- Maus rechts: Platzieren/Benutzen\n" -#~ "- Mausrad: Item auswählen\n" -#~ "- T: Chat\n" +#~ msgid "Cannot delete world: Nothing selected" +#~ msgstr "Kann Welt nicht löchen: Nichts ausgewählt" -#~ msgid "Exit to OS" -#~ msgstr "Programm beenden" +#~ msgid "Address required." +#~ msgstr "Adresse benötigt." -#~ msgid "Exit to Menu" -#~ msgstr "Hauptmenü" +#~ msgid "Create world" +#~ msgstr "Welt erstellen" -#~ msgid "Sound Volume" -#~ msgstr "Sound Lautstärke" +#~ msgid "Leave address blank to start a local server." +#~ msgstr "Lasse die Adresse frei um einen eigenen Server zu starten." -#~ msgid "Change Password" -#~ msgstr "Passwort ändern" +#~ msgid "Show Favorites" +#~ msgstr "Zeige Favoriten" -#~ msgid "Continue" -#~ msgstr "Weiter" +#~ msgid "Show Public" +#~ msgstr "Zeige öffentliche" -#~ msgid "You died." -#~ msgstr "Sie sind gestorben." +#~ msgid "Advanced" +#~ msgstr "Erweitert" -#~ msgid "Shutting down stuff..." -#~ msgstr "Herunterfahren..." +#~ msgid "Multiplayer" +#~ msgstr "Mehrspieler" -#~ msgid "Connecting to server..." -#~ msgstr "Verbinde zum Server..." +#~ msgid "Cannot create world: Name contains invalid characters" +#~ msgstr "Kann Welt nicht erstellen: Name enthält ungültige Zeichen" -#~ msgid "Resolving address..." -#~ msgstr "Löse Adresse auf..." +#~ msgid "Warning: Configuration not consistent. " +#~ msgstr "Warnung: Konfiguration nicht konsistent. " -#~ msgid "Creating client..." -#~ msgstr "Erstelle Client..." +#~ msgid "Configuration saved. " +#~ msgstr "Konfiguration gespeichert. " -#~ msgid "Creating server...." -#~ msgstr "Erstelle Server..." +#~ msgid "is required by:" +#~ msgstr "wird benötigt von:" -#~ msgid "Loading..." -#~ msgstr "Lädt..." +#~ msgid "Left click: Move all items, Right click: Move single item" +#~ msgstr "Linksklick: Alle Items bewegen, Rechtsklick: Einzelnes Item bewegen" -#~ msgid "Local install" -#~ msgstr "Lokale Install." +#~ msgid "Anisotropic Filtering" +#~ msgstr "Anisotroper Filter" -#~ msgid "Add mod:" -#~ msgstr "Modifikation hinzufügen:" +#~ msgid "Mip-Mapping" +#~ msgstr "Mip-Mapping" -#~ msgid "MODS" -#~ msgstr "MODS" - -#~ msgid "TEXTURE PACKS" -#~ msgstr "TEXTUREN PAKETE" - -#~ msgid "SINGLE PLAYER" -#~ msgstr "EINZELSPIELER" - -#~ msgid "Finite Liquid" -#~ msgstr "Endliches Wasser" - -#~ msgid "Preload item visuals" -#~ msgstr "Lade Inventarbilder vor" - -#~ msgid "SETTINGS" -#~ msgstr "EINSTELLUNGEN" - -#~ msgid "Password" -#~ msgstr "Passwort" - -#~ msgid "Name" -#~ msgstr "Name" - -#~ msgid "START SERVER" -#~ msgstr "SERVER STARTEN" - -#~ msgid "Favorites:" -#~ msgstr "Favoriten:" - -#~ msgid "CLIENT" -#~ msgstr "CLIENT" - -#~ msgid "<<-- Add mod" -#~ msgstr "<<-- Mod hinzufügen" - -#~ msgid "Remove selected mod" -#~ msgstr "Ausgewählte Mod löschen" - -#~ msgid "EDIT GAME" -#~ msgstr "SPIEL ÄNDERN" - -#~ msgid "new game" -#~ msgstr "neues Spiel" - -#~ msgid "edit game" -#~ msgstr "Spiel ändern" - -#~ msgid "Mods:" -#~ msgstr "Mods:" - -#~ msgid "Games" -#~ msgstr "Spiele" - -#~ msgid "GAMES" -#~ msgstr "SPIELE" - -#~ msgid "Gamemgr: Unable to copy mod \"$1\" to game \"$2\"" -#~ msgstr "Gamemgr: Kann mod \"$1\" nicht in Spiel \"$2\" kopieren" - -#~ msgid "Game Name" -#~ msgstr "Spielname" +#~ msgid "Downloading" +#~ msgstr "Lade herunter" diff --git a/po/ja/minetest.po b/po/ja/minetest.po index 8dba0dc91..b93c672f1 100644 --- a/po/ja/minetest.po +++ b/po/ja/minetest.po @@ -2,116 +2,157 @@ msgid "" msgstr "" "Project-Id-Version: minetest\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-14 23:12+0900\n" +"POT-Creation-Date: 2015-03-23 02:38+0900\n" "PO-Revision-Date: 2015-02-22 10:57+0900\n" -"Last-Translator: Rui Takeda \n" -"Language-Team: Japanese \n" +"Last-Translator: Rui\n" +"Language-Team: Minetest JP\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 1.6.5\n" +#: builtin/fstk/ui.lua:67 builtin/mainmenu/store.lua:165 msgid "Ok" msgstr "決定" +#: builtin/mainmenu/dlg_config_world.lua:29 msgid "World:" msgstr "ワールド:" +#: builtin/mainmenu/dlg_config_world.lua:33 +#: builtin/mainmenu/dlg_config_world.lua:35 msgid "Hide Game" msgstr "ゲームを隠す" +#: builtin/mainmenu/dlg_config_world.lua:39 +#: builtin/mainmenu/dlg_config_world.lua:41 msgid "Hide mp content" msgstr "Modパックの簡略化" +#: builtin/mainmenu/dlg_config_world.lua:49 msgid "Mod:" msgstr "Mod名:" +#: builtin/mainmenu/dlg_config_world.lua:51 builtin/mainmenu/tab_mods.lua:99 msgid "Depends:" msgstr "依存Mod:" +#: builtin/mainmenu/dlg_config_world.lua:54 src/guiKeyChangeMenu.cpp:192 msgid "Save" msgstr "保存" +#: builtin/mainmenu/dlg_config_world.lua:55 +#: builtin/mainmenu/dlg_create_world.lua:64 +#: builtin/mainmenu/dlg_rename_modpack.lua:33 src/guiKeyChangeMenu.cpp:200 +#: src/keycode.cpp:224 msgid "Cancel" msgstr "キャンセル" +#: builtin/mainmenu/dlg_config_world.lua:71 msgid "Enable MP" msgstr "有効化" +#: builtin/mainmenu/dlg_config_world.lua:73 msgid "Disable MP" msgstr "無効化" +#: builtin/mainmenu/dlg_config_world.lua:77 +#: builtin/mainmenu/dlg_config_world.lua:79 msgid "enabled" msgstr "有効化" +#: builtin/mainmenu/dlg_config_world.lua:85 msgid "Enable all" msgstr "すべて有効化" +#: builtin/mainmenu/dlg_create_world.lua:50 msgid "World name" msgstr "ワールド名" +#: builtin/mainmenu/dlg_create_world.lua:53 msgid "Seed" msgstr "Seed値" +#: builtin/mainmenu/dlg_create_world.lua:56 msgid "Mapgen" msgstr "ワールドタイプ" +#: builtin/mainmenu/dlg_create_world.lua:59 msgid "Game" msgstr "ゲーム" +#: builtin/mainmenu/dlg_create_world.lua:63 msgid "Create" msgstr "作成" +#: builtin/mainmenu/dlg_create_world.lua:68 msgid "You have no subgames installed." msgstr "ゲームがインストールされていません。" +#: builtin/mainmenu/dlg_create_world.lua:69 msgid "Download one from minetest.net" msgstr "minetest.netから再ダウンロードしてください。" +#: builtin/mainmenu/dlg_create_world.lua:72 msgid "Warning: The minimal development test is meant for developers." msgstr "警告:Minimal development testは開発者のためのゲームです。" +#: builtin/mainmenu/dlg_create_world.lua:73 msgid "Download a subgame, such as minetest_game, from minetest.net" msgstr "minetest.netからminetest_gameのゲームをダウンロードしてください。" +#: builtin/mainmenu/dlg_create_world.lua:99 msgid "A world named \"$1\" already exists" -msgstr "ワールド名\"$1\"はすでに使用されています。" +msgstr "ワールド名\"$1\"はすでに使用されています。" +#: builtin/mainmenu/dlg_create_world.lua:116 msgid "No worldname given or no game selected" -msgstr "ワールド名が入力されていないか、ゲームが選択されていません。" +msgstr "ワールド名が入力されていないか、ゲームが選択されていません。" +#: builtin/mainmenu/dlg_delete_mod.lua:26 msgid "Are you sure you want to delete \"$1\"?" msgstr "本当に\"$1\"を削除してよろしいですか?" +#: builtin/mainmenu/dlg_delete_mod.lua:27 +#: builtin/mainmenu/dlg_delete_world.lua:25 +#: builtin/mainmenu/tab_settings.lua:79 msgid "Yes" msgstr "はい" +#: builtin/mainmenu/dlg_delete_mod.lua:28 msgid "No of course not!" msgstr "いいえ" +#: builtin/mainmenu/dlg_delete_mod.lua:41 msgid "Modmgr: failed to delete \"$1\"" -msgstr "Modマネージャー:\"$1\"の削除に失敗しました。" +msgstr "Modマネージャ:\"$1\"の削除に失敗しました。" +#: builtin/mainmenu/dlg_delete_mod.lua:45 msgid "Modmgr: invalid modpath \"$1\"" -msgstr "Modマネージャー:Mod\"$1\"の場所が不明です。" +msgstr "Modマネージャ:Mod\"$1\"の場所が不明です。" +#: builtin/mainmenu/dlg_delete_world.lua:24 msgid "Delete World \"$1\"?" -msgstr "ワールド\"$1\"を削除してよろしいですか?" +msgstr "ワールド\"$1\"を削除してよろしいですか?" +#: builtin/mainmenu/dlg_delete_world.lua:26 msgid "No" msgstr "いいえ" +#: builtin/mainmenu/dlg_rename_modpack.lua:26 msgid "Rename Modpack:" msgstr "名前を変更" +#: builtin/mainmenu/dlg_rename_modpack.lua:31 src/keycode.cpp:228 msgid "Accept" msgstr "決定" +#: builtin/mainmenu/modmgr.lua:344 msgid "Install Mod: file: \"$1\"" msgstr "Modインストール:ファイル\"$1\"からModをインストールします。" +#: builtin/mainmenu/modmgr.lua:345 msgid "" "\n" "Install Mod: unsupported filetype \"$1\" or broken archive" @@ -119,323 +160,441 @@ msgstr "" "\n" "Modインストール:ファイル\"$1\"は非対応の形式か、壊れています。" +#: builtin/mainmenu/modmgr.lua:365 msgid "Failed to install $1 to $2" msgstr "$2へ$1をインストールできませんでした。" +#: builtin/mainmenu/modmgr.lua:368 msgid "Install Mod: unable to find suitable foldername for modpack $1" msgstr "" "Modインストール:Modパック$1に適したフォルダ名を見つけることができませんでし" "た。" +#: builtin/mainmenu/modmgr.lua:388 msgid "Install Mod: unable to find real modname for: $1" msgstr "Modインストール:$1の本来のMod名が不明です。" +#: builtin/mainmenu/store.lua:88 msgid "Unsorted" msgstr "未分類" +#: builtin/mainmenu/store.lua:99 builtin/mainmenu/store.lua:580 msgid "Search" msgstr "検索" +#: builtin/mainmenu/store.lua:126 msgid "Downloading $1, please wait..." msgstr "$1をダウンロードしています。しばらくお待ちください..." +#: builtin/mainmenu/store.lua:160 msgid "Successfully installed:" msgstr "インストールが完了しました。:" +#: builtin/mainmenu/store.lua:162 msgid "Shortname:" msgstr "省略名" +#: builtin/mainmenu/store.lua:472 msgid "Rating" msgstr "評価" +#: builtin/mainmenu/store.lua:497 msgid "re-Install" msgstr "再インストール" +#: builtin/mainmenu/store.lua:499 msgid "Install" msgstr "インストール" +#: builtin/mainmenu/store.lua:518 msgid "Close store" msgstr "閉じる" +#: builtin/mainmenu/store.lua:526 msgid "Page $1 of $2" msgstr "ページ $1/$2" +#: builtin/mainmenu/tab_credits.lua:22 msgid "Credits" msgstr "クレジット" +#: builtin/mainmenu/tab_credits.lua:29 msgid "Core Developers" msgstr "開発者" +#: builtin/mainmenu/tab_credits.lua:43 msgid "Active Contributors" msgstr "開発協力者" +#: builtin/mainmenu/tab_credits.lua:48 msgid "Previous Contributors" msgstr "以前の開発協力者" +#: builtin/mainmenu/tab_mods.lua:30 msgid "Installed Mods:" msgstr "インストール済みのMod:" +#: builtin/mainmenu/tab_mods.lua:39 msgid "Online mod repository" msgstr "オンラインでModを検索" +#: builtin/mainmenu/tab_mods.lua:78 msgid "No mod description available" msgstr "Modの説明がありません。" +#: builtin/mainmenu/tab_mods.lua:82 msgid "Mod information:" msgstr "Modの情報:" +#: builtin/mainmenu/tab_mods.lua:93 msgid "Rename" msgstr "名前を変更" +#: builtin/mainmenu/tab_mods.lua:95 msgid "Uninstall selected modpack" msgstr "選択したModパックを削除" +#: builtin/mainmenu/tab_mods.lua:106 msgid "Uninstall selected mod" msgstr "選択したModを削除" +#: builtin/mainmenu/tab_mods.lua:121 msgid "Select Mod File:" msgstr "Modファイルを選択" +#: builtin/mainmenu/tab_mods.lua:165 msgid "Mods" msgstr "Mod" +#: builtin/mainmenu/tab_multiplayer.lua:23 msgid "Address / Port :" msgstr "アドレスとポート:" +#: builtin/mainmenu/tab_multiplayer.lua:24 msgid "Name / Password :" msgstr "名前とパスワード:" +#: builtin/mainmenu/tab_multiplayer.lua:29 +#: builtin/mainmenu/tab_simple_main.lua:30 msgid "Public Serverlist" msgstr "公開済みのサーバーの一覧" +#: builtin/mainmenu/tab_multiplayer.lua:34 builtin/mainmenu/tab_server.lua:26 +#: builtin/mainmenu/tab_singleplayer.lua:85 src/keycode.cpp:230 msgid "Delete" msgstr "削除" +#: builtin/mainmenu/tab_multiplayer.lua:38 +#: builtin/mainmenu/tab_simple_main.lua:34 msgid "Connect" msgstr "接続" +#: builtin/mainmenu/tab_multiplayer.lua:62 +#: builtin/mainmenu/tab_simple_main.lua:45 msgid "Creative mode" msgstr "クリエイティブモード" +#: builtin/mainmenu/tab_multiplayer.lua:63 +#: builtin/mainmenu/tab_simple_main.lua:46 msgid "Damage enabled" msgstr "HPあり" +#: builtin/mainmenu/tab_multiplayer.lua:64 +#: builtin/mainmenu/tab_simple_main.lua:47 msgid "PvP enabled" msgstr "PvPあり" +#: builtin/mainmenu/tab_multiplayer.lua:257 msgid "Client" msgstr "クライアント" +#: builtin/mainmenu/tab_server.lua:27 builtin/mainmenu/tab_singleplayer.lua:86 msgid "New" msgstr "作成" +#: builtin/mainmenu/tab_server.lua:28 builtin/mainmenu/tab_singleplayer.lua:87 msgid "Configure" msgstr "設定" +#: builtin/mainmenu/tab_server.lua:29 msgid "Start Game" msgstr "ゲームスタート" +#: builtin/mainmenu/tab_server.lua:30 builtin/mainmenu/tab_singleplayer.lua:89 msgid "Select World:" msgstr "ワールドを選択:" +#: builtin/mainmenu/tab_server.lua:31 builtin/mainmenu/tab_simple_main.lua:76 +#: builtin/mainmenu/tab_singleplayer.lua:90 msgid "Creative Mode" msgstr "クリエイティブモード" +#: builtin/mainmenu/tab_server.lua:33 builtin/mainmenu/tab_simple_main.lua:78 +#: builtin/mainmenu/tab_singleplayer.lua:92 msgid "Enable Damage" msgstr "ダメージあり" +#: builtin/mainmenu/tab_server.lua:35 msgid "Public" msgstr "サーバーを公開する" +#: builtin/mainmenu/tab_server.lua:37 builtin/mainmenu/tab_simple_main.lua:25 msgid "Name/Password" msgstr "名前とパスワード" +#: builtin/mainmenu/tab_server.lua:45 msgid "Bind Address" msgstr "バインドアドレス" +#: builtin/mainmenu/tab_server.lua:47 msgid "Port" msgstr "ポート" +#: builtin/mainmenu/tab_server.lua:51 msgid "Server Port" msgstr "サーバーのポート" +#: builtin/mainmenu/tab_server.lua:218 msgid "Server" msgstr "サーバー" +#: builtin/mainmenu/tab_settings.lua:21 msgid "No Filter" msgstr "フィルタ無し" +#: builtin/mainmenu/tab_settings.lua:22 msgid "Bilinear Filter" msgstr "バイリニアフィルタ" +#: builtin/mainmenu/tab_settings.lua:23 msgid "Trilinear Filter" msgstr "トリリニアフィルタ" +#: builtin/mainmenu/tab_settings.lua:32 msgid "No Mipmap" msgstr "ミップマップ無し" +#: builtin/mainmenu/tab_settings.lua:33 msgid "Mipmap" msgstr "ミップマップ" +#: builtin/mainmenu/tab_settings.lua:34 msgid "Mipmap + Aniso. Filter" msgstr "異方性フィルタ" +#: builtin/mainmenu/tab_settings.lua:77 msgid "Are you sure to reset your singleplayer world?" msgstr "シングルプレイヤーのワールドをリセットしてよろしいですか?" +#: builtin/mainmenu/tab_settings.lua:81 msgid "No!!!" msgstr "いいえ" +#: builtin/mainmenu/tab_settings.lua:181 msgid "Smooth Lighting" msgstr "滑らかな光" +#: builtin/mainmenu/tab_settings.lua:183 msgid "Enable Particles" msgstr "パーティクル有効化" +#: builtin/mainmenu/tab_settings.lua:185 msgid "3D Clouds" msgstr "立体の雲" +#: builtin/mainmenu/tab_settings.lua:187 msgid "Fancy Trees" msgstr "綺麗な木" +#: builtin/mainmenu/tab_settings.lua:189 msgid "Opaque Water" msgstr "不透明な水" +#: builtin/mainmenu/tab_settings.lua:191 msgid "Connected Glass" msgstr "ガラスをつなげる" +#: builtin/mainmenu/tab_settings.lua:193 msgid "Node Highlighting" msgstr "ノードの強調" +#: builtin/mainmenu/tab_settings.lua:196 msgid "Texturing:" msgstr "テクスチャリング:" +#: builtin/mainmenu/tab_settings.lua:201 msgid "Rendering:" msgstr "レンダリング:" +#: builtin/mainmenu/tab_settings.lua:205 msgid "Restart minetest for driver change to take effect" msgstr "ドライバーを変更するためMinetesを再起動します" +#: builtin/mainmenu/tab_settings.lua:207 msgid "Shaders" msgstr "シェーダー" +#: builtin/mainmenu/tab_settings.lua:212 msgid "Change keys" msgstr "操作変更" +#: builtin/mainmenu/tab_settings.lua:215 msgid "Reset singleplayer world" msgstr "シングルプレイヤーのワールドをリセット" +#: builtin/mainmenu/tab_settings.lua:219 msgid "GUI scale factor" msgstr "メニューの大きさ" +#: builtin/mainmenu/tab_settings.lua:223 msgid "Scaling factor applied to menu elements: " msgstr "メニューの大きさとして設定する数値:" +#: builtin/mainmenu/tab_settings.lua:229 msgid "Touch free target" msgstr "タッチ位置を自由にする" +#: builtin/mainmenu/tab_settings.lua:235 msgid "Touchthreshold (px)" msgstr "タッチのしきい値(ピクセル単位)" +#: builtin/mainmenu/tab_settings.lua:242 builtin/mainmenu/tab_settings.lua:256 msgid "Bumpmapping" msgstr "バンプマッピング" +#: builtin/mainmenu/tab_settings.lua:244 builtin/mainmenu/tab_settings.lua:257 msgid "Generate Normalmaps" msgstr "ノーマルマップの生成" +#: builtin/mainmenu/tab_settings.lua:246 builtin/mainmenu/tab_settings.lua:258 msgid "Parallax Occlusion" msgstr "視差遮蔽マッピング" +#: builtin/mainmenu/tab_settings.lua:248 builtin/mainmenu/tab_settings.lua:259 msgid "Waving Water" msgstr "揺れる水" +#: builtin/mainmenu/tab_settings.lua:250 builtin/mainmenu/tab_settings.lua:260 msgid "Waving Leaves" msgstr "揺れる葉" +#: builtin/mainmenu/tab_settings.lua:252 builtin/mainmenu/tab_settings.lua:261 msgid "Waving Plants" msgstr "揺れる草花" +#: builtin/mainmenu/tab_settings.lua:287 msgid "To enable shaders the OpenGL driver needs to be used." msgstr "シェーダーを有効にするにはOpenGLを使用する必要があります。" +#: builtin/mainmenu/tab_settings.lua:398 msgid "Settings" msgstr "設定" +#: builtin/mainmenu/tab_simple_main.lua:80 msgid "Fly mode" msgstr "飛行モード" +#: builtin/mainmenu/tab_simple_main.lua:84 msgid "Start Singleplayer" msgstr "ゲームスタート" +#: builtin/mainmenu/tab_simple_main.lua:85 msgid "Config mods" msgstr "Mod設定" +#: builtin/mainmenu/tab_simple_main.lua:208 msgid "Main" msgstr "メイン" +#: builtin/mainmenu/tab_singleplayer.lua:88 src/keycode.cpp:249 msgid "Play" msgstr "ゲームスタート" +#: builtin/mainmenu/tab_singleplayer.lua:268 msgid "Singleplayer" msgstr "シングルプレイヤー" +#: builtin/mainmenu/tab_texturepacks.lua:49 msgid "Select texture pack:" msgstr "テクスチャパックを選択:" +#: builtin/mainmenu/tab_texturepacks.lua:69 msgid "No information available" msgstr "情報がありません。" +#: builtin/mainmenu/tab_texturepacks.lua:114 msgid "Texturepacks" msgstr "テクスチャパック" +#: src/client.cpp:1616 msgid "Loading textures..." msgstr "テクスチャ読み込み中..." +#: src/client.cpp:1626 msgid "Rebuilding shaders..." msgstr "シェーダー構築中..." +#: src/client.cpp:1633 msgid "Initializing nodes..." msgstr "ノードの設定中..." +#: src/client.cpp:1647 +msgid "Initializing nodes" +msgstr "ノードを設定中" + +#: src/client.cpp:1655 msgid "Item textures..." msgstr "アイテムのテクスチャを設定中..." +#: src/client.cpp:1680 msgid "Done!" msgstr "完了!" +#: src/client/clientlauncher.cpp:172 msgid "Main Menu" msgstr "メインメニュー" +#: src/client/clientlauncher.cpp:210 msgid "Player name too long." msgstr "名前が長過ぎます。" +#: src/client/clientlauncher.cpp:248 msgid "Connection error (timed out?)" msgstr "接続失敗(またはタイムアウト)" +#: src/client/clientlauncher.cpp:413 msgid "No world selected and no address provided. Nothing to do." msgstr "ワールドが選択されていないアドレスです。続行できません。" +#: src/client/clientlauncher.cpp:420 msgid "Provided world path doesn't exist: " msgstr "ワールドが存在しません:" +#: src/client/clientlauncher.cpp:429 msgid "Could not find or load game \"" msgstr "ゲーム\"の読み込みができません。" +#: src/client/clientlauncher.cpp:447 msgid "Invalid gamespec." msgstr "無効なgamespecです。" +#: src/fontengine.cpp:70 src/fontengine.cpp:226 msgid "needs_fallback_font" msgstr "yes" +#: src/game.cpp:1046 src/guiFormSpecMenu.cpp:2008 msgid "Proceed" msgstr "決定" +#: src/game.cpp:1066 msgid "You died." msgstr "You died." +#: src/game.cpp:1067 msgid "Respawn" msgstr "Respawn" +#: src/game.cpp:1086 msgid "" "Default Controls:\n" "No menu visible:\n" @@ -463,6 +622,7 @@ msgstr "" "- タッチしてドラッグ:\n" "-- アイテムを置く\n" +#: src/game.cpp:1100 msgid "" "Default Controls:\n" "- WASD: move\n" @@ -488,57 +648,75 @@ msgstr "" "- ホイール:アイテム選択\n" "- T:チャット画面\n" +#: src/game.cpp:1119 msgid "Continue" msgstr "再開" +#: src/game.cpp:1123 msgid "Change Password" -msgstr "パスワード変更" +msgstr "パスワード変更" +#: src/game.cpp:1128 msgid "Sound Volume" msgstr "音量" +#: src/game.cpp:1130 msgid "Change Keys" msgstr "操作変更" +#: src/game.cpp:1133 msgid "Exit to Menu" msgstr "タイトル" +#: src/game.cpp:1135 msgid "Exit to OS" msgstr "終了" +#: src/game.cpp:1812 msgid "Shutting down..." msgstr "終了中..." +#: src/game.cpp:1862 msgid "Loading..." msgstr "読み込み中..." +#: src/game.cpp:1919 msgid "Creating server..." msgstr "サーバー作成中..." +#: src/game.cpp:1956 msgid "Creating client..." msgstr "クライアント作成中..." +#: src/game.cpp:2129 msgid "Resolving address..." msgstr "アドレス解決中..." +#: src/game.cpp:2220 msgid "Connecting to server..." msgstr "サーバー接続中..." +#: src/game.cpp:2278 msgid "Item definitions..." msgstr "アイテム定義中..." +#: src/game.cpp:2283 msgid "Node definitions..." msgstr "ノード定義中..." +#: src/game.cpp:2290 msgid "Media..." msgstr "..." +#: src/game.cpp:2295 msgid " KB/s" msgstr " KB/秒" +#: src/game.cpp:2299 msgid " MB/s" msgstr " MB/秒" +#: src/game.cpp:4255 msgid "" "\n" "Check debug.txt for details." @@ -546,311 +724,418 @@ msgstr "" "\n" "詳細はdebug.txtをご覧ください。" +#: src/guiFormSpecMenu.cpp:2799 msgid "Enter " msgstr "Enter" +#: src/guiFormSpecMenu.cpp:2819 msgid "ok" msgstr "決定" +#: src/guiKeyChangeMenu.cpp:126 msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)" msgstr "操作の設定を変更します。" +#: src/guiKeyChangeMenu.cpp:166 msgid "\"Use\" = climb down" msgstr "「使用」で降りる" +#: src/guiKeyChangeMenu.cpp:181 msgid "Double tap \"jump\" to toggle fly" msgstr "「ジャンプ」二回押しで飛行モード" +#: src/guiKeyChangeMenu.cpp:297 msgid "Key already in use" msgstr "すでに使われているキーです。" +#: src/guiKeyChangeMenu.cpp:372 msgid "press key" msgstr "キー入力待ち" +#: src/guiKeyChangeMenu.cpp:398 msgid "Forward" msgstr "前進" +#: src/guiKeyChangeMenu.cpp:399 msgid "Backward" msgstr "後退" +#: src/guiKeyChangeMenu.cpp:400 src/keycode.cpp:229 msgid "Left" msgstr "左に進む" +#: src/guiKeyChangeMenu.cpp:401 src/keycode.cpp:229 msgid "Right" msgstr "右に進む" +#: src/guiKeyChangeMenu.cpp:402 msgid "Use" msgstr "使用" +#: src/guiKeyChangeMenu.cpp:403 msgid "Jump" msgstr "ジャンプ" +#: src/guiKeyChangeMenu.cpp:404 msgid "Sneak" msgstr "スニーク" +#: src/guiKeyChangeMenu.cpp:405 msgid "Drop" msgstr "落とす" +#: src/guiKeyChangeMenu.cpp:406 msgid "Inventory" msgstr "インベントリ" +#: src/guiKeyChangeMenu.cpp:407 msgid "Chat" msgstr "チャット" +#: src/guiKeyChangeMenu.cpp:408 msgid "Command" msgstr "コマンド" +#: src/guiKeyChangeMenu.cpp:409 msgid "Console" msgstr "コンソール" +#: src/guiKeyChangeMenu.cpp:410 msgid "Toggle fly" msgstr "飛行モード" +#: src/guiKeyChangeMenu.cpp:411 msgid "Toggle fast" msgstr "高速移動モード" +#: src/guiKeyChangeMenu.cpp:412 +msgid "Toggle Cinematic" +msgstr "シネマティックモード" + +#: src/guiKeyChangeMenu.cpp:413 msgid "Toggle noclip" msgstr "すり抜けモード" +#: src/guiKeyChangeMenu.cpp:414 msgid "Range select" msgstr "視野範囲変更" +#: src/guiKeyChangeMenu.cpp:415 msgid "Print stacks" msgstr "スタックの表示" +#: src/guiPasswordChange.cpp:108 msgid "Old Password" msgstr "古いパスワード" +#: src/guiPasswordChange.cpp:124 msgid "New Password" msgstr "新しいパスワード" +#: src/guiPasswordChange.cpp:139 msgid "Confirm Password" msgstr "パスワードの確認" +#: src/guiPasswordChange.cpp:155 msgid "Change" msgstr "変更" +#: src/guiPasswordChange.cpp:164 msgid "Passwords do not match!" msgstr "パスワードが一致しません!" +#: src/guiVolumeChange.cpp:106 msgid "Sound Volume: " msgstr "音量:" +#: src/guiVolumeChange.cpp:120 msgid "Exit" msgstr "閉じる" +#: src/keycode.cpp:224 msgid "Left Button" msgstr "左ボタン" +#: src/keycode.cpp:224 msgid "Middle Button" msgstr "中ボタン" +#: src/keycode.cpp:224 msgid "Right Button" msgstr "右ボタン" +#: src/keycode.cpp:224 msgid "X Button 1" msgstr "Xボタン1" +#: src/keycode.cpp:225 msgid "Back" msgstr "Back" +#: src/keycode.cpp:225 msgid "Clear" msgstr "消す" +#: src/keycode.cpp:225 msgid "Return" msgstr "エンター" +#: src/keycode.cpp:225 msgid "Tab" msgstr "タブ" +#: src/keycode.cpp:225 msgid "X Button 2" msgstr "Xボタン2" +#: src/keycode.cpp:226 msgid "Capital" msgstr "Caps Lock" +#: src/keycode.cpp:226 msgid "Control" msgstr "コントロール" +#: src/keycode.cpp:226 msgid "Kana" msgstr "かな" +#: src/keycode.cpp:226 msgid "Menu" msgstr "メニュー" +#: src/keycode.cpp:226 msgid "Pause" msgstr "ポーズ" +#: src/keycode.cpp:226 msgid "Shift" msgstr "Shift" +#: src/keycode.cpp:227 msgid "Convert" msgstr "変換" +#: src/keycode.cpp:227 msgid "Escape" msgstr "Esc" +#: src/keycode.cpp:227 msgid "Final" msgstr "Finalキー" +#: src/keycode.cpp:227 msgid "Junja" msgstr "Junjaキー" +#: src/keycode.cpp:227 msgid "Kanji" msgstr "半角/全角" +#: src/keycode.cpp:227 msgid "Nonconvert" msgstr "無変換" +#: src/keycode.cpp:228 msgid "End" msgstr "終了" +#: src/keycode.cpp:228 msgid "Home" msgstr "Home" +#: src/keycode.cpp:228 msgid "Mode Change" msgstr "モード変更" +#: src/keycode.cpp:228 msgid "Next" msgstr "Page Down" +#: src/keycode.cpp:228 msgid "Prior" msgstr "Page Up" +#: src/keycode.cpp:228 msgid "Space" msgstr "スペース" +#: src/keycode.cpp:229 msgid "Down" msgstr "下" +#: src/keycode.cpp:229 msgid "Execute" msgstr "実行キー" +#: src/keycode.cpp:229 msgid "Print" msgstr "印刷キー" +#: src/keycode.cpp:229 msgid "Select" msgstr "選択キー" +#: src/keycode.cpp:229 msgid "Up" msgstr "上" +#: src/keycode.cpp:230 msgid "Help" msgstr "ヘルプ" +#: src/keycode.cpp:230 msgid "Insert" msgstr "Insert" +#: src/keycode.cpp:230 msgid "Snapshot" msgstr "Snapshot" +#: src/keycode.cpp:233 msgid "Left Windows" msgstr "左Windows" +#: src/keycode.cpp:234 msgid "Apps" msgstr "Apps" +#: src/keycode.cpp:234 msgid "Numpad 0" msgstr "Numpad 0" +#: src/keycode.cpp:234 msgid "Numpad 1" msgstr "Numpad 1" +#: src/keycode.cpp:234 msgid "Right Windows" msgstr "右Windows" +#: src/keycode.cpp:234 msgid "Sleep" msgstr "スリープ" +#: src/keycode.cpp:235 msgid "Numpad 2" msgstr "Numpad 2" +#: src/keycode.cpp:235 msgid "Numpad 3" msgstr "Numpad 3" +#: src/keycode.cpp:235 msgid "Numpad 4" msgstr "Numpad 4" +#: src/keycode.cpp:235 msgid "Numpad 5" msgstr "Numpad 5" +#: src/keycode.cpp:235 msgid "Numpad 6" msgstr "Numpad 6" +#: src/keycode.cpp:235 msgid "Numpad 7" msgstr "Numpad 7" +#: src/keycode.cpp:236 msgid "Numpad *" msgstr "Numpad *" +#: src/keycode.cpp:236 msgid "Numpad +" msgstr "Numpad +" +#: src/keycode.cpp:236 msgid "Numpad -" msgstr "Numpad -" +#: src/keycode.cpp:236 msgid "Numpad /" msgstr "Numpad /" +#: src/keycode.cpp:236 msgid "Numpad 8" msgstr "Numpad 8" +#: src/keycode.cpp:236 msgid "Numpad 9" msgstr "Numpad 9" +#: src/keycode.cpp:240 msgid "Num Lock" msgstr "Num Lock" +#: src/keycode.cpp:240 msgid "Scroll Lock" msgstr "Scroll Lock" +#: src/keycode.cpp:241 msgid "Left Shift" msgstr "左Shift" +#: src/keycode.cpp:241 msgid "Right Shift" msgstr "右Shift" +#: src/keycode.cpp:242 msgid "Left Control" msgstr "左Ctrl" +#: src/keycode.cpp:242 msgid "Left Menu" msgstr "左メニュー" +#: src/keycode.cpp:242 msgid "Right Control" msgstr "右Ctrl" +#: src/keycode.cpp:242 msgid "Right Menu" msgstr "右メニュー" +#: src/keycode.cpp:244 msgid "Comma" msgstr "読点" +#: src/keycode.cpp:244 msgid "Minus" msgstr "ー" +#: src/keycode.cpp:244 msgid "Period" msgstr "." +#: src/keycode.cpp:244 msgid "Plus" msgstr "プラス" +#: src/keycode.cpp:248 msgid "Attn" msgstr ":" +#: src/keycode.cpp:248 msgid "CrSel" msgstr "CrSel" +#: src/keycode.cpp:249 msgid "Erase OEF" msgstr "Erase OEF" +#: src/keycode.cpp:249 msgid "ExSel" msgstr "ExSel" +#: src/keycode.cpp:249 msgid "OEM Clear" msgstr "OEM Clear" +#: src/keycode.cpp:249 msgid "PA1" msgstr "PA1" +#: src/keycode.cpp:249 msgid "Zoom" msgstr "ズーム" diff --git a/po/minetest.pot b/po/minetest.pot index 9a623788f..9dc989a79 100644 --- a/po/minetest.pot +++ b/po/minetest.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: minetest\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-12-13 15:24+0100\n" +"POT-Creation-Date: 2015-03-14 16:32+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,57 +17,57 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: builtin/fstk/ui.lua:67 +#: builtin/fstk/ui.lua:67 builtin/mainmenu/store.lua:165 msgid "Ok" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:26 +#: builtin/mainmenu/dlg_config_world.lua:29 msgid "World:" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:30 -#: builtin/mainmenu/dlg_config_world.lua:32 +#: builtin/mainmenu/dlg_config_world.lua:33 +#: builtin/mainmenu/dlg_config_world.lua:35 msgid "Hide Game" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:36 -#: builtin/mainmenu/dlg_config_world.lua:38 +#: builtin/mainmenu/dlg_config_world.lua:39 +#: builtin/mainmenu/dlg_config_world.lua:41 msgid "Hide mp content" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:46 +#: builtin/mainmenu/dlg_config_world.lua:49 msgid "Mod:" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:48 +#: builtin/mainmenu/dlg_config_world.lua:51 builtin/mainmenu/tab_mods.lua:99 msgid "Depends:" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:51 src/guiKeyChangeMenu.cpp:191 +#: builtin/mainmenu/dlg_config_world.lua:54 src/guiKeyChangeMenu.cpp:192 msgid "Save" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:52 +#: builtin/mainmenu/dlg_config_world.lua:55 #: builtin/mainmenu/dlg_create_world.lua:64 -#: builtin/mainmenu/dlg_rename_modpack.lua:33 src/guiKeyChangeMenu.cpp:199 +#: builtin/mainmenu/dlg_rename_modpack.lua:33 src/guiKeyChangeMenu.cpp:200 #: src/keycode.cpp:224 msgid "Cancel" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:68 +#: builtin/mainmenu/dlg_config_world.lua:71 msgid "Enable MP" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:70 +#: builtin/mainmenu/dlg_config_world.lua:73 msgid "Disable MP" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:74 -#: builtin/mainmenu/dlg_config_world.lua:76 +#: builtin/mainmenu/dlg_config_world.lua:77 +#: builtin/mainmenu/dlg_config_world.lua:79 msgid "enabled" msgstr "" -#: builtin/mainmenu/dlg_config_world.lua:82 +#: builtin/mainmenu/dlg_config_world.lua:85 msgid "Enable all" msgstr "" @@ -107,7 +107,7 @@ msgstr "" msgid "Download a subgame, such as minetest_game, from minetest.net" msgstr "" -#: builtin/mainmenu/dlg_create_world.lua:97 +#: builtin/mainmenu/dlg_create_world.lua:99 msgid "A world named \"$1\" already exists" msgstr "" @@ -121,7 +121,7 @@ msgstr "" #: builtin/mainmenu/dlg_delete_mod.lua:27 #: builtin/mainmenu/dlg_delete_world.lua:25 -#: builtin/mainmenu/tab_settings.lua:25 +#: builtin/mainmenu/tab_settings.lua:79 msgid "Yes" msgstr "" @@ -179,47 +179,39 @@ msgstr "" msgid "Unsorted" msgstr "" -#: builtin/mainmenu/store.lua:99 builtin/mainmenu/store.lua:584 +#: builtin/mainmenu/store.lua:99 builtin/mainmenu/store.lua:580 msgid "Search" msgstr "" -#: builtin/mainmenu/store.lua:125 -msgid "Downloading" +#: builtin/mainmenu/store.lua:126 +msgid "Downloading $1, please wait..." msgstr "" -#: builtin/mainmenu/store.lua:127 -msgid "please wait..." -msgstr "" - -#: builtin/mainmenu/store.lua:159 +#: builtin/mainmenu/store.lua:160 msgid "Successfully installed:" msgstr "" -#: builtin/mainmenu/store.lua:163 +#: builtin/mainmenu/store.lua:162 msgid "Shortname:" msgstr "" -#: builtin/mainmenu/store.lua:167 src/guiFormSpecMenu.cpp:2866 -msgid "ok" -msgstr "" - -#: builtin/mainmenu/store.lua:476 +#: builtin/mainmenu/store.lua:472 msgid "Rating" msgstr "" -#: builtin/mainmenu/store.lua:501 +#: builtin/mainmenu/store.lua:497 msgid "re-Install" msgstr "" -#: builtin/mainmenu/store.lua:503 +#: builtin/mainmenu/store.lua:499 msgid "Install" msgstr "" -#: builtin/mainmenu/store.lua:522 +#: builtin/mainmenu/store.lua:518 msgid "Close store" msgstr "" -#: builtin/mainmenu/store.lua:530 +#: builtin/mainmenu/store.lua:526 msgid "Page $1 of $2" msgstr "" @@ -276,12 +268,11 @@ msgid "Mods" msgstr "" #: builtin/mainmenu/tab_multiplayer.lua:23 -msgid "Address/Port" +msgid "Address / Port :" msgstr "" -#: builtin/mainmenu/tab_multiplayer.lua:24 builtin/mainmenu/tab_server.lua:37 -#: builtin/mainmenu/tab_simple_main.lua:25 -msgid "Name/Password" +#: builtin/mainmenu/tab_multiplayer.lua:24 +msgid "Name / Password :" msgstr "" #: builtin/mainmenu/tab_multiplayer.lua:29 @@ -299,7 +290,22 @@ msgstr "" msgid "Connect" msgstr "" -#: builtin/mainmenu/tab_multiplayer.lua:252 +#: builtin/mainmenu/tab_multiplayer.lua:62 +#: builtin/mainmenu/tab_simple_main.lua:45 +msgid "Creative mode" +msgstr "" + +#: builtin/mainmenu/tab_multiplayer.lua:63 +#: builtin/mainmenu/tab_simple_main.lua:46 +msgid "Damage enabled" +msgstr "" + +#: builtin/mainmenu/tab_multiplayer.lua:64 +#: builtin/mainmenu/tab_simple_main.lua:47 +msgid "PvP enabled" +msgstr "" + +#: builtin/mainmenu/tab_multiplayer.lua:257 msgid "Client" msgstr "" @@ -319,12 +325,12 @@ msgstr "" msgid "Select World:" msgstr "" -#: builtin/mainmenu/tab_server.lua:31 builtin/mainmenu/tab_simple_main.lua:63 +#: builtin/mainmenu/tab_server.lua:31 builtin/mainmenu/tab_simple_main.lua:76 #: builtin/mainmenu/tab_singleplayer.lua:90 msgid "Creative Mode" msgstr "" -#: builtin/mainmenu/tab_server.lua:33 builtin/mainmenu/tab_simple_main.lua:65 +#: builtin/mainmenu/tab_server.lua:33 builtin/mainmenu/tab_simple_main.lua:78 #: builtin/mainmenu/tab_singleplayer.lua:92 msgid "Enable Damage" msgstr "" @@ -333,6 +339,10 @@ msgstr "" msgid "Public" msgstr "" +#: builtin/mainmenu/tab_server.lua:37 builtin/mainmenu/tab_simple_main.lua:25 +msgid "Name/Password" +msgstr "" + #: builtin/mainmenu/tab_server.lua:45 msgid "Bind Address" msgstr "" @@ -349,131 +359,151 @@ msgstr "" msgid "Server" msgstr "" +#: builtin/mainmenu/tab_settings.lua:21 +msgid "No Filter" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:22 +msgid "Bilinear Filter" +msgstr "" + #: builtin/mainmenu/tab_settings.lua:23 +msgid "Trilinear Filter" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:32 +msgid "No Mipmap" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:33 +msgid "Mipmap" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:34 +msgid "Mipmap + Aniso. Filter" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:77 msgid "Are you sure to reset your singleplayer world?" msgstr "" -#: builtin/mainmenu/tab_settings.lua:27 +#: builtin/mainmenu/tab_settings.lua:81 msgid "No!!!" msgstr "" -#: builtin/mainmenu/tab_settings.lua:134 +#: builtin/mainmenu/tab_settings.lua:181 msgid "Smooth Lighting" msgstr "" -#: builtin/mainmenu/tab_settings.lua:136 +#: builtin/mainmenu/tab_settings.lua:183 msgid "Enable Particles" msgstr "" -#: builtin/mainmenu/tab_settings.lua:138 +#: builtin/mainmenu/tab_settings.lua:185 msgid "3D Clouds" msgstr "" -#: builtin/mainmenu/tab_settings.lua:140 +#: builtin/mainmenu/tab_settings.lua:187 msgid "Fancy Trees" msgstr "" -#: builtin/mainmenu/tab_settings.lua:142 +#: builtin/mainmenu/tab_settings.lua:189 msgid "Opaque Water" msgstr "" -#: builtin/mainmenu/tab_settings.lua:144 +#: builtin/mainmenu/tab_settings.lua:191 msgid "Connected Glass" msgstr "" -#: builtin/mainmenu/tab_settings.lua:149 +#: builtin/mainmenu/tab_settings.lua:193 +msgid "Node Highlighting" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:196 +msgid "Texturing:" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:201 +msgid "Rendering:" +msgstr "" + +#: builtin/mainmenu/tab_settings.lua:205 msgid "Restart minetest for driver change to take effect" msgstr "" -#: builtin/mainmenu/tab_settings.lua:151 -msgid "Mip-Mapping" -msgstr "" - -#: builtin/mainmenu/tab_settings.lua:153 -msgid "Anisotropic Filtering" -msgstr "" - -#: builtin/mainmenu/tab_settings.lua:155 -msgid "Bi-Linear Filtering" -msgstr "" - -#: builtin/mainmenu/tab_settings.lua:157 -msgid "Tri-Linear Filtering" -msgstr "" - -#: builtin/mainmenu/tab_settings.lua:160 +#: builtin/mainmenu/tab_settings.lua:207 msgid "Shaders" msgstr "" -#: builtin/mainmenu/tab_settings.lua:164 +#: builtin/mainmenu/tab_settings.lua:212 msgid "Change keys" msgstr "" -#: builtin/mainmenu/tab_settings.lua:167 +#: builtin/mainmenu/tab_settings.lua:215 msgid "Reset singleplayer world" msgstr "" -#: builtin/mainmenu/tab_settings.lua:171 +#: builtin/mainmenu/tab_settings.lua:219 msgid "GUI scale factor" msgstr "" -#: builtin/mainmenu/tab_settings.lua:175 +#: builtin/mainmenu/tab_settings.lua:223 msgid "Scaling factor applied to menu elements: " msgstr "" -#: builtin/mainmenu/tab_settings.lua:181 +#: builtin/mainmenu/tab_settings.lua:229 msgid "Touch free target" msgstr "" -#: builtin/mainmenu/tab_settings.lua:187 +#: builtin/mainmenu/tab_settings.lua:235 msgid "Touchthreshold (px)" msgstr "" -#: builtin/mainmenu/tab_settings.lua:194 builtin/mainmenu/tab_settings.lua:208 +#: builtin/mainmenu/tab_settings.lua:242 builtin/mainmenu/tab_settings.lua:256 msgid "Bumpmapping" msgstr "" -#: builtin/mainmenu/tab_settings.lua:196 builtin/mainmenu/tab_settings.lua:209 +#: builtin/mainmenu/tab_settings.lua:244 builtin/mainmenu/tab_settings.lua:257 msgid "Generate Normalmaps" msgstr "" -#: builtin/mainmenu/tab_settings.lua:198 builtin/mainmenu/tab_settings.lua:210 +#: builtin/mainmenu/tab_settings.lua:246 builtin/mainmenu/tab_settings.lua:258 msgid "Parallax Occlusion" msgstr "" -#: builtin/mainmenu/tab_settings.lua:200 builtin/mainmenu/tab_settings.lua:211 +#: builtin/mainmenu/tab_settings.lua:248 builtin/mainmenu/tab_settings.lua:259 msgid "Waving Water" msgstr "" -#: builtin/mainmenu/tab_settings.lua:202 builtin/mainmenu/tab_settings.lua:212 +#: builtin/mainmenu/tab_settings.lua:250 builtin/mainmenu/tab_settings.lua:260 msgid "Waving Leaves" msgstr "" -#: builtin/mainmenu/tab_settings.lua:204 builtin/mainmenu/tab_settings.lua:213 +#: builtin/mainmenu/tab_settings.lua:252 builtin/mainmenu/tab_settings.lua:261 msgid "Waving Plants" msgstr "" -#: builtin/mainmenu/tab_settings.lua:255 +#: builtin/mainmenu/tab_settings.lua:287 msgid "To enable shaders the OpenGL driver needs to be used." msgstr "" -#: builtin/mainmenu/tab_settings.lua:330 +#: builtin/mainmenu/tab_settings.lua:398 msgid "Settings" msgstr "" -#: builtin/mainmenu/tab_simple_main.lua:67 +#: builtin/mainmenu/tab_simple_main.lua:80 msgid "Fly mode" msgstr "" -#: builtin/mainmenu/tab_simple_main.lua:71 +#: builtin/mainmenu/tab_simple_main.lua:84 msgid "Start Singleplayer" msgstr "" -#: builtin/mainmenu/tab_simple_main.lua:72 +#: builtin/mainmenu/tab_simple_main.lua:85 msgid "Config mods" msgstr "" -#: builtin/mainmenu/tab_simple_main.lua:191 +#: builtin/mainmenu/tab_simple_main.lua:208 msgid "Main" msgstr "" @@ -497,157 +527,292 @@ msgstr "" msgid "Texturepacks" msgstr "" -#: src/client.cpp:2726 +#: src/client.cpp:1563 +msgid "Loading textures..." +msgstr "" + +#: src/client.cpp:1573 +msgid "Rebuilding shaders..." +msgstr "" + +#: src/client.cpp:1580 +msgid "Initializing nodes..." +msgstr "" + +#: src/client.cpp:1595 msgid "Item textures..." msgstr "" +#: src/client.cpp:1620 +msgid "Done!" +msgstr "" + +#: src/client/clientlauncher.cpp:172 +msgid "Main Menu" +msgstr "" + +#: src/client/clientlauncher.cpp:210 +msgid "Player name too long." +msgstr "" + +#: src/client/clientlauncher.cpp:248 +msgid "Connection error (timed out?)" +msgstr "" + +#: src/client/clientlauncher.cpp:413 +msgid "No world selected and no address provided. Nothing to do." +msgstr "" + +#: src/client/clientlauncher.cpp:420 +msgid "Provided world path doesn't exist: " +msgstr "" + +#: src/client/clientlauncher.cpp:429 +msgid "Could not find or load game \"" +msgstr "" + +#: src/client/clientlauncher.cpp:447 +msgid "Invalid gamespec." +msgstr "" + #: src/fontengine.cpp:70 src/fontengine.cpp:226 msgid "needs_fallback_font" msgstr "" -#: src/game.cpp:1063 +#: src/game.cpp:1061 src/guiFormSpecMenu.cpp:2008 +msgid "Proceed" +msgstr "" + +#: src/game.cpp:1081 +msgid "You died." +msgstr "" + +#: src/game.cpp:1082 msgid "Respawn" msgstr "" -#: src/game.cpp:2250 +#: src/game.cpp:1101 +msgid "" +"Default Controls:\n" +"No menu visible:\n" +"- single tap: button activate\n" +"- double tap: place/use\n" +"- slide finger: look around\n" +"Menu/Inventory visible:\n" +"- double tap (outside):\n" +" -->close\n" +"- touch stack, touch slot:\n" +" --> move stack\n" +"- touch&drag, tap 2nd finger\n" +" --> place single item to slot\n" +msgstr "" + +#: src/game.cpp:1115 +msgid "" +"Default Controls:\n" +"- WASD: move\n" +"- Space: jump/climb\n" +"- Shift: sneak/go down\n" +"- Q: drop item\n" +"- I: inventory\n" +"- Mouse: turn/look\n" +"- Mouse left: dig/punch\n" +"- Mouse right: place/use\n" +"- Mouse wheel: select item\n" +"- T: chat\n" +msgstr "" + +#: src/game.cpp:1134 +msgid "Continue" +msgstr "" + +#: src/game.cpp:1138 +msgid "Change Password" +msgstr "" + +#: src/game.cpp:1143 +msgid "Sound Volume" +msgstr "" + +#: src/game.cpp:1145 +msgid "Change Keys" +msgstr "" + +#: src/game.cpp:1148 +msgid "Exit to Menu" +msgstr "" + +#: src/game.cpp:1150 +msgid "Exit to OS" +msgstr "" + +#: src/game.cpp:1827 +msgid "Shutting down..." +msgstr "" + +#: src/game.cpp:1876 +msgid "Loading..." +msgstr "" + +#: src/game.cpp:1933 +msgid "Creating server..." +msgstr "" + +#: src/game.cpp:1970 +msgid "Creating client..." +msgstr "" + +#: src/game.cpp:2143 +msgid "Resolving address..." +msgstr "" + +#: src/game.cpp:2234 +msgid "Connecting to server..." +msgstr "" + +#: src/game.cpp:2292 msgid "Item definitions..." msgstr "" -#: src/game.cpp:2255 +#: src/game.cpp:2297 msgid "Node definitions..." msgstr "" -#: src/game.cpp:2262 +#: src/game.cpp:2304 msgid "Media..." msgstr "" -#: src/game.cpp:2267 +#: src/game.cpp:2309 msgid " KB/s" msgstr "" -#: src/game.cpp:2271 +#: src/game.cpp:2313 msgid " MB/s" msgstr "" -#: src/game.cpp:4220 +#: src/game.cpp:4265 msgid "" "\n" "Check debug.txt for details." msgstr "" -#: src/guiFormSpecMenu.cpp:2055 -msgid "Proceed" -msgstr "" - -#: src/guiFormSpecMenu.cpp:2846 +#: src/guiFormSpecMenu.cpp:2799 msgid "Enter " msgstr "" -#: src/guiKeyChangeMenu.cpp:125 +#: src/guiFormSpecMenu.cpp:2819 +msgid "ok" +msgstr "" + +#: src/guiKeyChangeMenu.cpp:126 msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)" msgstr "" -#: src/guiKeyChangeMenu.cpp:165 +#: src/guiKeyChangeMenu.cpp:166 msgid "\"Use\" = climb down" msgstr "" -#: src/guiKeyChangeMenu.cpp:180 +#: src/guiKeyChangeMenu.cpp:181 msgid "Double tap \"jump\" to toggle fly" msgstr "" -#: src/guiKeyChangeMenu.cpp:296 +#: src/guiKeyChangeMenu.cpp:297 msgid "Key already in use" msgstr "" -#: src/guiKeyChangeMenu.cpp:371 +#: src/guiKeyChangeMenu.cpp:372 msgid "press key" msgstr "" -#: src/guiKeyChangeMenu.cpp:397 +#: src/guiKeyChangeMenu.cpp:398 msgid "Forward" msgstr "" -#: src/guiKeyChangeMenu.cpp:398 +#: src/guiKeyChangeMenu.cpp:399 msgid "Backward" msgstr "" -#: src/guiKeyChangeMenu.cpp:399 src/keycode.cpp:229 +#: src/guiKeyChangeMenu.cpp:400 src/keycode.cpp:229 msgid "Left" msgstr "" -#: src/guiKeyChangeMenu.cpp:400 src/keycode.cpp:229 +#: src/guiKeyChangeMenu.cpp:401 src/keycode.cpp:229 msgid "Right" msgstr "" -#: src/guiKeyChangeMenu.cpp:401 +#: src/guiKeyChangeMenu.cpp:402 msgid "Use" msgstr "" -#: src/guiKeyChangeMenu.cpp:402 +#: src/guiKeyChangeMenu.cpp:403 msgid "Jump" msgstr "" -#: src/guiKeyChangeMenu.cpp:403 +#: src/guiKeyChangeMenu.cpp:404 msgid "Sneak" msgstr "" -#: src/guiKeyChangeMenu.cpp:404 +#: src/guiKeyChangeMenu.cpp:405 msgid "Drop" msgstr "" -#: src/guiKeyChangeMenu.cpp:405 +#: src/guiKeyChangeMenu.cpp:406 msgid "Inventory" msgstr "" -#: src/guiKeyChangeMenu.cpp:406 +#: src/guiKeyChangeMenu.cpp:407 msgid "Chat" msgstr "" -#: src/guiKeyChangeMenu.cpp:407 +#: src/guiKeyChangeMenu.cpp:408 msgid "Command" msgstr "" -#: src/guiKeyChangeMenu.cpp:408 +#: src/guiKeyChangeMenu.cpp:409 msgid "Console" msgstr "" -#: src/guiKeyChangeMenu.cpp:409 +#: src/guiKeyChangeMenu.cpp:410 msgid "Toggle fly" msgstr "" -#: src/guiKeyChangeMenu.cpp:410 +#: src/guiKeyChangeMenu.cpp:411 msgid "Toggle fast" msgstr "" -#: src/guiKeyChangeMenu.cpp:411 -msgid "Toggle noclip" -msgstr "" - #: src/guiKeyChangeMenu.cpp:412 -msgid "Range select" +msgid "Toggle Cinematic" msgstr "" #: src/guiKeyChangeMenu.cpp:413 +msgid "Toggle noclip" +msgstr "" + +#: src/guiKeyChangeMenu.cpp:414 +msgid "Range select" +msgstr "" + +#: src/guiKeyChangeMenu.cpp:415 msgid "Print stacks" msgstr "" -#: src/guiPasswordChange.cpp:106 +#: src/guiPasswordChange.cpp:108 msgid "Old Password" msgstr "" -#: src/guiPasswordChange.cpp:122 +#: src/guiPasswordChange.cpp:124 msgid "New Password" msgstr "" -#: src/guiPasswordChange.cpp:137 +#: src/guiPasswordChange.cpp:139 msgid "Confirm Password" msgstr "" -#: src/guiPasswordChange.cpp:153 +#: src/guiPasswordChange.cpp:155 msgid "Change" msgstr "" -#: src/guiPasswordChange.cpp:162 +#: src/guiPasswordChange.cpp:164 msgid "Passwords do not match!" msgstr "" @@ -946,31 +1111,3 @@ msgstr "" #: src/keycode.cpp:249 msgid "Zoom" msgstr "" - -#: src/main.cpp:1681 -msgid "Main Menu" -msgstr "" - -#: src/main.cpp:1719 -msgid "Player name too long." -msgstr "" - -#: src/main.cpp:1757 -msgid "Connection error (timed out?)" -msgstr "" - -#: src/main.cpp:1919 -msgid "No world selected and no address provided. Nothing to do." -msgstr "" - -#: src/main.cpp:1926 -msgid "Provided world path doesn't exist: " -msgstr "" - -#: src/main.cpp:1935 -msgid "Could not find or load game \"" -msgstr "" - -#: src/main.cpp:1953 -msgid "Invalid gamespec." -msgstr "" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2ce108681..b33bea87b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,8 @@ -project(minetest) -cmake_minimum_required( VERSION 2.6 ) +cmake_minimum_required(VERSION 2.6) + +project(Minetest) +string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) -INCLUDE(CheckCSourceRuns) INCLUDE(CheckIncludeFiles) # Add custom SemiDebug build mode @@ -22,83 +23,69 @@ set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING FORCE ) + # Set some random things default to not being visible in the GUI mark_as_advanced(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH) -option(ENABLE_CURL "Enable cURL support for fetching media" 1) -if (NOT ENABLE_CURL) - mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR) -endif(NOT ENABLE_CURL) +option(ENABLE_CURL "Enable cURL support for fetching media" TRUE) +set(USE_CURL FALSE) -if( ENABLE_CURL ) +if(ENABLE_CURL) find_package(CURL) -endif( ENABLE_CURL ) -set(USE_CURL 0) -if (CURL_FOUND AND ENABLE_CURL) - message(STATUS "cURL support enabled") - set(USE_CURL 1) -endif(CURL_FOUND AND ENABLE_CURL) + if (CURL_FOUND) + message(STATUS "cURL support enabled.") + set(USE_CURL TRUE) + endif() +else() + mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR) +endif() -# user-visible option to enable/disable gettext usage -OPTION(ENABLE_GETTEXT "Use GetText for internationalization" 0) -# this is only set to 1 if gettext is enabled _and_ available -set(USE_GETTEXT 0) +option(ENABLE_GETTEXT "Use GetText for internationalization" FALSE) +set(USE_GETTEXT FALSE) if(ENABLE_GETTEXT) find_package(GettextLib) + if(GETTEXT_FOUND) + if(WIN32) + message(STATUS "GetText library: ${GETTEXT_LIBRARY}") + message(STATUS "GetText DLL: ${GETTEXT_DLL}") + message(STATUS "GetText iconv DLL: ${GETTEXT_ICONV_DLL}") + endif() + set(USE_GETTEXT TRUE) + message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}") + endif(GETTEXT_FOUND) else() - MARK_AS_ADVANCED(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT) + mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT) + message(STATUS "GetText disabled.") endif() -if(GETTEXT_FOUND AND ENABLE_GETTEXT) - message(STATUS "gettext include path: ${GETTEXT_INCLUDE_DIR}") - message(STATUS "gettext msgfmt path: ${GETTEXT_MSGFMT}") - if(WIN32) - message(STATUS "gettext library: ${GETTEXT_LIBRARY}") - message(STATUS "gettext dll: ${GETTEXT_DLL}") - message(STATUS "gettext iconv dll: ${GETTEXT_ICONV_DLL}") - endif() - set(USE_GETTEXT 1) - message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}") -elseif(GETTEXT_FOUND AND NOT ENABLE_GETTEXT) - MESSAGE(STATUS "GetText found but disabled;") -else(GETTEXT_FOUND AND ENABLE_GETTEXT) - message(STATUS "GetText disabled") -endif(GETTEXT_FOUND AND ENABLE_GETTEXT) -# user visible option to enable/disable sound -OPTION(ENABLE_SOUND "Enable sound" ON) +option(ENABLE_SOUND "Enable sound" TRUE) +set(USE_SOUND FALSE) -# this is only set to 1 if sound is enabled _and_ available -set(USE_SOUND 0) -set(SOUND_PROBLEM 0) - -if(ENABLE_SOUND AND BUILD_CLIENT) +if(BUILD_CLIENT AND ENABLE_SOUND) # Sound libraries find_package(OpenAL) find_package(Vorbis) if(NOT OPENAL_FOUND) message(STATUS "Sound enabled, but OpenAL not found!") - set(SOUND_PROBLEM 1) - MARK_AS_ADVANCED(CLEAR OPENAL_LIBRARY OPENAL_INCLUDE_DIR) + mark_as_advanced(CLEAR OPENAL_LIBRARY OPENAL_INCLUDE_DIR) endif() if(NOT VORBIS_FOUND) message(STATUS "Sound enabled, but Vorbis libraries not found!") - set(SOUND_PROBLEM 1) - MARK_AS_ADVANCED(CLEAR OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY) + mark_as_advanced(CLEAR OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY) endif() if(OPENAL_FOUND AND VORBIS_FOUND) - set(USE_SOUND 1) - message(STATUS "Sound enabled") + set(USE_SOUND TRUE) + message(STATUS "Sound enabled.") + else() + message(FATAL_ERROR "Sound enabled, but cannot be used.\n" + "To continue, either fill in the required paths or disable sound. (-DENABLE_SOUND=0)") endif() -endif(ENABLE_SOUND AND BUILD_CLIENT) - -if(SOUND_PROBLEM) - message(FATAL_ERROR "Sound enabled, but cannot be used.\n" - "To continue, either fill in the required paths or disable sound. (-DENABLE_SOUND=0)") endif() + if(USE_SOUND) set(sound_SRCS sound_openal.cpp) set(SOUND_INCLUDE_DIRS @@ -112,18 +99,87 @@ if(USE_SOUND) ) endif() -option(ENABLE_FREETYPE "Enable freetype2 (truetype fonts and basic unicode support)" OFF) -set(USE_FREETYPE 0) + +option(ENABLE_GLES "Enable OpenGL ES support" FALSE) +mark_as_advanced(ENABLE_GLES) +if(ENABLE_GLES) + find_package(OpenGLES2) +endif() + + +option(ENABLE_FREETYPE "Enable FreeType2 (TrueType fonts and basic unicode support)" TRUE) +set(USE_FREETYPE FALSE) + if(ENABLE_FREETYPE) - set(USE_FREETYPE 1) + if(UNIX) + include(FindPkgConfig) + if(PKG_CONFIG_FOUND) + pkg_check_modules(FREETYPE QUIET freetype2) + if(FREETYPE_FOUND) + SET(FREETYPE_PKGCONFIG_FOUND TRUE) + SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) + # Because CMake is idiotic + string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) + string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) + endif(FREETYPE_FOUND) + endif(PKG_CONFIG_FOUND) + endif(UNIX) + if(NOT FREETYPE_FOUND) + find_package(Freetype) + endif() + if(FREETYPE_FOUND) + set(USE_FREETYPE TRUE) + set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont") + set(CGUITTFONT_LIBRARY cguittfont) + endif() endif(ENABLE_FREETYPE) + +find_package(Lua REQUIRED) + + +option(ENABLE_LEVELDB "Enable LevelDB backend" TRUE) +set(USE_LEVELDB FALSE) + +if(ENABLE_LEVELDB) + find_library(LEVELDB_LIBRARY leveldb) + find_path(LEVELDB_INCLUDE_DIR db.h PATH_SUFFIXES leveldb) + if(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR) + set(USE_LEVELDB TRUE) + message(STATUS "LevelDB backend enabled.") + include_directories(${LEVELDB_INCLUDE_DIR}) + else() + message(STATUS "LevelDB not found!") + endif() +endif(ENABLE_LEVELDB) + + +OPTION(ENABLE_REDIS "Enable Redis backend" TRUE) +set(USE_REDIS FALSE) + +if(ENABLE_REDIS) + find_library(REDIS_LIBRARY hiredis) + find_path(REDIS_INCLUDE_DIR hiredis.h PATH_SUFFIXES hiredis) + if(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) + set(USE_REDIS TRUE) + message(STATUS "Redis backend enabled.") + include_directories(${REDIS_INCLUDE_DIR}) + else(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) + message(STATUS "Redis not found!") + endif(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) +endif(ENABLE_REDIS) + + +find_package(SQLite3 REQUIRED) +find_package(Json REQUIRED) + + if(NOT MSVC) - set(USE_GPROF 0 CACHE BOOL "Use -pg flag for g++") + set(USE_GPROF FALSE CACHE BOOL "Use -pg flag for g++") endif() # Use cmake_config.h -add_definitions ( -DUSE_CMAKE_CONFIG_H ) +add_definitions(-DUSE_CMAKE_CONFIG_H) if(WIN32) # Windows @@ -150,7 +206,7 @@ if(WIN32) CACHE PATH "freetype include dir") set(FREETYPE_LIBRARY "${PROJECT_SOURCE_DIR}/../../freetype2/objs/win32/vc2005/freetype247.lib" CACHE FILEPATH "Path to freetype247.lib") - endif(USE_FREETYPE) + endif() if(ENABLE_SOUND) set(OPENAL_DLL "" CACHE FILEPATH "Path to OpenAL32.dll for installation (optional)") set(OGG_DLL "" CACHE FILEPATH "Path to libogg.dll for installation (optional)") @@ -166,9 +222,9 @@ else() find_package(BZip2 REQUIRED) find_package(PNG REQUIRED) if(APPLE) - FIND_LIBRARY(CARBON_LIB Carbon) - FIND_LIBRARY(COCOA_LIB Cocoa) - FIND_LIBRARY(IOKIT_LIB IOKit) + find_library(CARBON_LIB Carbon) + find_library(COCOA_LIB Cocoa) + find_library(IOKIT_LIB IOKit) mark_as_advanced( CARBON_LIB COCOA_LIB @@ -191,156 +247,14 @@ else() set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY}) endif() -find_package(SQLite3 REQUIRED) -find_package(Json REQUIRED) - -option(ENABLE_GLES "Enable OpenGL ES support" 0) -mark_as_advanced(ENABLE_GLES) -if(ENABLE_GLES) - find_package(OpenGLES2) -endif(ENABLE_GLES) - -if(USE_FREETYPE) - if(UNIX) - include(FindPkgConfig) - if(PKG_CONFIG_FOUND) - pkg_check_modules(FREETYPE QUIET freetype2) - if(FREETYPE_FOUND) - SET(FREETYPE_PKGCONFIG_FOUND TRUE) - SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) - # because cmake is idiotic - string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) - string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) - endif(FREETYPE_FOUND) - endif(PKG_CONFIG_FOUND) - endif(UNIX) - if(NOT FREETYPE_FOUND) - find_package(Freetype REQUIRED) - endif(NOT FREETYPE_FOUND) - set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont") - set(CGUITTFONT_LIBRARY cguittfont) -endif(USE_FREETYPE) - -if (NOT DISABLE_LUAJIT) - find_library(LUA_LIBRARY luajit - NAMES luajit-5.1) - find_path(LUA_INCLUDE_DIR luajit.h - NAMES luajit.h - PATH_SUFFIXES luajit-2.0) - message (STATUS "LuaJIT library: ${LUA_LIBRARY}") - message (STATUS "LuaJIT headers: ${LUA_INCLUDE_DIR}") -else (NOT ${DISABLE_LUAJIT} MATCHES "1") - message (STATUS "LuaJIT detection disabled! (DISABLE_LUAJIT=1)") - set(LUA_LIBRARY "") - set(LUA_INCLUDE_DIR "") -endif (NOT DISABLE_LUAJIT) - -set(USE_LUAJIT 0) -if(LUA_LIBRARY AND LUA_INCLUDE_DIR) - message (STATUS "LuaJIT found, checking for broken versions...") - if(CMAKE_CROSSCOMPILING) - message(WARNING "Cross-compiling enabled, assuming LuaJIT is not broken") - set(VALID_LUAJIT_VERSION 1) - else(CMAKE_CROSSCOMPILING) - set(BACKUP_REQUIRED_INCS CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${LUA_INCLUDE_DIR}") - CHECK_C_SOURCE_RUNS(" - #include - #include - #include - - #define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) - - static char *broken_luajit_versions[] = { - \"LuaJIT 2.0.0-beta7\", - \"LuaJIT 2.0.0-beta6\", - \"LuaJIT 2.0.0-beta5\", - \"LuaJIT 2.0.0-beta4\", - \"LuaJIT 2.0.0-beta3\", - \"LuaJIT 2.0.0-beta2\", - \"LuaJIT 2.0.0-beta1\" - }; - - int main(int argc, char *argv[]) { - unsigned int i; - for (i = 0; i < ARRAYSIZE(broken_luajit_versions); i++) { - if (strcmp(LUAJIT_VERSION, broken_luajit_versions[i]) == 0) { - return 1; - } - } - return 0; - } - " - VALID_LUAJIT_VERSION) - set(CMAKE_REQUIRED_INCLUDES BACKUP_REQUIRED_INCS) - endif(CMAKE_CROSSCOMPILING) - if (VALID_LUAJIT_VERSION) - message (STATUS "LuaJIT version ok") - set(USE_LUAJIT 1) - else (VALID_LUAJIT_VERSION) - message (STATUS "LuaJIT versions till 2.0.0beta7 known to be broken, update to at least beta8") - set(USE_LUAJIT 0) - endif (VALID_LUAJIT_VERSION) -endif (LUA_LIBRARY AND LUA_INCLUDE_DIR) - -if(NOT USE_LUAJIT) - message (STATUS "LuaJIT not found, using bundled Lua.") - set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") - set(LUA_LIBRARY "lua") - add_subdirectory(lua) -endif(NOT USE_LUAJIT) - -mark_as_advanced(LUA_LIBRARY) -mark_as_advanced(LUA_INCLUDE_DIR) - -set(USE_LEVELDB 0) - -OPTION(ENABLE_LEVELDB "Enable LevelDB backend") - -if(ENABLE_LEVELDB) - find_library(LEVELDB_LIBRARY leveldb) - find_path(LEVELDB_INCLUDE_DIR db.h PATH_SUFFIXES leveldb) - message (STATUS "LevelDB library: ${LEVELDB_LIBRARY}") - message (STATUS "LevelDB headers: ${LEVELDB_INCLUDE_DIR}") - if(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR) - set(USE_LEVELDB 1) - message(STATUS "LevelDB backend enabled") - include_directories(${LEVELDB_INCLUDE_DIR}) - else(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR) - set(USE_LEVELDB 0) - message(STATUS "LevelDB not found!") - endif(LEVELDB_LIBRARY AND LEVELDB_INCLUDE_DIR) -endif(ENABLE_LEVELDB) - -set(USE_REDIS 0) - -OPTION(ENABLE_REDIS "Enable redis backend" 0) - -if(ENABLE_REDIS) - find_library(REDIS_LIBRARY hiredis) - find_path(REDIS_INCLUDE_DIR hiredis.h PATH_SUFFIXES hiredis) - message(STATUS "redis library: ${REDIS_LIBRARY}") - message(STATUS "redis headers: ${REDIS_INCLUDE_DIR}") - if(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) - set(USE_REDIS 1) - message(STATUS "redis backend enabled") - include_directories(${REDIS_INCLUDE_DIR}) - else(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) - set(USE_REDIS 0) - message(STATUS "redis not found!") - endif(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) -endif(ENABLE_REDIS) - -CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H) -if(NOT HAVE_ENDIAN_H) - set(HAVE_ENDIAN_H 0) -endif(NOT HAVE_ENDIAN_H) +check_include_files(endian.h HAVE_ENDIAN_H) configure_file( "${PROJECT_SOURCE_DIR}/cmake_config.h.in" "${PROJECT_BINARY_DIR}/cmake_config.h" ) + # Add a target that always rebuilds cmake_config_githash.h add_custom_target(GenerateVersion COMMAND ${CMAKE_COMMAND} @@ -351,11 +265,13 @@ add_custom_target(GenerateVersion -P "${CMAKE_SOURCE_DIR}/cmake/Modules/GenerateVersion.cmake" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + add_subdirectory(jthread) add_subdirectory(network) add_subdirectory(script) add_subdirectory(util) + set (unittests_SRCS test.cpp ) @@ -437,9 +353,10 @@ set(common_SRCS ${unittests_SRCS} ) + # This gives us the icon and file version information if(WIN32) - set(WINRESOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc) + set(WINRESOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc") if(MINGW) if(NOT CMAKE_RC_COMPILER) set(CMAKE_RC_COMPILER "windres.exe") @@ -456,16 +373,16 @@ if(WIN32) endif(MINGW) endif() -# Client sources +# Client sources if (BUILD_CLIENT) add_subdirectory(client) endif(BUILD_CLIENT) -set(minetest_SRCS +set(client_SRCS + ${client_SRCS} ${common_SRCS} ${sound_SRCS} - ${client_SRCS} ${client_network_SRCS} camera.cpp chat.cpp @@ -500,16 +417,16 @@ set(minetest_SRCS shader.cpp sky.cpp wieldmesh.cpp - ${minetest_SCRIPT_SRCS} + ${client_SCRIPT_SRCS} ) -list(SORT minetest_SRCS) +list(SORT client_SRCS) # Server sources -set(minetestserver_SRCS +set(server_SRCS ${common_SRCS} main.cpp ) -list(SORT minetestserver_SRCS) +list(SORT server_SRCS) include_directories( ${PROJECT_BINARY_DIR} @@ -526,26 +443,24 @@ include_directories( ${PROJECT_SOURCE_DIR}/script ) + if(USE_FREETYPE) - include_directories( - ${FREETYPE_INCLUDE_DIRS} - ${CGUITTFONT_INCLUDE_DIR} - ) -endif(USE_FREETYPE) + include_directories(${FREETYPE_INCLUDE_DIRS} ${CGUITTFONT_INCLUDE_DIR}) +endif() if(USE_CURL) - include_directories( - ${CURL_INCLUDE_DIR} - ) -endif(USE_CURL) + include_directories(${CURL_INCLUDE_DIR}) +endif() + set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin") + if(BUILD_CLIENT) - add_executable(${PROJECT_NAME} ${minetest_SRCS}) - add_dependencies(${PROJECT_NAME} GenerateVersion) - set(minetest_LIBS - ${PROJECT_NAME} + add_executable(${PROJECT_NAME_LOWER} ${client_SRCS}) + add_dependencies(${PROJECT_NAME_LOWER} GenerateVersion) + set(client_LIBS + ${PROJECT_NAME_LOWER} ${ZLIB_LIBRARIES} ${IRRLICHT_LIBRARY} ${OPENGL_LIBRARIES} @@ -564,46 +479,47 @@ if(BUILD_CLIENT) ) if(APPLE) target_link_libraries( - ${minetest_LIBS} + ${client_LIBS} ${ICONV_LIBRARY} ) else() target_link_libraries( - ${minetest_LIBS} + ${client_LIBS} ) endif() if(USE_CURL) target_link_libraries( - ${PROJECT_NAME} + ${PROJECT_NAME_LOWER} ${CURL_LIBRARY} ) - endif(USE_CURL) + endif() if(USE_FREETYPE) if(FREETYPE_PKGCONFIG_FOUND) - set_target_properties(${PROJECT_NAME} + set_target_properties(${PROJECT_NAME_LOWER} PROPERTIES COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}" ) - endif(FREETYPE_PKGCONFIG_FOUND) + endif() target_link_libraries( - ${PROJECT_NAME} + ${PROJECT_NAME_LOWER} ${FREETYPE_LIBRARY} ${CGUITTFONT_LIBRARY} ) - endif(USE_FREETYPE) + endif() if (USE_LEVELDB) - target_link_libraries(${PROJECT_NAME} ${LEVELDB_LIBRARY}) - endif(USE_LEVELDB) + target_link_libraries(${PROJECT_NAME_LOWER} ${LEVELDB_LIBRARY}) + endif() if (USE_REDIS) - target_link_libraries(${PROJECT_NAME} ${REDIS_LIBRARY}) - endif(USE_REDIS) + target_link_libraries(${PROJECT_NAME_LOWER} ${REDIS_LIBRARY}) + endif() endif(BUILD_CLIENT) + if(BUILD_SERVER) - add_executable(${PROJECT_NAME}server ${minetestserver_SRCS}) - add_dependencies(${PROJECT_NAME}server GenerateVersion) + add_executable(${PROJECT_NAME_LOWER}server ${server_SRCS}) + add_dependencies(${PROJECT_NAME_LOWER}server GenerateVersion) target_link_libraries( - ${PROJECT_NAME}server + ${PROJECT_NAME_LOWER}server ${ZLIB_LIBRARIES} ${SQLITE3_LIBRARY} ${JSON_LIBRARY} @@ -611,24 +527,24 @@ if(BUILD_SERVER) ${LUA_LIBRARY} ${PLATFORM_LIBS} ) + set_target_properties(${PROJECT_NAME_LOWER}server PROPERTIES + COMPILE_DEFINITIONS "SERVER") if (USE_LEVELDB) - target_link_libraries(${PROJECT_NAME}server ${LEVELDB_LIBRARY}) - endif(USE_LEVELDB) + target_link_libraries(${PROJECT_NAME_LOWER}server ${LEVELDB_LIBRARY}) + endif() if (USE_REDIS) - target_link_libraries(${PROJECT_NAME}server ${REDIS_LIBRARY}) - endif(USE_REDIS) + target_link_libraries(${PROJECT_NAME_LOWER}server ${REDIS_LIBRARY}) + endif() if(USE_CURL) target_link_libraries( - ${PROJECT_NAME}server + ${PROJECT_NAME_LOWER}server ${CURL_LIBRARY} ) - endif(USE_CURL) + endif() endif(BUILD_SERVER) -# # Set some optimizations and tweaks -# include(CheckCXXCompilerFlag) @@ -649,12 +565,6 @@ if(MSVC) # Flags for C files (sqlite) # /MT = Link statically with standard library stuff set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT") - - if(BUILD_SERVER) - set_target_properties(${PROJECT_NAME}server PROPERTIES - COMPILE_DEFINITIONS "SERVER") - endif(BUILD_SERVER) - else() # Probably GCC if(APPLE) @@ -687,20 +597,11 @@ else() if(USE_GPROF) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg") endif() - - if(BUILD_SERVER) - set_target_properties(${PROJECT_NAME}server PROPERTIES - COMPILE_DEFINITIONS "SERVER") - endif(BUILD_SERVER) - endif() -#MESSAGE(STATUS "CMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}") -#MESSAGE(STATUS "CMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}") -# # Installation -# + if(WIN32) if(USE_SOUND) if(OPENAL_DLL) @@ -737,7 +638,7 @@ if(WIN32) endif() if(BUILD_CLIENT) - install(TARGETS ${PROJECT_NAME} + install(TARGETS ${PROJECT_NAME_LOWER} RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${BINDIR} ARCHIVE DESTINATION ${BINDIR} @@ -755,9 +656,9 @@ if(BUILD_CLIENT) if(USE_GETTEXT) foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE}) - set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo") + set(MO_BUILD_PATH "${MO_BUILD_PATH}/${PROJECT_NAME_LOWER}.mo") install(FILES ${MO_BUILD_PATH} DESTINATION ${MO_DEST_PATH}) - endforeach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) + endforeach() endif() if(WIN32) @@ -771,21 +672,21 @@ if(BUILD_CLIENT) if(DEFINED GETTEXT_ICONV_DLL) install(FILES ${GETTEXT_ICONV_DLL} DESTINATION ${BINDIR}) endif() - endif(USE_GETTEXT) + endif() endif() endif(BUILD_CLIENT) if(BUILD_SERVER) - install(TARGETS ${PROJECT_NAME}server DESTINATION ${BINDIR}) -endif(BUILD_SERVER) + install(TARGETS ${PROJECT_NAME_LOWER}server DESTINATION ${BINDIR}) +endif() if (USE_GETTEXT) set(MO_FILES) foreach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) - set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/minetest.po") + set(PO_FILE_PATH "${GETTEXT_PO_PATH}/${LOCALE}/${PROJECT_NAME_LOWER}.po") set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE}) - set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo") + set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME_LOWER}.mo") add_custom_command(OUTPUT ${MO_BUILD_PATH} COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH} @@ -800,20 +701,15 @@ if (USE_GETTEXT) ) set(MO_FILES ${MO_FILES} ${MO_FILE_PATH}) - endforeach(LOCALE ${GETTEXT_AVAILABLE_LOCALES}) + endforeach() add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES}) -endif(USE_GETTEXT) +endif() + # Subdirectories if (BUILD_CLIENT AND USE_FREETYPE) add_subdirectory(cguittfont) -endif (BUILD_CLIENT AND USE_FREETYPE) +endif() -if (JSON_FOUND) -else (JSON_FOUND) - add_subdirectory(json) -endif (JSON_FOUND) - -#end diff --git a/src/camera.cpp b/src/camera.cpp index 5200f71ba..0152f7041 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -119,34 +119,22 @@ Camera::~Camera() m_wieldmgr->drop(); } -bool Camera::successfullyCreated(std::wstring& error_message) +bool Camera::successfullyCreated(std::string &error_message) { - if (m_playernode == NULL) - { - error_message = L"Failed to create the player scene node"; - return false; + if (!m_playernode) { + error_message = "Failed to create the player scene node"; + } else if (!m_headnode) { + error_message = "Failed to create the head scene node"; + } else if (!m_cameranode) { + error_message = "Failed to create the camera scene node"; + } else if (!m_wieldmgr) { + error_message = "Failed to create the wielded item scene manager"; + } else if (!m_wieldnode) { + error_message = "Failed to create the wielded item scene node"; + } else { + error_message.clear(); } - if (m_headnode == NULL) - { - error_message = L"Failed to create the head scene node"; - return false; - } - if (m_cameranode == NULL) - { - error_message = L"Failed to create the camera scene node"; - return false; - } - if (m_wieldmgr == NULL) - { - error_message = L"Failed to create the wielded item scene manager"; - return false; - } - if (m_wieldnode == NULL) - { - error_message = L"Failed to create the wielded item scene node"; - return false; - } - return true; + return error_message.empty(); } // Returns the fractional part of x diff --git a/src/camera.h b/src/camera.h index b53738860..b0d190a3a 100644 --- a/src/camera.h +++ b/src/camera.h @@ -110,7 +110,7 @@ public: } // Checks if the constructor was able to create the scene nodes - bool successfullyCreated(std::wstring& error_message); + bool successfullyCreated(std::string &error_message); // Step the camera: updates the viewing range and view bobbing. void step(f32 dtime); diff --git a/src/cguittfont/CMakeLists.txt b/src/cguittfont/CMakeLists.txt index 21448ecb8..7717a2f91 100644 --- a/src/cguittfont/CMakeLists.txt +++ b/src/cguittfont/CMakeLists.txt @@ -27,3 +27,4 @@ target_link_libraries( ${FREETYPE_LIBRARY} ${ZLIB_LIBRARIES} # needed by freetype, repeated here for safety ) + diff --git a/src/client.cpp b/src/client.cpp index 3320172f4..6ee918ad0 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1126,12 +1126,12 @@ void Client::sendReady() DSTACK(__FUNCTION_NAME); NetworkPacket pkt(TOSERVER_CLIENT_READY, - 1 + 1 + 1 + 1 + 2 + sizeof(char) * strlen(minetest_version_hash)); + 1 + 1 + 1 + 1 + 2 + sizeof(char) * strlen(g_version_hash)); - pkt << (u8) VERSION_MAJOR << (u8) VERSION_MINOR << (u8) VERSION_PATCH_ORIG - << (u8) 0 << (u16) strlen(minetest_version_hash); + pkt << (u8) VERSION_MAJOR << (u8) VERSION_MINOR << (u8) VERSION_PATCH + << (u8) 0 << (u16) strlen(g_version_hash); - pkt.putRawString(minetest_version_hash, (u16) strlen(minetest_version_hash)); + pkt.putRawString(g_version_hash, (u16) strlen(g_version_hash)); Send(&pkt); } @@ -1710,13 +1710,22 @@ void Client::makeScreenshot(IrrlichtDevice *device) if (image) { raw_image->copyTo(image); - irr::c8 filename[256]; - snprintf(filename, sizeof(filename), - (std::string("%s") + DIR_DELIM + "screenshot_%u.png").c_str(), - g_settings->get("screenshot_path").c_str(), - device->getTimer()->getRealTime()); + + std::string filename; + + time_t t = time(NULL); + struct tm *tm = localtime(&t); + char timetstamp_c[16]; // YYYYMMDD_HHMMSS + '\0' + strftime(timetstamp_c, sizeof(timetstamp_c), "%Y%m%d_%H%M%S", tm); + + filename = g_settings->get("screenshot_path") + + DIR_DELIM + + std::string("screenshot_") + + std::string(timetstamp_c) + + ".png"; + std::ostringstream sstr; - if (driver->writeImageToFile(image, filename)) { + if (driver->writeImageToFile(image, filename.c_str())) { sstr << "Saved screenshot to '" << filename << "'"; } else { sstr << "Failed to save screenshot '" << filename << "'"; diff --git a/src/client.h b/src/client.h index ab5842678..9db9764dd 100644 --- a/src/client.h +++ b/src/client.h @@ -480,7 +480,7 @@ public: bool accessDenied() { return m_access_denied; } - std::wstring accessDeniedReason() + std::string accessDeniedReason() { return m_access_denied_reason; } bool itemdefReceived() @@ -589,7 +589,7 @@ private: u64 m_map_seed; std::string m_password; bool m_access_denied; - std::wstring m_access_denied_reason; + std::string m_access_denied_reason; std::queue m_client_event_queue; bool m_itemdef_received; bool m_nodedef_received; diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 288acf14c..a1ec37fe3 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -3,3 +3,4 @@ set(client_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/tile.cpp PARENT_SCOPE ) + diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 7bf849624..6815082a6 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -81,6 +81,9 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) return false; } + // Create time getter + g_timegetter = new IrrlichtTimeGetter(device); + // Speed tests (done after irrlicht is loaded to get timer) if (cmd_args.getFlag("speedtests")) { dstream << "Running speed tests" << std::endl; @@ -94,7 +97,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) return false; } - porting::setXorgClassHint(video_driver->getExposedVideoData(), "Minetest"); + porting::setXorgClassHint(video_driver->getExposedVideoData(), PROJECT_NAME); /* This changes the minimum allowed number of vertices in a VBO. @@ -102,9 +105,6 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) */ //driver->setMinHardwareBufferVertexCount(50); - // Create time getter - g_timegetter = new IrrlichtTimeGetter(device); - // Create game callback for menus g_gamecallback = new MainGameCallback(device); @@ -156,7 +156,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) // If an error occurs, this is set to something by menu(). // It is then displayed before the menu shows on the next call to menu() - std::wstring error_message = L""; + std::string error_message; bool first_loop = true; @@ -170,7 +170,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) { // Set the window caption const wchar_t *text = wgettext("Main Menu"); - device->setWindowCaption((std::wstring(L"Minetest [") + text + L"]").c_str()); + device->setWindowCaption((narrow_to_wide(PROJECT_NAME) + L" [" + text + L"]").c_str()); delete[] text; try { // This is used for catching disconnects @@ -184,7 +184,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) */ guiroot = guienv->addStaticText(L"", core::rect(0, 0, 10000, 10000)); - bool game_has_run = launch_game(&error_message, game_params, cmd_args); + bool game_has_run = launch_game(error_message, game_params, cmd_args); // If skip_main_menu, we only want to startup once if (skip_main_menu && !first_loop) @@ -207,7 +207,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) } if (current_playername.length() > PLAYERNAME_SIZE-1) { - error_message = wgettext("Player name too long."); + error_message = gettext("Player name too long."); playername = current_playername.substr(0, PLAYERNAME_SIZE-1); g_settings->set("name", playername); continue; @@ -245,25 +245,24 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args) } //try catch (con::PeerNotFoundException &e) { - error_message = wgettext("Connection error (timed out?)"); - errorstream << wide_to_narrow(error_message) << std::endl; + error_message = gettext("Connection error (timed out?)"); + errorstream << error_message << std::endl; } #ifdef NDEBUG catch (std::exception &e) { - std::string narrow_message = "Some exception: \""; - narrow_message += e.what(); - narrow_message += "\""; - errorstream << narrow_message << std::endl; - error_message = narrow_to_wide(narrow_message); + std::string error_message = "Some exception: \""; + error_message += e.what(); + error_message += "\""; + errorstream << error_message << std::endl; } #endif // If no main menu, show error and exit if (skip_main_menu) { - if (error_message != L"") { + if (!error_message.empty()) { verbosestream << "error_message = " - << wide_to_narrow(error_message) << std::endl; + << error_message << std::endl; retval = false; } break; @@ -312,7 +311,7 @@ bool ClientLauncher::init_engine(int log_level) return device != NULL; } -bool ClientLauncher::launch_game(std::wstring *error_message, +bool ClientLauncher::launch_game(std::string &error_message, GameParams &game_params, const Settings &cmd_args) { // Initialize menu data @@ -320,9 +319,9 @@ bool ClientLauncher::launch_game(std::wstring *error_message, menudata.address = address; menudata.name = playername; menudata.port = itos(game_params.socket_port); - menudata.errormessage = wide_to_narrow(*error_message); + menudata.errormessage = error_message; - *error_message = L""; + error_message.clear(); if (cmd_args.exists("password")) menudata.password = cmd_args.get("password"); @@ -367,11 +366,11 @@ bool ClientLauncher::launch_game(std::wstring *error_message, } } - if (menudata.errormessage != "") { + if (!menudata.errormessage.empty()) { /* The calling function will pass this back into this function upon the * next iteration (if any) causing it to be displayed by the GUI */ - *error_message = narrow_to_wide(menudata.errormessage); + error_message = menudata.errormessage; return false; } @@ -410,25 +409,25 @@ bool ClientLauncher::launch_game(std::wstring *error_message, if (current_address == "") { // If local game if (worldspec.path == "") { - *error_message = wgettext("No world selected and no address " + error_message = gettext("No world selected and no address " "provided. Nothing to do."); - errorstream << wide_to_narrow(*error_message) << std::endl; + errorstream << error_message << std::endl; return false; } if (!fs::PathExists(worldspec.path)) { - *error_message = wgettext("Provided world path doesn't exist: ") - + narrow_to_wide(worldspec.path); - errorstream << wide_to_narrow(*error_message) << std::endl; + error_message = gettext("Provided world path doesn't exist: ") + + worldspec.path; + errorstream << error_message << std::endl; return false; } // Load gamespec for required game gamespec = findWorldSubgame(worldspec.path); if (!gamespec.isValid() && !game_params.game_spec.isValid()) { - *error_message = wgettext("Could not find or load game \"") - + narrow_to_wide(worldspec.gameid) + L"\""; - errorstream << wide_to_narrow(*error_message) << std::endl; + error_message = gettext("Could not find or load game \"") + + worldspec.gameid + "\""; + errorstream << error_message << std::endl; return false; } @@ -444,10 +443,9 @@ bool ClientLauncher::launch_game(std::wstring *error_message, } if (!gamespec.isValid()) { - *error_message = wgettext("Invalid gamespec."); - *error_message += L" (world_gameid=" - + narrow_to_wide(worldspec.gameid) + L")"; - errorstream << wide_to_narrow(*error_message) << std::endl; + error_message = gettext("Invalid gamespec."); + error_message += " (world.gameid=" + worldspec.gameid + ")"; + errorstream << error_message << std::endl; return false; } } diff --git a/src/client/clientlauncher.h b/src/client/clientlauncher.h index c3e0ae866..09f8c039a 100644 --- a/src/client/clientlauncher.h +++ b/src/client/clientlauncher.h @@ -92,7 +92,7 @@ protected: void init_args(GameParams &game_params, const Settings &cmd_args); bool init_engine(int log_level); - bool launch_game(std::wstring *error_message, GameParams &game_params, + bool launch_game(std::string &error_message, GameParams &game_params, const Settings &cmd_args); void main_menu(MainMenuData *menudata); diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in index e111a650d..7d446d178 100644 --- a/src/cmake_config.h.in +++ b/src/cmake_config.h.in @@ -3,31 +3,24 @@ #ifndef CMAKE_CONFIG_H #define CMAKE_CONFIG_H -#define CMAKE_PROJECT_NAME "@PROJECT_NAME@" -#define CMAKE_VERSION_STRING "@VERSION_STRING@" -#define CMAKE_PRODUCT_VERSION_STRING "@VERSION_MAJOR@.@VERSION_MINOR@" -#define CMAKE_RUN_IN_PLACE @RUN_IN_PLACE@ -#define CMAKE_USE_GETTEXT @USE_GETTEXT@ -#define CMAKE_USE_CURL @USE_CURL@ -#define CMAKE_USE_SOUND @USE_SOUND@ -#define CMAKE_USE_FREETYPE @USE_FREETYPE@ -#define CMAKE_STATIC_SHAREDIR "@SHAREDIR@" -#define CMAKE_USE_LEVELDB @USE_LEVELDB@ -#define CMAKE_USE_LUAJIT @USE_LUAJIT@ -#define CMAKE_USE_REDIS @USE_REDIS@ -#define CMAKE_VERSION_MAJOR @VERSION_MAJOR@ -#define CMAKE_VERSION_MINOR @VERSION_MINOR@ -#define CMAKE_VERSION_PATCH @VERSION_PATCH@ -#define CMAKE_VERSION_PATCH_ORIG @VERSION_PATCH_ORIG@ -#define CMAKE_VERSION_EXTRA_STRING "@VERSION_EXTRA@" -#define CMAKE_HAVE_ENDIAN_H @HAVE_ENDIAN_H@ - -#ifdef NDEBUG - #define CMAKE_BUILD_TYPE "Release" -#else - #define CMAKE_BUILD_TYPE "Debug" -#endif -#define CMAKE_BUILD_INFO "BUILD_TYPE=" CMAKE_BUILD_TYPE " RUN_IN_PLACE=@RUN_IN_PLACE@ USE_GETTEXT=@USE_GETTEXT@ USE_SOUND=@USE_SOUND@ USE_CURL=@USE_CURL@ USE_FREETYPE=@USE_FREETYPE@ USE_LUAJIT=@USE_LUAJIT@ STATIC_SHAREDIR=@SHAREDIR@" +#define PROJECT_NAME "@PROJECT_NAME@" +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ +#define VERSION_PATCH @VERSION_PATCH@ +#define VERSION_EXTRA "@VERSION_EXTRA@" +#define VERSION_STRING "@VERSION_STRING@" +#define PRODUCT_VERSION_STRING "@VERSION_MAJOR@.@VERSION_MINOR@" +#define STATIC_SHAREDIR "@SHAREDIR@" +#define BUILD_TYPE "@CMAKE_BUILD_TYPE@" +#cmakedefine01 RUN_IN_PLACE +#cmakedefine01 USE_GETTEXT +#cmakedefine01 USE_CURL +#cmakedefine01 USE_SOUND +#cmakedefine01 USE_FREETYPE +#cmakedefine01 USE_LEVELDB +#cmakedefine01 USE_LUAJIT +#cmakedefine01 USE_REDIS +#cmakedefine01 HAVE_ENDIAN_H #endif diff --git a/src/cmake_config_githash.h.in b/src/cmake_config_githash.h.in index 4d5fcd60f..c72960c9f 100644 --- a/src/cmake_config_githash.h.in +++ b/src/cmake_config_githash.h.in @@ -4,7 +4,7 @@ #ifndef CMAKE_CONFIG_GITHASH_H #define CMAKE_CONFIG_GITHASH_H -#define CMAKE_VERSION_GITHASH "@VERSION_GITHASH@" +#define VERSION_GITHASH "@VERSION_GITHASH@" #endif diff --git a/src/config.h b/src/config.h index b07aa5d22..df7429be0 100644 --- a/src/config.h +++ b/src/config.h @@ -6,82 +6,36 @@ #ifndef CONFIG_H #define CONFIG_H -#define PROJECT_NAME "Minetest" -#define RUN_IN_PLACE 0 -#define STATIC_SHAREDIR "" +#define STRINGIFY(x) #x +#define STR(x) STRINGIFY(x) -#define USE_GETTEXT 0 -#ifndef USE_SOUND - #define USE_SOUND 0 -#endif - -#ifndef USE_CURL - #define USE_CURL 0 -#endif - -#ifndef USE_FREETYPE - #define USE_FREETYPE 0 -#endif - -#ifndef USE_LEVELDB - #define USE_LEVELDB 0 -#endif - -#ifndef USE_LUAJIT - #define USE_LUAJIT 0 -#endif - -#ifndef USE_REDIS - #define USE_REDIS 0 -#endif - -#define HAVE_ENDIAN_H 0 - -#ifdef USE_CMAKE_CONFIG_H +#if defined USE_CMAKE_CONFIG_H #include "cmake_config.h" - #undef PROJECT_NAME - #define PROJECT_NAME CMAKE_PROJECT_NAME - #undef RUN_IN_PLACE - #define RUN_IN_PLACE CMAKE_RUN_IN_PLACE - #undef USE_GETTEXT - #define USE_GETTEXT CMAKE_USE_GETTEXT - #undef USE_SOUND - #define USE_SOUND CMAKE_USE_SOUND - #undef USE_CURL - #define USE_CURL CMAKE_USE_CURL - #undef USE_FREETYPE - #define USE_FREETYPE CMAKE_USE_FREETYPE - #undef STATIC_SHAREDIR - #define STATIC_SHAREDIR CMAKE_STATIC_SHAREDIR - #undef USE_LEVELDB - #define USE_LEVELDB CMAKE_USE_LEVELDB - #undef USE_LUAJIT - #define USE_LUAJIT CMAKE_USE_LUAJIT - #undef USE_REDIS - #define USE_REDIS CMAKE_USE_REDIS - #undef VERSION_MAJOR - #define VERSION_MAJOR CMAKE_VERSION_MAJOR - #undef VERSION_MINOR - #define VERSION_MINOR CMAKE_VERSION_MINOR - #undef VERSION_PATCH - #define VERSION_PATCH CMAKE_VERSION_PATCH - #undef VERSION_PATCH_ORIG - #define VERSION_PATCH_ORIG CMAKE_VERSION_PATCH_ORIG - #undef VERSION_STRING - #define VERSION_STRING CMAKE_VERSION_STRING - #undef PRODUCT_VERSION_STRING - #define PRODUCT_VERSION_STRING CMAKE_PRODUCT_VERSION_STRING - #undef VERSION_EXTRA_STRING - #define VERSION_EXTRA_STRING CMAKE_VERSION_EXTRA_STRING - #undef HAVE_ENDIAN_H - #define HAVE_ENDIAN_H CMAKE_HAVE_ENDIAN_H -#endif - -#ifdef __ANDROID__ +#elif defined (__ANDROID__) || defined (ANDROID) + #define PROJECT_NAME "Minetest" + #define STATIC_SHAREDIR "" #include "android_version.h" - #define VERSION_STRING CMAKE_VERSION_STRING + #ifdef NDEBUG + #define BUILD_TYPE "Release" + #else + #define BUILD_TYPE "Debug" + #endif +#else + #ifdef NDEBUG + #define BUILD_TYPE "Release" + #else + #define BUILD_TYPE "Debug" + #endif #endif -#endif +#define BUILD_INFO "BUILD_TYPE=" BUILD_TYPE \ + " RUN_IN_PLACE=" STR(RUN_IN_PLACE) \ + " USE_GETTEXT=" STR(USE_GETTEXT) \ + " USE_SOUND=" STR(USE_SOUND) \ + " USE_CURL=" STR(USE_CURL) \ + " USE_FREETYPE=" STR(USE_FREETYPE) \ + " USE_LUAJIT=" STR(USE_LUAJIT) \ + " STATIC_SHAREDIR=" STR(STATIC_SHAREDIR) +#endif diff --git a/src/debug.cpp b/src/debug.cpp index 521891bbd..ae2ffadc3 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -385,9 +385,11 @@ long WINAPI Win32ExceptionHandler(struct _EXCEPTION_POINTERS *pExceptInfo) MINIDUMP_USER_STREAM_INFORMATION mdusi; MINIDUMP_USER_STREAM mdus; bool minidump_created = false; - std::string version_str("Minetest "); - std::string dumpfile = porting::path_user + DIR_DELIM "minetest.dmp"; + std::string dumpfile = porting::path_user + DIR_DELIM PROJECT_NAME ".dmp"; + + std::string version_str(PROJECT_NAME " "); + version_str += g_version_hash; HANDLE hFile = CreateFileA(dumpfile.c_str(), GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -401,8 +403,6 @@ long WINAPI Win32ExceptionHandler(struct _EXCEPTION_POINTERS *pExceptInfo) mdei.ExceptionPointers = pExceptInfo; mdei.ThreadId = GetCurrentThreadId(); - version_str += minetest_version_hash; - mdus.Type = CommentStreamA; mdus.BufferSize = version_str.size(); mdus.Buffer = (PVOID)version_str.c_str(); diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 4ad0418bb..0acb4a730 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -319,7 +319,7 @@ void set_default_settings(Settings *settings) settings->setDefault("enable_particles", "false"); settings->setDefault("video_driver", "ogles1"); settings->setDefault("touchtarget", "true"); - settings->setDefault("TMPFolder","/sdcard/Minetest/tmp/"); + settings->setDefault("TMPFolder","/sdcard/" PROJECT_NAME "/tmp/"); settings->setDefault("touchscreen_threshold","20"); settings->setDefault("smooth_lighting", "false"); settings->setDefault("max_simultaneous_block_sends_per_client", "3"); diff --git a/src/emerge.cpp b/src/emerge.cpp index 89153cdb6..bf104e035 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -519,20 +519,22 @@ void *EmergeThread::Thread() } catch (VersionMismatchException &e) { std::ostringstream err; - err << "World data version mismatch in MapBlock "<setAsyncFatalError(err.str()); } catch (SerializationError &e) { std::ostringstream err; - err << "Invalid data in MapBlock "<setAsyncFatalError(err.str()); } diff --git a/src/game.cpp b/src/game.cpp index df0895ae1..25b4048a3 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1134,8 +1134,8 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec, os << "button_exit[4," << (ypos++) << ";3,0.5;btn_exit_os;" << wide_to_narrow(wstrgettext("Exit to OS")) << "]" << "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]" - << "textarea[0.4,0.25;3.5,6;;" << "Minetest\n" - << minetest_build_info << "\n" + << "textarea[0.4,0.25;3.5,6;;" << PROJECT_NAME "\n" + << g_build_info << "\n" << "path_user = " << wrap_rows(porting::path_user, 20) << "\n;]"; @@ -1423,7 +1423,7 @@ public: // If address is "", local server is used and address is updated std::string *address, u16 port, - std::wstring *error_message, + std::string &error_message, ChatBackend *chat_backend, const SubgameSpec &gamespec, // Used for local game bool simple_singleplayer_mode); @@ -1445,9 +1445,8 @@ protected: // Client creation bool createClient(const std::string &playername, - const std::string &password, std::string *address, u16 port, - std::wstring *error_message); - bool initGui(std::wstring *error_message); + const std::string &password, std::string *address, u16 port); + bool initGui(); // Client connection bool connectToServer(const std::string &playername, @@ -1575,7 +1574,7 @@ private: video::IVideoDriver *driver; scene::ISceneManager *smgr; bool *kill; - std::wstring *error_message; + std::string *error_message; IGameDef *gamedef; // Convenience (same as *client) scene::ISceneNode *skybox; @@ -1692,7 +1691,7 @@ bool Game::startup(bool *kill, const std::string &password, std::string *address, // can change if simple_singleplayer_mode u16 port, - std::wstring *error_message, + std::string &error_message, ChatBackend *chat_backend, const SubgameSpec &gamespec, bool simple_singleplayer_mode) @@ -1700,7 +1699,7 @@ bool Game::startup(bool *kill, // "cache" this->device = device; this->kill = kill; - this->error_message = error_message; + this->error_message = &error_message; this->random_input = random_input; this->input = input; this->chat_backend = chat_backend; @@ -1714,7 +1713,7 @@ bool Game::startup(bool *kill, if (!init(map_dir, address, port, gamespec)) return false; - if (!createClient(playername, password, address, port, error_message)) + if (!createClient(playername, password, address, port)) return false; return true; @@ -1934,10 +1933,10 @@ bool Game::createSingleplayerServer(const std::string map_dir, } if (bind_addr.isIPv6() && !g_settings->getBool("enable_ipv6")) { - *error_message = L"Unable to listen on " + - narrow_to_wide(bind_addr.serializeString()) + - L" because IPv6 is disabled"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Unable to listen on " + + bind_addr.serializeString() + + " because IPv6 is disabled"; + errorstream << *error_message << std::endl; return false; } @@ -1950,8 +1949,7 @@ bool Game::createSingleplayerServer(const std::string map_dir, } bool Game::createClient(const std::string &playername, - const std::string &password, std::string *address, u16 port, - std::wstring *error_message) + const std::string &password, std::string *address, u16 port) { showOverlayMessage(wgettext("Creating client..."), 0, 10); @@ -1966,19 +1964,19 @@ bool Game::createClient(const std::string &playername, return false; if (!could_connect) { - if (*error_message == L"" && !connect_aborted) { + if (error_message->empty() && !connect_aborted) { // Should not happen if error messages are set properly - *error_message = L"Connection failed for unknown reason"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Connection failed for unknown reason"; + errorstream << *error_message << std::endl; } return false; } if (!getServerContent(&connect_aborted)) { - if (*error_message == L"" && !connect_aborted) { + if (error_message->empty() && !connect_aborted) { // Should not happen if error messages are set properly - *error_message = L"Connection failed for unknown reason"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Connection failed for unknown reason"; + errorstream << *error_message << std::endl; } return false; } @@ -1997,9 +1995,8 @@ bool Game::createClient(const std::string &playername, if (m_cache_enable_clouds) { clouds = new Clouds(smgr->getRootSceneNode(), smgr, -1, time(0)); if (!clouds) { - *error_message = L"Memory allocation error"; - *error_message += narrow_to_wide(" (clouds)"); - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Memory allocation error (clouds)"; + errorstream << *error_message << std::endl; return false; } } @@ -2012,9 +2009,8 @@ bool Game::createClient(const std::string &playername, local_inventory = new Inventory(itemdef_manager); if (!(sky && local_inventory)) { - *error_message = L"Memory allocation error"; - *error_message += narrow_to_wide(" (sky or local inventory)"); - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Memory allocation error (sky or local inventory)"; + errorstream << *error_message << std::endl; return false; } @@ -2028,14 +2024,15 @@ bool Game::createClient(const std::string &playername, crack_animation_length = 5; } - if (!initGui(error_message)) + if (!initGui()) return false; /* Set window caption */ - core::stringw str = L"Minetest ["; + std::wstring str = narrow_to_wide(PROJECT_NAME); + str += L" ["; str += driver->getName(); - str += "]"; + str += L"]"; device->setWindowCaption(str.c_str()); LocalPlayer *player = client->getEnv().getLocalPlayer(); @@ -2045,19 +2042,19 @@ bool Game::createClient(const std::string &playername, hud = new Hud(driver, smgr, guienv, gamedef, player, local_inventory); if (!hud) { - *error_message = L"Memory error: could not create HUD"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Memory error: could not create HUD"; + errorstream << *error_message << std::endl; return false; } return true; } -bool Game::initGui(std::wstring *error_message) +bool Game::initGui() { // First line of debug text guitext = guienv->addStaticText( - L"Minetest", + narrow_to_wide(PROJECT_NAME).c_str(), core::rect(0, 0, 0, 0), false, false, guiroot); @@ -2094,8 +2091,8 @@ bool Game::initGui(std::wstring *error_message) gui_chat_console = new GUIChatConsole(guienv, guienv->getRootGUIElement(), -1, chat_backend, client); if (!gui_chat_console) { - *error_message = L"Could not allocate memory for chat console"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Could not allocate memory for chat console"; + errorstream << *error_message << std::endl; return false; } @@ -2145,16 +2142,16 @@ bool Game::connectToServer(const std::string &playername, local_server_mode = true; } } catch (ResolveError &e) { - *error_message = L"Couldn't resolve address: " + narrow_to_wide(e.what()); - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = std::string("Couldn't resolve address: ") + e.what(); + errorstream << *error_message << std::endl; return false; } if (connect_address.isIPv6() && !g_settings->getBool("enable_ipv6")) { - *error_message = L"Unable to connect to " + - narrow_to_wide(connect_address.serializeString()) + - L" because IPv6 is disabled"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Unable to connect to " + + connect_address.serializeString() + + " because IPv6 is disabled"; + errorstream << *error_message << std::endl; return false; } @@ -2204,9 +2201,9 @@ bool Game::connectToServer(const std::string &playername, // Break conditions if (client->accessDenied()) { - *error_message = L"Access denied. Reason: " + *error_message = "Access denied. Reason: " + client->accessDeniedReason(); - errorstream << wide_to_narrow(*error_message) << std::endl; + errorstream << *error_message << std::endl; break; } @@ -2252,16 +2249,12 @@ bool Game::getServerContent(bool *aborted) } // Error conditions - if (client->accessDenied()) { - *error_message = L"Access denied. Reason: " - + client->accessDeniedReason(); - errorstream << wide_to_narrow(*error_message) << std::endl; + if (!checkConnection()) return false; - } if (client->getState() < LC_Init) { - *error_message = L"Client disconnected"; - errorstream << wide_to_narrow(*error_message) << std::endl; + *error_message = "Client disconnected"; + errorstream << *error_message << std::endl; return false; } @@ -2335,9 +2328,9 @@ inline void Game::updateInteractTimers(GameRunData *runData, f32 dtime) inline bool Game::checkConnection() { if (client->accessDenied()) { - *error_message = L"Access denied. Reason: " + *error_message = "Access denied. Reason: " + client->accessDeniedReason(); - errorstream << wide_to_narrow(*error_message) << std::endl; + errorstream << *error_message << std::endl; return false; } @@ -2976,19 +2969,37 @@ void Game::updatePlayerControl(const CameraOrientation &cam) cam.camera_pitch, cam.camera_yaw ); + + u32 keypress_bits = + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_FORWARD]) & 0x1) << 0) | + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_BACKWARD]) & 0x1) << 1) | + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_LEFT]) & 0x1) << 2) | + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_RIGHT]) & 0x1) << 3) | + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_JUMP]) & 0x1) << 4) | + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_SPECIAL1]) & 0x1) << 5) | + ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_SNEAK]) & 0x1) << 6) | + ( (u32)(input->getLeftState() & 0x1) << 7) | + ( (u32)(input->getRightState() & 0x1) << 8 + ); + +#ifdef ANDROID + /* For Android, invert the meaning of holding down the fast button (i.e. + * holding down the fast button -- if there is one -- means walk), unless + * performing an action, sneaking or jumping. + */ + const u32 autofast_exludebits = + (1U << 4) | (1U << 6) // jump, sneak + | (1U << 7) | (1U << 8); // left state, right state + + if ((keypress_bits & autofast_exludebits) == 0) { + control.aux1 = control.aux1 ^ true; + keypress_bits ^= ((u32)(1U << 5)); + } +#endif + client->setPlayerControl(control); LocalPlayer *player = client->getEnv().getLocalPlayer(); - player->keyPressed = - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_FORWARD]) & 0x1) << 0) | - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_BACKWARD]) & 0x1) << 1) | - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_LEFT]) & 0x1) << 2) | - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_RIGHT]) & 0x1) << 3) | - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_JUMP]) & 0x1) << 4) | - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_SPECIAL1]) & 0x1) << 5) | - ( (u32)(input->isKeyDown(keycache.key[KeyCache::KEYMAP_ID_SNEAK]) & 0x1) << 6) | - ( (u32)(input->getLeftState() & 0x1) << 7) | - ( (u32)(input->getRightState() & 0x1) << 8 - ); + player->keyPressed = keypress_bits; //tt.stop(); } @@ -3994,7 +4005,7 @@ void Game::updateGui(float *statustext_time, const RunStats &stats, std::ostringstream os(std::ios_base::binary); os << std::fixed - << "Minetest " << minetest_version_hash + << PROJECT_NAME " " << g_version_hash << " FPS = " << fps << " (R: range_all=" << draw_control->range_all << ")" << std::setprecision(0) @@ -4010,7 +4021,7 @@ void Game::updateGui(float *statustext_time, const RunStats &stats, guitext->setVisible(true); } else if (flags.show_hud || flags.show_chat) { std::ostringstream os(std::ios_base::binary); - os << "Minetest " << minetest_version_hash; + os << PROJECT_NAME " " << g_version_hash; guitext->setText(narrow_to_wide(os.str()).c_str()); guitext->setVisible(true); } else { @@ -4218,7 +4229,7 @@ void the_game(bool *kill, const std::string &address, // If empty local server is created u16 port, - std::wstring &error_message, + std::string &error_message, ChatBackend &chat_backend, const SubgameSpec &gamespec, // Used for local game bool simple_singleplayer_mode) @@ -4234,24 +4245,24 @@ void the_game(bool *kill, try { if (game.startup(kill, random_input, input, device, map_dir, - playername, password, &server_address, port, - &error_message, &chat_backend, gamespec, - simple_singleplayer_mode)) { - + playername, password, &server_address, port, + error_message, &chat_backend, gamespec, + simple_singleplayer_mode)) { game.run(); game.shutdown(); } } catch (SerializationError &e) { - error_message = L"A serialization error occurred:\n" - + narrow_to_wide(e.what()) + L"\n\nThe server is probably " - L" running a different version of Minetest."; - errorstream << wide_to_narrow(error_message) << std::endl; + error_message = std::string("A serialization error occurred:\n") + + e.what() + "\n\nThe server is probably " + " running a different version of " PROJECT_NAME "."; + errorstream << error_message << std::endl; } catch (ServerError &e) { - error_message = narrow_to_wide(e.what()); - errorstream << "ServerError: " << e.what() << std::endl; + error_message = e.what(); + errorstream << "ServerError: " << error_message << std::endl; } catch (ModError &e) { - errorstream << "ModError: " << e.what() << std::endl; - error_message = narrow_to_wide(e.what()) + wstrgettext("\nCheck debug.txt for details."); + error_message = e.what() + strgettext("\nCheck debug.txt for details."); + errorstream << "ModError: " << error_message << std::endl; } } + diff --git a/src/game.h b/src/game.h index 61f780bee..358b26c37 100644 --- a/src/game.h +++ b/src/game.h @@ -145,7 +145,7 @@ void the_game(bool *kill, const std::string &password, const std::string &address, // If "", local server is used u16 port, - std::wstring &error_message, + std::string &error_message, ChatBackend &chat_backend, const SubgameSpec &gamespec, // Used for local game bool simple_singleplayer_mode); diff --git a/src/gettext.cpp b/src/gettext.cpp index fc7569418..20453b914 100644 --- a/src/gettext.cpp +++ b/src/gettext.cpp @@ -236,8 +236,9 @@ void init_gettext(const char *path, const std::string &configured_language) { #endif #endif - bindtextdomain(PROJECT_NAME, path); - textdomain(PROJECT_NAME); + static const char *name = lowercase(PROJECT_NAME).c_str(); + bindtextdomain(name, path); + textdomain(name); #if defined(_WIN32) // Set character encoding for Win32 diff --git a/src/gettime.h b/src/gettime.h index 2a6a211b8..44c159026 100644 --- a/src/gettime.h +++ b/src/gettime.h @@ -54,8 +54,8 @@ inline std::string getTimestamp() // This is not really thread-safe but it won't break anything // except its own output, so just go with it. struct tm *tm = localtime(&t); - char cs[20]; - strftime(cs, 20, "%H:%M:%S", tm); + char cs[20]; //YYYY-MM-DD HH:MM:SS + '\0' + strftime(cs, 20, "%Y-%m-%d %H:%M:%S", tm); return cs; } diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp index 30296b40c..c143e5110 100644 --- a/src/guiEngine.cpp +++ b/src/guiEngine.cpp @@ -171,8 +171,8 @@ GUIEngine::GUIEngine( irr::IrrlichtDevice* dev, m_sound_manager = &dummySoundManager; //create topleft header - std::wstring t = narrow_to_wide(std::string("Minetest ") + - minetest_version_hash); + std::wstring t = narrow_to_wide(std::string(PROJECT_NAME " ") + + g_version_hash); core::rect rect(0, 0, g_fontengine->getTextWidth(t), g_fontengine->getTextHeight()); rect += v2s32(4, 0); @@ -571,8 +571,8 @@ bool GUIEngine::downloadFile(std::string url, std::string target) /******************************************************************************/ void GUIEngine::setTopleftText(std::string append) { - std::wstring toset = narrow_to_wide( std::string("Minetest ") + - minetest_version_hash); + std::wstring toset = narrow_to_wide(std::string(PROJECT_NAME " ") + + g_version_hash); if (append != "") { diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 40ad92da3..e17a8b187 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -48,7 +48,7 @@ HTTPFetchRequest::HTTPFetchRequest() connect_timeout = timeout; multipart = false; - useragent = std::string("Minetest/") + minetest_version_hash + " (" + porting::get_sysinfo() + ")"; + useragent = std::string(PROJECT_NAME "/") + g_version_hash + " (" + porting::get_sysinfo() + ")"; } diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index 26cabc25f..178985dfd 100644 --- a/src/inventorymanager.cpp +++ b/src/inventorymanager.cpp @@ -455,9 +455,9 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame } } - mgr->setInventoryModified(from_inv); + mgr->setInventoryModified(from_inv, false); if(inv_from != inv_to) - mgr->setInventoryModified(to_inv); + mgr->setInventoryModified(to_inv, false); } void IMoveAction::clientApply(InventoryManager *mgr, IGameDef *gamedef) @@ -597,7 +597,7 @@ void IDropAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame if(item2.count != actually_dropped_count) errorstream<<"Could not take dropped count of items"<setInventoryModified(from_inv); + mgr->setInventoryModified(from_inv, false); } } diff --git a/src/inventorymanager.h b/src/inventorymanager.h index 8e2abc961..39cc6e50f 100644 --- a/src/inventorymanager.h +++ b/src/inventorymanager.h @@ -112,7 +112,7 @@ public: // Get an inventory (server and client) virtual Inventory* getInventory(const InventoryLocation &loc){return NULL;} // Set modified (will be saved and sent over network; only on server) - virtual void setInventoryModified(const InventoryLocation &loc){} + virtual void setInventoryModified(const InventoryLocation &loc, bool playerSend = true){} // Send inventory action to server (only on client) virtual void inventoryAction(InventoryAction *a){} }; diff --git a/src/json/CMakeLists.txt b/src/json/CMakeLists.txt index 5887d523a..206c6ea9c 100644 --- a/src/json/CMakeLists.txt +++ b/src/json/CMakeLists.txt @@ -1,14 +1,4 @@ -if( UNIX ) - set(json_SRCS jsoncpp.cpp) - set(json_platform_LIBS "") -else( UNIX ) - set(json_SRCS jsoncpp.cpp) - set(json_platform_LIBS "") -endif( UNIX ) +add_library(jsoncpp jsoncpp.cpp) -add_library(jsoncpp ${json_SRCS}) +target_link_libraries(jsoncpp) -target_link_libraries( - jsoncpp - ${json_platform_LIBS} -) diff --git a/src/jthread/CMakeLists.txt b/src/jthread/CMakeLists.txt index a581a3b02..cebb35caa 100644 --- a/src/jthread/CMakeLists.txt +++ b/src/jthread/CMakeLists.txt @@ -1,15 +1,14 @@ -if( UNIX ) - set(JTHREAD_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/pthread/jmutex.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/pthread/jthread.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/pthread/jsemaphore.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/pthread/jevent.cpp - PARENT_SCOPE) -else( UNIX ) - set(JTHREAD_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/win32/jmutex.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/win32/jthread.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/win32/jsemaphore.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/win32/jevent.cpp - PARENT_SCOPE) -endif( UNIX ) +if(UNIX) + set(THREAD_SYS_DIR pthread) +else() + set(THREAD_SYS_DIR win32) +endif() + +set(SRC_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/${THREAD_SYS_DIR}) +set(JTHREAD_SRCS + ${SRC_PREFIX}/jmutex.cpp + ${SRC_PREFIX}/jthread.cpp + ${SRC_PREFIX}/jsemaphore.cpp + ${SRC_PREFIX}/jevent.cpp + PARENT_SCOPE) + diff --git a/src/lua/CMakeLists.txt b/src/lua/CMakeLists.txt index 4bfe318ee..119dd6302 100644 --- a/src/lua/CMakeLists.txt +++ b/src/lua/CMakeLists.txt @@ -1,10 +1,12 @@ -# -# Lua 5.1.x -# cmake_minimum_required(VERSION 2.4 FATAL_ERROR) project(lua C) +set(LUA_VERSION_MAJOR 5) +set(LUA_VERSION_MINOR 1) +set(LUA_VERSION_PATCH 4) +set(LUA_VERSION "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(COMMON_CFLAGS) @@ -16,9 +18,7 @@ if(APPLE) set(DEFAULT_DLOPEN ON) # use this on Mac OS X 10.3- option(LUA_USE_MACOSX "Mac OS X 10.3-" OFF) -elseif(CYGWIN) - set(DEFAULT_POSIX TRUE) -elseif(UNIX) +elseif(UNIX OR CYGWIN) set(DEFAULT_POSIX TRUE) elseif(WIN32) set(LUA_WIN TRUE) @@ -32,50 +32,18 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(DEFAULT_DLOPEN ON) endif() -if(WIN32) - #set(BUILD_STATIC OFF) - set(BUILD_STATIC ON) -else() - #option(BUILD_STATIC "build static library" ON) - set(BUILD_STATIC ON) -endif() - -if(DEFAULT_DLOPEN) - option(LUA_USE_DLOPEN "Enable dlopen support." ON) -else() - option(LUA_USE_DLOPEN "Enable dlopen support." OFF) -endif() -mark_as_advanced(LUA_USE_DLOPEN) - -if(DEFAULT_ANSI) - option(LUA_ANSI "Disable non-ansi features." ON) -else() - option(LUA_ANSI "Disable non-ansi features." OFF) -endif() -mark_as_advanced(LUA_ANSI) - -# -# Lua version -# -set(LUA_VERSION_MAJOR 5) -set(LUA_VERSION_MINOR 1) -set(LUA_VERSION_PATCH 4) -set(LUA_VERSION - "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") -set(LUA_SOVERSION - "${LUA_VERSION_MAJOR}") - -# -# libs & cflags -# -set(COMMON_LDFLAGS "${COMMON_LDFLAGS}") - # For "Mac OS X 10.3-" if(LUA_USE_MACOSX) set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_USE_MACOSX") set(LUA_USE_DLOPEN FALSE) endif(LUA_USE_MACOSX) +option(LUA_USE_DLOPEN "Enable dlopen support." ${DEFAULT_DLOPEN}) +mark_as_advanced(LUA_USE_DLOPEN) + +option(LUA_ANSI "Disable non-ANSI features." ${DEFAULT_ANSI}) +mark_as_advanced(LUA_ANSI) + if(LUA_USE_DLOPEN) set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_USE_DLOPEN") if(NOT APPLE) @@ -91,14 +59,11 @@ if(LUA_ANSI) set(COMMON_CFLAGS "${COMMON_CFLAGS} -DLUA_ANSI") endif(LUA_ANSI) -# # COMMON_CFLAGS has no effect without this line -# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_CFLAGS}") -# -# standard flags to use for each build type. -# + +# Standard flags to use for each build type. if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Wall -Wextra -Wshadow -W -pedantic -std=gnu99") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2") @@ -107,8 +72,6 @@ if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2 -g") endif(CMAKE_COMPILER_IS_GNUCC) -# -# sub-folders -# -ADD_SUBDIRECTORY(src build) + +add_subdirectory(src build) diff --git a/src/lua/src/CMakeLists.txt b/src/lua/src/CMakeLists.txt index 8fdc7e58b..8f6cc1213 100644 --- a/src/lua/src/CMakeLists.txt +++ b/src/lua/src/CMakeLists.txt @@ -39,11 +39,9 @@ set(LUA_LIB_HEADERS ) include_directories(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}) + ${CMAKE_CURRENT_BINARY_DIR}) -# # Lua library. -# add_library(lua STATIC ${LUA_CORE_SRC}) target_link_libraries(lua ${LIBS}) set(LUA_STATIC_LIB lua) @@ -51,13 +49,6 @@ set(LUA_LIBS lua) set_target_properties(${LUA_LIBS} PROPERTIES VERSION ${LUA_VERSION} - SOVERSION ${LUA_SOVERSION} CLEAN_DIRECT_OUTPUT 1 ) -# Install library -#install(TARGETS ${LUA_LIBS} -# RUNTIME DESTINATION bin -# LIBRARY DESTINATION lib -# ARCHIVE DESTINATION lib) - diff --git a/src/main.cpp b/src/main.cpp index d84a09f76..3893b9a82 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -400,13 +400,11 @@ static void print_allowed_options(const OptionList &allowed_options) static void print_version() { -#ifdef SERVER - dstream << "minetestserver " << minetest_version_hash << std::endl; -#else - dstream << "Minetest " << minetest_version_hash << std::endl; + dstream << PROJECT_NAME " " << g_version_hash << std::endl; +#ifndef SERVER dstream << "Using Irrlicht " << IRRLICHT_SDK_VERSION << std::endl; #endif - dstream << "Build info: " << minetest_build_info << std::endl; + dstream << "Build info: " << g_build_info << std::endl; } static void list_game_ids() @@ -543,7 +541,7 @@ static void startup_message() infostream << PROJECT_NAME << " " << _("with") << " SER_FMT_VER_HIGHEST_READ=" << (int)SER_FMT_VER_HIGHEST_READ << ", " - << minetest_build_info << std::endl; + << g_build_info << std::endl; } static bool read_config_file(const Settings &cmd_args) diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 4095ace26..3805c323d 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -12,4 +12,5 @@ if (BUILD_CLIENT) ${CMAKE_CURRENT_SOURCE_DIR}/clientpackethandler.cpp PARENT_SCOPE ) -endif(BUILD_CLIENT) +endif() + diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 5acf04f91..4afe2a2ce 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -140,7 +140,7 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt) // to be processed even if the serialisation format has // not been agreed yet, the same as TOCLIENT_INIT. m_access_denied = true; - m_access_denied_reason = L"Unknown"; + m_access_denied_reason = "Unknown"; if (pkt->getCommand() == TOCLIENT_ACCESS_DENIED) { if (pkt->getSize() < 1) @@ -149,7 +149,9 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt) u8 denyCode = SERVER_ACCESSDENIED_UNEXPECTED_DATA; *pkt >> denyCode; if (denyCode == SERVER_ACCESSDENIED_CUSTOM_STRING) { - *pkt >> m_access_denied_reason; + std::wstring wide_reason; + *pkt >> wide_reason; + m_access_denied_reason = wide_to_narrow(wide_reason); } else if (denyCode < SERVER_ACCESSDENIED_MAX) { m_access_denied_reason = accessDeniedStrings[denyCode]; @@ -159,7 +161,9 @@ void Client::handleCommand_AccessDenied(NetworkPacket* pkt) // for compat with old clients else { if (pkt->getSize() >= 2) { - *pkt >> m_access_denied_reason; + std::wstring wide_reason; + *pkt >> wide_reason; + m_access_denied_reason = wide_to_narrow(wide_reason); } } } diff --git a/src/network/connection.cpp b/src/network/connection.cpp index d51324ed4..4440b8cc7 100644 --- a/src/network/connection.cpp +++ b/src/network/connection.cpp @@ -1063,14 +1063,14 @@ void UDPPeer::PutReliableSendCommand(ConnectionCommand &c, <<" processing reliable command for peer id: " << c.peer_id <<" data size: " << c.data.getSize() << std::endl); if (!processReliableSendCommand(c,max_packet_size)) { - channels[c.channelnum].queued_commands.push(c); + channels[c.channelnum].queued_commands.push_back(c); } } else { LOG(dout_con<getDesc() <<" Queueing reliable command for peer id: " << c.peer_id <<" data size: " << c.data.getSize() < 0) && (channels[i].queued_reliables.size() < maxtransfer) && - (commands_processed < maxcommands)) - { + (commands_processed < maxcommands)) { try { ConnectionCommand c = channels[i].queued_commands.front(); - channels[i].queued_commands.pop(); + channels[i].queued_commands.pop_front(); LOG(dout_con<getDesc() <<" processing queued reliable command "<(&peer) == 0) continue; - for(u16 i=0; i(&peer))->channels[i]; - if (channel->queued_commands.size() > 0) - { + if (channel->queued_commands.size() > 0) { return true; } } diff --git a/src/network/connection.h b/src/network/connection.h index 0aa63d4cf..9c920cc01 100644 --- a/src/network/connection.h +++ b/src/network/connection.h @@ -501,7 +501,7 @@ public: std::queue queued_reliables; //queue commands prior splitting to packets - std::queue queued_commands; + std::deque queued_commands; IncomingSplitBuffer incoming_splits; diff --git a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp index cfbca32d3..85d39d91d 100644 --- a/src/network/networkpacket.cpp +++ b/src/network/networkpacket.cpp @@ -512,7 +512,7 @@ NetworkPacket& NetworkPacket::operator<<(video::SColor src) Buffer NetworkPacket::oldForgePacket() { - SharedBuffer sb(m_datasize + 2); + Buffer sb(m_datasize + 2); writeU16(&sb[0], m_command); u8* datas = getU8Ptr(0); diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 599b70006..3a52ddacd 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -861,36 +861,36 @@ enum ToServerCommand }; enum AccessDeniedCode { - SERVER_ACCESSDENIED_WRONG_PASSWORD = 0, - SERVER_ACCESSDENIED_UNEXPECTED_DATA = 1, - SERVER_ACCESSDENIED_SINGLEPLAYER = 2, - SERVER_ACCESSDENIED_WRONG_VERSION = 3, - SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME = 4, - SERVER_ACCESSDENIED_WRONG_NAME = 5, - SERVER_ACCESSDENIED_TOO_MANY_USERS = 6, - SERVER_ACCESSDENIED_EMPTY_PASSWORD = 7, - SERVER_ACCESSDENIED_ALREADY_CONNECTED = 8, - SERVER_ACCESSDENIED_SERVER_FAIL = 9, - SERVER_ACCESSDENIED_CUSTOM_STRING = 10, - SERVER_ACCESSDENIED_MAX = 11, + SERVER_ACCESSDENIED_WRONG_PASSWORD, + SERVER_ACCESSDENIED_UNEXPECTED_DATA, + SERVER_ACCESSDENIED_SINGLEPLAYER, + SERVER_ACCESSDENIED_WRONG_VERSION, + SERVER_ACCESSDENIED_WRONG_CHARS_IN_NAME, + SERVER_ACCESSDENIED_WRONG_NAME, + SERVER_ACCESSDENIED_TOO_MANY_USERS, + SERVER_ACCESSDENIED_EMPTY_PASSWORD, + SERVER_ACCESSDENIED_ALREADY_CONNECTED, + SERVER_ACCESSDENIED_SERVER_FAIL, + SERVER_ACCESSDENIED_CUSTOM_STRING, + SERVER_ACCESSDENIED_MAX, }; enum NetProtoCompressionMode { NETPROTO_COMPRESSION_ZLIB = 0, }; -const static std::wstring accessDeniedStrings[SERVER_ACCESSDENIED_MAX] = { - L"Invalid password", - L"Your client sent something server didn't expect. Try reconnecting or updating your client", - L"The server is running in simple singleplayer mode. You cannot connect.", - L"Your client's version is not supported.\nPlease contact server administrator.", - L"Name contains unallowed characters", - L"Name is not allowed", - L"Too many users.", - L"Empty passwords are disallowed. Set a password and try again.", - L"Another client is connected with this name. If your client closed unexpectedly, try again in a minute.", - L"Server authenticator failed. Maybe the servers has some problems." - L"", +const static std::string accessDeniedStrings[SERVER_ACCESSDENIED_MAX] = { + "Invalid password", + "Your client sent something the server didn't expect. Try reconnecting or updating your client", + "The server is running in simple singleplayer mode. You cannot connect.", + "Your client's version is not supported.\nPlease contact server administrator.", + "Player name contains disallowed characters.", + "Player name not allowed.", + "Too many users.", + "Empty passwords are disallowed. Set a password and try again.", + "Another client is connected with this name. If your client closed unexpectedly, try again in a minute.", + "Server authention failed. This is likely a server error." + "", }; #endif diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index f6438d311..e01aeaa55 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -388,7 +388,7 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt) DenyAccess_Legacy(pkt->getPeerId(), std::wstring( L"Your client's version is not supported.\n" L"Server version is ") - + narrow_to_wide(minetest_version_simple) + L"." + + narrow_to_wide(g_version_string) + L"." ); return; } @@ -436,7 +436,7 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt) DenyAccess_Legacy(pkt->getPeerId(), std::wstring( L"Your client's version is not supported.\n" L"Server version is ") - + narrow_to_wide(minetest_version_simple) + L",\n" + + narrow_to_wide(g_version_string) + L",\n" + L"server's PROTOCOL_VERSION is " + narrow_to_wide(itos(SERVER_PROTOCOL_VERSION_MIN)) + L"..." @@ -456,7 +456,7 @@ void Server::handleCommand_Init_Legacy(NetworkPacket* pkt) DenyAccess_Legacy(pkt->getPeerId(), std::wstring( L"Your client's version is not supported.\n" L"Server version is ") - + narrow_to_wide(minetest_version_simple) + L",\n" + + narrow_to_wide(g_version_string) + L",\n" + L"server's PROTOCOL_VERSION (strict) is " + narrow_to_wide(itos(LATEST_PROTOCOL_VERSION)) + L", client's PROTOCOL_VERSION is " @@ -952,8 +952,8 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) ma->from_inv.applyCurrentPlayer(player->getName()); ma->to_inv.applyCurrentPlayer(player->getName()); - setInventoryModified(ma->from_inv); - setInventoryModified(ma->to_inv); + setInventoryModified(ma->from_inv, false); + setInventoryModified(ma->to_inv, false); bool from_inv_is_current_player = (ma->from_inv.type == InventoryLocation::PLAYER) && @@ -1006,7 +1006,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) da->from_inv.applyCurrentPlayer(player->getName()); - setInventoryModified(da->from_inv); + setInventoryModified(da->from_inv, false); /* Disable dropping items out of craftpreview @@ -1033,7 +1033,7 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) ca->craft_inv.applyCurrentPlayer(player->getName()); - setInventoryModified(ca->craft_inv); + setInventoryModified(ca->craft_inv, false); //bool craft_inv_is_current_player = // (ca->craft_inv.type == InventoryLocation::PLAYER) && @@ -1052,6 +1052,8 @@ void Server::handleCommand_InventoryAction(NetworkPacket* pkt) a->apply(this, playersao, this); // Eat the action delete a; + + SendInventory(playersao); } void Server::handleCommand_ChatMessage(NetworkPacket* pkt) diff --git a/src/player.cpp b/src/player.cpp index 08cb24248..4a5e5ad91 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -86,6 +86,7 @@ Player::Player(IGameDef *gamedef, const char *name): movement_liquid_fluidity_smooth = 0.5 * BS; movement_liquid_sink = 10 * BS; movement_gravity = 9.81 * BS; + local_animation_speed = 0.0; // Movement overrides are multipliers and must be 1 by default physics_override_speed = 1; diff --git a/src/porting.cpp b/src/porting.cpp index 710446363..797a2cf39 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -461,7 +461,7 @@ void initializePaths() // Use "C:\Documents and Settings\user\Application Data\" len = GetEnvironmentVariable("APPDATA", buf, buflen); FATAL_ERROR_IF(len >= buflen, "Overlow"); - path_user = std::string(buf) + DIR_DELIM + PROJECT_NAME; + path_user = std::string(buf) + DIR_DELIM + lowercase(PROJECT_NAME); /* Linux @@ -491,7 +491,7 @@ void initializePaths() if(static_sharedir != "" && static_sharedir != ".") trylist.push_back(static_sharedir); trylist.push_back( - bindir + DIR_DELIM + ".." + DIR_DELIM + "share" + DIR_DELIM + PROJECT_NAME); + bindir + DIR_DELIM + ".." + DIR_DELIM + "share" + DIR_DELIM + lowercase(PROJECT_NAME)); trylist.push_back(bindir + DIR_DELIM + ".."); #ifdef __ANDROID__ trylist.push_back(path_user); @@ -515,7 +515,7 @@ void initializePaths() break; } #ifndef __ANDROID__ - path_user = std::string(getenv("HOME")) + DIR_DELIM + "." + PROJECT_NAME; + path_user = std::string(getenv("HOME")) + DIR_DELIM + "." + lowercase(PROJECT_NAME); #endif /* @@ -532,12 +532,13 @@ void initializePaths() dstream << "WARNING: Could not determine bundle resource path" << std::endl; } CFRelease(resources_url); - path_user = std::string(getenv("HOME")) + "/Library/Application Support/" + PROJECT_NAME; + + path_user = std::string(getenv("HOME")) + "/Library/Application Support/" + lowercase(PROJECT_NAME); #else // FreeBSD, and probably many other POSIX-like systems. path_share = STATIC_SHAREDIR; - path_user = std::string(getenv("HOME")) + DIR_DELIM + "." + PROJECT_NAME; + path_user = std::string(getenv("HOME")) + DIR_DELIM + "." + lowercase(PROJECT_NAME); #endif @@ -569,16 +570,20 @@ void setXorgClassHint(const video::SExposedVideoData &video_data, } #ifndef SERVER + v2u32 getWindowSize() { return device->getVideoDriver()->getScreenSize(); } -std::vector > getVideoModes() +std::vector > getSupportedVideoModes() { + IrrlichtDevice *nulldevice = createDevice(video::EDT_NULL); + sanity_check(nulldevice != NULL); + std::vector > mlist; - video::IVideoModeList *modelist = device->getVideoModeList(); + video::IVideoModeList *modelist = nulldevice->getVideoModeList(); u32 num_modes = modelist->getVideoModeCount(); for (u32 i = 0; i != num_modes; i++) { @@ -587,6 +592,8 @@ std::vector > getVideoModes() mlist.push_back(core::vector3d(mode_res.Width, mode_res.Height, mode_depth)); } + nulldevice->drop(); + return mlist; } diff --git a/src/porting.h b/src/porting.h index 3d2677564..ddb56cf7d 100644 --- a/src/porting.h +++ b/src/porting.h @@ -371,6 +371,7 @@ float getDisplayDensity(); v2u32 getDisplaySize(); v2u32 getWindowSize(); +std::vector > getSupportedVideoModes(); std::vector getSupportedVideoDrivers(); const char *getVideoDriverName(irr::video::E_DRIVER_TYPE type); const char *getVideoDriverFriendlyName(irr::video::E_DRIVER_TYPE type); diff --git a/src/script/CMakeLists.txt b/src/script/CMakeLists.txt index 491c05a1e..5ef672ca9 100644 --- a/src/script/CMakeLists.txt +++ b/src/script/CMakeLists.txt @@ -11,9 +11,10 @@ set(common_SCRIPT_SRCS PARENT_SCOPE) # Used by client only -set(minetest_SCRIPT_SRCS +set(client_SCRIPT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/scripting_mainmenu.cpp - ${minetest_SCRIPT_COMMON_SRCS} - ${minetest_SCRIPT_CPP_API_SRCS} - ${minetest_SCRIPT_LUA_API_SRCS} + ${client_SCRIPT_COMMON_SRCS} + ${client_SCRIPT_CPP_API_SRCS} + ${client_SCRIPT_LUA_API_SRCS} PARENT_SCOPE) + diff --git a/src/script/common/CMakeLists.txt b/src/script/common/CMakeLists.txt index 27e2fb4d5..4a8e6bab5 100644 --- a/src/script/common/CMakeLists.txt +++ b/src/script/common/CMakeLists.txt @@ -1,4 +1,3 @@ -# Used by server and client set(common_SCRIPT_COMMON_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/c_content.cpp ${CMAKE_CURRENT_SOURCE_DIR}/c_converter.cpp @@ -6,6 +5,6 @@ set(common_SCRIPT_COMMON_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/c_internal.cpp PARENT_SCOPE) -# Used by client only -set(minetest_SCRIPT_COMMON_SRCS +set(client_SCRIPT_COMMON_SRCS PARENT_SCOPE) + diff --git a/src/script/cpp_api/CMakeLists.txt b/src/script/cpp_api/CMakeLists.txt index c45020055..4584962f1 100644 --- a/src/script/cpp_api/CMakeLists.txt +++ b/src/script/cpp_api/CMakeLists.txt @@ -1,4 +1,3 @@ -# Used by server and client set(common_SCRIPT_CPP_API_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/s_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/s_entity.cpp @@ -12,7 +11,7 @@ set(common_SCRIPT_CPP_API_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/s_async.cpp PARENT_SCOPE) -# Used by client only -set(minetest_SCRIPT_CPP_API_SRCS +set(client_SCRIPT_CPP_API_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/s_mainmenu.cpp PARENT_SCOPE) + diff --git a/src/script/lua_api/CMakeLists.txt b/src/script/lua_api/CMakeLists.txt index 08960d2ad..aaabc213e 100644 --- a/src/script/lua_api/CMakeLists.txt +++ b/src/script/lua_api/CMakeLists.txt @@ -1,4 +1,3 @@ -# Used by server and client set(common_SCRIPT_LUA_API_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/l_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/l_craft.cpp @@ -18,7 +17,7 @@ set(common_SCRIPT_LUA_API_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/l_settings.cpp PARENT_SCOPE) -# Used by client only -set(minetest_SCRIPT_LUA_API_SRCS +set(client_SCRIPT_LUA_API_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/l_mainmenu.cpp PARENT_SCOPE) + diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 36b97b2d1..2ad6ba360 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -840,7 +840,7 @@ int ModApiMainMenu::l_copy_dir(lua_State *L) int ModApiMainMenu::l_extract_zip(lua_State *L) { GUIEngine* engine = getGuiEngine(L); - sanity_check(engine != NULL);(engine != 0); + sanity_check(engine); const char *zipfile = luaL_checkstring(L, 1); const char *destination = luaL_checkstring(L, 2); @@ -980,7 +980,7 @@ int ModApiMainMenu::l_show_file_open_dialog(lua_State *L) /******************************************************************************/ int ModApiMainMenu::l_get_version(lua_State *L) { - lua_pushstring(L, minetest_version_simple); + lua_pushstring(L, g_version_string); return 1; } @@ -1056,6 +1056,28 @@ int ModApiMainMenu::l_get_video_drivers(lua_State *L) return 1; } +/******************************************************************************/ +int ModApiMainMenu::l_get_video_modes(lua_State *L) +{ + std::vector > videomodes + = porting::getSupportedVideoModes(); + + lua_newtable(L); + for (u32 i = 0; i != videomodes.size(); i++) { + lua_newtable(L); + lua_pushnumber(L, videomodes[i].X); + lua_setfield(L, -2, "w"); + lua_pushnumber(L, videomodes[i].Y); + lua_setfield(L, -2, "h"); + lua_pushnumber(L, videomodes[i].Z); + lua_setfield(L, -2, "depth"); + + lua_rawseti(L, -2, i + 1); + } + + return 1; +} + /******************************************************************************/ int ModApiMainMenu::l_gettext(lua_State *L) { @@ -1164,6 +1186,7 @@ void ModApiMainMenu::Initialize(lua_State *L, int top) API_FCT(sound_stop); API_FCT(gettext); API_FCT(get_video_drivers); + API_FCT(get_video_modes); API_FCT(get_screen_info); API_FCT(get_min_supp_proto); API_FCT(get_max_supp_proto); diff --git a/src/script/lua_api/l_mainmenu.h b/src/script/lua_api/l_mainmenu.h index 8b21a93aa..9c1fed272 100644 --- a/src/script/lua_api/l_mainmenu.h +++ b/src/script/lua_api/l_mainmenu.h @@ -137,6 +137,8 @@ private: static int l_get_video_drivers(lua_State *L); + static int l_get_video_modes(lua_State *L); + //version compatibility static int l_get_min_supp_proto(lua_State *L); diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index 8806581de..172f2b5cc 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -801,10 +801,13 @@ int ModApiMapgen::l_generate_ores(lua_State *L) mg.vm = LuaVoxelManip::checkobject(L, 1)->vm; mg.ndef = getServer(L)->getNodeDefManager(); - u32 blockseed = Mapgen::getBlockSeed(mg.vm->m_area.MinEdge, mg.seed); + v3s16 pmin = lua_istable(L, 2) ? read_v3s16(L, 2) : + mg.vm->m_area.MinEdge + v3s16(1,1,1) * MAP_BLOCKSIZE; + v3s16 pmax = lua_istable(L, 3) ? read_v3s16(L, 3) : + mg.vm->m_area.MaxEdge - v3s16(1,1,1) * MAP_BLOCKSIZE; + sortBoxVerticies(pmin, pmax); - v3s16 pmin = read_v3s16(L, 2); - v3s16 pmax = read_v3s16(L, 3); + u32 blockseed = Mapgen::getBlockSeed(pmin, mg.seed); emerge->oremgr->placeAllOres(&mg, blockseed, pmin, pmax); @@ -821,10 +824,13 @@ int ModApiMapgen::l_generate_decorations(lua_State *L) mg.vm = LuaVoxelManip::checkobject(L, 1)->vm; mg.ndef = getServer(L)->getNodeDefManager(); - u32 blockseed = Mapgen::getBlockSeed(mg.vm->m_area.MinEdge, mg.seed); + v3s16 pmin = lua_istable(L, 2) ? read_v3s16(L, 2) : + mg.vm->m_area.MinEdge + v3s16(1,1,1) * MAP_BLOCKSIZE; + v3s16 pmax = lua_istable(L, 3) ? read_v3s16(L, 3) : + mg.vm->m_area.MaxEdge - v3s16(1,1,1) * MAP_BLOCKSIZE; + sortBoxVerticies(pmin, pmax); - v3s16 pmin = read_v3s16(L, 2); - v3s16 pmax = read_v3s16(L, 3); + u32 blockseed = Mapgen::getBlockSeed(pmin, mg.seed); emerge->decomgr->placeAllDecos(&mg, blockseed, pmin, pmax); diff --git a/src/server.cpp b/src/server.cpp index 52183980f..3b4c3c3f0 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1290,13 +1290,16 @@ Inventory* Server::getInventory(const InventoryLocation &loc) } return NULL; } -void Server::setInventoryModified(const InventoryLocation &loc) +void Server::setInventoryModified(const InventoryLocation &loc, bool playerSend) { switch(loc.type){ case InventoryLocation::UNDEFINED: break; case InventoryLocation::PLAYER: { + if (!playerSend) + return; + Player *player = m_env->getPlayer(loc.name.c_str()); if(!player) return; @@ -2684,7 +2687,7 @@ std::wstring Server::getStatusString() std::wostringstream os(std::ios_base::binary); os<get("server_name"); server["description"] = g_settings->get("server_description"); - server["version"] = minetest_version_simple; + server["version"] = g_version_string; server["proto_min"] = strict_checking ? LATEST_PROTOCOL_VERSION : SERVER_PROTOCOL_VERSION_MIN; server["proto_max"] = strict_checking ? LATEST_PROTOCOL_VERSION : SERVER_PROTOCOL_VERSION_MAX; server["url"] = g_settings->get("server_url"); diff --git a/src/touchscreengui.cpp b/src/touchscreengui.cpp index a2c981cff..2d489c1f8 100644 --- a/src/touchscreengui.cpp +++ b/src/touchscreengui.cpp @@ -31,6 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include +// Very slow button repeat frequency (in seconds) +#define SLOW_BUTTON_REPEAT (1.0f) + using namespace irr::core; extern Settings *g_settings; @@ -121,6 +124,7 @@ TouchScreenGUI::TouchScreenGUI(IrrlichtDevice *device, IEventReceiver* receiver) for (unsigned int i=0; i < after_last_element_id; i++) { m_buttons[i].guibutton = 0; m_buttons[i].repeatcounter = -1; + m_buttons[i].repeatdelay = BUTTON_REPEAT_DELAY; } m_screensize = m_device->getVideoDriver()->getScreenSize(); @@ -141,13 +145,14 @@ void TouchScreenGUI::loadButtonTexture(button_info* btn, const char* path) } void TouchScreenGUI::initButton(touch_gui_button_id id, rect button_rect, - std::wstring caption, bool immediate_release ) + std::wstring caption, bool immediate_release, float repeat_delay) { button_info* btn = &m_buttons[id]; btn->guibutton = m_guienv->addButton(button_rect, 0, id, caption.c_str()); btn->guibutton->grab(); btn->repeatcounter = -1; + btn->repeatdelay = repeat_delay; btn->keycode = id2keycode(id); btn->immediate_release = immediate_release; btn->ids.clear(); @@ -240,25 +245,25 @@ void TouchScreenGUI::init(ISimpleTextureSource* tsrc, float density) rect(m_screensize.X - (0.75*button_size), m_screensize.Y - (2.25*button_size), m_screensize.X, m_screensize.Y - (button_size*1.5)), - L"fly", true); + L"fly", false, SLOW_BUTTON_REPEAT); /* init noclip button */ initButton(noclip_id, rect(m_screensize.X - (0.75*button_size), 2.25*button_size, m_screensize.X, 3*button_size), - L"clip", true); + L"clip", false, SLOW_BUTTON_REPEAT); /* init fast button */ initButton(fast_id, rect(m_screensize.X - (0.75*button_size), 1.5*button_size, m_screensize.X, 2.25*button_size), - L"fast", true); + L"fast", false, SLOW_BUTTON_REPEAT); /* init debug button */ initButton(debug_id, rect(m_screensize.X - (0.75*button_size), 0.75*button_size, m_screensize.X, 1.5*button_size), - L"dbg", true); + L"dbg", false, SLOW_BUTTON_REPEAT); /* init chat button */ initButton(chat_id, @@ -270,13 +275,13 @@ void TouchScreenGUI::init(ISimpleTextureSource* tsrc, float density) initButton(camera_id, rect(m_screensize.X - (1.5*button_size), 0, m_screensize.X - (0.75*button_size), 0.75*button_size), - L"cam", true); + L"cam", false, SLOW_BUTTON_REPEAT); /* init rangeselect button */ initButton(range_id, rect(m_screensize.X - (2.25*button_size), 0, m_screensize.X - (1.5*button_size), 0.75*button_size), - L"far", true); + L"far", false, SLOW_BUTTON_REPEAT); } touch_gui_button_id TouchScreenGUI::getButtonID(s32 x, s32 y) @@ -687,7 +692,7 @@ void TouchScreenGUI::step(float dtime) if (m_move_id != -1) m_move_has_really_moved = true; - if (btn->repeatcounter < 0.2) continue; + if (btn->repeatcounter < btn->repeatdelay) continue; btn->repeatcounter = 0; SEvent translated; diff --git a/src/touchscreengui.h b/src/touchscreengui.h index a00df5c47..2ded26a05 100644 --- a/src/touchscreengui.h +++ b/src/touchscreengui.h @@ -54,6 +54,7 @@ typedef enum { #define MIN_DIG_TIME_MS 500 #define MAX_TOUCH_COUNT 64 +#define BUTTON_REPEAT_DELAY 0.2f extern const char** touchgui_button_imagenames; @@ -105,6 +106,7 @@ private: struct button_info { float repeatcounter; + float repeatdelay; irr::EKEY_CODE keycode; std::vector ids; IGUIButton* guibutton; @@ -124,7 +126,8 @@ private: /* initialize a button */ void initButton(touch_gui_button_id id, rect button_rect, - std::wstring caption, bool immediate_release ); + std::wstring caption, bool immediate_release, + float repeat_delay = BUTTON_REPEAT_DELAY); /* load texture */ void loadButtonTexture(button_info* btn, const char* path); diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 56bf8a25a..112f09bb9 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -8,3 +8,4 @@ set(UTIL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/string.cpp ${CMAKE_CURRENT_SOURCE_DIR}/timetaker.cpp PARENT_SCOPE) + diff --git a/src/version.cpp b/src/version.cpp index ecfeb95f8..ed167cd24 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -20,27 +20,18 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "version.h" #include "config.h" -#ifdef __ANDROID__ +#if defined(__ANDROID__) #include "android_version.h" #elif defined(USE_CMAKE_CONFIG_H) #include "cmake_config_githash.h" #endif -#ifdef CMAKE_VERSION_GITHASH - #define VERSION_GITHASH CMAKE_VERSION_GITHASH -#else +#ifndef VERSION_GITHASH #define VERSION_GITHASH VERSION_STRING #endif -const char *minetest_version_simple = VERSION_STRING; -const char *minetest_version_hash = VERSION_GITHASH; -#ifdef USE_CMAKE_CONFIG_H -const char *minetest_build_info = - "VER=" VERSION_GITHASH " " CMAKE_BUILD_INFO; -#elif defined(ANDROID) -const char *minetest_build_info = "android jni"; -#else -const char *minetest_build_info = "non-cmake"; -#endif +const char *g_version_string = VERSION_STRING; +const char *g_version_hash = VERSION_GITHASH; +const char *g_build_info = "VER=" VERSION_GITHASH " " BUILD_INFO; diff --git a/src/version.h b/src/version.h index b23e770aa..0b803b82c 100644 --- a/src/version.h +++ b/src/version.h @@ -20,9 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef VERSION_HEADER #define VERSION_HEADER -extern const char *minetest_version_simple; -extern const char *minetest_version_hash; -extern const char *minetest_build_info; +extern const char *g_version_string; +extern const char *g_version_hash; +extern const char *g_build_info; #endif diff --git a/util/travis/before_install.sh b/util/travis/before_install.sh index a50d5f370..15f5da023 100755 --- a/util/travis/before_install.sh +++ b/util/travis/before_install.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -if [ $CC = "clang" ]; then +if [[ $CC == "clang" ]]; then export PATH="/usr/bin/:$PATH" sudo sh -c 'echo "deb http://ppa.launchpad.net/eudoxos/llvm-3.1/ubuntu precise main" >> /etc/apt/sources.list' sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-keys 92DE8183 @@ -9,24 +9,24 @@ if [ $CC = "clang" ]; then sudo apt-get install clang fi sudo apt-get install p7zip-full -if [ $WINDOWS = "no" ]; then +if [[ $PLATFORM == "Linux" ]]; then sudo apt-get install libirrlicht-dev cmake libbz2-dev libpng12-dev \ - libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libhiredis-dev \ - libogg-dev libvorbis-dev libopenal-dev gettext + libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \ + libhiredis-dev libogg-dev libvorbis-dev libopenal-dev gettext # Linking to LevelDB is broken, use a custom build wget http://sfan5.pf-control.de/libleveldb-1.18-ubuntu12.04.7z sudo 7z x -o/usr libleveldb-1.18-ubuntu12.04.7z -else - if [ $WINDOWS = "32" ]; then - wget http://sfan5.pf-control.de/mingw_w64_i686_ubuntu12.04_4.9.1.7z -O mingw.7z - sed -e "s|%PREFIX%|i686-w64-mingw32|" \ - -e "s|%ROOTPATH%|/usr/i686-w64-mingw32|" \ - < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw.cmake - elif [ $WINDOWS = "64" ]; then - wget http://sfan5.pf-control.de/mingw_w64_x86_64_ubuntu12.04_4.9.1.7z -O mingw.7z - sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \ - -e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \ - < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake - fi +elif [[ $PLATFORM == "Win32" ]]; then + wget http://sfan5.pf-control.de/mingw_w64_i686_ubuntu12.04_4.9.1.7z -O mingw.7z + sed -e "s|%PREFIX%|i686-w64-mingw32|" \ + -e "s|%ROOTPATH%|/usr/i686-w64-mingw32|" \ + < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw.cmake + sudo 7z x -y -o/usr mingw.7z +elif [[ $PLATFORM == "Win64" ]]; then + wget http://sfan5.pf-control.de/mingw_w64_x86_64_ubuntu12.04_4.9.1.7z -O mingw.7z + sed -e "s|%PREFIX%|x86_64-w64-mingw32|" \ + -e "s|%ROOTPATH%|/usr/x86_64-w64-mingw32|" \ + < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw64.cmake sudo 7z x -y -o/usr mingw.7z fi + diff --git a/util/travis/script.sh b/util/travis/script.sh index 35a62f16e..756cc1de8 100755 --- a/util/travis/script.sh +++ b/util/travis/script.sh @@ -1,16 +1,21 @@ #!/bin/bash -e -if [ $WINDOWS = "no" ]; then +if [[ $PLATFORM == "Linux" ]]; then mkdir -p travisbuild cd travisbuild - cmake -DENABLE_GETTEXT=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DCMAKE_BUILD_TYPE=Debug .. + CMAKE_FLAGS='-DCMAKE_BUILD_TYPE=Debug \ + -DRUN_IN_PLACE=TRUE \ + -DENABLE_GETTEXT=TRUE' + # Clang builds with FreeType fail on Travis + if [[ $CC == "clang" ]]; then + CMAKE_FLAGS+=' -DENABLE_FREETYPE=FALSE' + fi + cmake $CMAKE_FLAGS .. make -j2 - echo "Running unit tests for minetest" - ../bin/minetest --run-unittests - echo "Running unit tests for minetestserver" - ../bin/minetestserver --run-unittests -else - [ $CC = "clang" ] && exit 1 # Not supposed to happen + echo "Running unit tests." + ../bin/minetest --run-unittests && exit 0 +elif [[ $PLATFORM == Win* ]]; then + [[ $CC == "clang" ]] && exit 1 # Not supposed to happen # We need to have our build directory outside of the minetest directory because # CMake will otherwise get very very confused with symlinks and complain that # something is not a subdirectory of something even if it actually is. @@ -21,8 +26,17 @@ else # \/ \/ \/ # /home/travis/minetest/minetest/travisbuild/minetest/travisbuild/minetest/travisbuild/minetest # You get the idea. - OLDDIR=`pwd` + OLDDIR=$(pwd) cd .. - [ $WINDOWS = "32" ] && EXISTING_MINETEST_DIR=$OLDDIR NO_MINETEST_GAME=1 $OLDDIR/util/buildbot/buildwin32.sh travisbuild && exit 0 - [ $WINDOWS = "64" ] && EXISTING_MINETEST_DIR=$OLDDIR NO_MINETEST_GAME=1 $OLDDIR/util/buildbot/buildwin64.sh travisbuild && exit 0 + export EXISTING_MINETEST_DIR=$OLDDIR + export NO_MINETEST_GAME=1 + if [[ $PLATFORM == "Win32" ]]; then + $OLDDIR/util/buildbot/buildwin32.sh travisbuild && exit 0 + elif [[ $PLATFORM == "Win64" ]]; then + $OLDDIR/util/buildbot/buildwin64.sh travisbuild && exit 0 + fi +else + echo "Unknown platform \"${PLATFORM}\"." + exit 1 fi + diff --git a/util/travis/toolchain_mingw.cmake.in b/util/travis/toolchain_mingw.cmake.in index 44830eb60..65f67517e 100644 --- a/util/travis/toolchain_mingw.cmake.in +++ b/util/travis/toolchain_mingw.cmake.in @@ -1,17 +1,18 @@ -# name of the target operating system -SET(CMAKE_SYSTEM_NAME Windows) +# Target operating system name +set(CMAKE_SYSTEM_NAME Windows) -# which compilers to use for C and C++ -SET(CMAKE_C_COMPILER %PREFIX%-gcc) -SET(CMAKE_CXX_COMPILER %PREFIX%-g++) -SET(CMAKE_RC_COMPILER %PREFIX%-windres) +# Compilers to use +set(CMAKE_C_COMPILER %PREFIX%-gcc) +set(CMAKE_CXX_COMPILER %PREFIX%-g++) +set(CMAKE_RC_COMPILER %PREFIX%-windres) -# here is the target environment located -SET(CMAKE_FIND_ROOT_PATH %ROOTPATH%) +# Location of the target environment +set(CMAKE_FIND_ROOT_PATH %ROOTPATH%) -# adjust the default behaviour of the FIND_XXX() commands: -# search headers and libraries in the target environment, search -# programs in the host environment +# Adjust the default behaviour of the FIND_XXX() commands: +# search for headers and libraries in the target environment, +# search for programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +