Browse Source

Merge branch 'main' into files-download

Martijn Laan 3 months ago
parent
commit
3b55f2fa69

+ 27 - 17
Files/Languages/Corsican.isl

@@ -1,4 +1,4 @@
-; *** Inno Setup version 6.4.0+ Corsican messages ***
+; *** Inno Setup version 6.5.0+ Corsican messages ***
 ;
 ; To download user-contributed translations of this file, go to:
 ;   https://jrsoftware.org/files/istrans/
@@ -9,22 +9,20 @@
 ; two periods being displayed).
 
 ; Created and maintained by Patriccollu di Santa Maria è Sichè, 2011-2025
-; Schedariu di traduzzione in lingua corsa da Patriccollu
-; E-mail: Patrick.Santa-Maria[at]LaPoste.Net
+; Schedariu di traduzzione in lingua corsa creatu è mantenutu da Patriccollu
 ;
-; Changes:
-; June 6h, 2025 - Update to version 6.4.3
-; November 18th, 2024 - Update to version 6.4.0
-; February 11th, 2024 - Changes to version 6.3.0
-; November 14th, 2020 - Changes to version 6.1.2
-; July 25th, 2020 - Update to version 6.1.0
-; July 1st, 2020 - Update to version 6.0.5+
-; October 6th, 2019 - Update to version 6.0.3
-; January 20th, 2019 - Update to version 6.0.0
-; April 9th, 2016 - Changes to version 5.6.0
-; January 3rd, 2013 - Update to version 5.5.3
-; August 29th, 2012 - Update to version 5.5.2
-; September 17th, 2011 - Creation for version 5.1.11
+; Latest update of Corsican translation file is available here:
+;	https://github.com/jrsoftware/issrc/blob/main/Files/Languages/Corsican.isl
+;
+; History of Corsican translation for InnoSetup:
+;	- Updated in 2025 by Patriccollu di Santa Maria è Sichè: June 6th (6.4.4), June 8th (6.5.0)
+;	- Updated in 2024 by Patriccollu di Santa Maria è Sichè: February 11th (6.3.0), November 18th (6.4.0)
+;	- Updated in 2020 by Patriccollu di Santa Maria è Sichè: July 1st (6.0.5+), July 25th (6.1.0), November 14th (6.1.2)
+;	- Updated in 2019 by Patriccollu di Santa Maria è Sichè: January 20th (6.0.0), October 6th (6.0.3)
+;	- Updated on April 9th, 2016 by Patriccollu di Santa Maria è Sichè for version 5.6.0
+;	- Updated on January 3rd, 2013 by Patriccollu di Santa Maria è Sichè for version 5.5.3
+;	- Updated on August 29th, 2012 by Patriccollu di Santa Maria è Sichè for version 5.5.2
+;	- Created on September 17th, 2011 by Patriccollu di Santa Maria è Sichè for version 5.1.11
 
 [LangOptions]
 ; The following three entries are very important. Be sure to read and
@@ -242,13 +240,18 @@ ErrorFileHash2=Tazzeghju di u schedariu inaccettevule : aspettatu %1, trovu %2
 ErrorProgress=Prugressione inaccettevule : %1 di %2
 ErrorFileSize=Dimensione di u schedariu inaccettevule : aspettatu %1, trovu %2
 
-; *** TExtractionWizardPage wizard page and Extract7ZipArchive
+; *** TExtractionWizardPage wizard page and ExtractArchive
 ExtractionLabel=Estrazzione di i schedarii addiziunali…
 ButtonStopExtraction=&Piantà l’estrazzione
 StopExtraction=Da veru, vulete piantà l’estrazzione ?
 ErrorExtractionAborted=Estrazzione interrotta
 ErrorExtractionFailed=Fiascu di l’estrazzione : %1
 
+; *** Archive extraction failure details
+ArchiveIncorrectPassword=A parolla d’intesa hè incurretta
+ArchiveIsCorrupted=L’archiviu hè deteriuratu
+ArchiveUnsupportedFormat=U furmatu di l’archiviu ùn hè micca accettatu
+
 ; *** "Preparing to Install" wizard page
 WizardPreparing=Preparazione di l’installazione
 PreparingDesc=L’assistente appronta l’installazione di [name] nant’à l’urdinatore.
@@ -327,6 +330,12 @@ FileAbortRetryIgnoreSkipNotRecommended=Ignurà stu &schedariu (micca ricumandatu
 FileAbortRetryIgnoreIgnoreNotRecommended=&Ignurà u sbagliu è cuntinuà (micca ricumandatu)
 SourceIsCorrupted=U schedariu d’origine hè alteratu
 SourceDoesntExist=U schedariu d’origine « %1 » ùn esiste micca
+SourceVerificationFailed=Fiascu di a verificazione di u schedariu d’origine : %1
+VerificationSignatureDoesntExist=U schedariu di segnatura « %1 » ùn esiste micca
+VerificationSignatureInvalid=U schedariu di segnatura « %1 » hè inaccettevule
+VerificationKeyNotFound=U schedariu di segnatura « %1 » impiegheghja una chjave scunnisciuta
+VerificationFileSizeIncorrect=A dimensione di u schedariu hè incurretta
+VerificationFileHashIncorrect=U tazzeghju di u schedariu hè incurrettu
 ExistingFileReadOnly2=U schedariu esistente hà un attributu di lettura-sola è ùn pò micca esse rimpiazzatu.
 ExistingFileReadOnlyRetry=&Caccià l’attributu di lettura-sola è pruvà torna
 ExistingFileReadOnlyKeepExisting=Cunservà u schedariu &esistente
@@ -345,6 +354,7 @@ ErrorChangingAttr=Un sbagliu hè accadutu pruvendu di cambià l’attributi di u
 ErrorCreatingTemp=Un sbagliu hè accadutu pruvendu di creà un schedariu in u cartulare di destinazione :
 ErrorReadingSource=Un sbagliu hè accadutu pruvendu di leghje u schedariu d’origine :
 ErrorCopying=Un sbagliu hè accadutu pruvendu di cupià un schedariu :
+ErrorExtracting=Un sbagliu hè accadutu pruvendu d’estrae un archiviu :
 ErrorReplacingExistingFile=Un sbagliu hè accadutu pruvendu di rimpiazzà u schedariu esistente :
 ErrorRestartReplace=Fiascu di Rimpiazzamentu di schedariu à u rilanciu di l’urdinatore :
 ErrorRenamingTemp=Un sbagliu hè accadutu pruvendu di rinuminà un schedariu in u cartulare di destinazione :

+ 2 - 0
ISHelp/isetup.xml

@@ -1597,6 +1597,8 @@ Source: "*"; Excludes: "*.~*,\Temp\*"; Flags: recursesubdirs
 
 <param name="ExternalSize">
 <p>This parameter must be combined with the <tt>external</tt> flag and specifies the size of the external file in bytes. If this parameter is not specified, Setup retrieves the file size at startup. Primarily useful for files that aren't available at startup, for example files located on a second disk when <link topic="setup_diskspanning">disk spanning</link> is being used.</p>
+<p>If the specified size does not match the actual size, Setup's progress bar will automatically adjust by skipping ahead or pausing as needed during installation.</p>
+<p>If the <tt>extractarchive</tt> flag is also used, the total uncompressed size of all extracted files must be specified.</p>
 <example>
 <pre>
 ExternalSize: 1048576; Flags: external

+ 3 - 1
ISHelp/isxfunc.xml

@@ -1886,8 +1886,10 @@ end;</pre></example>
       <function>
         <name>SetDownloadCredentials</name>
         <prototype>procedure SetDownloadCredentials(const User, Pass: String);</prototype>
-        <description><p>Sets username and password for all following downloads. Set an empty string to delete the previous setting.</p></description>
+        <description><p>Sets the basic authentication username and password for all following downloads done by <tt>DownloadTemporaryFile</tt>, <tt>DownloadTemporaryFileWithISSigVerify</tt>, <tt>DownloadTemporaryFileSize</tt>, and <tt>DownloadTemporaryFileDate</tt>.</p>
+<p>Specify an empty username or password to unset the username or password.</p></description>
         <seealso><p><link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br/>
+<link topic="isxfunc_DownloadTemporaryFileWithISSigVerify">DownloadTemporaryFileWithISSigVerify</link><br/>
 <link topic="isxfunc_DownloadTemporaryFileSize">DownloadTemporaryFileSize</link><br/>
 <link topic="isxfunc_DownloadTemporaryFileDate">DownloadTemporaryFileDate</link></p></seealso>
       </function>

+ 1 - 0
Projects/Src/Setup.InstFunc.pas

@@ -569,6 +569,7 @@ function GetSHA256OfFile(const F: TFile): TSHA256Digest;
 var
   Buf: array[0..65535] of Byte;
 begin
+  F.Seek(0);
   var Context: TSHA256Context;
   SHA256Init(Context);
   while True do begin

+ 9 - 7
Projects/Src/Setup.Install.pas

@@ -288,7 +288,8 @@ end;
 procedure DoISSigVerify(const SourceF: TFile; const SourceFS: TFileStream;
   const SourceFilename: String; const ISSigAllowedKeys: AnsiString;
   out ExpectedFileHash: TSHA256Digest);
-{ Either SourceF or SourceFS must be set. Does not disable FS redirection. }
+{ Does not disable FS redirection. Either SourceF or SourceFS must be set, which
+  may be opened for writing instead of reading.  }
 begin
   if ((SourceF = nil) and (SourceFS = nil)) or ((SourceF <> nil) and (SourceFS <> nil)) then
     InternalError('DoISSigVerify: Invalid SourceF / SourceFS combination');
@@ -3844,7 +3845,6 @@ var
   LastError: DWORD;
   User, Pass, CleanUrl: String;
   HasCredentials : Boolean;
-  Base64: TBase64Encoding;
 begin
   if Url = '' then
     InternalError('DownloadTemporaryFile: Invalid Url value');
@@ -3893,7 +3893,6 @@ begin
   TempF := nil;
   TempFileLeftOver := False;
   HandleStream := nil;
-  Base64 := nil;
 
   try
     HasCredentials := GetCredentialsAndCleanUrl(URL, User, Pass, CleanUrl);
@@ -3924,8 +3923,12 @@ begin
     { Download to temporary file}
     HandleStream := THandleStream.Create(TempF.Handle);
     if HasCredentials then begin
-      Base64 := TBase64Encoding.Create(0);
-      HTTPClient.CustomHeaders['Authorization'] := 'Basic ' + Base64.Encode(User + ':' + Pass);
+      const Base64 = TBase64Encoding.Create(0);
+      try
+        HTTPClient.CustomHeaders['Authorization'] := 'Basic ' + Base64.Encode(User + ':' + Pass);
+      finally
+        Base64.Free;
+      end;
     end;
     HTTPResponse := HTTPClient.Get(CleanUrl, HandleStream);
     if HTTPDataReceiver.Aborted then
@@ -3933,7 +3936,7 @@ begin
     else if (HTTPResponse.StatusCode < 200) or (HTTPResponse.StatusCode > 299) then
       raise Exception.Create(FmtSetupMessage(msgErrorDownloadFailed, [IntToStr(HTTPResponse.StatusCode), HTTPResponse.StatusText]))
     else begin
-      { Download completed, get temporary file size and close it }
+      { Download completed, get size and close it }
       Result := HandleStream.Size;
       FreeAndNil(HandleStream);
 
@@ -3985,7 +3988,6 @@ begin
       TempFileLeftOver := False;
     end;
   finally
-    Base64.Free;
     HandleStream.Free;
     TempF.Free;
     HTTPClient.Free;