Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniTurtle committed Apr 6, 2024
1 parent d125c0d commit 33520e4
Show file tree
Hide file tree
Showing 54 changed files with 2,581 additions and 833 deletions.
28 changes: 19 additions & 9 deletions AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ AppDir:
id: district53
name: District53
icon: minetest
version: 3.0.2
exec: usr/local/bin/district53
version: 5.9.0.001
exec: usr/bin/District53
exec_args: $@
runtime:
env:
Expand All @@ -17,20 +17,24 @@ AppDir:
apt:
arch: amd64
sources:
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main universe
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-backports main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-security main universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main universe
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'


include:
- libc6
- libcurl3-gnutls
- libcurl4
- libfreetype6
- libgl1
- libjpeg-turbo8
- libjsoncpp1
- libleveldb1v5
- libleveldb1d
- libopenal1
- libpng16-16
- libsqlite3-0
Expand All @@ -41,6 +45,9 @@ AppDir:
- zlib1g
- libluajit-5.1-dev
- libssl-dev
- libmysqlclient-dev
- libfuse2
- libjsoncpp25

files:
exclude:
Expand All @@ -52,6 +59,9 @@ AppDir:

AppImage:
update-information: None
#sign-key: None
sign-key: 0236A9D6C1366CDA
sign-key: D85EFD1CF2B8800C88B6A2DEEA8DF9DC979031BE
arch: x86_64

script: |
cmake --install .
cp ../irrlicht./lib/Linux/libIrrlichtMt.so.1.9.0.15 AppDir/usr/lib/x86_64-linux-gnu/
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ add_subdirectory(lib/bip39/src)


set(IRRLICHTMT_BUILD_DIR "" CACHE PATH "Path to IrrlichtMt build directory.")

if(ANDROID)
# currently manually provided
elseif(NOT "${IRRLICHTMT_BUILD_DIR}" STREQUAL "")
Expand Down Expand Up @@ -432,3 +433,5 @@ if(BUILD_DOCUMENTATION)
)
endif()
endif()


23 changes: 18 additions & 5 deletions builtin/mainmenu/tab_local.lua
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,16 @@ local function get_formspec(tabview, name, tabdata)

-- Reset y so that the text fields always start at the same position,
-- regardless of whether some of the checkboxes are hidden.
y = 0.2 + 4 * yo + 0.35
y = 0.2 + 4 * yo

retval = retval .. "field[0," .. y .. ";4.5,0.75;te_playername;" .. fgettext("Name") .. ";" ..
core.formspec_escape(current_name) .. "]"

y = y + 1.15 + 0.25
y = y + 1.15

retval = retval .. "pwdfield[0," .. y .. ";4.5,0.75;te_passwd;" .. fgettext("Password") .. "]"

y = y + 1.15 + 0.25
y = y + 1.15

local bind_addr = core.settings:get("bind_address")
if bind_addr ~= nil and bind_addr ~= "" then
Expand Down Expand Up @@ -372,8 +372,21 @@ local function main_button_handler(this, fields, name, tabdata)
end

if core.settings:get_bool("enable_server") then
gamedata.playername = fields["te_playername"]
gamedata.password = fields["te_passwd"]
addresslistmgr.get_addresses()
local addressinfo = addresslistmgr.get_address(fields["te_playername"])

local sxpaddrvalidate = core.validate_sxp_password(addressinfo.encrypted_key, addressinfo.address, addressinfo.iv, fields.te_passwd)
if sxpaddrvalidate ~= 1 then
print("Invalid Password")
gamedata.errormessage = fgettext_ne("Invalid Password")
return true;
end

gamedata.playername = addressinfo.address
gamedata.aliasname = gamedata.playername
gamedata.encrypted_key = addressinfo.encrypted_key
gamedata.iv = addressinfo.iv
gamedata.password = fields.te_passwd
gamedata.port = fields["te_serverport"]
gamedata.address = ""

Expand Down
2 changes: 1 addition & 1 deletion client/addresslist/addresslist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"address":"SVHj6VUDdfAFpXpqxYt5rDT7uCxi8nHNnn","encrypted_key":"y9n/SjA887+g8IaTI1rSXe5pRYV6V7S+fbOYmAg1XfaP7ARWbP+2fQDN+zNhOuH+fi6Bj81BdTUqiQ8imLTC4KV/Cs2ybqpeCGOQi6ECZClbJVwJQdP1rGL2q7ZySh03UoySKz5ziuoetKN1zZu7lsWP0EDD6025Qr5FAeIkalfDs1wSmhuBskTtd6YzNaxlFjB4yiTnRbvlGEmEuZnKdg","iv":"AgmkNBozlIZvOL5J"}]
[{"address":"SZ1texxo4rwhLzm4zQEeMU4r7S8NkGAc81","encrypted_key":"tasCgyAkrqPWzekilfKxBfobpPPkgtiJrPlmKnZmI1Fh4M//FhB43Bg+p237uOOpq86SOoDNL3G0/vIlC0SeaRyvjlgNtAulvFMi5qxqK1NxxlAX50snDCmVwOehJCIkJvRJpXxI/WtDZGCV6VrtFulPnR7JeqCPSiNK4+mEAi12RDeu8NAbWCicQSB8iaOdWKNNa5ii7grHiAVZSmZ6mQ","iv":"2yivO5364kl0MSjJ"}]
22 changes: 22 additions & 0 deletions ignore.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,25 @@ x64
/build
/worlds/flowers
/worlds/minecloneworld
/debug.txt
/minetest.dmp
/lib/cpp-crypto/extern/arduinojson/ArduinoJson-prefix/src/ArduinoJson-stamp/Debug
/lib/cpp-crypto/extern/arduinojson/ArduinoJson-prefix/src/ArduinoJson-stamp/MinSizeRel
/lib/cpp-crypto/extern/arduinojson/ArduinoJson-prefix/src/ArduinoJson-stamp/Release
/lib/cpp-crypto/extern/arduinojson/ArduinoJson-prefix/src/ArduinoJson-stamp/RelWithDebInfo
/lib/cpp-crypto/extern/bcl/BCL-prefix/src/BCL-stamp/Debug
/lib/cpp-crypto/extern/bcl/BCL-prefix/src/BCL-stamp/MinSizeRel
/lib/cpp-crypto/extern/bcl/BCL-prefix/src/BCL-stamp/Release
/lib/cpp-crypto/extern/bcl/BCL-prefix/src/BCL-stamp/RelWithDebInfo
/lib/cpp-crypto/extern/bip66/BIP66-prefix/src/BIP66-stamp/Debug
/lib/cpp-crypto/extern/bip66/BIP66-prefix/src/BIP66-stamp/MinSizeRel
/lib/cpp-crypto/extern/bip66/BIP66-prefix/src/BIP66-stamp/Release
/lib/cpp-crypto/extern/bip66/BIP66-prefix/src/BIP66-stamp/RelWithDebInfo
/lib/cpp-crypto/extern/uecc/UECC-prefix/src/UECC-stamp/Debug
/lib/cpp-crypto/extern/uecc/UECC-prefix/src/UECC-stamp/MinSizeRel
/lib/cpp-crypto/extern/uecc/UECC-prefix/src/UECC-stamp/Release
/lib/cpp-crypto/extern/uecc/UECC-prefix/src/UECC-stamp/RelWithDebInfo
/games/capturetheflag
/worlds/ctf
/games/solarcraft_game
/worlds/world
4 changes: 2 additions & 2 deletions lib/bip39/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if (MSVC)
-DNOMINMAX
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
endif()

# clone submodules
Expand Down
4 changes: 2 additions & 2 deletions lib/cpp-crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ if (MSVC)
-DNOMINMAX)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
else()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g")
endif()
Expand Down
4 changes: 2 additions & 2 deletions lib/cpp-crypto/examples/cmake_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if (MSVC)
-DNOMINMAX
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
endif()

# clone submodules - Uncomment when used outside of the Ark cpp-crypto source tree
Expand Down
Binary file added minetest.dmp
Binary file not shown.
31 changes: 23 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
project(minetest)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

INCLUDE(CheckTypeSize)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
Expand Down Expand Up @@ -811,22 +809,22 @@ if(MSVC)
# Visual Studio
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _WIN32_WINNT=0x0601 /D WIN32_LEAN_AND_MEAN")
# EHa enables SEH exceptions (used for catching segfaults)
set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /MT /GS- /Zi /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0")
set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /MD /GS- /Zi /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0")
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /arch:SSE")
endif()

set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")

set(CMAKE_CXX_FLAGS_SEMIDEBUG "/MTd /Zi /Ob0 /O1 /RTC1")
set(CMAKE_CXX_FLAGS_SEMIDEBUG "/MDd /Zi /Ob0 /O1 /RTC1")

# Debug build doesn't catch exceptions by itself
# Add some optimizations because otherwise it's VERY slow
set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Zi /Ob0 /Od /RTC1")
set(CMAKE_CXX_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od /RTC1")

# Flags for C files (sqlite)
# /MD = dynamically link to MSVCRxxx.dll
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT")
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MD")

# Flags that cannot be shared between cl and clang-cl
# https://clang.llvm.org/docs/UsersManual.html#clang-cl
Expand Down Expand Up @@ -1027,6 +1025,23 @@ elseif (USE_GETTEXT)
add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES})
endif()

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "District53")

set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "District53")
if(ANDROID)
set(sysname Android)
elseif(APPLE)
set(sysname OSX)
elseif(MSVC)
set(sysname Win32-VisualStudio)
elseif(WIN32)
set(sysname Win32-gcc)
else()
set(sysname Linux)
endif()

if (WIN32)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${IRRLICHTMT_BUILD_DIR}/bin/${sysname}/$<CONFIGURATION>"
"$<TARGET_FILE_DIR:minetest>/")
endif()
3 changes: 3 additions & 0 deletions src/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,8 @@ set(client_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/shadows/shadowsshadercallbacks.cpp
${CMAKE_CURRENT_SOURCE_DIR}/shadows/shadowsScreenQuad.cpp
${CMAKE_CURRENT_SOURCE_DIR}/memoryManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mesh_buffer_handler.cpp
${CMAKE_CURRENT_SOURCE_DIR}/clientmap_norender.cpp
${CMAKE_CURRENT_SOURCE_DIR}/player_ai.cpp
PARENT_SCOPE
)
Loading

0 comments on commit 33520e4

Please sign in to comment.