chore: initial commit (extracted from Launchers monorepo)
Plugin: ns7zip v2.0.0 Architectures: x86-ansi, x86-unicode, amd64-unicode License: LGPL-2.1-or-later
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "SFXCon"=.\SFXCon.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,521 @@
|
||||
// Main.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../../../../C/CpuArch.h"
|
||||
#include "../../../../C/DllSecur.h"
|
||||
|
||||
#include "../../../Common/MyWindows.h"
|
||||
#include "../../../Common/MyInitGuid.h"
|
||||
|
||||
#include "../../../Common/CommandLineParser.h"
|
||||
#include "../../../Common/MyException.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../../../Windows/DLL.h"
|
||||
#else
|
||||
#include "../../../Common/StringConvert.h"
|
||||
#endif
|
||||
#include "../../../Windows/FileDir.h"
|
||||
#include "../../../Windows/FileName.h"
|
||||
|
||||
#include "../../UI/Common/ExitCode.h"
|
||||
#include "../../UI/Common/Extract.h"
|
||||
|
||||
#include "../../UI/Console/ExtractCallbackConsole.h"
|
||||
#include "../../UI/Console/List.h"
|
||||
#include "../../UI/Console/OpenCallbackConsole.h"
|
||||
|
||||
#include "../../MyVersion.h"
|
||||
|
||||
|
||||
using namespace NWindows;
|
||||
using namespace NFile;
|
||||
using namespace NDir;
|
||||
using namespace NCommandLineParser;
|
||||
|
||||
#ifdef _WIN32
|
||||
extern
|
||||
HINSTANCE g_hInstance;
|
||||
HINSTANCE g_hInstance = NULL;
|
||||
#endif
|
||||
extern
|
||||
int g_CodePage;
|
||||
int g_CodePage = -1;
|
||||
extern CStdOutStream *g_StdStream;
|
||||
|
||||
static const char * const kCopyrightString =
|
||||
"\n7-Zip SFX " MY_VERSION_CPU " : " MY_COPYRIGHT_DATE "\n";
|
||||
|
||||
static const int kNumSwitches = 6;
|
||||
|
||||
namespace NKey {
|
||||
enum Enum
|
||||
{
|
||||
kHelp1 = 0,
|
||||
kHelp2,
|
||||
kDisablePercents,
|
||||
kYes,
|
||||
kPassword,
|
||||
kOutputDir
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace NRecursedType {
|
||||
enum EEnum
|
||||
{
|
||||
kRecursed,
|
||||
kWildcardOnlyRecursed,
|
||||
kNonRecursed
|
||||
};
|
||||
}
|
||||
/*
|
||||
static const char kRecursedIDChar = 'R';
|
||||
|
||||
namespace NRecursedPostCharIndex {
|
||||
enum EEnum
|
||||
{
|
||||
kWildcardRecursionOnly = 0,
|
||||
kNoRecursion = 1
|
||||
};
|
||||
}
|
||||
|
||||
static const char kFileListID = '@';
|
||||
static const char kImmediateNameID = '!';
|
||||
|
||||
static const char kSomeCludePostStringMinSize = 2; // at least <@|!><N>ame must be
|
||||
static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!><N>ame must be
|
||||
*/
|
||||
|
||||
#define SWFRM_3(t, mu, mi) t, mu, mi, NULL
|
||||
#define SWFRM_1(t) SWFRM_3(t, false, 0)
|
||||
#define SWFRM_SIMPLE SWFRM_1(NSwitchType::kSimple)
|
||||
#define SWFRM_STRING_SINGL(mi) SWFRM_3(NSwitchType::kString, false, mi)
|
||||
|
||||
static const CSwitchForm kSwitchForms[kNumSwitches] =
|
||||
{
|
||||
{ "?", SWFRM_SIMPLE },
|
||||
{ "H", SWFRM_SIMPLE },
|
||||
{ "BD", SWFRM_SIMPLE },
|
||||
{ "Y", SWFRM_SIMPLE },
|
||||
{ "P", SWFRM_STRING_SINGL(1) },
|
||||
{ "O", SWFRM_STRING_SINGL(1) },
|
||||
};
|
||||
|
||||
static const int kNumCommandForms = 3;
|
||||
|
||||
static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
|
||||
{
|
||||
NRecursedType::kRecursed
|
||||
};
|
||||
|
||||
// static const bool kTestExtractRecursedDefault = true;
|
||||
// static const bool kAddRecursedDefault = false;
|
||||
|
||||
static const char * const kUniversalWildcard = "*";
|
||||
|
||||
static const char * const kHelpString =
|
||||
"\nUsage: 7zSFX [<command>] [<switches>...] [<file_name>...]\n"
|
||||
"\n"
|
||||
"<Commands>\n"
|
||||
// " l: List contents of archive\n"
|
||||
" t: Test integrity of archive\n"
|
||||
" x: eXtract files with full pathname (default)\n"
|
||||
"<Switches>\n"
|
||||
// " -bd Disable percentage indicator\n"
|
||||
" -o{Directory}: set Output directory\n"
|
||||
" -p{Password}: set Password\n"
|
||||
" -y: assume Yes on all queries\n";
|
||||
|
||||
|
||||
// ---------------------------
|
||||
// exception messages
|
||||
|
||||
static const char * const kUserErrorMessage = "Incorrect command line"; // NExitCode::kUserError
|
||||
// static const char * const kIncorrectListFile = "Incorrect wildcard in listfile";
|
||||
static const char * const kIncorrectWildcardInCommandLine = "Incorrect wildcard in command line";
|
||||
|
||||
// static const CSysString kFileIsNotArchiveMessageBefore = "File \"";
|
||||
// static const CSysString kFileIsNotArchiveMessageAfter = "\" is not archive";
|
||||
|
||||
// static const char * const kProcessArchiveMessage = " archive: ";
|
||||
|
||||
static const char * const kCantFindSFX = " cannot find sfx";
|
||||
|
||||
namespace NCommandType
|
||||
{
|
||||
enum EEnum
|
||||
{
|
||||
kTest = 0,
|
||||
kFullExtract,
|
||||
kList
|
||||
};
|
||||
}
|
||||
|
||||
static const char * const g_Commands = "txl";
|
||||
|
||||
struct CArchiveCommand
|
||||
{
|
||||
NCommandType::EEnum CommandType;
|
||||
|
||||
NRecursedType::EEnum DefaultRecursedType() const;
|
||||
};
|
||||
|
||||
static bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
|
||||
{
|
||||
UString s = commandString;
|
||||
s.MakeLower_Ascii();
|
||||
if (s.Len() != 1)
|
||||
return false;
|
||||
if (s[0] >= 0x80)
|
||||
return false;
|
||||
int index = FindCharPosInString(g_Commands, (char)s[0]);
|
||||
if (index < 0)
|
||||
return false;
|
||||
command.CommandType = (NCommandType::EEnum)index;
|
||||
return true;
|
||||
}
|
||||
|
||||
NRecursedType::EEnum CArchiveCommand::DefaultRecursedType() const
|
||||
{
|
||||
return kCommandRecursedDefault[CommandType];
|
||||
}
|
||||
|
||||
static void PrintHelp(void)
|
||||
{
|
||||
g_StdOut << kHelpString;
|
||||
}
|
||||
|
||||
Z7_ATTR_NORETURN
|
||||
static void ShowMessageAndThrowException(const char *message, NExitCode::EEnum code)
|
||||
{
|
||||
g_StdOut << message << endl;
|
||||
throw code;
|
||||
}
|
||||
|
||||
Z7_ATTR_NORETURN
|
||||
static void PrintHelpAndExit() // yyy
|
||||
{
|
||||
PrintHelp();
|
||||
ShowMessageAndThrowException(kUserErrorMessage, NExitCode::kUserError);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// filenames functions
|
||||
|
||||
static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
|
||||
const UString &name, bool include, NRecursedType::EEnum type)
|
||||
{
|
||||
/*
|
||||
if (!IsWildcardFilePathLegal(name))
|
||||
return false;
|
||||
*/
|
||||
const bool isWildcard = DoesNameContainWildcard(name);
|
||||
bool recursed = false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case NRecursedType::kWildcardOnlyRecursed:
|
||||
recursed = isWildcard;
|
||||
break;
|
||||
case NRecursedType::kRecursed:
|
||||
recursed = true;
|
||||
break;
|
||||
case NRecursedType::kNonRecursed:
|
||||
recursed = false;
|
||||
break;
|
||||
}
|
||||
|
||||
NWildcard::CCensorPathProps props;
|
||||
props.Recursive = recursed;
|
||||
wildcardCensor.AddPreItem(include, name, props);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void AddCommandLineWildcardToCensor(NWildcard::CCensor &wildcardCensor,
|
||||
const UString &name, bool include, NRecursedType::EEnum type)
|
||||
{
|
||||
if (!AddNameToCensor(wildcardCensor, name, include, type))
|
||||
ShowMessageAndThrowException(kIncorrectWildcardInCommandLine, NExitCode::kUserError);
|
||||
}
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
static void GetArguments(int numArgs, char *args[], UStringVector &parts)
|
||||
{
|
||||
parts.Clear();
|
||||
for (int i = 0; i < numArgs; i++)
|
||||
{
|
||||
UString s = MultiByteToUnicodeString(args[i]);
|
||||
parts.Add(s);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int Main2(
|
||||
#ifndef _WIN32
|
||||
int numArgs, char *args[]
|
||||
#endif
|
||||
);
|
||||
int Main2(
|
||||
#ifndef _WIN32
|
||||
int numArgs, char *args[]
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// do we need load Security DLLs for console program?
|
||||
LoadSecurityDlls();
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||
SetFileApisToOEM();
|
||||
#endif
|
||||
|
||||
#ifdef ENV_HAVE_LOCALE
|
||||
MY_SetLocale();
|
||||
#endif
|
||||
|
||||
g_StdOut << kCopyrightString;
|
||||
|
||||
UStringVector commandStrings;
|
||||
#ifdef _WIN32
|
||||
NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
|
||||
#else
|
||||
GetArguments(numArgs, args, commandStrings);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
FString arcPath;
|
||||
{
|
||||
FString path;
|
||||
NDLL::MyGetModuleFileName(path);
|
||||
if (!MyGetFullPathName(path, arcPath))
|
||||
{
|
||||
g_StdOut << "GetFullPathName Error";
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
if (commandStrings.IsEmpty())
|
||||
return NExitCode::kFatalError;
|
||||
|
||||
const FString arcPath = us2fs(commandStrings.Front());
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef UNDER_CE
|
||||
if (commandStrings.Size() > 0)
|
||||
commandStrings.Delete(0);
|
||||
#endif
|
||||
|
||||
NCommandLineParser::CParser parser;
|
||||
|
||||
try
|
||||
{
|
||||
if (!parser.ParseStrings(kSwitchForms, kNumSwitches, commandStrings))
|
||||
{
|
||||
g_StdOut << "Command line error:" << endl
|
||||
<< parser.ErrorMessage << endl
|
||||
<< parser.ErrorLine << endl;
|
||||
return NExitCode::kUserError;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
PrintHelpAndExit();
|
||||
}
|
||||
|
||||
if (parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs)
|
||||
{
|
||||
PrintHelp();
|
||||
return 0;
|
||||
}
|
||||
|
||||
const UStringVector &nonSwitchStrings = parser.NonSwitchStrings;
|
||||
|
||||
unsigned curCommandIndex = 0;
|
||||
|
||||
CArchiveCommand command;
|
||||
if (nonSwitchStrings.IsEmpty())
|
||||
command.CommandType = NCommandType::kFullExtract;
|
||||
else
|
||||
{
|
||||
const UString &cmd = nonSwitchStrings[curCommandIndex];
|
||||
if (!ParseArchiveCommand(cmd, command))
|
||||
{
|
||||
g_StdOut << "ERROR: Unknown command:" << endl << cmd << endl;
|
||||
return NExitCode::kUserError;
|
||||
}
|
||||
curCommandIndex = 1;
|
||||
}
|
||||
|
||||
|
||||
NRecursedType::EEnum recursedType;
|
||||
recursedType = command.DefaultRecursedType();
|
||||
|
||||
NWildcard::CCensor wildcardCensor;
|
||||
|
||||
{
|
||||
if (nonSwitchStrings.Size() == curCommandIndex)
|
||||
AddCommandLineWildcardToCensor(wildcardCensor, (UString)kUniversalWildcard, true, recursedType);
|
||||
for (; curCommandIndex < nonSwitchStrings.Size(); curCommandIndex++)
|
||||
{
|
||||
const UString &s = nonSwitchStrings[curCommandIndex];
|
||||
if (s.IsEmpty())
|
||||
throw "Empty file path";
|
||||
AddCommandLineWildcardToCensor(wildcardCensor, s, true, recursedType);
|
||||
}
|
||||
}
|
||||
|
||||
const bool yesToAll = parser[NKey::kYes].ThereIs;
|
||||
|
||||
// NExtractMode::EEnum extractMode;
|
||||
// bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode);
|
||||
|
||||
const bool passwordEnabled = parser[NKey::kPassword].ThereIs;
|
||||
|
||||
UString password;
|
||||
if (passwordEnabled)
|
||||
password = parser[NKey::kPassword].PostStrings[0];
|
||||
|
||||
if (!NFind::DoesFileExist_FollowLink(arcPath))
|
||||
throw kCantFindSFX;
|
||||
|
||||
FString outputDir;
|
||||
if (parser[NKey::kOutputDir].ThereIs)
|
||||
{
|
||||
outputDir = us2fs(parser[NKey::kOutputDir].PostStrings[0]);
|
||||
NName::NormalizeDirPathPrefix(outputDir);
|
||||
}
|
||||
|
||||
|
||||
wildcardCensor.AddPathsToCensor(NWildcard::k_RelatPath);
|
||||
|
||||
{
|
||||
UStringVector v1, v2;
|
||||
v1.Add(fs2us(arcPath));
|
||||
v2.Add(fs2us(arcPath));
|
||||
const NWildcard::CCensorNode &wildcardCensorHead =
|
||||
wildcardCensor.Pairs.Front().Head;
|
||||
|
||||
CCodecs *codecs = new CCodecs;
|
||||
CMyComPtr<
|
||||
#ifdef Z7_EXTERNAL_CODECS
|
||||
ICompressCodecsInfo
|
||||
#else
|
||||
IUnknown
|
||||
#endif
|
||||
> compressCodecsInfo = codecs;
|
||||
{
|
||||
HRESULT result = codecs->Load();
|
||||
if (result != S_OK)
|
||||
throw CSystemException(result);
|
||||
}
|
||||
|
||||
if (command.CommandType != NCommandType::kList)
|
||||
{
|
||||
CExtractCallbackConsole *ecs = new CExtractCallbackConsole;
|
||||
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
|
||||
ecs->Init(g_StdStream, &g_StdErr, g_StdStream, false);
|
||||
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
ecs->PasswordIsDefined = passwordEnabled;
|
||||
ecs->Password = password;
|
||||
#endif
|
||||
|
||||
/*
|
||||
COpenCallbackConsole openCallback;
|
||||
openCallback.Init(g_StdStream, g_StdStream);
|
||||
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
openCallback.PasswordIsDefined = passwordEnabled;
|
||||
openCallback.Password = password;
|
||||
#endif
|
||||
*/
|
||||
|
||||
CExtractOptions eo;
|
||||
eo.StdOutMode = false;
|
||||
eo.YesToAll = yesToAll;
|
||||
eo.TestMode = command.CommandType == NCommandType::kTest;
|
||||
eo.PathMode = NExtract::NPathMode::kFullPaths;
|
||||
eo.OverwriteMode = yesToAll ?
|
||||
NExtract::NOverwriteMode::kOverwrite :
|
||||
NExtract::NOverwriteMode::kAsk;
|
||||
eo.OutputDir = outputDir;
|
||||
|
||||
UString errorMessage;
|
||||
CDecompressStat stat;
|
||||
HRESULT result = Extract(
|
||||
codecs, CObjectVector<COpenType>(), CIntVector(),
|
||||
v1, v2,
|
||||
wildcardCensorHead,
|
||||
eo,
|
||||
ecs, ecs, ecs,
|
||||
// NULL, // hash
|
||||
errorMessage, stat);
|
||||
|
||||
ecs->ClosePercents();
|
||||
|
||||
if (!errorMessage.IsEmpty())
|
||||
{
|
||||
(*g_StdStream) << endl << "Error: " << errorMessage;
|
||||
if (result == S_OK)
|
||||
result = E_FAIL;
|
||||
}
|
||||
|
||||
if ( 0 != ecs->NumCantOpenArcs
|
||||
|| 0 != ecs->NumArcsWithError
|
||||
|| 0 != ecs->NumFileErrors
|
||||
|| 0 != ecs->NumOpenArcErrors)
|
||||
{
|
||||
if (ecs->NumCantOpenArcs != 0)
|
||||
(*g_StdStream) << endl << "Can't open as archive" << endl;
|
||||
if (ecs->NumArcsWithError != 0)
|
||||
(*g_StdStream) << endl << "Archive Errors" << endl;
|
||||
if (ecs->NumFileErrors != 0)
|
||||
(*g_StdStream) << endl << "Sub items Errors: " << ecs->NumFileErrors << endl;
|
||||
if (ecs->NumOpenArcErrors != 0)
|
||||
(*g_StdStream) << endl << "Open Errors: " << ecs->NumOpenArcErrors << endl;
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
if (result != S_OK)
|
||||
throw CSystemException(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw CSystemException(E_NOTIMPL);
|
||||
|
||||
/*
|
||||
UInt64 numErrors = 0;
|
||||
UInt64 numWarnings = 0;
|
||||
HRESULT result = ListArchives(
|
||||
codecs, CObjectVector<COpenType>(), CIntVector(),
|
||||
false, // stdInMode
|
||||
v1, v2,
|
||||
true, // processAltStreams
|
||||
false, // showAltStreams
|
||||
wildcardCensorHead,
|
||||
true, // enableHeaders
|
||||
false, // techMode
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
passwordEnabled, password,
|
||||
#endif
|
||||
numErrors, numWarnings);
|
||||
if (numErrors > 0)
|
||||
{
|
||||
g_StdOut << endl << "Errors: " << numErrors;
|
||||
return NExitCode::kFatalError;
|
||||
}
|
||||
if (result != S_OK)
|
||||
throw CSystemException(result);
|
||||
*/
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// StdAfx.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
@@ -0,0 +1,11 @@
|
||||
// StdAfx.h
|
||||
|
||||
#ifndef ZIP7_INC_STDAFX_H
|
||||
#define ZIP7_INC_STDAFX_H
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1800
|
||||
#pragma warning(disable : 4464) // relative include path contains '..'
|
||||
#endif
|
||||
#include "../../../Common/Common.h"
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,137 @@
|
||||
PROG = 7zCon.sfx
|
||||
MY_CONSOLE = 1
|
||||
MY_FIXED = 1
|
||||
|
||||
CFLAGS = $(CFLAGS) \
|
||||
-DZ7_EXTRACT_ONLY \
|
||||
-DZ7_NO_READ_FROM_CODER \
|
||||
-DZ7_SFX \
|
||||
-DZ7_NO_LONG_PATH \
|
||||
-DZ7_NO_LARGE_PAGES \
|
||||
|
||||
CURRENT_OBJS = \
|
||||
$O\SfxCon.obj \
|
||||
|
||||
CONSOLE_OBJS = \
|
||||
$O\ConsoleClose.obj \
|
||||
$O\ExtractCallbackConsole.obj \
|
||||
$O\List.obj \
|
||||
$O\MainAr.obj \
|
||||
$O\OpenCallbackConsole.obj \
|
||||
$O\PercentPrinter.obj \
|
||||
$O\UserInputUtils.obj \
|
||||
|
||||
COMMON_OBJS = \
|
||||
$O\CommandLineParser.obj \
|
||||
$O\CRC.obj \
|
||||
$O\IntToString.obj \
|
||||
$O\MyString.obj \
|
||||
$O\MyVector.obj \
|
||||
$O\NewHandler.obj \
|
||||
$O\StdInStream.obj \
|
||||
$O\StdOutStream.obj \
|
||||
$O\StringConvert.obj \
|
||||
$O\UTFConvert.obj \
|
||||
$O\Wildcard.obj \
|
||||
|
||||
WIN_OBJS = \
|
||||
$O\DLL.obj \
|
||||
$O\ErrorMsg.obj \
|
||||
$O\FileDir.obj \
|
||||
$O\FileFind.obj \
|
||||
$O\FileIO.obj \
|
||||
$O\FileName.obj \
|
||||
$O\PropVariant.obj \
|
||||
$O\PropVariantConv.obj \
|
||||
$O\Synchronization.obj \
|
||||
$O\System.obj \
|
||||
$O\TimeUtils.obj \
|
||||
|
||||
7ZIP_COMMON_OBJS = \
|
||||
$O\CreateCoder.obj \
|
||||
$O\CWrappers.obj \
|
||||
$O\FilePathAutoRename.obj \
|
||||
$O\FileStreams.obj \
|
||||
$O\InBuffer.obj \
|
||||
$O\FilterCoder.obj \
|
||||
$O\LimitedStreams.obj \
|
||||
$O\OutBuffer.obj \
|
||||
$O\ProgressUtils.obj \
|
||||
$O\PropId.obj \
|
||||
$O\StreamBinder.obj \
|
||||
$O\StreamObjects.obj \
|
||||
$O\StreamUtils.obj \
|
||||
$O\VirtThread.obj \
|
||||
|
||||
UI_COMMON_OBJS = \
|
||||
$O\ArchiveExtractCallback.obj \
|
||||
$O\ArchiveOpenCallback.obj \
|
||||
$O\DefaultName.obj \
|
||||
$O\Extract.obj \
|
||||
$O\ExtractingFilePath.obj \
|
||||
$O\LoadCodecs.obj \
|
||||
$O\OpenArchive.obj \
|
||||
$O\PropIDUtils.obj \
|
||||
|
||||
AR_OBJS = \
|
||||
$O\SplitHandler.obj \
|
||||
|
||||
AR_COMMON_OBJS = \
|
||||
$O\CoderMixer2.obj \
|
||||
$O\ItemNameUtils.obj \
|
||||
$O\MultiStream.obj \
|
||||
$O\OutStreamWithCRC.obj \
|
||||
|
||||
7Z_OBJS = \
|
||||
$O\7zDecode.obj \
|
||||
$O\7zExtract.obj \
|
||||
$O\7zHandler.obj \
|
||||
$O\7zIn.obj \
|
||||
$O\7zRegister.obj \
|
||||
|
||||
COMPRESS_OBJS = \
|
||||
$O\Bcj2Coder.obj \
|
||||
$O\Bcj2Register.obj \
|
||||
$O\BcjCoder.obj \
|
||||
$O\BcjRegister.obj \
|
||||
$O\BranchMisc.obj \
|
||||
$O\BranchRegister.obj \
|
||||
$O\CopyCoder.obj \
|
||||
$O\CopyRegister.obj \
|
||||
$O\DeltaFilter.obj \
|
||||
$O\Lzma2Decoder.obj \
|
||||
$O\Lzma2Register.obj \
|
||||
$O\LzmaDecoder.obj \
|
||||
$O\LzmaRegister.obj \
|
||||
$O\PpmdDecoder.obj \
|
||||
$O\PpmdRegister.obj \
|
||||
|
||||
CRYPTO_OBJS = \
|
||||
$O\7zAes.obj \
|
||||
$O\7zAesRegister.obj \
|
||||
$O\MyAes.obj \
|
||||
|
||||
C_OBJS = \
|
||||
$O\7zStream.obj \
|
||||
$O\Alloc.obj \
|
||||
$O\Bcj2.obj \
|
||||
$O\Bra.obj \
|
||||
$O\Bra86.obj \
|
||||
$O\BraIA64.obj \
|
||||
$O\CpuArch.obj \
|
||||
$O\Delta.obj \
|
||||
$O\DllSecur.obj \
|
||||
$O\Lzma2Dec.obj \
|
||||
$O\Lzma2DecMt.obj \
|
||||
$O\LzmaDec.obj \
|
||||
$O\MtDec.obj \
|
||||
$O\Ppmd7.obj \
|
||||
$O\Ppmd7Dec.obj \
|
||||
$O\Threads.obj \
|
||||
|
||||
!include "../../Aes.mak"
|
||||
!include "../../Crc.mak"
|
||||
!include "../../LzmaDec.mak"
|
||||
!include "../../Sha256.mak"
|
||||
|
||||
!include "../../7zip.mak"
|
||||
@@ -0,0 +1,215 @@
|
||||
PROG = 7zCon
|
||||
|
||||
# IS_X64 = 1
|
||||
# USE_ASM = 1
|
||||
# ST_MODE = 1
|
||||
|
||||
include ../../LzmaDec_gcc.mak
|
||||
|
||||
|
||||
LOCAL_FLAGS_ST =
|
||||
MT_OBJS =
|
||||
|
||||
|
||||
ifdef SystemDrive
|
||||
IS_MINGW = 1
|
||||
else
|
||||
ifdef SYSTEMDRIVE
|
||||
# ifdef OS
|
||||
IS_MINGW = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ST_MODE
|
||||
|
||||
LOCAL_FLAGS_ST = -DZ7_ST
|
||||
|
||||
ifdef IS_MINGW
|
||||
MT_OBJS = \
|
||||
$O/Threads.o \
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
MT_OBJS = \
|
||||
$O/StreamBinder.o \
|
||||
$O/Synchronization.o \
|
||||
$O/VirtThread.o \
|
||||
$O/Threads.o \
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
LOCAL_FLAGS_SYS =
|
||||
|
||||
ifdef IS_MINGW
|
||||
|
||||
LOCAL_FLAGS_SYS = \
|
||||
-DZ7_NO_LONG_PATH \
|
||||
-DZ7_NO_LARGE_PAGES \
|
||||
|
||||
SYS_OBJS = \
|
||||
$O/DLL.o \
|
||||
$O/DllSecur.o \
|
||||
$O/resource.o \
|
||||
|
||||
else
|
||||
|
||||
SYS_OBJS = \
|
||||
$O/MyWindows.o \
|
||||
|
||||
endif
|
||||
|
||||
LOCAL_FLAGS = \
|
||||
-DZ7_EXTRACT_ONLY \
|
||||
-DZ7_NO_READ_FROM_CODER \
|
||||
-DZ7_SFX \
|
||||
$(LOCAL_FLAGS_ST) \
|
||||
$(LOCAL_FLAGS_SYS) \
|
||||
|
||||
|
||||
CURRENT_OBJS = \
|
||||
$O/SfxCon.o \
|
||||
|
||||
CONSOLE_OBJS = \
|
||||
$O/ConsoleClose.o \
|
||||
$O/ExtractCallbackConsole.o \
|
||||
$O/List.o \
|
||||
$O/MainAr.o \
|
||||
$O/OpenCallbackConsole.o \
|
||||
$O/PercentPrinter.o \
|
||||
$O/UserInputUtils.o \
|
||||
|
||||
COMMON_OBJS = \
|
||||
$O/CommandLineParser.o \
|
||||
$O/CRC.o \
|
||||
$O/IntToString.o \
|
||||
$O/MyString.o \
|
||||
$O/MyVector.o \
|
||||
$O/NewHandler.o \
|
||||
$O/Sha256Prepare.o \
|
||||
$O/StdInStream.o \
|
||||
$O/StdOutStream.o \
|
||||
$O/StringConvert.o \
|
||||
$O/UTFConvert.o \
|
||||
$O/Wildcard.o \
|
||||
|
||||
WIN_OBJS = \
|
||||
\
|
||||
$O/ErrorMsg.o \
|
||||
$O/FileDir.o \
|
||||
$O/FileFind.o \
|
||||
$O/FileIO.o \
|
||||
$O/FileName.o \
|
||||
$O/PropVariant.o \
|
||||
$O/PropVariantConv.o \
|
||||
\
|
||||
$O/System.o \
|
||||
$O/TimeUtils.o \
|
||||
|
||||
7ZIP_COMMON_OBJS = \
|
||||
$O/CreateCoder.o \
|
||||
$O/CWrappers.o \
|
||||
$O/FilePathAutoRename.o \
|
||||
$O/FileStreams.o \
|
||||
$O/InBuffer.o \
|
||||
$O/FilterCoder.o \
|
||||
$O/LimitedStreams.o \
|
||||
$O/OutBuffer.o \
|
||||
$O/ProgressUtils.o \
|
||||
$O/PropId.o \
|
||||
\
|
||||
$O/StreamObjects.o \
|
||||
$O/StreamUtils.o \
|
||||
\
|
||||
|
||||
UI_COMMON_OBJS = \
|
||||
$O/ArchiveExtractCallback.o \
|
||||
$O/ArchiveOpenCallback.o \
|
||||
$O/DefaultName.o \
|
||||
$O/Extract.o \
|
||||
$O/ExtractingFilePath.o \
|
||||
$O/LoadCodecs.o \
|
||||
$O/OpenArchive.o \
|
||||
$O/PropIDUtils.o \
|
||||
|
||||
AR_OBJS = \
|
||||
$O/SplitHandler.o \
|
||||
|
||||
AR_COMMON_OBJS = \
|
||||
$O/CoderMixer2.o \
|
||||
$O/ItemNameUtils.o \
|
||||
$O/MultiStream.o \
|
||||
$O/OutStreamWithCRC.o \
|
||||
|
||||
7Z_OBJS = \
|
||||
$O/7zDecode.o \
|
||||
$O/7zExtract.o \
|
||||
$O/7zHandler.o \
|
||||
$O/7zIn.o \
|
||||
$O/7zRegister.o \
|
||||
|
||||
COMPRESS_OBJS = \
|
||||
$O/Bcj2Coder.o \
|
||||
$O/Bcj2Register.o \
|
||||
$O/BcjCoder.o \
|
||||
$O/BcjRegister.o \
|
||||
$O/BranchMisc.o \
|
||||
$O/BranchRegister.o \
|
||||
$O/CopyCoder.o \
|
||||
$O/CopyRegister.o \
|
||||
$O/DeltaFilter.o \
|
||||
$O/Lzma2Decoder.o \
|
||||
$O/Lzma2Register.o \
|
||||
$O/LzmaDecoder.o \
|
||||
$O/LzmaRegister.o \
|
||||
$O/PpmdDecoder.o \
|
||||
$O/PpmdRegister.o \
|
||||
|
||||
CRYPTO_OBJS = \
|
||||
$O/7zAes.o \
|
||||
$O/7zAesRegister.o \
|
||||
$O/MyAes.o \
|
||||
|
||||
C_OBJS = \
|
||||
$O/7zStream.o \
|
||||
$O/Alloc.o \
|
||||
$O/Bcj2.o \
|
||||
$O/Bra.o \
|
||||
$O/Bra86.o \
|
||||
$O/BraIA64.o \
|
||||
$O/CpuArch.o \
|
||||
$O/Delta.o \
|
||||
$O/Lzma2Dec.o \
|
||||
$O/Lzma2DecMt.o \
|
||||
$O/LzmaDec.o \
|
||||
$O/MtDec.o \
|
||||
$O/Ppmd7.o \
|
||||
$O/Ppmd7Dec.o \
|
||||
$O/Sha256.o \
|
||||
$O/Sha256Opt.o \
|
||||
$O/7zCrc.o \
|
||||
$O/7zCrcOpt.o \
|
||||
$O/Aes.o \
|
||||
$O/AesOpt.o \
|
||||
|
||||
OBJS = \
|
||||
$(LZMA_DEC_OPT_OBJS) \
|
||||
$(C_OBJS) \
|
||||
$(MT_OBJS) \
|
||||
$(SYS_OBJS) \
|
||||
$(COMMON_OBJS) \
|
||||
$(WIN_OBJS) \
|
||||
$(COMPRESS_OBJS) \
|
||||
$(CRYPTO_OBJS) \
|
||||
$(7ZIP_COMMON_OBJS) \
|
||||
$(AR_OBJS) \
|
||||
$(AR_COMMON_OBJS) \
|
||||
$(7Z_OBJS) \
|
||||
$(UI_COMMON_OBJS) \
|
||||
$(CONSOLE_OBJS) \
|
||||
$(CURRENT_OBJS) \
|
||||
|
||||
include ../../7zip_gcc.mak
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "../../MyVersionInfo.rc"
|
||||
|
||||
MY_VERSION_INFO_APP("7z Console SFX", "7z.sfx")
|
||||
|
||||
101 ICON "7z.ico"
|
||||
|
||||
#ifndef UNDER_CE
|
||||
1 24 MOVEABLE PURE "../../UI/Console/Console.manifest"
|
||||
#endif
|
||||
Reference in New Issue
Block a user