mirror of
https://github.com/bdnugget/freeminer.git
synced 2026-11-07 06:57:27 +00:00
wip
This commit is contained in:
1 parent
5957c94025
commit
942c8d6c74
4 files changed
+21
-13
No files matched your search
@@ -62,6 +62,10 @@ if(ENABLE_LEVELDB)
|
||||
set(LEVELDB_BUILD_BENCHMARKS 0 CACHE INTERNAL "")
|
||||
set(LEVELDB_INSTALL 0 CACHE INTERNAL "")
|
||||
set(HAVE_CLANG_THREAD_SAFETY 0 CACHE INTERNAL "") # -Werror remove
|
||||
if(EMSCRIPTEN) # BUG?
|
||||
include_directories(${ZSTD_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/leveldb)
|
||||
set(LEVELDB_LIBRARY leveldb)
|
||||
message(STATUS "Using bundled leveldb ${LEVELDB_INCLUDE_DIR} ${LEVELDB_LIBRARY}")
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
# == freeminer:
|
||||
OPTION(ENABLE_SCTP "Enable SCTP networking (EXPERIMENTAL)" 0)
|
||||
OPTION(USE_MULTI "Enable MT+ENET+WSS networking" 1)
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
|
||||
OPTION(ENABLE_SCTP "Enable SCTP networking (EXPERIMENTAL)" 0)
|
||||
OPTION(USE_MULTI "Enable MT+ENET+WSS networking" 1)
|
||||
endif()
|
||||
|
||||
if(USE_MULTI)
|
||||
#set(ENABLE_SCTP 1 CACHE BOOL "") # Maybe bugs
|
||||
set(ENABLE_ENET 1 CACHE BOOL "")
|
||||
|
||||
+1
-1
@@ -496,7 +496,7 @@ mt_SHA256_Update(mt_SHA256_CTX *c, const void *data_, size_t len)
|
||||
LCRYPTO_ALIAS(SHA256_Update);
|
||||
|
||||
void
|
||||
SHA256_Transform(mt_SHA256_CTX *c, const unsigned char *data)
|
||||
mt_SHA256_Transform(mt_SHA256_CTX *c, const unsigned char *data)
|
||||
{
|
||||
sha256_block_data_order(c, data, 1);
|
||||
}
|
||||
|
||||
+11
-10
@@ -473,8 +473,8 @@ $commands = {
|
||||
sy qq{rm -rf $config->{world} } if $config->{world_clear} and $config->{world};
|
||||
$config->{pid_file} = $config->{pid_path} . ($options->{pass}{name} || 'freeminer') . '.pid';
|
||||
return
|
||||
sytee $config->{runner},
|
||||
$commands->{env}(),
|
||||
sytee $commands->{env}(),
|
||||
$config->{runner},
|
||||
qq{@_},
|
||||
$commands->{executable}(),
|
||||
qq{$config->{go} --logfile $config->{logdir}/autotest.$g->{task_name}.game.log},
|
||||
@@ -483,8 +483,8 @@ $commands = {
|
||||
0;
|
||||
},
|
||||
run_test => sub {
|
||||
sy $config->{runner},
|
||||
$commands->{env}(),
|
||||
sy $commands->{env}(),
|
||||
$config->{runner},
|
||||
qq{@_},
|
||||
$commands->{executable}(),
|
||||
qq{--run-unittests --logfile $config->{logdir}/autotest.$g->{task_name}.test.log},
|
||||
@@ -493,13 +493,14 @@ $commands = {
|
||||
set_bot => {'----bot' => 1, '----bot_random' => 1,},
|
||||
run_bot => ['set_bot', 'set_client', 'run_single'],
|
||||
valgrind => sub {
|
||||
local $config->{runner} = $config->{runner} . " valgrind @_";
|
||||
commands_run($config->{run_task});
|
||||
$g->{keep_config} = 1;
|
||||
$config->{runner} = $config->{runner} . " valgrind @_";
|
||||
0;
|
||||
},
|
||||
run_server_simple => sub {
|
||||
my $fork = $config->{server_bg} ? '&' : '';
|
||||
$commands->{world_name}();
|
||||
sytee $config->{runner}, $commands->{env}(), qq{@_}, $commands->{executable}(), qq{--server},
|
||||
sytee $commands->{env}(), $config->{runner}, qq{@_}, $commands->{executable}(), qq{--server},
|
||||
options_make($options->{pass}{config} ? () : [qw(gameid world worldname port config autoexit verbose)]),
|
||||
$fork,
|
||||
qq{$config->{logdir}/autotest.$g->{task_name}.server.out.log};
|
||||
@@ -507,8 +508,8 @@ $commands = {
|
||||
run_server => sub {
|
||||
$commands->{world_name}();
|
||||
my $cmd = join ' ',
|
||||
$config->{runner},
|
||||
$commands->{env}(),
|
||||
$config->{runner},
|
||||
qq{@_},
|
||||
$commands->{executable}(),
|
||||
($config->{executable_name} eq 'freeminer' ? qq{--server} : ()),
|
||||
@@ -530,8 +531,8 @@ $commands = {
|
||||
for ($config->{clients_start} .. $config->{clients_num}) {
|
||||
Time::HiRes::sleep($config->{clients_spawn_sleep} // 0.2);
|
||||
sf
|
||||
$config->{runner},
|
||||
$commands->{env}(),
|
||||
$config->{runner},
|
||||
qq{@_},
|
||||
$commands->{executable}(),
|
||||
qq{--name $config->{name}$_ --go --autoexit $autoexit --logfile $config->{logdir}/autotest.$g->{task_name}.game.log},
|
||||
@@ -648,7 +649,7 @@ our $tasks = {
|
||||
(
|
||||
map {
|
||||
'valgrind_' . $_ => [
|
||||
'debug', 'build',
|
||||
#'debug', 'build',
|
||||
['valgrind', '--tool=' . $_],
|
||||
],
|
||||
} @{$config->{valgrind_tools}}
|
||||
|
||||
Reference in new issue
Block a user