Changeset 18


Ignore:
Timestamp:
Nov 6, 2017, 1:14:20 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: Build with newer Lazarus version.
  • Fixed: Creation of application configuration file.
  • Fixed: Wrong decimal point used for XML datetime decode.
  • Added: Detect Subversion exe files from TortoiseSVN directory on Windows.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Backends/Subversion/USubversion.pas

    r16 r18  
    5050
    5151procedure TRepositorySubversion.Execute(Parameters: array of string);
     52var
     53  ToolPath: string;
    5254begin
    5355  {$IFDEF Linux}
    54   ExecuteProcess('/usr/bin/svnadmin', Parameters);
     56  ToolPath := '/usr/bin/svnadmin';
    5557  {$ENDIF}
    5658  {$IFDEF Windows}
    57   ExecuteProcess('c:\Program Files\Subversion\bin\svnadmin.exe', Parameters);
    58   {$ENDIF}
     59  ToolPath := 'c:\Program Files\Subversion\bin\svnadmin.exe';
     60  if not FileExists(ToolPath) then
     61    ToolPath := 'C:\Program Files\TortoiseSVN\bin\svnadmin.exe';
     62  {$ENDIF}
     63  ExecuteProcess(ToolPath, Parameters);
    5964end;
    6065
     
    8388
    8489procedure TSubversion.Execute(Parameters: array of string);
     90var
     91  ToolPath: string;
    8592begin
    8693  {$IFDEF Linux}
    87   ExecuteProcess('/usr/bin/svn', Parameters);
     94  ToolPath := '/usr/bin/svn';
    8895  {$ENDIF}
    8996  {$IFDEF Windows}
    90   ExecuteProcess('c:\Program Files\Subversion\bin\svn.exe', Parameters);
    91   {$ENDIF}
     97  ToolPath := 'c:\Program Files\Subversion\bin\svn.exe';
     98  if not FileExists(ToolPath) then
     99    ToolPath := 'C:\Program Files\TortoiseSVN\bin\svn.exe';
     100  {$ENDIF}
     101  ExecuteProcess(ToolPath, Parameters);
    92102end;
    93103
  • trunk/Packages/Common/UXMLUtils.pas

    r15 r18  
    9797      if Pos('Z', XMLDateTime) > 0 then
    9898        LeftCutString(XMLDateTime, Part, 'Z');
    99       SecondFraction := StrToFloat('0.' + Part);
     99      SecondFraction := StrToFloat('0' + DecimalSeparator + Part);
    100100      Millisecond := Trunc(SecondFraction * 1000);
    101101    end else begin
  • trunk/Packages/TemplateGenerics/Generic/GenericMatrix.inc

    r6 r18  
    5050    function Implode(RowSeparator, ColSeparator: string; Converter: TToStringConverter): string;
    5151    procedure Explode(Text, Separator: string; Converter: TFromStringConverter; SlicesCount: Integer = -1);
    52     function IndexOf(Item: TGMatrixItem; Start: TIndex = 0): TIndex;
    53     function IndexOfList(List: TGMatrix; Start: TIndex = 0): TIndex;
     52    function IndexOf(Item: TGMatrixItem; Start: TIndex): TIndex;
     53    function IndexOfList(List: TGMatrix; Start: TIndex): TIndex;
    5454    procedure Insert(Index: TIndex; Item: TGMatrixItem);
    5555    procedure InsertList(Index: TIndex; List: TGMatrix);
  • trunk/UCore.lfm

    r13 r18  
    105105  end
    106106  object XMLConfig1: TXMLConfig
    107     Filename = 'Config.xml'
    108107    StartEmpty = False
    109108    RootName = 'CONFIG'
     109    ReadOnly = False
    110110    left = 96
    111111    top = 96
  • trunk/UCore.pas

    r15 r18  
    77uses
    88  Classes, SysUtils, XMLConf, FileUtil, ActnList, Controls, UVCS, UProject,
    9   ULastOpenedList, Forms, Dialogs, Contnrs, UBackend;
     9  ULastOpenedList, Forms, Dialogs, Menus, Contnrs, UBackend;
    1010
    1111type
     
    113113begin
    114114  Backends := TObjectList.Create;
     115  Project := nil;
    115116end;
    116117
     
    181182  XMLConfig1.SetValue('UserName', UserName);
    182183  XMLConfig1.SetValue('Email', Email);
     184  XmlConfig1.Flush;
    183185end;
    184186
     
    186188begin
    187189  RegisterBackends;
     190  XMLConfig1.Filename := GetAppConfigDir(False) + 'Config.xml';
     191  ForceDirectoriesUTF8(ExtractFileDir(XMLConfig1.Filename));
    188192  LoadConfig;
    189193  if (LastOpenedListProject.Items.Count > 0) and DirectoryExistsUTF8(LastOpenedListProject.Items[0]) then
  • trunk/VCSCommander.lpi

    r17 r18  
    22<CONFIG>
    33  <ProjectOptions>
    4     <Version Value="9"/>
     4    <Version Value="10"/>
    55    <General>
    66      <SessionStorage Value="InProjectDir"/>
Note: See TracChangeset for help on using the changeset viewer.