From 9925001dc2098069a2b9884cc008e3d8f369bd73 Mon Sep 17 00:00:00 2001 From: Maximus5 Date: Sat, 26 Dec 2020 20:20:27 +0100 Subject: [PATCH] Add dir_b3 missed files --- Dir_b3/.gitignore | 14 + Dir_b3/CompilePlugVC.bat | 143 +++++++++ Dir_b3/Descript.ion | 3 + Dir_b3/Dir_fmt_exe.vcproj | 256 ++++++++++++++++ Dir_b3/Dir_fmt_exe.vcxproj.filters | 25 ++ Dir_b3/Info.vcproj | 462 +++++++++++++++++++++++++++++ Dir_b3/Info.vcxproj.filters | 27 ++ Dir_b3/ModuleDef_old.h | 100 +++++++ Dir_b3/StdAfx.cpp | 8 + Dir_b3/dir_b3.vcxproj | 262 ++++++++++++++++ Dir_b3/dir_fmt_exe.vcxproj | 117 ++++++++ 11 files changed, 1417 insertions(+) create mode 100644 Dir_b3/.gitignore create mode 100644 Dir_b3/CompilePlugVC.bat create mode 100644 Dir_b3/Descript.ion create mode 100644 Dir_b3/Dir_fmt_exe.vcproj create mode 100644 Dir_b3/Dir_fmt_exe.vcxproj.filters create mode 100644 Dir_b3/Info.vcproj create mode 100644 Dir_b3/Info.vcxproj.filters create mode 100644 Dir_b3/ModuleDef_old.h create mode 100644 Dir_b3/StdAfx.cpp create mode 100644 Dir_b3/dir_b3.vcxproj create mode 100644 Dir_b3/dir_fmt_exe.vcxproj diff --git a/Dir_b3/.gitignore b/Dir_b3/.gitignore new file mode 100644 index 0000000..1acbe4b --- /dev/null +++ b/Dir_b3/.gitignore @@ -0,0 +1,14 @@ +.vs +*.7z +*.pdb +*.dsp +*-del +*.exe +*.dsw +*.plg +*.opt +/obj +/x64 +/Debug +/Release +/_* diff --git a/Dir_b3/CompilePlugVC.bat b/Dir_b3/CompilePlugVC.bat new file mode 100644 index 0000000..2f21647 --- /dev/null +++ b/Dir_b3/CompilePlugVC.bat @@ -0,0 +1,143 @@ +@echo off +@cls + +rem =============== Use Microsoft Visual Studio .NET 2003 ====================== + +rem @call "%VS60COMN%\..\VC98\Bin\VCVARS32.BAT" +rem if exist "%VS71COMNTOOLS%\vsvars32.bat" call "%VS71COMNTOOLS%\vsvars32.bat" +if exist "%VS90COMNTOOLS%..\..\VC\BIN\vcvars32.bat" call "%VS90COMNTOOLS%..\..\VC\BIN\vcvars32.bat" + +rem ======================== Set name and version ... ========================= + +@set PlugName=Dir +@set fileversion=3,0,0,5 +@set fileversion_str=3.0 build 5 +@set comments=Current developer: ConEmu.Maximus5@gmail.com +@set filedescription=DIR XP/2003/Vista/7 parse for FAR Manager +@set legalcopyright= Alexander Arefiev 2001, @ Maximus5 2012 + +rem ==================== remove temp files ==================================== + +if not exist %PlugName%.map goto nomap +attrib -H %PlugName%.map +del %PlugName%.map +:nomap + +rem ==================== Make %PlugName%.def file... ========================== + +rem @if not exist %PlugName%.def ( +echo Make %PlugName%.def file... + +rem @echo LIBRARY %PlugName%.so > %PlugName%.def +@echo EXPORTS > %PlugName%.def +@echo IsArchive >> %PlugName%.def +@echo OpenArchive >> %PlugName%.def +@echo GetArcItem >> %PlugName%.def +@echo CloseArchive >> %PlugName%.def +@echo GetFormatName >> %PlugName%.def +@echo GetDefaultCommands >> %PlugName%.def +@echo LoadSubModule >> %PlugName%.def +@echo UnloadSubModule >> %PlugName%.def +rem @echo SetFarInfo >> %PlugName%.def + +@if exist %PlugName%.def echo ... succesfully +rem ) + +rem ================== Make %PlugName%.rc file... ============================= + +@if not exist %PlugName%.rc ( +echo Make %PlugName%.rc file... + +@echo #define VERSIONINFO_1 1 > %PlugName%.rc +@echo. >> %PlugName%.rc +@echo VERSIONINFO_1 VERSIONINFO >> %PlugName%.rc +@echo FILEVERSION %fileversion% >> %PlugName%.rc +@echo PRODUCTVERSION 1,71,0,0 >> %PlugName%.rc +@echo FILEFLAGSMASK 0x0 >> %PlugName%.rc +@echo FILEFLAGS 0x0 >> %PlugName%.rc +@echo FILEOS 0x4 >> %PlugName%.rc +@echo FILETYPE 0x2 >> %PlugName%.rc +@echo FILESUBTYPE 0x0 >> %PlugName%.rc +@echo { >> %PlugName%.rc +@echo BLOCK "StringFileInfo" >> %PlugName%.rc +@echo { >> %PlugName%.rc +@echo BLOCK "000004E4" >> %PlugName%.rc +@echo { >> %PlugName%.rc +@echo VALUE "CompanyName", "%companyname%\0" >> %PlugName%.rc +@echo VALUE "FileDescription", "%filedescription%\0" >> %PlugName%.rc +@echo VALUE "FileVersion", "%fileversion_str%\0" >> %PlugName%.rc +@echo VALUE "InternalName", "%PlugName%\0" >> %PlugName%.rc +@echo VALUE "LegalCopyright", "%legalcopyright%\0" >> %PlugName%.rc +@echo VALUE "OriginalFilename", "%PlugName%.fmt\0" >> %PlugName%.rc +@echo VALUE "ProductName", "FAR Manager\0" >> %PlugName%.rc +@echo VALUE "ProductVersion", "1.71\0" >> %PlugName%.rc +@echo VALUE "Comments", "%comments%\0" >> %PlugName%.rc +@echo } >> %PlugName%.rc +@echo } >> %PlugName%.rc +@echo BLOCK "VarFileInfo" >> %PlugName%.rc +@echo { >> %PlugName%.rc +@echo VALUE "Translation", 0, 0x4e4 >> %PlugName%.rc +@echo } >> %PlugName%.rc +@echo } >> %PlugName%.rc + +@if exist %PlugName%.rc echo ... succesfully +) + +rem ==================== Compile %PlugName%.fmt file...======================== + +@if exist %PlugName%.fmt del %PlugName%.fmt>nul +@if exist %PlugName%.so del %PlugName%.so>nul +@rc /l 0x4E4 %PlugName%.rc +if errorlevel 1 goto err1 + +rem @echo !!!!!!! Compile %PlugName%.fmt with MSVCRT.dll ... !!!!!!! +@echo *************** +set libcrt= +if exist libCRT.lib set libcrt=/nodefaultlib libCRT.lib +@cl /Zp8 /O2 /GF /Gr /GR- /EHs-c- /MT %PlugName%.cpp /link /DLL /RELEASE /subsystem:console /machine:I386 /noentry /def:%PlugName%.def %libcrt% kernel32.lib User32.lib %PlugName%.res /map:"%PlugName%.map" /out:"%PlugName%.so" /merge:.rdata=.text +if errorlevel 1 goto err1 + +if not exist "%VS90COMNTOOLS%..\..\VC\BIN\x86_amd64\vcvarsx86_amd64.bat" goto no_x64 +call "%VS90COMNTOOLS%..\..\VC\BIN\x86_amd64\vcvarsx86_amd64.bat" + +if exist %PlugName%.exp del %PlugName%.exp>nul +if exist %PlugName%.obj del %PlugName%.obj>nul +if exist %PlugName%.lib del %PlugName%.lib>nul +if exist %PlugName%.res del %PlugName%.res>nul + +@if exist %PlugName%64.fmt del %PlugName%64.fmt>nul +@if exist %PlugName%64.so del %PlugName%64.so>nul + +@rc /D_WIN64 /l 0x4E4 %PlugName%.rc +if errorlevel 1 goto err1 + +set libcrt= +if exist libCRT64.lib set libcrt=/nodefaultlib libCRT64.lib +@cl /Zp8 /O2 /GF /Gr /GR- /EHs-c- /MT %PlugName%.cpp /link /DLL /RELEASE /subsystem:console /machine:X64 /noentry /def:%PlugName%.def %libcrt% kernel32.lib User32.lib %PlugName%.res /map:"%PlugName%64.map" /out:"%PlugName%64.so" /merge:.rdata=.text +if errorlevel 1 goto err1 + +:no_x64 +if exist %PlugName%.exp del %PlugName%.exp>nul +if exist %PlugName%64.exp del %PlugName%64.exp>nul +if exist %PlugName%.obj del %PlugName%.obj>nul +if exist %PlugName%.lib del %PlugName%.lib>nul +if exist %PlugName%64.lib del %PlugName%64.lib>nul +if exist %PlugName%.res del %PlugName%.res>nul +if exist %PlugName%.def del %PlugName%.def>nul +if exist %PlugName%.rc del %PlugName%.rc>nul +rem if exist %PlugName%.map del %PlugName%.map>nul + +echo *************** + + + +rem if not exist dir.fmt goto err1 +rem if exist E:\Far\Plugins\MultiArc\Formats\Dir.fm_ del E:\Far\Plugins\MultiArc\Formats\Dir.fm_ +rem if exist E:\Far\Plugins\MultiArc\Formats\Dir.fmt ren E:\Far\Plugins\MultiArc\Formats\Dir.fmt Dir.fm_ +rem copy dir.fmt E:\Far\Plugins\MultiArc\Formats\Dir.fmt +rem +rem if exist E:\Far\Unicode\Plugins\MultiArc\Formats\Dir.fm_ del E:\Far\Unicode\Plugins\MultiArc\Formats\Dir.fm_ +rem if exist E:\Far\Unicode\Plugins\MultiArc\Formats\Dir.fmt ren E:\Far\Unicode\Plugins\MultiArc\Formats\Dir.fmt Dir.fm_ +rem copy dir.fmt E:\Far\Unicode\Plugins\MultiArc\Formats\Dir.fmt + +:err1 diff --git a/Dir_b3/Descript.ion b/Dir_b3/Descript.ion new file mode 100644 index 0000000..c1c7a1e --- /dev/null +++ b/Dir_b3/Descript.ion @@ -0,0 +1,3 @@ +local.dir !!! 室! +fmt.hpp Archive Support API for FAR Manager 1.75 and MultiArc plugin (C/C++) +plugin.hpp Plugin API for FAR Manager 1.75 (C/C++) diff --git a/Dir_b3/Dir_fmt_exe.vcproj b/Dir_b3/Dir_fmt_exe.vcproj new file mode 100644 index 0000000..7da3b4b --- /dev/null +++ b/Dir_b3/Dir_fmt_exe.vcproj @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dir_b3/Dir_fmt_exe.vcxproj.filters b/Dir_b3/Dir_fmt_exe.vcxproj.filters new file mode 100644 index 0000000..4c02e47 --- /dev/null +++ b/Dir_b3/Dir_fmt_exe.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {bca8d7af-3a7c-4598-8269-fcce8d19cd13} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {4f27fc38-78bd-4f1d-98d3-a3ed241f6abf} + h;hpp;hxx;hm;inl + + + {86ad2920-138f-4c00-9d46-7e9db832136d} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Dir_b3/Info.vcproj b/Dir_b3/Info.vcproj new file mode 100644 index 0000000..4b9221f --- /dev/null +++ b/Dir_b3/Info.vcproj @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Dir_b3/Info.vcxproj.filters b/Dir_b3/Info.vcxproj.filters new file mode 100644 index 0000000..6bb7da5 --- /dev/null +++ b/Dir_b3/Info.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {ebdf81ab-cb8b-4413-a964-7e0928513661} + cpp;c;cxx;rc;def;r;odl;idl;hpj;bat + + + {b935d3bb-9db4-4d1d-a9da-6871ca667582} + h;hpp;hxx;hm;inl + + + {7fbe83ff-35b1-4dc0-b9b0-a65506111c5b} + ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe + + + + + Source Files + + + + + Source Files + + + \ No newline at end of file diff --git a/Dir_b3/ModuleDef_old.h b/Dir_b3/ModuleDef_old.h new file mode 100644 index 0000000..3ffbab3 --- /dev/null +++ b/Dir_b3/ModuleDef_old.h @@ -0,0 +1,100 @@ +#ifndef _MODULE_DEF_H_ +#define _MODULE_DEF_H_ + +#define MODULE_EXPORT __stdcall + +// Extract progress callbacks +typedef int (CALLBACK *ExtractProgressFunc)(HANDLE, __int64); + +struct ExtractProcessCallbacks +{ + HANDLE signalContext; + ExtractProgressFunc FileProgress; +}; + +#define ACTUAL_API_VERSION 3 +#define STORAGE_FORMAT_NAME_MAX_LEN 32 +#define STORAGE_PARAM_MAX_LEN 64 + +struct StorageGeneralInfo +{ + wchar_t Format[STORAGE_FORMAT_NAME_MAX_LEN]; + wchar_t Compression[STORAGE_PARAM_MAX_LEN]; + wchar_t Comment[STORAGE_PARAM_MAX_LEN]; + FILETIME Created; +}; + +struct StorageOpenParams +{ + const wchar_t* FilePath; + const char* Password; +}; + +struct StorageItemInfo +{ + DWORD Attributes; + __int64 Size; + FILETIME CreationTime; + FILETIME ModificationTime; + wchar_t Path[1024]; +}; + +struct ExtractOperationParams +{ + int item; + int flags; + const wchar_t* destFilePath; + ExtractProcessCallbacks callbacks; +}; + +typedef int (MODULE_EXPORT *OpenStorageFunc)(StorageOpenParams, HANDLE*, StorageGeneralInfo*); +typedef void (MODULE_EXPORT *CloseStorageFunc)(HANDLE); +typedef int (MODULE_EXPORT *GetItemFunc)(HANDLE, int, StorageItemInfo*); +typedef int (MODULE_EXPORT *ExtractFunc)(HANDLE, ExtractOperationParams params); + +struct ModuleLoadParameters +{ + //IN + const wchar_t* Settings; + //OUT + DWORD ModuleVersion; + DWORD ApiVersion; + OpenStorageFunc OpenStorage; + CloseStorageFunc CloseStorage; + GetItemFunc GetItem; + ExtractFunc ExtractItem; +}; + +// Function that should be exported from modules +typedef int (MODULE_EXPORT *LoadSubModuleFunc)(ModuleLoadParameters*); +typedef void (MODULE_EXPORT *UnloadSubModuleFunc)(void); + +#define MAKEMODULEVERSION(mj,mn) ((mj << 16) | mn) +#define STRBUF_SIZE(x) ( sizeof(x) / sizeof(x[0]) ) + +// Open storage return results +#define SOR_INVALID_FILE 0 +#define SOR_SUCCESS 1 +#define SOR_PASSWORD_REQUIRED 2 + +// Item retrieval result +#define GET_ITEM_ERROR 0 +#define GET_ITEM_OK 1 +#define GET_ITEM_NOMOREITEMS 2 + +// Extract result +#define SER_SUCCESS 0 +#define SER_ERROR_WRITE 1 +#define SER_ERROR_READ 2 +#define SER_ERROR_SYSTEM 3 +#define SER_USERABORT 4 + +// Extract error reactions +#define EEN_ABORT 1 +#define EEN_RETRY 2 +#define EEN_SKIP 3 +#define EEN_SKIPALL 4 +#define EEN_CONTINUE 5 +#define EEN_CONTINUESILENT 6 + +#endif diff --git a/Dir_b3/StdAfx.cpp b/Dir_b3/StdAfx.cpp new file mode 100644 index 0000000..5a56048 --- /dev/null +++ b/Dir_b3/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Dir_fmt_exe.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Dir_b3/dir_b3.vcxproj b/Dir_b3/dir_b3.vcxproj new file mode 100644 index 0000000..f187d26 --- /dev/null +++ b/Dir_b3/dir_b3.vcxproj @@ -0,0 +1,262 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + dir_b3 + {CE5DE198-A8B4-4BBC-BDB7-253EA2C646A1} + dir_3 + 10.0 + + + + DynamicLibrary + v141_xp + false + MultiByte + + + DynamicLibrary + v141_xp + false + MultiByte + + + DynamicLibrary + v142 + false + MultiByte + + + DynamicLibrary + v142 + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>16.0.30323.82 + + + $(Configuration)\ + obj\$(Platform)\$(Configuration)\ + true + .so + dir + + + $(Configuration)\ + obj\$(Platform)\$(Configuration)\ + true + dir64 + .so + + + $(Configuration)\ + obj\$(Platform)\$(Configuration)\ + false + .so + dir + + + $(Configuration)\ + obj\$(Platform)\$(Configuration)\ + false + dir64 + .so + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;INFO_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0419 + + + true + .\dir_b3.def + true + false + + MachineX86 + Windows + + + true + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;INFO_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + Level3 + true + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0419 + + + true + .\dir_b3.def + true + false + + MachineX64 + 7.0 + Windows + + + true + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;_USRDLL;INFO_EXPORTS;%(PreprocessorDefinitions) + true + MultiThreaded + true + Level3 + true + ProgramDatabase + + + NDEBUG;%(PreprocessorDefinitions) + 0x0419 + + + kernel32.lib;user32.lib;%(AdditionalDependencies) + true + .\dir_b3.def + true + true + false + + MachineX86 + Windows + + + true + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_WINDOWS;_USRDLL;INFO_EXPORTS;%(PreprocessorDefinitions) + true + MultiThreaded + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0419 + + + kernel32.lib;user32.lib;%(AdditionalDependencies) + true + .\dir_b3.def + true + false + + MachineX64 + 7.0 + Windows + + + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Dir_b3/dir_fmt_exe.vcxproj b/Dir_b3/dir_fmt_exe.vcxproj new file mode 100644 index 0000000..5668483 --- /dev/null +++ b/Dir_b3/dir_fmt_exe.vcxproj @@ -0,0 +1,117 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {2C08961C-89C1-4263-AA60-820B4C82B4E3} + 10.0 + + + + Application + v142 + false + MultiByte + + + Application + v142 + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>16.0.30323.82 + + + false + + + true + + + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0419 + + + Dir.fmt.exe + true + Console + false + + MachineX86 + + + true + + + + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0400;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0419 + + + true + true + Console + false + + MachineX86 + + + true + + + + + + + + + + \ No newline at end of file