From 872f5c677df48b4cd46931ba3a40b0e2573a2c07 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 30 Mar 2024 20:05:17 +1000 Subject: [PATCH] 3rdparty: Remove xz Had a backdoor. Best to not trust it. --- .gitmodules | 3 - 3rdparty/xz/CMakeLists.txt | 160 ------------------------------ 3rdparty/xz/config.h | 148 ---------------------------- 3rdparty/xz/liblzma.vcxproj | 191 ------------------------------------ 3rdparty/xz/xz | 1 - PCSX2_qt.sln | 27 ----- cmake/SearchForStuff.cmake | 3 - 7 files changed, 533 deletions(-) delete mode 100644 3rdparty/xz/CMakeLists.txt delete mode 100644 3rdparty/xz/config.h delete mode 100644 3rdparty/xz/liblzma.vcxproj delete mode 160000 3rdparty/xz/xz diff --git a/.gitmodules b/.gitmodules index cb02164c45..6d6c0ed41f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -24,9 +24,6 @@ [submodule "3rdparty/libwebp/libwebp"] path = 3rdparty/libwebp/libwebp url = https://github.com/webmproject/libwebp -[submodule "3rdparty/xz/xz"] - path = 3rdparty/xz/xz - url = https://github.com/tukaani-project/xz.git [submodule "3rdparty/lz4/lz4"] path = 3rdparty/lz4/lz4 url = https://github.com/lz4/lz4 diff --git a/3rdparty/xz/CMakeLists.txt b/3rdparty/xz/CMakeLists.txt deleted file mode 100644 index d5303b725c..0000000000 --- a/3rdparty/xz/CMakeLists.txt +++ /dev/null @@ -1,160 +0,0 @@ -add_library(xz-lzma - xz/src/common/tuklib_cpucores.c - xz/src/common/tuklib_physmem.c - xz/src/liblzma/check/check.c - xz/src/liblzma/check/crc32_fast.c - xz/src/liblzma/check/crc32_table.c - xz/src/liblzma/check/crc64_fast.c - xz/src/liblzma/check/crc64_table.c - xz/src/liblzma/check/sha256.c - xz/src/liblzma/common/alone_decoder.c - xz/src/liblzma/common/alone_encoder.c - xz/src/liblzma/common/auto_decoder.c - xz/src/liblzma/common/block_buffer_decoder.c - xz/src/liblzma/common/block_buffer_encoder.c - xz/src/liblzma/common/block_decoder.c - xz/src/liblzma/common/block_encoder.c - xz/src/liblzma/common/block_header_decoder.c - xz/src/liblzma/common/block_header_encoder.c - xz/src/liblzma/common/block_util.c - xz/src/liblzma/common/common.c - xz/src/liblzma/common/easy_buffer_encoder.c - xz/src/liblzma/common/easy_decoder_memusage.c - xz/src/liblzma/common/easy_encoder.c - xz/src/liblzma/common/easy_encoder_memusage.c - xz/src/liblzma/common/easy_preset.c - xz/src/liblzma/common/filter_buffer_decoder.c - xz/src/liblzma/common/filter_buffer_encoder.c - xz/src/liblzma/common/filter_common.c - xz/src/liblzma/common/filter_decoder.c - xz/src/liblzma/common/filter_encoder.c - xz/src/liblzma/common/filter_flags_decoder.c - xz/src/liblzma/common/filter_flags_encoder.c - xz/src/liblzma/common/hardware_cputhreads.c - xz/src/liblzma/common/hardware_physmem.c - xz/src/liblzma/common/index.c - xz/src/liblzma/common/index_decoder.c - xz/src/liblzma/common/index_encoder.c - xz/src/liblzma/common/index_hash.c - xz/src/liblzma/common/outqueue.c - xz/src/liblzma/common/stream_buffer_decoder.c - xz/src/liblzma/common/stream_buffer_encoder.c - xz/src/liblzma/common/stream_decoder.c - xz/src/liblzma/common/stream_encoder.c - xz/src/liblzma/common/stream_encoder_mt.c - xz/src/liblzma/common/stream_flags_common.c - xz/src/liblzma/common/stream_flags_decoder.c - xz/src/liblzma/common/stream_flags_encoder.c - xz/src/liblzma/common/vli_decoder.c - xz/src/liblzma/common/vli_encoder.c - xz/src/liblzma/common/vli_size.c - xz/src/liblzma/delta/delta_common.c - xz/src/liblzma/delta/delta_decoder.c - xz/src/liblzma/delta/delta_encoder.c - xz/src/liblzma/lzma/fastpos_table.c - xz/src/liblzma/lzma/lzma2_decoder.c - xz/src/liblzma/lzma/lzma2_encoder.c - xz/src/liblzma/lzma/lzma_decoder.c - xz/src/liblzma/lzma/lzma_encoder.c - xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c - xz/src/liblzma/lzma/lzma_encoder_optimum_normal.c - xz/src/liblzma/lzma/lzma_encoder_presets.c - xz/src/liblzma/lz/lz_decoder.c - xz/src/liblzma/lz/lz_encoder.c - xz/src/liblzma/lz/lz_encoder_mf.c - xz/src/liblzma/rangecoder/price_table.c - xz/src/liblzma/simple/arm.c - xz/src/liblzma/simple/armthumb.c - xz/src/liblzma/simple/ia64.c - xz/src/liblzma/simple/powerpc.c - xz/src/liblzma/simple/simple_coder.c - xz/src/liblzma/simple/simple_decoder.c - xz/src/liblzma/simple/simple_encoder.c - xz/src/liblzma/simple/sparc.c - xz/src/liblzma/simple/x86.c - xz/src/common/mythread.h - xz/src/common/sysdefs.h - xz/src/common/tuklib_common.h - xz/src/common/tuklib_config.h - xz/src/common/tuklib_cpucores.h - xz/src/common/tuklib_integer.h - xz/src/common/tuklib_physmem.h - xz/src/liblzma/api/lzma.h - xz/src/liblzma/api/lzma/base.h - xz/src/liblzma/api/lzma/bcj.h - xz/src/liblzma/api/lzma/block.h - xz/src/liblzma/api/lzma/check.h - xz/src/liblzma/api/lzma/container.h - xz/src/liblzma/api/lzma/delta.h - xz/src/liblzma/api/lzma/filter.h - xz/src/liblzma/api/lzma/hardware.h - xz/src/liblzma/api/lzma/index.h - xz/src/liblzma/api/lzma/index_hash.h - xz/src/liblzma/api/lzma/lzma12.h - xz/src/liblzma/api/lzma/stream_flags.h - xz/src/liblzma/api/lzma/version.h - xz/src/liblzma/api/lzma/vli.h - xz/src/liblzma/check/check.h - xz/src/liblzma/check/crc32_table_be.h - xz/src/liblzma/check/crc32_table_le.h - xz/src/liblzma/check/crc64_table_be.h - xz/src/liblzma/check/crc64_table_le.h - xz/src/liblzma/check/crc_macros.h - xz/src/liblzma/common/alone_decoder.h - xz/src/liblzma/common/block_buffer_encoder.h - xz/src/liblzma/common/block_decoder.h - xz/src/liblzma/common/block_encoder.h - xz/src/liblzma/common/common.h - xz/src/liblzma/common/easy_preset.h - xz/src/liblzma/common/filter_common.h - xz/src/liblzma/common/filter_decoder.h - xz/src/liblzma/common/filter_encoder.h - xz/src/liblzma/common/index.h - xz/src/liblzma/common/index_encoder.h - xz/src/liblzma/common/memcmplen.h - xz/src/liblzma/common/outqueue.h - xz/src/liblzma/common/stream_decoder.h - xz/src/liblzma/common/stream_flags_common.h - xz/src/liblzma/delta/delta_common.h - xz/src/liblzma/delta/delta_decoder.h - xz/src/liblzma/delta/delta_encoder.h - xz/src/liblzma/delta/delta_private.h - xz/src/liblzma/lzma/fastpos.h - xz/src/liblzma/lzma/lzma2_decoder.h - xz/src/liblzma/lzma/lzma2_encoder.h - xz/src/liblzma/lzma/lzma_common.h - xz/src/liblzma/lzma/lzma_decoder.h - xz/src/liblzma/lzma/lzma_encoder.h - xz/src/liblzma/lzma/lzma_encoder_private.h - xz/src/liblzma/lz/lz_decoder.h - xz/src/liblzma/lz/lz_encoder.h - xz/src/liblzma/lz/lz_encoder_hash.h - xz/src/liblzma/lz/lz_encoder_hash_table.h - xz/src/liblzma/rangecoder/price.h - xz/src/liblzma/rangecoder/range_common.h - xz/src/liblzma/rangecoder/range_decoder.h - xz/src/liblzma/rangecoder/range_encoder.h - xz/src/liblzma/simple/simple_coder.h - xz/src/liblzma/simple/simple_decoder.h - xz/src/liblzma/simple/simple_encoder.h - xz/src/liblzma/simple/simple_private.h - config.h -) -target_compile_definitions(xz-lzma PRIVATE HAVE_CONFIG_H) -target_include_directories(xz-lzma - PUBLIC - xz/src/liblzma/api - PRIVATE - . - xz/src/common - xz/src/liblzma/check - xz/src/liblzma/common - xz/src/liblzma/delta - xz/src/liblzma/lz - xz/src/liblzma/lzma - xz/src/liblzma/rangecoder - xz/src/liblzma/simple -) -add_library(LibLZMA::LibLZMA ALIAS xz-lzma) - -disable_compiler_warnings_for_target(xz-lzma) diff --git a/3rdparty/xz/config.h b/3rdparty/xz/config.h deleted file mode 100644 index 71f353f4ec..0000000000 --- a/3rdparty/xz/config.h +++ /dev/null @@ -1,148 +0,0 @@ -/* config.h for compiling liblzma (*not* the whole XZ Utils) with MSVC 2013 */ - -/* Prefix for symbols exported by tuklib_*.c files */ -#define TUKLIB_SYMBOL_PREFIX lzma_ - -/* How many MiB of RAM to assume if the real amount cannot be determined. */ -#define ASSUME_RAM 128 - -/* Define to 1 if crc32 integrity check is enabled. */ -#define HAVE_CHECK_CRC32 1 - -/* Define to 1 if crc64 integrity check is enabled. */ -#define HAVE_CHECK_CRC64 1 - -/* Define to 1 if sha256 integrity check is enabled. */ -#define HAVE_CHECK_SHA256 1 - -/* Define to 1 if any of HAVE_DECODER_foo have been defined. */ -#define HAVE_DECODERS 1 - -/* Define to 1 if arm decoder is enabled. */ -#define HAVE_DECODER_ARM 1 - -/* Define to 1 if armthumb decoder is enabled. */ -#define HAVE_DECODER_ARMTHUMB 1 - -/* Define to 1 if delta decoder is enabled. */ -#define HAVE_DECODER_DELTA 1 - -/* Define to 1 if ia64 decoder is enabled. */ -#define HAVE_DECODER_IA64 1 - -/* Define to 1 if lzma1 decoder is enabled. */ -#define HAVE_DECODER_LZMA1 1 - -/* Define to 1 if lzma2 decoder is enabled. */ -#define HAVE_DECODER_LZMA2 1 - -/* Define to 1 if powerpc decoder is enabled. */ -#define HAVE_DECODER_POWERPC 1 - -/* Define to 1 if sparc decoder is enabled. */ -#define HAVE_DECODER_SPARC 1 - -/* Define to 1 if x86 decoder is enabled. */ -#define HAVE_DECODER_X86 1 - -/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */ -#define HAVE_ENCODERS 1 - -/* Define to 1 if arm encoder is enabled. */ -#define HAVE_ENCODER_ARM 1 - -/* Define to 1 if armthumb encoder is enabled. */ -#define HAVE_ENCODER_ARMTHUMB 1 - -/* Define to 1 if delta encoder is enabled. */ -#define HAVE_ENCODER_DELTA 1 - -/* Define to 1 if ia64 encoder is enabled. */ -#define HAVE_ENCODER_IA64 1 - -/* Define to 1 if lzma1 encoder is enabled. */ -#define HAVE_ENCODER_LZMA1 1 - -/* Define to 1 if lzma2 encoder is enabled. */ -#define HAVE_ENCODER_LZMA2 1 - -/* Define to 1 if powerpc encoder is enabled. */ -#define HAVE_ENCODER_POWERPC 1 - -/* Define to 1 if sparc encoder is enabled. */ -#define HAVE_ENCODER_SPARC 1 - -/* Define to 1 if x86 encoder is enabled. */ -#define HAVE_ENCODER_X86 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 to enable bt2 match finder. */ -#define HAVE_MF_BT2 1 - -/* Define to 1 to enable bt3 match finder. */ -#define HAVE_MF_BT3 1 - -/* Define to 1 to enable bt4 match finder. */ -#define HAVE_MF_BT4 1 - -/* Define to 1 to enable hc3 match finder. */ -#define HAVE_MF_HC3 1 - -/* Define to 1 to enable hc4 match finder. */ -#define HAVE_MF_HC4 1 - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 or 0, depending whether the compiler supports simple visibility - declarations. */ -#define HAVE_VISIBILITY 0 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -#ifdef _M_IX86 -/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This - avoids use of features that were added in Windows Vista. - This is used for 32-bit x86 builds for compatibility reasons since it - makes no measurable difference in performance compared to Vista threads. */ -#define MYTHREAD_WIN95 1 -#else -/* Define to 1 when using Windows Vista compatible threads. This uses features - that are not available on Windows XP. */ -#define MYTHREAD_VISTA 1 -#endif - -/* Define to 1 to disable debugging code. */ -#define NDEBUG 1 - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "XZ Utils" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://tukaani.org/xz/" - -/* The size of `size_t', as computed by sizeof. */ -#ifdef _WIN64 -#define SIZEOF_SIZE_T 8 -#else -#define SIZEOF_SIZE_T 4 -#endif - -/* Define to 1 if the system supports fast unaligned access to 16-bit and - 32-bit integers. */ -#define TUKLIB_FAST_UNALIGNED_ACCESS 1 diff --git a/3rdparty/xz/liblzma.vcxproj b/3rdparty/xz/liblzma.vcxproj deleted file mode 100644 index 66eddd60cc..0000000000 --- a/3rdparty/xz/liblzma.vcxproj +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - {12728250-16EC-4DC6-94D7-E21DD88947F8} - Win32Proj - - - - StaticLibrary - $(DefaultPlatformToolset) - ClangCL - MultiByte - true - true - false - - - - - - - - - - - - - AllRules.ruleset - - - $(ProjectName) - - - $(ProjectName) - - - - HAVE_CONFIG_H;%(PreprocessorDefinitions) - TurnOffAllWarnings - $(ProjectDir);xz/src/liblzma/common;xz/src/common;xz/src/liblzma/api;xz/src/liblzma/check;xz/src/liblzma/delta;xz/src/liblzma/lz;xz/src/liblzma/lzma;xz/src/liblzma/rangecoder;xz/src/liblzma/simple - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rdparty/xz/xz b/3rdparty/xz/xz deleted file mode 160000 index 49053c0a64..0000000000 --- a/3rdparty/xz/xz +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 49053c0a649f4c8bd2b8d97ce915f401fbc0f3d9 diff --git a/PCSX2_qt.sln b/PCSX2_qt.sln index b553b4b0a4..c041a17b28 100644 --- a/PCSX2_qt.sln +++ b/PCSX2_qt.sln @@ -13,8 +13,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "3rdparty\zlib\zlib. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\xz\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "3rdparty\fmt\fmt.vcxproj", "{449AD25E-424A-4714-BABC-68706CDCC33B}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchdr", "3rdparty\libchdr\libchdr.vcxproj", "{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}" @@ -177,30 +175,6 @@ Global {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release Clang|x64.Build.0 = Release Clang|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug AVX2|x64.ActiveCfg = Debug|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug AVX2|x64.Build.0 = Debug|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug Clang AVX2|x64.ActiveCfg = Debug Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug Clang AVX2|x64.Build.0 = Debug Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug Clang|x64.ActiveCfg = Debug Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug Clang|x64.Build.0 = Debug Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel AVX2|x64.ActiveCfg = Devel|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel AVX2|x64.Build.0 = Devel|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel Clang AVX2|x64.ActiveCfg = Devel Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel Clang AVX2|x64.Build.0 = Devel Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel Clang|x64.ActiveCfg = Devel Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel Clang|x64.Build.0 = Devel Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel|x64.ActiveCfg = Devel|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel|x64.Build.0 = Devel|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release AVX2|x64.ActiveCfg = Release|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release AVX2|x64.Build.0 = Release|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release Clang AVX2|x64.ActiveCfg = Release Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release Clang AVX2|x64.Build.0 = Release Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release Clang|x64.ActiveCfg = Release Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release Clang|x64.Build.0 = Release Clang|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64 - {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64 {449AD25E-424A-4714-BABC-68706CDCC33B}.Debug AVX2|x64.ActiveCfg = Debug|x64 {449AD25E-424A-4714-BABC-68706CDCC33B}.Debug AVX2|x64.Build.0 = Debug|x64 {449AD25E-424A-4714-BABC-68706CDCC33B}.Debug Clang AVX2|x64.ActiveCfg = Debug Clang|x64 @@ -797,7 +771,6 @@ Global {E9B51944-7E6D-4BCD-83F2-7BBD5A46182D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} - {12728250-16EC-4DC6-94D7-E21DD88947F8} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {449AD25E-424A-4714-BABC-68706CDCC33B} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 71f7aed9a0..d0fc74480e 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -9,7 +9,6 @@ if (WIN32) add_subdirectory(3rdparty/zlib EXCLUDE_FROM_ALL) add_subdirectory(3rdparty/libpng EXCLUDE_FROM_ALL) add_subdirectory(3rdparty/libwebp EXCLUDE_FROM_ALL) - add_subdirectory(3rdparty/xz EXCLUDE_FROM_ALL) add_subdirectory(3rdparty/zstd EXCLUDE_FROM_ALL) add_subdirectory(3rdparty/lz4 EXCLUDE_FROM_ALL) add_subdirectory(3rdparty/D3D12MemAlloc EXCLUDE_FROM_ALL) @@ -23,8 +22,6 @@ if (WIN32) add_subdirectory(3rdparty/wil EXCLUDE_FROM_ALL) else() find_package(PCAP REQUIRED) - find_package(LibLZMA REQUIRED) - make_imported_target_if_missing(LibLZMA::LibLZMA LIBLZMA) # Using find_package OpenGL without either setting your opengl preference to GLVND or LEGACY # is deprecated as of cmake 3.11.