Procházet zdrojové kódy

Fix ANSI compilation once more.

Martijn Laan před 11 roky
rodič
revize
250908d647

+ 2 - 0
Projects/ScriptClasses_C.pas

@@ -546,7 +546,9 @@ begin
   SIRegisterTStringList(Cl);
   SIRegisterTHandleStream(Cl);
   SIRegisterTFileStream(Cl);
+{$IFDEF UNICODE}
   SIRegisterTStringStream(Cl);
+{$ENDIF}
 
   { Graphics }
   SIRegister_Graphics_TypesAndConsts(Cl);

+ 2 - 0
Projects/ScriptClasses_R.pas

@@ -600,7 +600,9 @@ begin
     RIRegisterTStringList(Cl);
     RIRegisterTHandleStream(Cl);
     RIRegisterTFileStream(Cl);
+{$IFDEF UNICODE}
     RIRegisterTStringStream(Cl);
+{$ENDIF}
 
     { Graphics }
     RIRegisterTGraphicsObject(Cl);

+ 2 - 1
ishelp/isetup.xml

@@ -2650,8 +2650,9 @@ Type: files; Name: "{win}\MYPROG.INI"
     <li>The new RemObjects PascalScript version used by the Unicode compiler supports Unicode, but not for its input source. This means it does use Unicode string types as said, but any literal Unicode characters in the script will be converted to ANSI. This doesn't mean you can't display Unicode strings: you can for example instead use encoded Unicode characters to build Unicode strings (like <tt>S := #$0100 + #$0101 + 'Aa';</tt>), or load the string from a file using <tt>LoadStringsFromFile</tt>, or use a <tt>{cm:...}</tt> constant.</li>
     <li>Some support functions had their prototype changed: some parameters of <tt>CreateOutputMsgMemoPage</tt>, <tt>RegQueryBinaryValue</tt>, <tt>RegWriteBinaryValue</tt>, <tt>OemToCharBuff</tt>, <tt>CharToOemBuff</tt>, <tt>LoadStringFromfile</tt>, <tt>SaveStringToFile</tt>, and <tt>GetMD5OfString</tt> are of type AnsiString now instead of String.</li>
     <li>Added new <tt>SaveStringsToUTF8File</tt>, and <tt>GetMD5OfUnicodeString</tt> support functions.</li>
-    <li>If you want to compile an existing script that imports ANSI Windows API calls with the Unicode compiler, either upgrade to the 'W' Unicode API call or change the parameters from 'String' or 'PChar' to 'AnsiString'. The 'AnsiString' approach will make your [Code] compatible with both the Unicode and the non Unicode version.</li>
     <li>Added new 'Int64' type, supported by <tt>IntToStr</tt>. Also added new <tt>StrToInt64</tt>, <tt>StrToInt64Def</tt>, and <tt>GetSpaceOnDisk64</tt> support functions.</li>
+    <li>Added new <tt>TStringStream</tt> class.</li>
+    <li>If you want to compile an existing script that imports ANSI Windows API calls with the Unicode compiler, either upgrade to the 'W' Unicode API call or change the parameters from 'String' or 'PChar' to 'AnsiString'. The 'AnsiString' approach will make your [Code] compatible with both the Unicode and the non Unicode version.</li>
     </ul>
   </li>
   <li>Unicode Inno Setup supports UTF-8 encoded .iss files (but not UTF-16).</li>

+ 1 - 1
whatsnew.htm

@@ -39,9 +39,9 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 <li>Pascal Scripting changes:
 <ul>
   <li>Added new function <tt>CurrentSourceFileName</tt>, which returns the source file name of the [Files] entry that is currently being processed. The returned name may include constants. <i>Note:</i> Do not attempt to call this function from outside a Check, BeforeInstall or AfterInstall event function belonging to a [Files] entry with the <tt>external</tt> flag.</li>
-  <li>Added new class <tt>TStringStream</tt>.</li>
   <li>The already-existing <tt>StrToFloat</tt> and <tt>FloatToStr</tt> functions are now documented.</li>
   <li>Strings and numbers are now highlighted. Based on contribution by <a href="https://github.com/maldoinc" target="_blank">maldoinc</a> via <a href="https://github.com/jrsoftware" target="_blank">GitHub</a>.</li>
+  <li>Unicode Inno Setup: Added new class <tt>TStringStream</tt>.</li>
 </ul>
 </li>
 <li>Inno Setup Preprocessor (ISPP) changes: