Ignore:
Timestamp:
Feb 12, 2011, 12:33:04 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Instance compilation on Linux.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        44Source
        55Instance
         6FreePascalManager
  • trunk/Forms/UMainForm.pas

    r7 r9  
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    99  StdCtrls, ActnList, Menus, ExtCtrls, Contnrs, USource, UInstance,
    10   UInstanceOptions, DOM, XMLWrite, XMLRead, HTTPSend, UMainOptions,
    11   USourceSelection;
     10  UInstanceOptions, DOM, XMLWrite, XMLRead, UMainOptions,
     11  USourceSelection, HTTPSend;
    1212
    1313const
     
    8181    Sources: TSourceList;
    8282    function GetBinUtilsDir: string;
     83    function GetCompilerPath: string;
    8384    function GetBaseDir: string;
     85    procedure InstallDependencies;
    8486  end;
    8587
     
    254256    AStart.Enabled := False;
    255257    ARemove.Enabled := False;
     258    AUpdate.Enabled := False;
    256259  end;
    257260end;
     
    492495function TMainForm.GetBinUtilsDir: string;
    493496begin
     497  {$IFDEF Windows}
    494498  Result := GetBaseDir + DirectorySeparator +
    495499    BinUtilsDir + DirectorySeparator + Platform;
     500  {$ENDIF}
     501  {$IFDEF Linux}
     502  Result := '/usr/bin';
     503  {$ENDIF}
     504end;
     505
     506function TMainForm.GetCompilerPath: string;
     507begin
     508  {$IFDEF Windows}
     509  Result := GetBinUtilsDir + DirectorySeparator + 'fpc';
     510  {$ENDIF}
     511  {$IFDEF Linux}
     512  Result := '/usr/lib/fpc/2.4.0/ppc386';
     513  {$ENDIF}
    496514end;
    497515
     
    499517begin
    500518  Result := ExtractFileDir(Application.ExeName);
     519end;
     520
     521procedure TMainForm.InstallDependencies;
     522begin
     523  {$IFDEF Windows}
     524  {$ENDIF}
     525  {$IFDEF Linux}
     526  if FileExistsUTF8('yum') then begin
     527  end else
     528  if FileExistsUTF8('apt-get') then begin
     529  (* sudo apt-get install -y subversion
     530    sudo apt-get install -y cvs
     531    sudo apt-get install -y alien
     532    sudo apt-get install -y libncurses5-dev
     533    sudo apt-get install -y libgtk2.0-dev
     534    sudo apt-get install -y libgdk-pixbuf-dev
     535    sudo apt-get install -y libXp-dev
     536    sudo apt-get install -y libgtk1.2-dev
     537    sudo apt-get install -y libXxf86vm-dev
     538    sudo apt-get install -y glutg3-dev
     539    sudo apt-get install -y libgli-mesa-dev
     540    sudo apt-get install -y mesa-utils
     541  *)
     542  end else ShowMessage('No package manager found.');
     543  {$ENDIF}
    501544end;
    502545
Note: See TracChangeset for help on using the changeset viewer.