Permalink
Browse files

Multiple fixes to allow help integration in Delphi XE5

Fixed StrToStrings and StrIToStrings in JclAnsiStrings.pas (back ported from JcStrings.pas)
Updated JclSysutils.pas so StrToStrings is called explicitely with AllowString = False< (this was causing help registration failures following the StrToStrings fix)
  • Loading branch information...
cycocrew committed Nov 2, 2013
1 parent c6cba78 commit e694653c6a5aed25cb5b3c4e3c3a5d1af40e76f6
View
@@ -16,9 +16,9 @@
{ Copyright (C) of Petr Vones. All Rights Reserved. }
{ }
{ Contributor(s): }
-{ - Robert Rossmair - crossplatform & BCB support, refactoring }
-{ - Florent Ouchet (outchy) - New installer core }
-{ - Resource refactorings }
+{ Robert Rossmair - crossplatform & BCB support, refactoring }
+{ Florent Ouchet (outchy) - New installer core, resource refactorings }
+{ Jean-Fabien Connault (cycocrew) }
{ }
{**************************************************************************************************}
{ }
@@ -3716,8 +3716,9 @@ function TJclDistribution.RegHelpExecuteCommands(DisplayErrors: Boolean): Boolea
if Assigned(GUI) and not IsElevated then
GUI.Dialog(LoadResString(@RsHTMLHelp2Credentials), dtInformation, [drOK]);
- // RegHelper.exe manifest requires elevation on Vista
- if IsAdministrator or IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2 then
+ // RegHelper.exe manifest requires elevation on Windows Vista/7/8/8.1 and Windows Server 2008/2008R2/2012/2012R2
+ if IsAdministrator or IsWinVista or IsWinServer2008 or IsWin7 or IsWinServer2008R2 or
+ IsWin8 or IsWinServer2012 or IsWin81 or IsWinServer2012R2 then
Verb := 'open'
else
Verb := 'runas';
@@ -16,9 +16,9 @@
{ Copyright (C) of Petr Vones. All Rights Reserved. }
{ }
{ Contributor(s): }
-{ - Robert Rossmair - crossplatform & BCB support, refactoring }
-{ - Florent Ouchet (outchy) - New installer core }
-{ - Resource refactorings }
+{ Robert Rossmair - crossplatform & BCB support, refactoring }
+{ Florent Ouchet (outchy) - New installer core, resource refactorings }
+{ Jean-Fabien Connault (cycocrew) }
{ }
{**************************************************************************************************}
{ }
@@ -162,7 +162,7 @@ interface
RsCaptionHelpHlp = 'Add help file to IDE help system';
RsCaptionHelpChm = 'Add HTML help to the Tools menu';
RsCaptionHelpHxS = 'Register help 2.0 files';
- RsCaptionHelpHxSPlugin = 'Plug help 2.0 files in the Borland help system';
+ RsCaptionHelpHxSPlugin = 'Plug help 2.0 files in the Embarcadero help system';
// demos
RsCaptionMakeDemos = 'Make demos';
@@ -16,6 +16,7 @@
{ Portions created by Florent Ouchet are Copyright (C) of Florent Ouchet. All Rights Reserved. }
{ }
{ Contributor(s): }
+{ Jean-Fabien Connault (cycocrew) }
{ }
{**************************************************************************************************}
{ }
@@ -181,7 +182,7 @@ var
procedure DisplayCopyright;
begin
WriteLn(RegHelperOutput,'HTML Help 2.0 registration helper');
- WriteLn(RegHelperOutput,'Copyright (c) 2007 Project JEDI');
+ WriteLn(RegHelperOutput,'Copyright (c) 2007-2013 Project JEDI');
WriteLn(RegHelperOutput,'');
end;
@@ -258,7 +259,7 @@ function ParseArguments: Boolean;
end
else
begin
- WriteLn(RegHelperOutput,'Error: Number of parameter is invalid for command: ', Argument);
+ WriteLn(RegHelperOutput, 'Error: Number of parameters (' + intToStr(ParamCount) + ' found instead of ' + intToStr(CommandRecs[IndexCommand].ParamCount) + ' expected) is invalid for command: ', Argument);
Result := False;
Exit;
end;
@@ -3485,8 +3485,8 @@ procedure StrToStrings(S, Sep: AnsiString; const List: TJclAnsiStrings; const Al
Delete(S, 1, I + L - 1);
I := Pos(Sep, S);
end;
- if S <> '' then
- List.Add(S); // Ignore empty strings at the end.
+ if (S <> '') or AllowEmptyString then
+ List.Add(S); // Ignore empty strings at the end (only if AllowEmptyString = False).
finally
List.EndUpdate;
end;
@@ -3515,8 +3515,8 @@ procedure StrIToStrings(S, Sep: AnsiString; const List: TJclAnsiStrings; const A
Delete(LowerCaseStr, 1, I + L - 1);
I := Pos(Sep, LowerCaseStr);
end;
- if S <> '' then
- List.Add(S); // Ignore empty strings at the end.
+ if (S <> '') or AllowEmptyString then
+ List.Add(S); // Ignore empty strings at the end (only if AllowEmptyString = False).
finally
List.EndUpdate;
end;
@@ -3562,7 +3562,7 @@ procedure ListAddItems(var List: string; const Separator, Items: string);
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
NewItems := TStringList.Create;
try
@@ -3589,7 +3589,7 @@ procedure ListIncludeItems(var List: string; const Separator, Items: string);
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
NewItems := TStringList.Create;
try
@@ -3620,11 +3620,11 @@ procedure ListRemoveItems(var List: string; const Separator, Items: string);
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
RemItems := TStringList.Create;
try
- StrToStrings(Items, Separator, RemItems);
+ StrToStrings(Items, Separator, RemItems, False);
for Index := 0 to RemItems.Count - 1 do
begin
@@ -3652,7 +3652,7 @@ procedure ListDelItem(var List: string; const Separator: string; const Index: In
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
StrList.Delete(Index);
@@ -3669,7 +3669,7 @@ function ListItemCount(const List, Separator: string): Integer;
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
Result := StrList.Count;
finally
@@ -3684,7 +3684,7 @@ function ListGetItem(const List, Separator: string; const Index: Integer): strin
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
Result := StrList.Strings[Index];
finally
@@ -3700,7 +3700,7 @@ procedure ListSetItem(var List: string; const Separator: string;
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
StrList.Strings[Index] := Value;
@@ -3717,7 +3717,7 @@ function ListItemIndex(const List, Separator, Item: string): Integer;
begin
StrList := TStringList.Create;
try
- StrToStrings(List, Separator, StrList);
+ StrToStrings(List, Separator, StrList, False);
Result := StrList.IndexOf(Item);
finally
@@ -119,7 +119,7 @@ TJclHelp2Manager = class
RCSfile: '$URL$';
Revision: '$Revision$';
Date: '$Date$';
- LogPath: 'JCL\source\windows';
+ LogPath: 'jcl\source\windows';
Extra: '';
Data: nil
);
@@ -314,6 +314,12 @@ constructor TJclHelp2Manager.Create(IDEVersionNumber: Integer);
FHxPlugin := nil;
if IDEVersionNumber > 0 then
begin
+ if (IDEVersionNumber = 12) then
+ FIdeNameSpace := 'embarcadero.rs_xe5'
+ else
+ if (IDEVersionNumber = 11) then
+ FIdeNameSpace := 'embarcadero.rs_xe4'
+ else
if (IDEVersionNumber = 10) then
FIdeNameSpace := 'embarcadero.rs_xe3'
else

0 comments on commit e694653

Please sign in to comment.