~ubuntu-branches/ubuntu/vivid/lazarus/vivid-proposed

« back to all changes in this revision

Viewing changes to ide/initialsetupdlgs.pas

  • Committer: Package Import Robot
  • Author(s): Abou Al Montacir
  • Date: 2014-05-15 23:17:51 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20140515231751-gumj9a01g0ghm7ac
Tags: 1.2.2+dfsg-1
* New upstream release with few fixes and official support of FPC 2.6.4.
  - The detailed list of changes can be found here:
  http://wiki.lazarus.freepascal.org/Lazarus_1.2_fixes_branch#Fixes_for_1.2.2_.28Merged.29

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  Classes, SysUtils, strutils, contnrs, LCLProc, Forms, Controls, Buttons,
46
46
  Dialogs, FileUtil, Laz2_XMLCfg, lazutf8classes, LazFileUtils, Graphics,
47
47
  ComCtrls, ExtCtrls, StdCtrls, DefineTemplates, CodeToolManager,
48
 
  TransferMacros, MacroDefIntf, LazarusIDEStrConsts, LazConf, EnvironmentOpts,
49
 
  IDEProcs, AboutFrm, IDETranslations;
50
 
  
 
48
  TransferMacros, MacroDefIntf, GDBMIDebugger, Debugger, LazarusIDEStrConsts,
 
49
  LazConf, EnvironmentOpts, IDEProcs, AboutFrm, IDETranslations;
 
50
 
51
51
type
52
52
  TSDFilenameQuality = (
53
53
    sddqInvalid,
260
260
 
261
261
implementation
262
262
 
 
263
const
 
264
  DefaultDebuggerClass: TDebuggerClass = TGDBMIDebugger;
 
265
 
263
266
type
264
267
 
265
268
  { TSetupMacros }
954
957
  DebuggerFileName='gdb'; //For Windows, .exe will be appended
955
958
var
956
959
  OldDebuggerFilename: String;
957
 
  AFilename: String;
 
960
  s, AFilename: String;
958
961
  Files: TStringList;
959
962
  i: Integer;
960
963
begin
975
978
                                    'EnvironmentOptions/DebuggerFilename/Value');
976
979
    if CheckFile(AFilename,Result) then exit;
977
980
 
978
 
    // The next 2 locations are locations used by older and newer versions of the Windows installers
979
 
    // If other platform installers follow the same strategy, this can be useful.
980
 
    // Chances of this are low (gdb is generally installed in the path on Unixy systems), but it can't hurt...
981
 
    // and it can be useful for cross compiling/custom setups.
982
 
 
983
 
    // Check new installation location: $(LazarusDir)\mingw\$(TargetCPU)-$(TargetOS)\bin\gdb.exe
984
 
    if CheckFile(SetDirSeparators('$(LazarusDir)/mingw/$(TargetCPU)-$(TargetOS)/bin/'+DebuggerFileName+GetExecutableExt),Result)
985
 
      then exit;
986
 
 
987
 
    // Older Lazarus installers did not use macros for their debuggers: there was only one debugger
988
 
    // Check old installation location: $(LazarusDir)\mingw\bin\gdb.exe
989
 
    if CheckFile(SetDirSeparators('$(LazarusDir)/mingw/bin/'+DebuggerFileName+GetExecutableExt),Result)
990
 
      then exit;
 
981
    // Check locations proposed by debugger class
 
982
    s := DefaultDebuggerClass.ExePaths;
 
983
    while s <> '' do begin
 
984
      AFilename := GetPart([], [';'], s);
 
985
      if CheckFile(AFilename, Result) then exit;
 
986
      if s <> '' then delete(s, 1, 1);
 
987
    end;
 
988
 
991
989
 
992
990
    // Windows-only locations:
993
991
    if (GetDefaultSrcOSForTargetOS(GetCompiledTargetOS)='win') then begin