From 757710e888900332becb4eb421a483f62e5d2415 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 15 Jan 2023 19:13:33 +0100 Subject: [PATCH] move libspeex with other DLLs - also to libspeex-1.dll for consistency with other autoconf DLLs --- .gitignore | 4 -- Makefile | 5 +-- cli/Makefile | 2 +- cli/vgmstream_cli.vcxproj | 4 +- cmake/vgmstream.cmake | 4 +- ext_libs/CMakeLists.txt | 16 ++++---- ext_libs/Makefile | 6 +-- ext_libs/ext_libs.vcxproj | 6 +-- .../{libspeex/libspeex.def => libspeex-1.def} | 2 +- .../{libspeex/libspeex.dll => libspeex-1.dll} | Bin ext_libs/libspeex/COPYING | 35 ------------------ fb2k/foo_input_vgmstream.vcxproj | 4 +- msvc-build.ps1 | 2 - src/libvgmstream.vcxproj | 1 - src/libvgmstream.vcxproj.filters | 3 -- winamp/in_vgmstream.vcxproj | 4 +- xmplay/xmp-vgmstream.vcxproj | 4 +- 17 files changed, 28 insertions(+), 74 deletions(-) rename ext_libs/{libspeex/libspeex.def => libspeex-1.def} (98%) rename ext_libs/{libspeex/libspeex.dll => libspeex-1.dll} (100%) delete mode 100644 ext_libs/libspeex/COPYING diff --git a/.gitignore b/.gitignore index 6e29d6ec..ddc094de 100644 --- a/.gitignore +++ b/.gitignore @@ -30,10 +30,6 @@ Release /ext_libs/Release /ext_libs/*.exp /ext_libs/*.lib -/ext_libs/libspeex/Debug -/ext_libs/libspeex/Release -/ext_libs/libspeex/*.exp -/ext_libs/libspeex/*.lib /ext_libs/Getopt/Debug /ext_libs/Getopt/Release /fb2k/Debug diff --git a/Makefile b/Makefile index a6f4ce55..29ad1c3c 100644 --- a/Makefile +++ b/Makefile @@ -143,8 +143,8 @@ ifeq ($(TARGET_OS),Windows_NT) VGM_SPEEX = 1 ifneq ($(VGM_SPEEX),0) LIBS_CFLAGS += -DVGM_USE_SPEEX - LIBS_LDFLAGS += -L../ext_libs/libspeex -lspeex - LIBS_TARGET_EXT_LIBS += libspeex/libspeex.a + LIBS_LDFLAGS += -lspeex-1 + LIBS_TARGET_EXT_LIBS += libspeex-1.a endif else @@ -217,7 +217,6 @@ ifeq ($(TARGET_OS),Windows_NT) ZIP_FILES += winamp/in_vgmstream.dll ZIP_FILES += xmplay/xmp-vgmstream.dll ZIP_FILES += ext_libs/*.dll - ZIP_FILES += ext_libs/libspeex/*.dll ZIP_FILES_AO = cli/vgmstream123.exe ZIP_FILES_AO += $(LIBAO_DLL_PATH)/*.dll else diff --git a/cli/Makefile b/cli/Makefile index ac2a2b76..64633dd4 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -58,6 +58,6 @@ $(TARGET_EXT_LIBS): $(MAKE) -C ../ext_libs $@ clean: - $(RMF) $(OUTPUT_CLI) + $(RMF) $(OUTPUT_CLI) $(OUTPUT_123) .PHONY: clean vgmstream_cli libvgmstream.a $(TARGET_EXT_LIBS) diff --git a/cli/vgmstream_cli.vcxproj b/cli/vgmstream_cli.vcxproj index 41236e8a..b42e04c4 100644 --- a/cli/vgmstream_cli.vcxproj +++ b/cli/vgmstream_cli.vcxproj @@ -80,7 +80,7 @@ EditAndContinue - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/jansson.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/jansson.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) Console true MachineX86 @@ -104,7 +104,7 @@ Fast - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/jansson.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/jansson.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) Console true true diff --git a/cmake/vgmstream.cmake b/cmake/vgmstream.cmake index 426ee52d..dd5fe178 100644 --- a/cmake/vgmstream.cmake +++ b/cmake/vgmstream.cmake @@ -128,7 +128,7 @@ macro(setup_target TARGET) target_compile_definitions(${TARGET} PRIVATE VGM_USE_SPEEX) if(WIN32 AND LINK) add_dependencies(${TARGET} libspeex) - target_link_libraries(${TARGET} ${VGM_BINARY_DIR}/ext_libs/libspeex/libspeex.lib) + target_link_libraries(${TARGET} ${VGM_BINARY_DIR}/ext_libs/libspeex-1.lib) endif() if(NOT WIN32 AND LINK) target_link_libraries(${TARGET} speex m) @@ -151,7 +151,7 @@ macro(install_dlls INSTALL_PREFIX) set(CELT_DLL ${VGM_SOURCE_DIR}/ext_libs/libcelt-0061.dll ${VGM_SOURCE_DIR}/ext_libs/libcelt-0110.dll) - set(SPEEX_DLL ${VGM_SOURCE_DIR}/ext_libs/libspeex/libspeex.dll) + set(SPEEX_DLL ${VGM_SOURCE_DIR}/ext_libs/libspeex-1.dll) # List of DLLs to check for install set(DLLS diff --git a/ext_libs/CMakeLists.txt b/ext_libs/CMakeLists.txt index d79947e8..2cea2eac 100644 --- a/ext_libs/CMakeLists.txt +++ b/ext_libs/CMakeLists.txt @@ -103,13 +103,13 @@ if(MSVC) endif() if(USE_SPEEX) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.lib ${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.exp + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.lib ${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.exp COMMAND lib - ARGS /def:${CMAKE_CURRENT_SOURCE_DIR}/libspeex/libspeex.def /machine:x86 /out:${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.lib - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libspeex/libspeex.def) + ARGS /def:${CMAKE_CURRENT_SOURCE_DIR}/libspeex-1.def /machine:x86 /out:${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.lib + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libspeex-1.def) file(GLOB SPEEX_HEADERS "${VGM_SOURCE_DIR}/ext_includes/speex/*.h") add_custom_target(libspeex - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.lib + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.lib SOURCES ${SPEEX_HEADERS}) endif() elseif(MINGW) @@ -194,11 +194,11 @@ elseif(MINGW) endif() if(USE_SPEEX) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.lib + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.lib COMMAND ${DLLTOOL} - ARGS -d ${CMAKE_CURRENT_SOURCE_DIR}/libspeex/libspeex.def -l ${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.lib - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libspeex/libspeex.def) + ARGS -d ${CMAKE_CURRENT_SOURCE_DIR}/libspeex-1.def -l ${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.lib + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libspeex-1.def) add_custom_target(libspeex - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libspeex/libspeex.lib) + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libspeex-1.lib) endif() endif() diff --git a/ext_libs/Makefile b/ext_libs/Makefile index 40e2541e..b488db09 100644 --- a/ext_libs/Makefile +++ b/ext_libs/Makefile @@ -38,10 +38,10 @@ libcelt-0061.a: libcelt-0061.dll libcelt-0061.def libcelt-0110.a: libcelt-0110.dll libcelt-0110.def $(DLLTOOL) -D libcelt-0110.dll -d libcelt-0110.def -l libcelt-0110.a -libspeex/libspeex.a: libspeex/libspeex.dll libspeex/libspeex.def - $(DLLTOOL) -D libspeex.dll -d libspeex/libspeex.def -l libspeex/libspeex.a +libspeex-1.a: libspeex-1.dll libspeex-1.def + $(DLLTOOL) -D libspeex-1.dll -d libspeex-1.def -l libspeex-1.a clean: - $(RMF) libvorbis.a libmpg123-0.a libg719_decode.a libavcodec.a libavformat.a libavutil.a libswresample.a libatrac9.a libcelt-0061.a libcelt-0110.a libspeex/libspeex.a + $(RMF) libvorbis.a libmpg123-0.a libg719_decode.a libavcodec.a libavformat.a libavutil.a libswresample.a libatrac9.a libcelt-0061.a libcelt-0110.a libspeex-1.a .PHONY: clean diff --git a/ext_libs/ext_libs.vcxproj b/ext_libs/ext_libs.vcxproj index 372e025e..1bd1de4e 100644 --- a/ext_libs/ext_libs.vcxproj +++ b/ext_libs/ext_libs.vcxproj @@ -103,10 +103,10 @@ lib /def:libcelt-0110.def /machine:x86 /out:libcelt-0110.lib libcelt-0110.lib;libcelt-0110.exp;%(Outputs) - + Building library stub - lib /def:libspeex/libspeex.def /machine:x86 /out:libspeex/libspeex.lib - libspeex/libspeex.lib;libspeex/libspeex.exp;%(Outputs) + lib /def:libspeex-1.def /machine:x86 /out:libspeex-1.lib + libspeex-1.lib;libspeex-1.exp;%(Outputs) Building library stub diff --git a/ext_libs/libspeex/libspeex.def b/ext_libs/libspeex-1.def similarity index 98% rename from ext_libs/libspeex/libspeex.def rename to ext_libs/libspeex-1.def index 8d5d984f..3d62cda1 100644 --- a/ext_libs/libspeex/libspeex.def +++ b/ext_libs/libspeex-1.def @@ -1,4 +1,4 @@ -LIBRARY libspeex.dll +LIBRARY libspeex-1.dll EXPORTS diff --git a/ext_libs/libspeex/libspeex.dll b/ext_libs/libspeex-1.dll similarity index 100% rename from ext_libs/libspeex/libspeex.dll rename to ext_libs/libspeex-1.dll diff --git a/ext_libs/libspeex/COPYING b/ext_libs/libspeex/COPYING deleted file mode 100644 index de6fbe2c..00000000 --- a/ext_libs/libspeex/COPYING +++ /dev/null @@ -1,35 +0,0 @@ -Copyright 2002-2008 Xiph.org Foundation -Copyright 2002-2008 Jean-Marc Valin -Copyright 2005-2007 Analog Devices Inc. -Copyright 2005-2008 Commonwealth Scientific and Industrial Research - Organisation (CSIRO) -Copyright 1993, 2002, 2006 David Rowe -Copyright 2003 EpicGames -Copyright 1992-1994 Jutta Degener, Carsten Bormann - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -- Neither the name of the Xiph.org Foundation nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/fb2k/foo_input_vgmstream.vcxproj b/fb2k/foo_input_vgmstream.vcxproj index c2af9630..d2d8aa06 100644 --- a/fb2k/foo_input_vgmstream.vcxproj +++ b/fb2k/foo_input_vgmstream.vcxproj @@ -81,7 +81,7 @@ /d2notypeopt %(AdditionalOptions) - $(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + $(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) true libcmt.lib;msvcrt.lib;libcmtd.lib @@ -106,7 +106,7 @@ /d2notypeopt - $(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + $(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) true true true diff --git a/msvc-build.ps1 b/msvc-build.ps1 index 80ec1473..3b1bd6d6 100644 --- a/msvc-build.ps1 +++ b/msvc-build.ps1 @@ -190,7 +190,6 @@ function Clean $fb2kFiles = @( "ext_libs/*.dll", - "ext_libs/libspeex/*.dll", "$configuration/foo_input_vgmstream.dll", "README.md" "doc/USAGE.md" @@ -198,7 +197,6 @@ $fb2kFiles = @( $cliFiles = @( "ext_libs/*.dll", - "ext_libs/libspeex/*.dll", "$configuration/in_vgmstream.dll", "$configuration/vgmstream-cli.exe", "$configuration/xmp-vgmstream.dll", diff --git a/src/libvgmstream.vcxproj b/src/libvgmstream.vcxproj index cce19dba..03d7c793 100644 --- a/src/libvgmstream.vcxproj +++ b/src/libvgmstream.vcxproj @@ -181,7 +181,6 @@ - diff --git a/src/libvgmstream.vcxproj.filters b/src/libvgmstream.vcxproj.filters index c211f3c3..13910b3c 100644 --- a/src/libvgmstream.vcxproj.filters +++ b/src/libvgmstream.vcxproj.filters @@ -1819,9 +1819,6 @@ meta\Source Files - - coding\Source Files - coding\Source Files diff --git a/winamp/in_vgmstream.vcxproj b/winamp/in_vgmstream.vcxproj index aab5013c..1ea5c3f1 100644 --- a/winamp/in_vgmstream.vcxproj +++ b/winamp/in_vgmstream.vcxproj @@ -79,7 +79,7 @@ EditAndContinue - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) true Windows false @@ -105,7 +105,7 @@ Fast - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) true true true diff --git a/xmplay/xmp-vgmstream.vcxproj b/xmplay/xmp-vgmstream.vcxproj index e77ac9d2..1c8c7e7c 100644 --- a/xmplay/xmp-vgmstream.vcxproj +++ b/xmplay/xmp-vgmstream.vcxproj @@ -68,7 +68,7 @@ EditAndContinue - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) true MachineX86 Windows @@ -94,7 +94,7 @@ true - ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex/libspeex.lib;%(AdditionalDependencies) + ../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;../ext_libs/libspeex-1.lib;%(AdditionalDependencies) true true true