Explorar el Código

Merge branch 'main' into files-downloadarchive

Martijn Laan hace 3 meses
padre
commit
547ac86850

+ 4 - 4
Files/Languages/Ukrainian.isl

@@ -3,14 +3,14 @@
 ; E-Mail: [email protected]
 ; Please report all spelling/grammar errors, and observations.
 ; Version 2020.08.04
-; Updated and Reviewed on 08.06.2025 by Sergii Leonov ([email protected])
+; Updated and Reviewed on 13.06.2025 by Sergii Leonov ([email protected])
 
 ; *** Український переклад Inno Setup для версії 6.5.0 та вище***
 ; Автор перекладу: Дмитро Онищук
 ; E-Mail: [email protected]
 ; Будь ласка, повідомляйте про всі знайдені помилки та зауваження.
 ; Версія перекладу 2020.08.04
-; Оновлено та переглянуто 08.06.2025, Сергій Леонов ([email protected])
+; Оновлено та переглянуто 13.06.2025, Сергій Леонов ([email protected])
 
 [LangOptions]
 LanguageName=<0423><043A><0440><0430><0457><043D><0441><044C><043A><0430>
@@ -209,8 +209,6 @@ StopDownload=Ви дійсно бажаєте перервати заванта
 ErrorDownloadAborted=Завантаження перервано
 ErrorDownloadFailed=Помилка завантаження: %1 %2
 ErrorDownloadSizeFailed=Помилка отримання розміру: %1 %2
-ErrorFileHash1=Помилка хешу файлу: %1
-ErrorFileHash2=Невірний хеш файлу: очікувався %1, отриманий %2
 ErrorProgress=Помилка виконання: %1 з %2
 ErrorFileSize=Невірний розмір файлу: очікувався %1, отриманий %2
 
@@ -275,6 +273,7 @@ AbortRetryIgnoreCancel=Відмінити встановлення
 StatusClosingApplications=Закриття програм...
 StatusCreateDirs=Створення тек...
 StatusExtractFiles=Розпакування файлів...
+StatusDownloadFiles=Завантаження файлів...
 StatusCreateIcons=Створення ярликів...
 StatusCreateIniEntries=Створення INI записів...
 StatusCreateRegistryEntries=Створення записів реєстру...
@@ -328,6 +327,7 @@ ErrorChangingAttr=Виникла помилка при спробі зміни 
 ErrorCreatingTemp=Виникла помилка при спробі створення файлу у теці встановлення:
 ErrorReadingSource=Виникла помилка при спробі читання вихідного файлу:
 ErrorCopying=Виникла помилка при спробі копіювання файлу:
+ErrorDownloading=Виникла помилка при спробі завантажити файл:
 ErrorExtracting=Виникла помилка при спробі розпакування архіву:
 ErrorReplacingExistingFile=Виникла помилка при спробі заміни існуючого файлу:
 ErrorRestartReplace=Помилка RestartReplace:

+ 24 - 10
Files/Languages/Unofficial/Lithuanian.isl

@@ -1,4 +1,4 @@
-; *** Inno Setup version 6.4.0+ Lithuanian messages ***
+; *** Inno Setup version 6.5.0+ Lithuanian messages ***
 ;
 ; To download user-contributed translations of this file, go to:
 ;   https://jrsoftware.org/files/istrans/
@@ -9,13 +9,15 @@
 ; two periods being displayed).
 ; Translated by Robertas Rimas (Loptar AT takas DOT lt)
 ; Corrected and updated by Rolandas Rudomanskis (rolandasr AT gmail DOT com)
-; Corrected and updated to version 6.0.3+ by Dalius Guzauskas (aka Tichij) (tichij AT mail DOT com)
+; Corrected and updated to version 6.5.0+ by Dalius Guzauskas (aka Tichij) (tichij AT mail DOT com)
 
 [LangOptions]
 ; The following three entries are very important. Be sure to read and 
 ; understand the '[LangOptions] section' topic in the help file.
 LanguageName=Lietuvi<0173>
 LanguageID=$0427
+; LanguageCodePage should always be set if possible, even if this file is Unicode
+; For English it's set to zero anyway because English only uses ASCII characters
 LanguageCodePage=1257
 ; If the language you are translating to requires special font faces or
 ; sizes, uncomment any of the following entries and change them accordingly.
@@ -220,17 +222,20 @@ StopDownload=Ar tikrai norite sustabdyti parsisiuntim
 ErrorDownloadAborted=Parsisiuntimas nutrauktas
 ErrorDownloadFailed=Parsisiøsti nepavyko: %1 %2
 ErrorDownloadSizeFailed=Nepavyko gauti dydþio: %1 %2
-ErrorFileHash1=Failo patikrinimas nepavyko: %1
-ErrorFileHash2=Neteisinga failo „hash“ reikðmë: numatyta %1, rasta %2
 ErrorProgress=Netinkama eiga: %1 ið %2
 ErrorFileSize=Neteisingas failo dydis: numatytas %1, rastas %2
 
-; *** TExtractionWizardPage wizard page and Extract7ZipArchive
-ExtractionLabel=Papildomø failø iðtraukimas...
-ButtonStopExtraction=&Stabdyti iðtraukimà
-StopExtraction=Ar tikrai norite sustabdyti iðtraukimà?
-ErrorExtractionAborted=Iðtraukimas nutrauktas
-ErrorExtractionFailed=Nepavyko iðtraukti: %1
+; *** TExtractionWizardPage wizard page and ExtractArchive
+ExtractionLabel=Papildomø failø iðpakavimas...
+ButtonStopExtraction=&Stabdyti iðpakavimà
+StopExtraction=Ar tikrai norite sustabdyti iðpakavimà?
+ErrorExtractionAborted=Iðpakavimas nutrauktas
+ErrorExtractionFailed=Nepavyko iðpakuoti: %1
+
+; *** Archive extraction failure details
+ArchiveIncorrectPassword=Slaptaþodis neteisingas
+ArchiveIsCorrupted=Archyvas sugadintas
+ArchiveUnsupportedFormat=Nepalaikomas archyvo formatas
 
 ; *** "Preparing to Install" wizard page
 WizardPreparing=Pasirengimas diegimui
@@ -281,6 +286,7 @@ AbortRetryIgnoreCancel=Nutraukti diegim
 StatusClosingApplications=Uþdaromos programos...
 StatusCreateDirs=Kuriami katalogai...
 StatusExtractFiles=Iðpakuojami failai...
+StatusDownloadFiles=Parsisiunèiami failai...
 StatusCreateIcons=Kuriamos nuorodos...
 StatusCreateIniEntries=Kuriami INI áraðai...
 StatusCreateRegistryEntries=Kuriami registro áraðai...
@@ -310,6 +316,12 @@ FileAbortRetryIgnoreSkipNotRecommended=Pralei&sti 
 FileAbortRetryIgnoreIgnoreNotRecommended=&Ignoruoti klaidà ir tæsti (nerekomenduojama)
 SourceIsCorrupted=Pradinis failas sugadintas
 SourceDoesntExist=Pradinio failo „%1“ nëra
+SourceVerificationFailed=Nepavyko patikrinti pradinio failo: %1
+VerificationSignatureDoesntExist=Paraðo failo „%1“ nëra
+VerificationSignatureInvalid=Paraðo failas „%1“ sugadintas
+VerificationKeyNotFound=Paraðo failas „%1“ naudoja neþinomà raktà
+VerificationFileSizeIncorrect=Neteisingas failo dydis
+VerificationFileHashIncorrect=Neteisinga failo „hash“ reikðmë
 ExistingFileReadOnly2=Esamas failas yra paþymëtas „Tik skaitymui“ todël negali bûti pakeistas.
 ExistingFileReadOnlyRetry=Paðalinkite at&ributà „Tik skaitymui“ ir bandykite vël
 ExistingFileReadOnlyKeepExisting=Pali&kti esamà failà
@@ -329,6 +341,8 @@ ErrorChangingAttr=Kei
 ErrorCreatingTemp=Kuriant failà pasirinktame kataloge ávyko klaida:
 ErrorReadingSource=Skaitant diegiamàjá failà ávyko klaida:
 ErrorCopying=Kopijuojant failà ávyko klaida:
+ErrorDownloading=Parsisiunèiant failà ávyko klaida:
+ErrorExtracting=Iðpakuojant archyvà ávyko klaida:
 ErrorReplacingExistingFile=Perraðant esamà failà ávyko klaida:
 ErrorRestartReplace=Perkrovimas/Perraðymas nepavyko:
 ErrorRenamingTemp=Pervadinant failà pasirinktame kataloge ávyko klaida:

BIN
Files/is7z.dll


+ 4 - 4
Files/is7z.dll.issig

@@ -1,6 +1,6 @@
 format issig-v1
-file-size 985232
-file-hash a97b9e6180c2051748b3403e210159293503889dcc78e943573ba56ffe52ec27
+file-size 992912
+file-hash 74081e3749ab6f833618c4a9efbb75537a4e68e6e0579a7b43270a38224dcb66
 key-id def0147c3bbc17ab99bf7b7a9c2de1390283f38972152418d7c2a4a7d7131a38
-sig-r b77f55d21a3a6f48e03c8ab75d4759f7e22c58a76d3261eecc83fbeb55ecf0e1
-sig-s 23a870023614c313f91d20b09c0d166524ab173dae7af4d87ae42c31b36db2df
+sig-r 8e2689da63e4c4f9926a1c24b3cc1a70b3523d36b64a2e526c1e0c96e79644e8
+sig-s 8cb1f83607d7e62c5538dbc819dd2b566f321bffb7fc48000e53343a6ef62496

+ 1 - 0
ISHelp/isetup.xml

@@ -4802,6 +4802,7 @@ ExtraDiskSpaceRequired=1_048_576</pre></example>
 </indent>
 <p>All methods overwrite read-only files which already exist in the destination directory without prompting the user.</p>
 <p>All methods restore the following file properties from the archive, if available: creation time, last modified time, attributes.</p>
+<p>When using the <tt>full</tt> method to extract a compressed archive, such as <i>archive.tar.gz</i>, or a split multi-volume archive, such as <i>archive.7z.001</i>, the output will be the archive file itself (e.g., <i>archive.tar</i> or <i>archive.7z</i>) rather than the individual files contained within it.</p>
 <p>The <tt>basic</tt> method has the following additional limitations, as written by Igor Pavlov in the LZMA SDK:</p>
 <ul>
 <li>It does not support PPMd and BZip2 methods.</li>

+ 8 - 1
Projects/Src/Compression.SevenZipDLLDecoder.Interfaces.pas

@@ -83,6 +83,7 @@ const
 
   { From PropID.h}
   kpidPath = 3;
+  kpidName = 4;
   kpidIsDir = 6;
   kpidSize = 7;
   kpidAttrib = 9;
@@ -128,7 +129,13 @@ type
     function SetCompleted(files, bytes: PUInt64): HRESULT; stdcall;
   end;
 
-  IArchiveExtractCallback = interface(IProgress)
+  IArchiveOpenVolumeCallback = interface
+  ['{23170F69-40C1-278A-0000-000600300000}']
+    function GetProperty(propID: PROPID; var value: OleVariant): HRESULT; stdcall;
+    function GetStream(const name: PChar; var inStream: IInStream): HRESULT; stdcall;
+  end;
+
+    IArchiveExtractCallback = interface(IProgress)
   ['{23170F69-40C1-278A-0000-000600200000}']
     function GetStream(index: UInt32; out outStream: ISequentialOutStream;
       askExtractMode: Int32): HRESULT; stdcall;

+ 50 - 2
Projects/Src/Compression.SevenZipDLLDecoder.pas

@@ -93,11 +93,19 @@ type
     constructor Create(const Password: String);
   end;
 
-  TArchiveOpenCallback = class(TArchiveCallback, IArchiveOpenCallback)
+  TArchiveOpenCallback = class(TArchiveCallback, IArchiveOpenCallback, IArchiveOpenVolumeCallback)
+  private
+    FDisableFsRedir: Boolean;
+    FArchiveFilename: String;
   protected
     { IArchiveOpenCallback }
     function SetTotal(files, bytes: PUInt64): HRESULT; stdcall;
     function SetCompleted(files, bytes: PUInt64): HRESULT; stdcall;
+    { IArchiveOpenVolumeCallback - queried for by 7-Zip on IArchiveOpenCallback }
+    function GetProperty(propID: PROPID; var value: OleVariant): HRESULT; stdcall;
+    function GetStream(const name: PChar; var inStream: IInStream): HRESULT; stdcall;
+  public
+    constructor Create(const DisableFsRedir: Boolean; const ArchiveFilename, Password: String);
   end;
 
   TArchiveExtractBaseCallback = class(TArchiveCallback, IArchiveExtractCallback)
@@ -382,6 +390,13 @@ end;
 
 { TArchiveOpenCallback }
 
+constructor TArchiveOpenCallback.Create(const DisableFsRedir: Boolean; const ArchiveFilename, Password: String);
+begin
+  inherited Create(Password);
+  FDisableFsRedir := DisableFsRedir;
+  FArchiveFilename := ArchiveFilename;
+end;
+
 function TArchiveOpenCallback.SetCompleted(files,
   bytes: PUInt64): HRESULT;
 begin
@@ -394,6 +409,37 @@ begin
   Result := S_OK;
 end;
 
+function TArchiveOpenCallback.GetProperty(propID: PROPID; var value: OleVariant): HRESULT;
+begin
+  { This is for multi-volume archives: when the archive is opened 7-Zip only receives a stream. It
+    will then use this callback to find the name of the archive (like archive.7z.001) to figure out
+    the name of other volumes (like archive.7z.002) }
+  if propID = kpidName then
+    value := FArchiveFilename;
+  Result := S_OK;
+end;
+
+function TArchiveOpenCallback.GetStream(const name: PChar; var inStream: IInStream): HRESULT;
+begin
+  { This is for multi-volume archives: after 7-Zip figures out the name of other volumes (like
+    archive.7z.002) it will then use this callback to open it. The callback must either return
+    S_FALSE or set instream to nil when it tries to open a volume which doesn't exists (like
+    archive.7z.003 when there's two volumes only). }
+  try
+    if NewFileExistsRedir(FDisableFsRedir, name) then begin
+      const F = TFileRedir.Create(FDisableFsRedir, name, fdOpenExisting, faRead, fsRead);
+      instream := TInStream.Create(F);
+    end else
+      instream := nil;
+    Result := S_OK;
+  except
+    on E: EAbort do
+      Result := E_ABORT
+    else
+      Result := E_FAIL;
+  end;
+end;
+
 { TArchiveExtractBaseCallback }
 
 constructor TArchiveExtractBaseCallback.Create(const InArchive: IInArchive;
@@ -899,6 +945,8 @@ begin
     Result := CLSID_HandlerWim
   else if SameText(Ext, '.dmg') then
     Result := CLSID_HandlerDmg
+  else if SameText(Ext, '.001') then
+    Result := CLSID_HandlerSplit
   else
     InternalError(NotFoundErrorMsg);
 end;
@@ -930,7 +978,7 @@ begin
   end;
   const InStream: IInStream = TInStream.Create(F);
   var ScanSize: Int64 := 1 shl 23; { From Client7z.cpp }
-  const OpenCallback: IArchiveOpenCallback = TArchiveOpenCallback.Create(Password);
+  const OpenCallback: IArchiveOpenCallback = TArchiveOpenCallback.Create(DisableFsRedir, ArchiveFileName, Password);
   if Result.Open(InStream, @ScanSize, OpenCallback) <> S_OK then
     SevenZipError(SetupMessages[msgArchiveIsCorrupted], 'Cannot open file as archive' { Just like Client7z.cpp });
   if Result.GetNumberOfItems(numItems) <> S_OK then