mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
ddnet-libs submodule and some fixes
This commit is contained in:
parent
e3191bdda2
commit
41d9de997c
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "ddnet-libs"]
|
||||||
|
path = ddnet-libs
|
||||||
|
url = https://github.com/ddnet/ddnet-libs
|
|
@ -35,9 +35,9 @@ endif()
|
||||||
|
|
||||||
function(set_extra_dirs VARIABLE NAME)
|
function(set_extra_dirs VARIABLE NAME)
|
||||||
if(TARGET_BITS AND TARGET_OS)
|
if(TARGET_BITS AND TARGET_OS)
|
||||||
set("EXTRA_${VARIABLE}_LIBDIR" "other/${NAME}/${TARGET_OS}/lib${TARGET_BITS}" PARENT_SCOPE)
|
set("EXTRA_${VARIABLE}_LIBDIR" "ddnet-libs/${NAME}/${TARGET_OS}/lib${TARGET_BITS}" PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
set("EXTRA_${VARIABLE}_INCLUDEDIR" "other/${NAME}/include" PARENT_SCOPE)
|
set("EXTRA_${VARIABLE}_INCLUDEDIR" "ddnet-libs/${NAME}/include" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Check for PkgConfig once so all the other `find_package` calls can do it
|
# Check for PkgConfig once so all the other `find_package` calls can do it
|
||||||
|
|
|
@ -12,7 +12,7 @@ Building
|
||||||
|
|
||||||
To compile DDNet yourself, you can follow the [instructions for compiling Teeworlds](https://www.teeworlds.com/?page=docs&wiki=compiling_everything).
|
To compile DDNet yourself, you can follow the [instructions for compiling Teeworlds](https://www.teeworlds.com/?page=docs&wiki=compiling_everything).
|
||||||
|
|
||||||
DDNet requires additional libraries, that are bundled for the most common platforms (Windows, Mac, Linux, all x86 and x86_64). To get the bundled libraries you have to clone or download https://github.com/ddnet/ddnet-libs into this directory.
|
DDNet requires additional libraries, that are bundled for the most common platforms (Windows, Mac, Linux, all x86 and x86_64). The bundled libraries are now in the ddnet-libs submodule.
|
||||||
|
|
||||||
Instead you can install these libraries on your system, remove the `config.lua` and `bam` should use the system-wide libraries by default. You can install all required dependencies and bam on Debian and Ubuntu like this:
|
Instead you can install these libraries on your system, remove the `config.lua` and `bam` should use the system-wide libraries by default. You can install all required dependencies and bam on Debian and Ubuntu like this:
|
||||||
|
|
||||||
|
|
7
bam.lua
7
bam.lua
|
@ -142,16 +142,19 @@ server_sql_depends = {}
|
||||||
|
|
||||||
if family == "windows" then
|
if family == "windows" then
|
||||||
if platform == "win32" then
|
if platform == "win32" then
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/freetype/lib32/freetype-6.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/freetype/lib32/libfreetype-6.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/sdl/lib32/SDL2.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/sdl/lib32/SDL2.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/curl/windows/lib32/libcurl-4.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/curl/windows/lib32/libcurl-4.dll"))
|
||||||
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libwinpthread-1.dll"))
|
||||||
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libgcc_s_sjlj-1.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libogg-0.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libogg-0.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libopus-0.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libopus-0.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libopusfile-0.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libopusfile-0.dll"))
|
||||||
else
|
else
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/freetype/lib64/freetype-6.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/freetype/lib64/libfreetype-6.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/sdl/lib64/SDL2.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/sdl/lib64/SDL2.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/curl/windows/lib64/libcurl-4.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/curl/windows/lib64/libcurl-4.dll"))
|
||||||
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libwinpthread-1.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libogg-0.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libogg-0.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libopus-0.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libopus-0.dll"))
|
||||||
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libopusfile-0.dll"))
|
table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libopusfile-0.dll"))
|
||||||
|
|
|
@ -24,7 +24,7 @@ set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDEDIR})
|
||||||
|
|
||||||
string(FIND "${FREETYPE_LIBRARY}" "${PROJECT_SOURCE_DIR}" LOCAL_PATH_POS)
|
string(FIND "${FREETYPE_LIBRARY}" "${PROJECT_SOURCE_DIR}" LOCAL_PATH_POS)
|
||||||
if(LOCAL_PATH_POS EQUAL 0 AND TARGET_OS STREQUAL "windows")
|
if(LOCAL_PATH_POS EQUAL 0 AND TARGET_OS STREQUAL "windows")
|
||||||
set(FREETYPE_COPY_FILES "${EXTRA_FREETYPE_LIBDIR}/freetype.dll")
|
set(FREETYPE_COPY_FILES "${EXTRA_FREETYPE_LIBDIR}/libfreetype-6.dll")
|
||||||
else()
|
else()
|
||||||
set(FREETYPE_COPY_FILES)
|
set(FREETYPE_COPY_FILES)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -69,7 +69,10 @@ if include_data and not use_bundle:
|
||||||
if platform[:3] == "win":
|
if platform[:3] == "win":
|
||||||
shutil.copy("other/config_directory.bat", package_dir)
|
shutil.copy("other/config_directory.bat", package_dir)
|
||||||
shutil.copy("SDL2.dll", package_dir)
|
shutil.copy("SDL2.dll", package_dir)
|
||||||
shutil.copy("freetype-6.dll", package_dir)
|
shutil.copy("libfreetype-6.dll", package_dir)
|
||||||
|
if platform == "win32":
|
||||||
|
shutil.copy("libgcc_s_sjlj-1.dll", package_dir)
|
||||||
|
shutil.copy("libwinpthread-1.dll", package_dir)
|
||||||
shutil.copy("libogg-0.dll", package_dir)
|
shutil.copy("libogg-0.dll", package_dir)
|
||||||
shutil.copy("libopus-0.dll", package_dir)
|
shutil.copy("libopus-0.dll", package_dir)
|
||||||
shutil.copy("libopusfile-0.dll", package_dir)
|
shutil.copy("libopusfile-0.dll", package_dir)
|
||||||
|
|
Loading…
Reference in a new issue