diff --git a/CMakeLists.txt b/CMakeLists.txt index 922aeabb84..fadc7712c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -658,6 +658,14 @@ add_library(Common STATIC ${CommonLOONGARCH64} ${CommonD3D} ${CommonVR} + ext/lzma-sdk/7zArcIn.c # TODO: Move. + ext/lzma-sdk/7zBuf.c + ext/lzma-sdk/7zCrc.c + ext/lzma-sdk/7zDec.c + ext/lzma-sdk/7zFile.c + ext/lzma-sdk/7zStream.c + ext/lzma-sdk/Bcj2.c + ext/lzma-sdk/Lzma2Dec.c Common/Serialize/Serializer.cpp Common/Serialize/Serializer.h Common/Serialize/SerializeDeque.h @@ -726,14 +734,6 @@ add_library(Common STATIC Common/File/VFS/SevenZipFileReader.h Common/File/VFS/DirectoryReader.cpp Common/File/VFS/DirectoryReader.h - ext/lzma-sdk/7zArcIn.c - ext/lzma-sdk/7zBuf.c - ext/lzma-sdk/7zCrc.c - ext/lzma-sdk/7zDec.c - ext/lzma-sdk/7zFile.c - ext/lzma-sdk/7zStream.c - ext/lzma-sdk/Bcj2.c - ext/lzma-sdk/Lzma2Dec.c Common/File/AndroidStorage.h Common/File/AndroidStorage.cpp Common/File/AndroidContentURI.h @@ -977,6 +977,7 @@ endif() if(ARM64) if(ANDROID) target_link_libraries(Common adrenotools) + target_compile_definitions(Common PRIVATE Z7_CRC_NUM_TABLES=1) endif() endif() diff --git a/UI/AdhocServerScreen.cpp b/UI/AdhocServerScreen.cpp index 493d1cf747..fa82bc1675 100644 --- a/UI/AdhocServerScreen.cpp +++ b/UI/AdhocServerScreen.cpp @@ -22,7 +22,7 @@ public: parent->Add(new CheckBox(&hasRelay_, ni->T("Relay server mode"))); } - virtual void OnCompleted(DialogResult result) { + virtual void OnCompleted(DialogResult result) override { if (result == DialogResult::DR_OK) { std::vector servers = AdhocGetServerList(AdhocLoadListMode::CacheOnlySync); bool preset = false; diff --git a/UI/InstallZipScreen.cpp b/UI/InstallZipScreen.cpp index 1befd99d91..36e23d1328 100644 --- a/UI/InstallZipScreen.cpp +++ b/UI/InstallZipScreen.cpp @@ -45,8 +45,10 @@ InstallZipScreen::InstallZipScreen(const Path &zipPath) : UITwoPaneBaseDialogScr if (zipPath.GetFileExtension() == ".7z") { SevenZipFileReader *sevenZipFile = SevenZipFileReader::Create(zipPath, ""); - DetectArchiveContents(sevenZipFile, &zipFileInfo_); // Even if this fails, it sets zipInfo->contents. - delete sevenZipFile; + if (sevenZipFile) { + DetectArchiveContents(sevenZipFile, &zipFileInfo_); // Even if this fails, it sets zipInfo->contents. + delete sevenZipFile; + } } else { ZipContainer zipFile = ZipOpenPath(zipPath_); if (zipFile) { diff --git a/UWP/CommonUWP/CommonUWP.vcxproj b/UWP/CommonUWP/CommonUWP.vcxproj index f5fb3a0b53..57286cf5e5 100644 --- a/UWP/CommonUWP/CommonUWP.vcxproj +++ b/UWP/CommonUWP/CommonUWP.vcxproj @@ -95,6 +95,7 @@ + @@ -275,6 +276,21 @@ + + + + + + + + + + + + + + + @@ -289,6 +305,7 @@ + @@ -443,6 +460,18 @@ + + + + + + + + + + + + diff --git a/UWP/CommonUWP/CommonUWP.vcxproj.filters b/UWP/CommonUWP/CommonUWP.vcxproj.filters index 4997be9222..04bb3c2cc5 100644 --- a/UWP/CommonUWP/CommonUWP.vcxproj.filters +++ b/UWP/CommonUWP/CommonUWP.vcxproj.filters @@ -109,6 +109,9 @@ {e3871672-2a90-49d9-abb1-43fe75d73f8b} + + {32412196-7280-4118-ad20-4ee3f6ad18ef} + @@ -543,6 +546,45 @@ UI + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + File\VFS + @@ -1043,6 +1085,54 @@ UI + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + ext\lzma-sdk + + + File\VFS + diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 4384151c07..2d088890e3 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -267,7 +267,15 @@ EXT_FILES := \ $(SRC)/ext/cpu_features/src/impl_x86_macos.c \ $(SRC)/ext/cpu_features/src/impl_x86_windows.c \ $(SRC)/ext/cpu_features/src/stack_line_reader.c \ - $(SRC)/ext/cpu_features/src/string_view.c + $(SRC)/ext/cpu_features/src/string_view.c \ + $(SRC)/ext/lzma-sdk/7zArcIn.c \ + $(SRC)/ext/lzma-sdk/7zBuf.c \ + $(SRC)/ext/lzma-sdk/7zCrc.c \ + $(SRC)/ext/lzma-sdk/7zDec.c \ + $(SRC)/ext/lzma-sdk/7zFile.c \ + $(SRC)/ext/lzma-sdk/7zStream.c \ + $(SRC)/ext/lzma-sdk/Bcj2.c \ + $(SRC)/ext/lzma-sdk/Lzma2Dec.c EXEC_AND_LIB_FILES := \ $(ARCH_FILES) \