Skip to content

Commit

Permalink
TMP-SQUASH-commit mcmilk/7-Zip-zstd
Browse files Browse the repository at this point in the history
This squash-merges the current tip of the default branch, i.e. d03b30eb
(Update LZ4 to version 1.9.4, 2022-10-16).

This commit is not meant for consumption by anybody except interested
readers who want to figure out how 7-Zip-zstd differs from 7-Zip.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Nov 4, 2022
1 parent 19a5781 commit f8a8f0d
Show file tree
Hide file tree
Showing 462 changed files with 152,304 additions and 151 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: ['https://www.paypal.me/TinoReichardt']
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

*.obj
*.exe
*.res
*.dll
*.pch
*.exp
*.lib

8 changes: 4 additions & 4 deletions C/7zVersion.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define MY_VER_MAJOR 22
#define MY_VER_MINOR 01
#define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "22.01"
#define MY_VERSION_NUMBERS "22.01 ZS v1.5.0 R1"
#define MY_VERSION MY_VERSION_NUMBERS

#ifdef MY_CPU_NAME
Expand All @@ -10,12 +10,12 @@
#define MY_VERSION_CPU MY_VERSION
#endif

#define MY_DATE "2022-07-15"
#define MY_DATE "2022-08-07"
#undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE
#define MY_AUTHOR_NAME "Igor Pavlov"
#define MY_AUTHOR_NAME "Igor Pavlov, Tino Reichardt"
#define MY_COPYRIGHT_PD "Igor Pavlov : Public domain"
#define MY_COPYRIGHT_CR "Copyright (c) 1999-2022 Igor Pavlov"
#define MY_COPYRIGHT_CR "Copyright (c) 1999-2022 Igor Pavlov, 2016-2022 Tino Reichardt"

#ifdef USE_COPYRIGHT_CR
#define MY_COPYRIGHT MY_COPYRIGHT_CR
Expand Down
4 changes: 2 additions & 2 deletions C/7zVersion.rc
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ BEGIN \
BEGIN \
BLOCK "040904b0" \
BEGIN \
VALUE "CompanyName", "Igor Pavlov" \
VALUE "CompanyName", "Igor Pavlov, Tino Reichardt" \
VALUE "FileDescription", descr \
VALUE "FileVersion", MY_VERSION \
VALUE "InternalName", intName \
VALUE "LegalCopyright", MY_COPYRIGHT \
VALUE "OriginalFilename", origName \
VALUE "ProductName", "7-Zip" \
VALUE "ProductName", "7-Zip ZS" \
VALUE "ProductVersion", MY_VERSION \
END \
END \
Expand Down
14 changes: 14 additions & 0 deletions C/7zVersionTr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#include "7zVersion.h"

#undef MY_AUTHOR_NAME
#define MY_AUTHOR_NAME "Tino Reichardt"

#undef MY_COPYRIGHT
#define MY_COPYRIGHT "Copyright (c) 2016 - 2021 Tino Reichardt"

#undef MY_COPYRIGHT_DATE
#define MY_COPYRIGHT_DATE MY_COPYRIGHT " : " MY_DATE

#undef MY_VERSION_COPYRIGHT_DATE
#define MY_VERSION_COPYRIGHT_DATE MY_VERSION_CPU " : " MY_COPYRIGHT " : " MY_DATE
16 changes: 8 additions & 8 deletions C/Util/7zipInstall/7zipInstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
#define _7ZIP_CUR_VER ((MY_VER_MAJOR << 16) | MY_VER_MINOR)
#define _7ZIP_DLL_VER_COMPAT ((16 << 16) | 3)

static LPCSTR const k_7zip = "7-Zip";
static LPCSTR const k_7zip = "7-Zip-Zstandard";

static LPCWSTR const k_Reg_Software_7zip = L"Software\\7-Zip";
static LPCWSTR const k_Reg_Software_7zip = L"Software\\7-Zip-Zstandard";

// #define _64BIT_INSTALLER 1

#ifdef _WIN64
#define _64BIT_INSTALLER 1
#endif

#define k_7zip_with_Ver_base L"7-Zip " LLL(MY_VERSION)
#define k_7zip_with_Ver_base L"7-Zip ZS " LLL(MY_VERSION)

#ifdef _64BIT_INSTALLER

Expand Down Expand Up @@ -103,7 +103,7 @@ static LPCWSTR const k_Reg_Path32 = L"Path"
#define k_Reg_WOW_Flag_32 0
#endif

#define k_7zip_CLSID L"{23170F69-40C1-278A-1000-000100020000}"
#define k_7zip_CLSID L"{23170F69-20BB-278A-1000-000100020000}"

static LPCWSTR const k_Reg_CLSID_7zip = L"CLSID\\" k_7zip_CLSID;
static LPCWSTR const k_Reg_CLSID_7zip_Inproc = L"CLSID\\" k_7zip_CLSID L"\\InprocServer32";
Expand Down Expand Up @@ -602,9 +602,9 @@ static LPCWSTR FindSubString(LPCWSTR s1, const char *s2)
static void Set7zipPostfix(WCHAR *s)
{
NormalizePrefix(s);
if (FindSubString(s, "7-Zip"))
if (FindSubString(s, "7-Zip-Zstandard"))
return;
CatAscii(s, "7-Zip\\");
CatAscii(s, "7-Zip-Zstandard\\");
}


Expand Down Expand Up @@ -887,7 +887,7 @@ static void WriteShellEx()
for (i = 0; i < ARRAY_SIZE(k_ShellEx_Items); i++)
{
CpyAscii(destPath, k_ShellEx_Items[i]);
CatAscii(destPath, "\\7-Zip");
CatAscii(destPath, "\\7-Zip-Zstandard");

#ifdef USE_7ZIP_32_DLL
MyRegistry_CreateKeyAndVal_32(HKEY_CLASSES_ROOT, destPath, NULL, k_7zip_CLSID);
Expand Down Expand Up @@ -918,7 +918,7 @@ static void WriteShellEx()

{
HKEY destKey = 0;
LONG res = MyRegistry_CreateKey(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\7-Zip", &destKey);
LONG res = MyRegistry_CreateKey(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\7-Zip-Zstandard", &destKey);
if (res == ERROR_SUCCESS)
{
MyRegistry_SetString(destKey, L"DisplayName", k_7zip_with_Ver_str);
Expand Down
4 changes: 2 additions & 2 deletions C/Util/7zipInstall/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "../../7zVersion.rc"
#include "resource.h"

MY_VERSION_INFO(MY_VFT_APP, "7-Zip Installer", "7zipInstall", "7zipInstall.exe")
MY_VERSION_INFO(MY_VFT_APP, "7-Zip Installer ZS", "7zipInstall", "7zipInstall.exe")

1 ICON "7zip.ico"

Expand All @@ -28,7 +28,7 @@ MY_VERSION_INFO(MY_VFT_APP, "7-Zip Installer", "7zipInstall", "7zipInstall.exe")

IDD_INSTALL DIALOG 0, 0, xs, ys
STYLE DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Install 7-Zip"
CAPTION "Install 7-Zip ZS"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Destination folder:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8
Expand Down
16 changes: 8 additions & 8 deletions C/Util/7zipUninstall/7zipUninstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@

#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))

// static LPCWSTR const k_7zip = L"7-Zip";
// static LPCWSTR const k_7zip = L"7-Zip-Zstandard";

// #define _64BIT_INSTALLER 1

#ifdef _WIN64
#define _64BIT_INSTALLER 1
#endif

#define k_7zip_with_Ver_base L"7-Zip " LLL(MY_VERSION)
#define k_7zip_with_Ver_base L"7-Zip ZS " LLL(MY_VERSION)

#ifdef _64BIT_INSTALLER

Expand All @@ -59,7 +59,7 @@

static LPCWSTR const k_7zip_with_Ver_Uninstall = k_7zip_with_Ver L" Uninstall";

static LPCWSTR const k_Reg_Software_7zip = L"Software\\7-Zip";
static LPCWSTR const k_Reg_Software_7zip = L"Software\\7-Zip-Zstandard";

static LPCWSTR const k_Reg_Path = L"Path";

Expand All @@ -83,7 +83,7 @@ static LPCWSTR const k_Reg_Path32 = L"Path"
#define k_Reg_WOW_Flag_32 0
#endif

#define k_7zip_CLSID L"{23170F69-40C1-278A-1000-000100020000}"
#define k_7zip_CLSID L"{23170F69-20BB-278A-1000-000100020000}"

static LPCWSTR const k_Reg_CLSID_7zip = L"CLSID\\" k_7zip_CLSID;
static LPCWSTR const k_Reg_CLSID_7zip_Inproc = L"CLSID\\" k_7zip_CLSID L"\\InprocServer32";
Expand Down Expand Up @@ -356,7 +356,7 @@ static void SetShellProgramsGroup(HWND hwndOwner)
continue;

NormalizePrefix(link);
CatAscii(link, "7-Zip\\");
CatAscii(link, "7-Zip-Zstandard\\");

{
const size_t baseLen = wcslen(link);
Expand Down Expand Up @@ -405,7 +405,7 @@ static LPCWSTR const k_Shell_Approved = L"Software\\Microsoft\\Windows\\CurrentV

static LPCWSTR const k_AppPaths_7zFm = L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\7zFM.exe";
#define k_REG_Uninstall L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
static LPCWSTR const k_Uninstall_7zip = k_REG_Uninstall L"7-Zip";
static LPCWSTR const k_Uninstall_7zip = k_REG_Uninstall L"7-Zip-Zstandard";


static void RemoveQuotes(wchar_t *s)
Expand Down Expand Up @@ -446,7 +446,7 @@ static void WriteCLSID()
{
WCHAR destPath[MAX_PATH];
CpyAscii(destPath, k_ShellEx_Items[i]);
CatAscii(destPath, "\\7-Zip");
CatAscii(destPath, "\\7-Zip-Zstandard");

MyRegistry_DeleteKey(HKEY_CLASSES_ROOT, destPath);
}
Expand Down Expand Up @@ -483,7 +483,7 @@ static void WriteCLSID()
{
WCHAR destPath[MAX_PATH];
CpyAscii(destPath, k_ShellEx_Items[i]);
CatAscii(destPath, "\\7-Zip");
CatAscii(destPath, "\\7-Zip-Zstandard");

MyRegistry_DeleteKey_32(HKEY_CLASSES_ROOT, destPath);
}
Expand Down
4 changes: 2 additions & 2 deletions C/Util/7zipUninstall/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "../../7zVersion.rc"
#include "resource.h"

MY_VERSION_INFO(MY_VFT_APP, "7-Zip Uninstaller", "Uninstall", "Uninstall.exe")
MY_VERSION_INFO(MY_VFT_APP, "7-Zip Uninstaller ZS", "Uninstall", "Uninstall.exe")

1 ICON "7zipUninstall.ico"

Expand All @@ -28,7 +28,7 @@ MY_VERSION_INFO(MY_VFT_APP, "7-Zip Uninstaller", "Uninstall", "Uninstall.exe")

IDD_INSTALL DIALOG 0, 0, xs, ys
STYLE DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Uninstall 7-Zip"
CAPTION "Uninstall 7-Zip ZS"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Uninstall from:", IDT_EXTRACT_EXTRACT_TO, m, m, xc, 8
Expand Down
48 changes: 48 additions & 0 deletions C/brotli/Brotli-Adjust.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh
# C/brotli/*
# /TR 2017-05-25

find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 644 {} \;
chmod +x $0

mv include/brotli/* .
rm -rf include
for i in */*.c *.h; do
sed -i 's|<brotli/port.h>|"port.h"|g' "$i"
sed -i 's|<brotli/types.h>|"types.h"|g' "$i"
sed -i 's|<brotli/encode.h>|"encode.h"|g' "$i"
sed -i 's|<brotli/decode.h>|"decode.h"|g' "$i"
done
for i in */*.h; do
sed -i 's|<brotli/port.h>|"../port.h"|g' "$i"
sed -i 's|<brotli/types.h>|"../types.h"|g' "$i"
sed -i 's|<brotli/encode.h>|"../encode.h"|g' "$i"
sed -i 's|<brotli/decode.h>|"../decode.h"|g' "$i"
done

cd common
sed -i 's|include "./|include "./common/|g' *.c
for f in *.c; do mv $f ../br_$f; done

cd ../dec
sed -i 's|include "./|include "./dec/|g' *.c
sed -i 's|include "../common|include "./common|g' *.c
for f in *.c; do mv $f ../br_$f; done

cd ../enc
sed -i 's|include "./|include "./enc/|g' *.c
sed -i 's|include "../common|include "./common/|g' *.c
for f in *.c; do mv $f ../br_$f; done

exit

# then put these to "port.h"

/* disable some warnings /TR */
#pragma warning(disable : 4100)
#pragma warning(disable : 4127)
#pragma warning(disable : 4189)
#pragma warning(disable : 4295)
#pragma warning(disable : 4389)
#pragma warning(disable : 4701)
19 changes: 19 additions & 0 deletions C/brotli/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit f8a8f0d

Please sign in to comment.