Skip to content

Commit

Permalink
arclite b246 -- 0002758: Распаковка файлов с некорректными именами
Browse files Browse the repository at this point in the history
  • Loading branch information
w17 committed Jan 10, 2017
1 parent d2dd02f commit f47e469
Show file tree
Hide file tree
Showing 10 changed files with 481 additions and 190 deletions.
25 changes: 25 additions & 0 deletions plugins/arclite/arclite-extra.farconfig
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<farconfig version="3.0.4881">
<pluginsconfig>
<plugin guid="65642111-AA69-4B84-B4B8-9249579EC4FA">
<hierarchicalconfig>
<key name="65642111-AA69-4B84-B4B8-9249579EC4FA" description="arclite">

<value name="max_check_size" type="qword" value="0000000000800000" />
<!-- 8MB (default = 1MB) -->

<value name="correct_name_mode" type="qword" value="0000000000000013" />
<!-- 0x10 correct empty filenames ("" converted to "_") -->
<!-- 0x20 remove trailing dots/spaces -->
<!-- 0x40 corrcet reserved names (NUL, LPT1, ...) -->
<!-- ==== < > : * ? "" | / \ '\x01' ... '\x1f' -->
<!-- 0x.0 < > : * ? "" | / \ '\x01' ... '\x1f' -->
<!-- 0x.1 _ _ _ _ _ __ _ _ _ _______________________________ -->
<!-- 0x.2 « » = ¤ ¿ “” ¦ ⁄ ¬ ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ -->
<!-- 0x.3 « » ։ ✶ ¿ “” ¦ ⁄ ¬ ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ -->
<!-- default = 0x12 -->
</key>
</hierarchicalconfig>
</plugin>
</pluginsconfig>
</farconfig>
58 changes: 58 additions & 0 deletions plugins/arclite/build.bat
@@ -0,0 +1,58 @@
@echo off
rem =======================================================
rem build [Debug|Release] [nmake|msbuild] [clean] [vcNN] ==
rem build 7z [overwrite] [vcNN] ==
rem =======================================================

set "c=Release" & set "c1=" & set "clean=N" & set "over=N"
set "m=nmake" & rem msbuild

call "%~dp0..\..\unicode_far\build.bat" set_vcver %*
for %%a in (%*) do call :opts %%a

call :copy_7z "%~dp0" 7z\dll\final.32W.vc 7z\src\CPP\7zip\Bundles\Format7zF\Debug
call :copy_7z "%~dp0" 7z\dll\final.64W.vc 7z\src\CPP\7zip\Bundles\Format7zF\x64\Debug
if /i "%m%" == "7z" goto :EOF

:cont
pushd "%~dp0"
call :build x86 X86 Win32
call :build x86_amd64 AMD64 x64
popd
goto :EOF

:build
call :set_vc %1
if /i "%clean%" == "Y" goto :clean
if /i "%m%"=="nmake" %m% -nologo -f makefile_vc CPU=%2 VisualStudioVersion=%vcver%.0 %c1%
if /i "%m%"=="msbuild" %m% arclite.vcxproj /nologo /t:Build /p:Configuration=%c%;Platform=%3
goto :EOF
:clean
if /i "%m%"=="nmake" %m% -nologo -f makefile_vc CPU=%2 VisualStudioVersion=%vcver%.0 %c1% clean
if /i "%m%"=="msbuild" %m% arclite.vcxproj /nologo /t:Clean /p:Configuration=%c%;Platform=%3
goto :EOF

:copy_7z
if /i not "%over%" == "Y" if exist "%~1%~3\7z.dll" goto :EOF
if not exist "%~1%~3\*" echo md "%~3"
if not exist "%~1%~3\*" md "%~1%~3"
echo copy /y "%~2\7z.dll" "%~3\7z.dll"
copy 1>nul /y "%~1%~2\7z.dll" "%~1%~3\7z.dll"
goto :EOF

:opts
if /i "%~1" == "Debug" set "c=Debug" & set "c1=DEBUG=1"
if /i "%~1" == "Release" set "c=Release" & set "c1="
if /i "%~1" == "nmake" set "m=nmake"
if /i "%~1" == "msbuild" set "m=msbuild"
if /i "%~1" == "clean" set "clean=Y"
if /i "%~1" == "clear" set "clean=Y"
if /i "%~1" == "7z" set "m=7z"
if /i "%~1" == "over" set "over=Y"
if /i "%~1" == "overwrite" set "over=Y"
if /i "%~1" == "copy" set "over=Y"
goto :EOF

:set_vc
call "%~dp0..\..\unicode_far\build.bat" set_vcvars %1
goto :EOF

0 comments on commit f47e469

Please sign in to comment.