From 38db5643cfd0698476aea4bdb36698b2fadc3625 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sun, 25 Jun 2023 18:45:48 +0900 Subject: [PATCH] Update 7-Zip to 23.01 (#1913) --- ArchiveSupport/Merge7z/BuildArc.cmd | 2 +- .../Merge7z/{Merge7z907.cpp => Merge7z.cpp} | 36 ++++++++++--------- ArchiveSupport/Merge7z/Merge7z.vcxproj | 20 ++++++----- .../Merge7z/Merge7z.vcxproj.filters | 8 ++++- DownloadDeps.cmd | 8 ++--- Externals/sevenzip | 2 +- Externals/versions.txt | 2 +- 7 files changed, 44 insertions(+), 34 deletions(-) rename ArchiveSupport/Merge7z/{Merge7z907.cpp => Merge7z.cpp} (85%) diff --git a/ArchiveSupport/Merge7z/BuildArc.cmd b/ArchiveSupport/Merge7z/BuildArc.cmd index cfd42e163fc..ed19306a5ef 100644 --- a/ArchiveSupport/Merge7z/BuildArc.cmd +++ b/ArchiveSupport/Merge7z/BuildArc.cmd @@ -1,7 +1,7 @@ pushd "%~dp0" setlocal -set MERGE7z_VERSION=2201.0 +set MERGE7z_VERSION=2301.0 set PATH="%ProgramFiles%\7-zip";"%ProgramFiles(x86)%\7-zip";%PATH% set DISTDIR=..\..\Build\Releases diff --git a/ArchiveSupport/Merge7z/Merge7z907.cpp b/ArchiveSupport/Merge7z/Merge7z.cpp similarity index 85% rename from ArchiveSupport/Merge7z/Merge7z907.cpp rename to ArchiveSupport/Merge7z/Merge7z.cpp index 0d116a37bd4..a2f08c3f049 100644 --- a/ArchiveSupport/Merge7z/Merge7z907.cpp +++ b/ArchiveSupport/Merge7z/Merge7z.cpp @@ -34,6 +34,7 @@ DATE: BY: DESCRIPTION: #include "7zip/UI/FileManager/OpenCallback.h" #include "7zip/UI/FileManager/ExtractCallback.h" #include "7zip/UI/FileManager/resourceGui.h" +#include "7zip/UI/FileManager/LangUtils.h" #include "7zip/UI/Common/ArchiveExtractCallback.h" #include "7zip/UI/GUI/UpdateCallbackGUI.h" @@ -92,12 +93,13 @@ struct CThreadArchiveOpen NFile::NFind::CFileInfo* FileInfo; IInArchive* Archive; CMyComPtr OpenCallback; - COpenArchiveCallback* OpenCallbackSpec; + COpenCallbackImp* OpenCallbackSpec; + COpenArchiveCallback OpenArchiveCallbackSpec; HRESULT Result; void Process() { - CProgressCloser closer(OpenCallbackSpec->ProgressDialog); + CProgressCloser closer(OpenArchiveCallbackSpec.ProgressDialog); if COMPLAIN(!NFile::NFind::CFindFile().FindFirst(Path, *FileInfo)) { @@ -141,34 +143,34 @@ void Format7zDLL::Interface::Inspector::Init(HWND hwndParent) format->GetDefaultName(hwndParent, ustrDefaultName); CThreadArchiveOpen t; - t.OpenCallbackSpec = new COpenArchiveCallback; + t.OpenCallbackSpec = new COpenCallbackImp; t.OpenCallback = t.OpenCallbackSpec; - t.OpenCallbackSpec->PasswordIsDefined = false; - t.OpenCallbackSpec->ParentWindow = hwndParent; + t.OpenArchiveCallbackSpec.PasswordIsDefined = false; + t.OpenArchiveCallbackSpec.ParentWindow = hwndParent; (archive = format->GetInArchive())->AddRef(); - (file = new CInFileStream)->AddRef(); + static_cast(file = new CInFileStream)->AddRef(); t.File = file; t.Path = path; t.FileInfo = &fileInfo; t.Archive = archive; UString progressTitle = LangString(IDS_OPENNING); - t.OpenCallbackSpec->ProgressDialog.MainWindow = hwndParent; - t.OpenCallbackSpec->ProgressDialog.MainTitle = "7-Zip"; // LangString(IDS_APP_TITLE); - t.OpenCallbackSpec->ProgressDialog.MainAddTitle = progressTitle + L' '; - t.OpenCallbackSpec->ProgressDialog.WaitMode = true; + t.OpenArchiveCallbackSpec.ProgressDialog.MainWindow = hwndParent; + t.OpenArchiveCallbackSpec.ProgressDialog.MainTitle = "7-Zip"; // LangString(IDS_APP_TITLE); + t.OpenArchiveCallbackSpec.ProgressDialog.MainAddTitle = progressTitle + L' '; + t.OpenArchiveCallbackSpec.ProgressDialog.WaitMode = true; { NWindows::CThread thread; thread.Create(CThreadArchiveOpen::MyThreadFunction, &t); - t.OpenCallbackSpec->StartProgressDialog(progressTitle, thread); + t.OpenArchiveCallbackSpec.StartProgressDialog(progressTitle, thread); } if (t.Result != ERROR_SUCCESS) Complain(t.Result, path); - passwordIsDefined = t.OpenCallbackSpec->PasswordIsDefined; - password = t.OpenCallbackSpec->Password; + passwordIsDefined = t.OpenArchiveCallbackSpec.PasswordIsDefined; + password = t.OpenArchiveCallbackSpec.Password; } /** @@ -189,7 +191,7 @@ HRESULT Format7zDLL::Interface::Inspector::Extract(HWND hwndParent, LPCTSTR fold } } - (extractCallbackSpec2 = new CExtractCallbackImp) -> AddRef(); + static_cast(extractCallbackSpec2 = new CExtractCallbackImp) -> AddRef(); extractCallbackSpec2->Init(); @@ -197,7 +199,7 @@ HRESULT Format7zDLL::Interface::Inspector::Extract(HWND hwndParent, LPCTSTR fold extractCallbackSpec2->PasswordIsDefined = passwordIsDefined; extractCallbackSpec2->Password = password; - (extractCallbackSpec = new CArchiveExtractCallback) -> AddRef(); + static_cast(extractCallbackSpec = new CArchiveExtractCallback) -> AddRef(); extractCallbackSpec->InitForMulti ( @@ -319,7 +321,7 @@ Format7zDLL::Interface::Updater::Updater(Format7zDLL::Interface *format, LPCTSTR void Format7zDLL::Interface::Updater::Init(HWND hwndParent) { (outArchive = format->GetOutArchive()) -> AddRef(); - (file = new COutFileStream) -> AddRef(); + static_cast(file = new COutFileStream) -> AddRef(); if COMPLAIN(!file->Create(path, true)) { Complain(ERROR_CANNOT_MAKE, path); @@ -339,7 +341,7 @@ HRESULT Format7zDLL::Interface::Updater::Commit(HWND hwndParent) // Ref counts are not always accurate with 7-Zip. // An extra AddRef() ensures that interfaces remain valid until they // are explicitly released at the end of this function. - (updateCallbackSpec = new CArchiveUpdateCallback) -> AddRef(); + static_cast((updateCallbackSpec = new CArchiveUpdateCallback)) -> AddRef(); (updateCallbackGUI = new CUpdateCallbackGUI);// -> AddRef(); updateCallbackGUI->Init(); diff --git a/ArchiveSupport/Merge7z/Merge7z.vcxproj b/ArchiveSupport/Merge7z/Merge7z.vcxproj index a5e556361d5..2cacb1c0033 100644 --- a/ArchiveSupport/Merge7z/Merge7z.vcxproj +++ b/ArchiveSupport/Merge7z/Merge7z.vcxproj @@ -189,7 +189,7 @@ Disabled ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug Use @@ -236,7 +236,7 @@ Disabled ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug Use @@ -279,7 +279,7 @@ Disabled ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug Use @@ -322,7 +322,7 @@ Disabled ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug Use @@ -366,7 +366,7 @@ MinSpace OnlyExplicitInline ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) true MultiThreaded true @@ -414,7 +414,7 @@ MinSpace OnlyExplicitInline ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) true MultiThreaded true @@ -458,7 +458,7 @@ MinSpace OnlyExplicitInline ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) true MultiThreaded true @@ -502,7 +502,7 @@ MinSpace OnlyExplicitInline ..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) + WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions) true MultiThreaded true @@ -552,6 +552,7 @@ + @@ -620,6 +621,7 @@ + NotUsing NotUsing @@ -630,7 +632,7 @@ NotUsing NotUsing - + Create diff --git a/ArchiveSupport/Merge7z/Merge7z.vcxproj.filters b/ArchiveSupport/Merge7z/Merge7z.vcxproj.filters index 06084600eb2..b2e976f1ff8 100644 --- a/ArchiveSupport/Merge7z/Merge7z.vcxproj.filters +++ b/ArchiveSupport/Merge7z/Merge7z.vcxproj.filters @@ -237,9 +237,12 @@ 7zip Common + + Windows + - + Quellcodedateien @@ -446,6 +449,9 @@ 7zip Common + + Windows + diff --git a/DownloadDeps.cmd b/DownloadDeps.cmd index 1f5f121b2cd..6dcdcd60bba 100644 --- a/DownloadDeps.cmd +++ b/DownloadDeps.cmd @@ -12,10 +12,10 @@ set downloadsdir=%~dp0\build\WinMergeDownloadDeps set urls_destdirs=^ https://github.com/WinMerge/winmerge/releases/download/winmerge_manual_another_build_tools_v2/winmerge_manual_another_build_tools_v2.zip!Docs\Manual\Tools ^ https://github.com/WinMerge/winmerge/releases/download/ShellExtension-1.18.7.0/ShellExtension-1.18.7.0.zip!Build ^ -https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-x86.zip!Build\x86\Release ^ -https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-x64.zip!Build\X64\Release ^ -https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-ARM.zip!Build\ARM64\Release ^ -https://github.com/WinMerge/winmerge/releases/download/Merge7z2201.0/Merge7z2201.0-ARM64.zip!Build\ARM64\Release ^ +https://github.com/WinMerge/winmerge/releases/download/Merge7z2301.0/Merge7z2301.0-x86.zip!Build\x86\Release ^ +https://github.com/WinMerge/winmerge/releases/download/Merge7z2301.0/Merge7z2301.0-x64.zip!Build\X64\Release ^ +https://github.com/WinMerge/winmerge/releases/download/Merge7z2301.0/Merge7z2301.0-ARM.zip!Build\ARM64\Release ^ +https://github.com/WinMerge/winmerge/releases/download/Merge7z2301.0/Merge7z2301.0-ARM64.zip!Build\ARM64\Release ^ https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.12-x86.zip!Build\x86\Release ^ https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.12-x64.zip!Build\x64\Release ^ https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.12-ARM.zip!Build\ARM\Release ^ diff --git a/Externals/sevenzip b/Externals/sevenzip index a9e7638927f..df1302c9052 160000 --- a/Externals/sevenzip +++ b/Externals/sevenzip @@ -1 +1 @@ -Subproject commit a9e7638927f757b70cd2df84e0b2824ce39e32e4 +Subproject commit df1302c90524e1179687c32bb37a9fc7a27092a2 diff --git a/Externals/versions.txt b/Externals/versions.txt index 0af6cee2cf1..2eda5b23104 100644 --- a/Externals/versions.txt +++ b/Externals/versions.txt @@ -15,7 +15,7 @@ This file lists versions of the external components we are using. - rapidjson: 1.1.1 - Google C++ Testing Framework: 1.11.0 - GNU patch: 2.7.6-1 -- 7-zip: 22.01 +- 7-zip: 23.01 - LibXDiff: 611e42a on Nov 2, 2018 (https://github.com/git/git/tree/master/xdiff) - html-tidy5: 5.4.0 - jq: 1.6