From c53f39c43426d3bcbbf0425fbee95e6bcb36b8d4 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 21 Jul 2017 23:43:01 +0200 Subject: [PATCH] Let's try the nicer dll names on windows --- bam.lua | 28 ++++++++++++++-------------- cmake/FindCurl.cmake | 2 +- cmake/FindFreetype.cmake | 2 +- cmake/FindOpusfile.cmake | 6 +++--- ddnet-libs | 2 +- other/freetype.lua | 6 +++--- other/mysql.lua | 2 ++ other/sdl.lua | 4 ++-- scripts/make_release.py | 10 +++++----- 9 files changed, 32 insertions(+), 30 deletions(-) diff --git a/bam.lua b/bam.lua index 4b7636faa..8239d7e35 100644 --- a/bam.lua +++ b/bam.lua @@ -142,25 +142,25 @@ server_sql_depends = {} if family == "windows" then if platform == "win32" then - 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/curl/windows/lib32/libcurl-4.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/freetype/windows/lib32/libfreetype.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/sdl/windows/lib32/SDL2.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/curl/windows/lib32/libcurl.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/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/libogg.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libopus.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib32/libopusfile.dll")) else - 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/curl/windows/lib64/libcurl-4.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/freetype/windows/lib64/libfreetype.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/sdl/windows/lib64/SDL2.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/curl/windows/lib64/libcurl.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/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/libogg.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libopus.dll")) + table.insert(client_depends, CopyToDirectory(".", "ddnet-libs/opus/windows/lib64/libopusfile.dll")) end - table.insert(server_sql_depends, CopyToDirectory(".", "ddnet-libs/mysql/vc2005libs/mysqlcppconn.dll")) - table.insert(server_sql_depends, CopyToDirectory(".", "ddnet-libs/mysql/vc2005libs/libmysql.dll")) + table.insert(server_sql_depends, CopyToDirectory(".", "ddnet-libs/mysql/windows/mysqlcppconn.dll")) + table.insert(server_sql_depends, CopyToDirectory(".", "ddnet-libs/mysql/windows/libmysql.dll")) if config.compiler.driver == "cl" then client_link_other = {ResCompile("other/icons/DDNet_cl.rc")} diff --git a/cmake/FindCurl.cmake b/cmake/FindCurl.cmake index 4b120aaad..c6d72ef31 100644 --- a/cmake/FindCurl.cmake +++ b/cmake/FindCurl.cmake @@ -23,7 +23,7 @@ set(CURL_INCLUDE_DIRS ${CURL_INCLUDEDIR}) string(FIND "${CURL_LIBRARY}" "${PROJECT_SOURCE_DIR}" LOCAL_PATH_POS) if(LOCAL_PATH_POS EQUAL 0 AND TARGET_OS STREQUAL "windows") set(CURL_COPY_FILES - "${EXTRA_CURL_LIBDIR}/libcurl-4.dll" + "${EXTRA_CURL_LIBDIR}/libcurl.dll" ) else() set(CURL_COPY_FILES) diff --git a/cmake/FindFreetype.cmake b/cmake/FindFreetype.cmake index f779f13d4..6e6aa9e60 100644 --- a/cmake/FindFreetype.cmake +++ b/cmake/FindFreetype.cmake @@ -24,7 +24,7 @@ set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDEDIR}) string(FIND "${FREETYPE_LIBRARY}" "${PROJECT_SOURCE_DIR}" LOCAL_PATH_POS) if(LOCAL_PATH_POS EQUAL 0 AND TARGET_OS STREQUAL "windows") - set(FREETYPE_COPY_FILES "${EXTRA_FREETYPE_LIBDIR}/libfreetype-6.dll") + set(FREETYPE_COPY_FILES "${EXTRA_FREETYPE_LIBDIR}/libfreetype.dll") else() set(FREETYPE_COPY_FILES) endif() diff --git a/cmake/FindOpusfile.cmake b/cmake/FindOpusfile.cmake index 44798c1a4..c9fb5f87a 100644 --- a/cmake/FindOpusfile.cmake +++ b/cmake/FindOpusfile.cmake @@ -24,9 +24,9 @@ set(OPUSFILE_INCLUDE_DIRS ${OPUSFILE_INCLUDEDIR}) string(FIND "${OPUSFILE_LIBRARY}" "${PROJECT_SOURCE_DIR}" LOCAL_PATH_POS) if(LOCAL_PATH_POS EQUAL 0 AND TARGET_OS STREQUAL "windows") set(OPUSFILE_COPY_FILES - "${EXTRA_OPUSFILE_LIBDIR}/libogg-0.dll" - "${EXTRA_OPUSFILE_LIBDIR}/libopus-0.dll" - "${EXTRA_OPUSFILE_LIBDIR}/libopusfile-0.dll" + "${EXTRA_OPUSFILE_LIBDIR}/libogg.dll" + "${EXTRA_OPUSFILE_LIBDIR}/libopus.dll" + "${EXTRA_OPUSFILE_LIBDIR}/libopusfile.dll" "${EXTRA_OPUSFILE_LIBDIR}/libwinpthread-1.dll" ) if (TARGET_BITS EQUAL 32) diff --git a/ddnet-libs b/ddnet-libs index e2e4953af..8135082b8 160000 --- a/ddnet-libs +++ b/ddnet-libs @@ -1 +1 @@ -Subproject commit e2e4953afd0d1f903693cd2a6977b8425b57b1e4 +Subproject commit 8135082b8ea3ad911abcda39ef21bed1da77c62c diff --git a/other/freetype.lua b/other/freetype.lua index 95fedbd75..5a5a8994f 100644 --- a/other/freetype.lua +++ b/other/freetype.lua @@ -30,11 +30,11 @@ FreeType = { elseif option.use_winlib > 0 then if option.use_winlib == 32 then - settings.link.libpath:Add("ddnet-libs/freetype/lib32") + settings.link.libpath:Add("ddnet-libs/freetype/windows/lib32") else - settings.link.libpath:Add("ddnet-libs/freetype/lib64") + settings.link.libpath:Add("ddnet-libs/freetype/windows/lib64") end - settings.link.libs:Add("freetype-6") + settings.link.libs:Add("freetype") end end diff --git a/other/mysql.lua b/other/mysql.lua index 426f1e36c..40bd79449 100644 --- a/other/mysql.lua +++ b/other/mysql.lua @@ -67,6 +67,8 @@ Mysql = { elseif platform == "linux" then settings.link.libpath:Add("ddnet-libs/mysql/linux/lib64") settings.link.libpath:Add("ddnet-libs/mysql/linux/lib32") + elseif platform == "windows" then + settings.link.libpath:Add("ddnet-libs/mysql/windows") end end end diff --git a/other/sdl.lua b/other/sdl.lua index a418542eb..86ce3065d 100644 --- a/other/sdl.lua +++ b/other/sdl.lua @@ -41,9 +41,9 @@ SDL = { if option.use_winlib > 0 then settings.cc.includes:Add("ddnet-libs/sdl/include") if option.use_winlib == 32 then - settings.link.libpath:Add("ddnet-libs/sdl/lib32") + settings.link.libpath:Add("ddnet-libs/sdl/windows/lib32") else - settings.link.libpath:Add("ddnet-libs/sdl/lib64") + settings.link.libpath:Add("ddnet-libs/sdl/windows/lib64") end settings.link.libs:Add("SDL2") settings.link.libs:Add("SDL2main") diff --git a/scripts/make_release.py b/scripts/make_release.py index 3ba487ff5..f81037c0e 100644 --- a/scripts/make_release.py +++ b/scripts/make_release.py @@ -69,14 +69,14 @@ if include_data and not use_bundle: if platform[:3] == "win": shutil.copy("other/config_directory.bat", package_dir) shutil.copy("SDL2.dll", package_dir) - shutil.copy("libfreetype-6.dll", package_dir) + shutil.copy("libfreetype.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("libopus-0.dll", package_dir) - shutil.copy("libopusfile-0.dll", package_dir) - shutil.copy("libcurl-4.dll", package_dir) + shutil.copy("libogg.dll", package_dir) + shutil.copy("libopus.dll", package_dir) + shutil.copy("libopusfile.dll", package_dir) + shutil.copy("libcurl.dll", package_dir) if include_exe and not use_bundle: shutil.copy(name+exe_ext, package_dir)