Skip to content

Commit

Permalink
Update 7-Zip to 23.01 (#1913)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka authored Jun 25, 2023
1 parent 5552b83 commit 38db564
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ArchiveSupport/Merge7z/BuildArc.cmd
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -92,12 +93,13 @@ struct CThreadArchiveOpen
NFile::NFind::CFileInfo* FileInfo;
IInArchive* Archive;
CMyComPtr<IProgress> 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))
{
Expand Down Expand Up @@ -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<IInStream*>(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;
}

/**
Expand All @@ -189,15 +191,15 @@ HRESULT Format7zDLL::Interface::Inspector::Extract(HWND hwndParent, LPCTSTR fold
}
}

(extractCallbackSpec2 = new CExtractCallbackImp) -> AddRef();
static_cast<IFolderArchiveExtractCallback*>(extractCallbackSpec2 = new CExtractCallbackImp) -> AddRef();

extractCallbackSpec2->Init();

extractCallbackSpec2->OverwriteMode = NExtract::NOverwriteMode::kOverwrite;
extractCallbackSpec2->PasswordIsDefined = passwordIsDefined;
extractCallbackSpec2->Password = password;

(extractCallbackSpec = new CArchiveExtractCallback) -> AddRef();
static_cast<IArchiveExtractCallback*>(extractCallbackSpec = new CArchiveExtractCallback) -> AddRef();

extractCallbackSpec->InitForMulti
(
Expand Down Expand Up @@ -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<IOutStream*>(file = new COutFileStream) -> AddRef();
if COMPLAIN(!file->Create(path, true))
{
Complain(ERROR_CANNOT_MAKE, path);
Expand All @@ -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<IArchiveUpdateCallback2*>((updateCallbackSpec = new CArchiveUpdateCallback)) -> AddRef();
(updateCallbackGUI = new CUpdateCallbackGUI);// -> AddRef();

updateCallbackGUI->Init();
Expand Down
20 changes: 11 additions & 9 deletions ArchiveSupport/Merge7z/Merge7z.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
Expand Down Expand Up @@ -236,7 +236,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
Expand Down Expand Up @@ -279,7 +279,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
Expand Down Expand Up @@ -322,7 +322,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;_DEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
Expand Down Expand Up @@ -366,7 +366,7 @@
<Optimization>MinSpace</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -414,7 +414,7 @@
<Optimization>MinSpace</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -458,7 +458,7 @@
<Optimization>MinSpace</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -502,7 +502,7 @@
<Optimization>MinSpace</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\Externals\sevenzip;..\..\Externals\sevenzip\CPP;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;Z7_LANG;NDEBUG;_WINDOWS;_USRDLL;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -552,6 +552,7 @@
<ClInclude Include="..\..\Externals\sevenzip\CPP\7zip\UI\Common\SortUtils.h" />
<ClInclude Include="..\..\Externals\sevenzip\CPP\Windows\Clipboard.h" />
<ClInclude Include="..\..\Externals\sevenzip\CPP\Windows\MemoryGlobal.h" />
<ClInclude Include="..\..\Externals\sevenzip\CPP\Windows\System.h" />
<ClInclude Include="Merge7z.h" />
<ClInclude Include="Merge7zCommon.h" />
<ClInclude Include="StdAfx.h" />
Expand Down Expand Up @@ -620,6 +621,7 @@
<ClCompile Include="..\..\Externals\sevenzip\CPP\7zip\UI\Common\SortUtils.cpp" />
<ClCompile Include="..\..\Externals\sevenzip\CPP\Windows\Clipboard.cpp" />
<ClCompile Include="..\..\Externals\sevenzip\CPP\Windows\MemoryGlobal.cpp" />
<ClCompile Include="..\..\Externals\sevenzip\CPP\Windows\System.cpp" />
<ClCompile Include="..\..\Externals\sevenzip\C\7zCrcOpt.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
Expand All @@ -630,7 +632,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Merge7z907.cpp" />
<ClCompile Include="Merge7z.cpp" />
<ClCompile Include="Merge7zCommon.cpp" />
<ClCompile Include="StdAfx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
Expand Down
8 changes: 7 additions & 1 deletion ArchiveSupport/Merge7z/Merge7z.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,12 @@
<ClInclude Include="..\..\Externals\sevenzip\CPP\7zip\Common\FilterCoder.h">
<Filter>7zip Common</Filter>
</ClInclude>
<ClInclude Include="..\..\Externals\sevenzip\CPP\Windows\System.h">
<Filter>Windows</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Merge7z907.cpp">
<ClCompile Include="Merge7z.cpp">
<Filter>Quellcodedateien</Filter>
</ClCompile>
<ClCompile Include="Merge7zCommon.cpp">
Expand Down Expand Up @@ -446,6 +449,9 @@
<ClCompile Include="..\..\Externals\sevenzip\CPP\7zip\Common\FilterCoder.cpp">
<Filter>7zip Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Externals\sevenzip\CPP\Windows\System.cpp">
<Filter>Windows</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\Externals\sevenzip\CPP\7zip\Ui\Gui\resource.rc">
Expand Down
8 changes: 4 additions & 4 deletions DownloadDeps.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ^
Expand Down
2 changes: 1 addition & 1 deletion Externals/sevenzip
Submodule sevenzip updated 1026 files
2 changes: 1 addition & 1 deletion Externals/versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38db564

Please sign in to comment.