dpkg --get-selections | grep curl
libcurl3
libcurl3:i386
libcurl3-gnutls
php5-curl
sudo apt-get install libcurl4-openssl-dev
cmake . -DENABLE-CURL=1 -DRUN_IN_PLACE=1
-- *** Will build version 0.4.6 ***
-- IRRLICHT_SOURCE_DIR =
-- IRRLICHT_INCLUDE_DIR = /usr/include/irrlicht
-- IRRLICHT_LIBRARY = /usr/lib/libIrrlicht.a
-- CURL_INCLUDE_DIR = /usr/include/curl
-- CURL_LIBRARY = /usr/lib/x86_64-linux-gnu/libcurl.so
-- cURL support enabled
port = 30000
name = globis
server_announce = true
server_name = globis server
server_description = A server with a lot of mods.
server_address = 94.23.33.108:30000
server_url = http://forum.minetest.net/viewtopic.php?pid=89696
liquid_finite = true
max_users = 20
enable_damage = false
default_privs = interact, shout, money, fly, noclip
unlimited_player_transfer_distance = false
enable_pvp = false
static_spawnpoint = 0,20,2500
disallow_empty_password = true
02:29:36: ACTION[ServerThread]: announcing to servers.minetest.net
Hybrid Dog wrote:Why?Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
CMake Warning:
Manually-specified variables were not used by the project:
ENABLE-CURL
error: patch failed: src/serverlist.cpp:259
error: src/serverlist.cpp: patch does not apply
void sendAnnounce(std::string action, u16 clients, double uptime, std::string gameid) {
Json::Value server;
if (action.size())
server["action"] = action;
server["port"] = g_settings->get("port");
if (action != "del") {
server["name"] = g_settings->get("server_name");
server["description"] = g_settings->get("server_description");
server["address"] = g_settings->get("server_address");
server["version"] = VERSION_STRING;
server["url"] = g_settings->get("server_url");
server["creative"] = g_settings->get("creative_mode");
server["damage"] = g_settings->get("enable_damage");
server["dedicated"] = g_settings->get("server_dedicated");
server["password"] = g_settings->getBool("disallow_empty_password");
server["pvp"] = g_settings->getBool("enable_pvp");
server["clients"] = clients;
server["clients_max"] = g_settings->get("max_users");
if (uptime >=1) server["uptime"] = (int)uptime;
if (gameid!="") server["gameid"] = gameid;
}
if(server["action"] == "start")
actionstream << "announcing to " << g_settings->get("serverlist_url") << std::endl;
Json::StyledWriter writer;
#if 0 // CURL IS BEING DUMB
CURL *curl;
curl = curl_easy_init();
if (curl)
{
CURLcode res;
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_URL, (g_settings->get("serverlist_url")+std::string("/announce?json=")+curl_easy_escape(curl, writer.write( server ).c_str(), 0)).c_str());
//curl_easy_setopt(curl, CURLOPT_USERAGENT, "minetest");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ServerList::ServerAnnounceCallback);
//curl_easy_setopt(curl, CURLOPT_WRITEDATA, &liststring);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 1);
res = curl_easy_perform(curl);
//if (res != CURLE_OK)
// errorstream<<"Serverlist at url "<<g_settings->get("serverlist_url")<<" not found (internet connection?)"<<std::endl;
curl_easy_cleanup(curl);
}
#else
CURL *curl;
curl = curl_easy_init();
system(("curl "+g_settings->get("serverlist_url")+std::string("/announce?json=")+curl_easy_escape(curl, writer.write( server ).c_str(), 0)).c_str());
curl_easy_cleanup(curl);
printf("\n");
#endif
minetest@ks368390:~/minetest-12-05-2013$ cmake . -DENABLE_CURL=1 -DRUN_IN_PLACE=1
CMake Warning at CMakeLists.txt:4 (message):
CMake/CPack version 2.8.2 will not create working .deb packages!
-- *** Will build version 0.4.6 ***
-- IRRLICHT_SOURCE_DIR =
-- IRRLICHT_INCLUDE_DIR = /usr/include/irrlicht
-- IRRLICHT_LIBRARY = /usr/lib/libIrrlicht.a
-- CURL_INCLUDE_DIR = /usr/include/curl
-- CURL_LIBRARY = /usr/lib/libcurl.so
-- cURL support enabled
-- GetText disabled
-- Sound enabled
-- Using project jthread library
-- Found system sqlite3 header file in /usr/include
-- Found system sqlite3 library /usr/lib/libsqlite3.so
-- Using project jsoncpp library
-- LuaJIT library: LUA_LIBRARY-NOTFOUND
-- LuaJIT headers: LUA_INCLUDE_DIR-NOTFOUND
-- LuaJIT not found, using bundled Lua.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/minetest/minetest-12-05-2013
minetest@ks368390:~/minetest-12-05-2013$ make -j2
[ 0%] Built target jsoncpp
[ 12%] [ 13%] Built target lua
Built target jthread
Scanning dependencies of target minetestserver
Scanning dependencies of target minetest
[ 13%] Building CXX object src/CMakeFiles/minetestserver.dir/serverlist.cpp.o
[ 13%] Building CXX object src/CMakeFiles/minetest.dir/serverlist.cpp.o
/home/minetest/minetest-12-05-2013/src/serverlist.cpp:231: warning: 'size_t ServerList::ServerAnnounceCallback(void*, size_t, size_t, void*)' defined but not used
/home/minetest/minetest-12-05-2013/src/serverlist.cpp:231: warning: 'size_t ServerList::ServerAnnounceCallback(void*, size_t, size_t, void*)' defined but not used
cc1plus: warning: unrecognized command line option "-Wno-unused-but-set-variable"
cc1plus: warning: unrecognized command line option "-Wno-unused-but-set-variable"
Linking CXX executable ../bin/minetestserver
Linking CXX executable ../bin/minetest
lua/build/liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x35): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
[ 49%] Built target minetestserver
lua/build/liblua.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x35): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
[100%] Built target minetest
$ minetest --server --port 30000 --worldname "Craftopoles BR" &
...
19:43:00: ACTION [main]: Server for gameid = "minetest" listening on port 30000.
creative inventory size: 242
19:43:00: ACTION [ServerThread]: announcing to servers.minetest.net
...
Users browsing this forum: No registered users and 4 guests