问题描述
摘要:
我无法获取JCL压缩库以打开任何跨区存档。
它提供了在borlands'windows.pas';
scenerios: / p>
使用JCL压缩示例压缩的单个归档。
- 在JCL示例和7zip gui中都解压缩。
/ p>
使用JCL压缩示例压缩的7个文件的跨区存档。
- 仅在7zip gui中解压缩。使用JCL示例无法解压缩。
使用7zip gui压缩的单个归档。
- 在JCL示例和7zip中都解压缩gui。
使用7zip gui压缩7个文件的跨区存档。
- 只在7zip gui中解压缩。无法使用JCL解压缩
额外信息
压缩演示是JCL库附带的一个。
JCL:2.2.1.3970
7zip dll:9.20.0.0和9.65.0.0
跨区存档集中的示例文件名:Test Archive.7z.002
尝试使用.tar和.7z两个文件压缩
文件
一个
使用了不同的文件大小。 2048个字节和2048KB
Delphi 2009.
这是代码im。
它来自JCL压缩演示。
错误发生在行'TJclDecompressArchive(FArchive).ListFiles'。
procedure TFormMain.ActionOpenROExecute(Sender:TObject) ;
var
ArchiveFileName,Password:string;
AFormat:TJclDecompressArchiveClass;
SplitArchive:Boolean;
begin
如果OpenDialogArchiveRO.Execute then
begin
CloseArchive;
ArchiveFileName:= OpenDialogArchiveRO.FileName;
SplitArchive:= AnsiSameText(ExtractFileExt(ArchiveFileName),'.001');
如果SplitArchive然后
ArchiveFileName:= ChangeFileExt(ArchiveFileName,'');
AFormat:= GetArchiveFormats.FindDecompressFormat(ArchiveFileName);
if AFormat<> nil then
begin
if SplitArchive then
ArchiveFileName:= ArchiveFileName +'。%。3d';
InputQuery('Archive password','Value',Password);
FArchive:= AFormat.Create(ArchiveFileName,0,SplitArchive);
FArchive.Password:=密码;
FArchive.OnProgress:= ArchiveProgress;
如果FArchive是TJclDecompressArchive然后
TJclDecompressArchive(FArchive).ListFiles
else
如果FArchive是TJclUpdateArchive然后
TJclUpdateArchive(FArchive).ListFiles;
ListView1.Items.BeginUpdate;
try
while ListView1.Items.Count< FArchive.ItemCount do
ListView1.Items.Add;
finally
ListView1.Items.EndUpdate;
end;
end
else
ShowMessage('not a supported format');
end;
end;
JCL示例知道文件并打开它们。
(zip格式用于图像。同样的问题)。
之前有人曾经遇到过这个问题吗?。$ $ $
任何人都可以指向正确的方向?。$
谢谢您的时间。
Scott M。
Project JEDI中存在此错误 - 问题跟踪器。
两种可能的解决方法
- 将JCL安装升级到
-
在
过程TJclSevenzipDecompressArchive.OpenArchive中注释
JclCompression.pas
//注释此行!
SevenzipCheck(InArchive.Open(AInStream,@MaxCheckStartPosition,OpenCallback) );
Summary:
I am having trouble to get the JCL compression library to open any spanned archives.It presents the error "(0000001) Incorrect Function" as defined in borlands 'windows.pas';
scenerios:
A single archive compressed using the JCL compression example.
-Will uncompress in both the JCL example and the 7zip gui.
A spanned archive over 7 files compressed using the JCL compression example.
-Will uncompress in only the 7zip gui. Fails to uncompress using JCL example.
A single archive compressed using the 7zip gui.
-Will uncompress in both the JCL example and the 7zip gui.
A spanned archive compressed over 7 files using the 7zip gui.
-Will uncompress in only the 7zip gui. Fails to uncompress using JCL
Extra information
The JCL compression demo is the one included with the JCL library.
JCL: 2.2.1.3970
7zip dll: 9.20.0.0 and 9.65.0.0
Example filename in spanned archive set: "Test Archive.7z.002"
Tried with both .tar and .7z compression
Different file sizes were used. 2048 bytes and 2048KB
Delphi 2009.
This is the code im using.Its from the JCL compression demo.Error occurs on line 'TJclDecompressArchive(FArchive).ListFiles'.
procedure TFormMain.ActionOpenROExecute(Sender: TObject);
var
ArchiveFileName, Password: string;
AFormat: TJclDecompressArchiveClass;
SplitArchive: Boolean;
begin
if OpenDialogArchiveRO.Execute then
begin
CloseArchive;
ArchiveFileName := OpenDialogArchiveRO.FileName;
SplitArchive := AnsiSameText(ExtractFileExt(ArchiveFileName), '.001');
if SplitArchive then
ArchiveFileName := ChangeFileExt(ArchiveFileName, '');
AFormat := GetArchiveFormats.FindDecompressFormat(ArchiveFileName);
if AFormat <> nil then
begin
if SplitArchive then
ArchiveFileName := ArchiveFileName + '.%.3d';
InputQuery('Archive password', 'Value', Password);
FArchive := AFormat.Create(ArchiveFileName, 0, SplitArchive);
FArchive.Password := Password;
FArchive.OnProgress := ArchiveProgress;
if FArchive is TJclDecompressArchive then
TJclDecompressArchive(FArchive).ListFiles
else
if FArchive is TJclUpdateArchive then
TJclUpdateArchive(FArchive).ListFiles;
ListView1.Items.BeginUpdate;
try
while ListView1.Items.Count < FArchive.ItemCount do
ListView1.Items.Add;
finally
ListView1.Items.EndUpdate;
end;
end
else
ShowMessage('not a supported format');
end;
end;
The JCL example does know about the files and does open them.(zip format used in image. Same problem).
Prehaps someone has come across this before?.
Can anyone point me in the right direction please?.
Thank you for your time.
Scott M.
This bug exists in Project JEDI - Issue Tracker.
http://issuetracker.delphi-jedi.org/bug_view_advanced_page.php?bug_id=5137
Two possible work-around
- Upgrade your JCL installation to latest daily build
Comment the following line in
JclCompression.pas
atprocedure TJclSevenzipDecompressArchive.OpenArchive;
and rebuild the packages.// comment this line !
SevenzipCheck(InArchive.Open(AInStream, @MaxCheckStartPosition, OpenCallback));
这篇关于JEDI JCL压缩库不打开跨区存档文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!