Changeset 9


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

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        44Source
        55Instance
         6FreePascalManager
  • trunk/Forms/UInstanceOptions.lfm

    r6 r9  
    3737    Height = 14
    3838    Top = 72
    39     Width = 67
     39    Width = 76
    4040    Caption = 'IDE selection:'
    4141    ParentColor = False
     
    4545    Height = 14
    4646    Top = 40
    47     Width = 69
     47    Width = 77
    4848    Caption = 'FPC selection:'
    4949    ParentColor = False
     
    6161    Height = 14
    6262    Top = 8
    63     Width = 32
     63    Width = 37
    6464    Caption = 'Name:'
    6565    ParentColor = False
  • trunk/Forms/UInstanceOptions.pas

    r7 r9  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, ExtCtrls, DOM, XMLWrite, XMLRead, HTTPSend, USource, UInstance,
     9  ComCtrls, ExtCtrls, DOM, XMLWrite, XMLRead, USource, UInstance,
    1010  USourceSelection;
    1111
  • trunk/Forms/UMainForm.lfm

    r8 r9  
    3535      item
    3636        Caption = 'Compiled'
     37        Width = 95
    3738      end>
    3839    OwnerData = True
     
    4950    Height = 14
    5051    Top = 8
    51     Width = 94
     52    Width = 108
    5253    Caption = 'Installed instances:'
    5354    ParentColor = False
  • 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
  • trunk/Forms/UMainOptions.lfm

    r7 r9  
    11object MainOptionsForm: TMainOptionsForm
    2   Left = 320
     2  Left = 307
    33  Height = 350
    4   Top = 81
     4  Top = 161
    55  Width = 489
    66  Caption = 'Options'
     
    3535    Height = 14
    3636    Top = 8
    37     Width = 79
     37    Width = 92
    3838    Caption = 'Bit utils location:'
    3939    ParentColor = False
     
    5151    Height = 14
    5252    Top = 50
    53     Width = 41
     53    Width = 46
    5454    Caption = 'Platform'
    5555    ParentColor = False
     
    6767    Height = 14
    6868    Top = 90
    69     Width = 135
     69    Width = 155
    7070    Caption = 'Web source list file location:'
    7171    ParentColor = False
     
    8383    Height = 14
    8484    Top = 128
    85     Width = 98
     85    Width = 113
    8686    Caption = 'Subversion location:'
    8787    ParentColor = False
  • trunk/Forms/USourceSelection.pas

    r7 r9  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   StdCtrls, USource, HTTPSend;
     9  StdCtrls, USource, HttpSend;
    1010
    1111type
  • trunk/FreePascalManager.lpi

    r8 r9  
    2828      <local>
    2929        <FormatVersion Value="1"/>
     30        <LaunchingApplication PathPlusParams="\usr\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
    3031      </local>
    3132    </RunParams>
     
    4647        <TopLine Value="1"/>
    4748        <CursorPos X="1" Y="15"/>
    48         <UsageCount Value="116"/>
     49        <UsageCount Value="119"/>
    4950      </Unit0>
    5051      <Unit1>
     
    5657        <EditorIndex Value="0"/>
    5758        <WindowIndex Value="0"/>
    58         <TopLine Value="163"/>
    59         <CursorPos X="55" Y="167"/>
    60         <UsageCount Value="116"/>
     59        <TopLine Value="495"/>
     60        <CursorPos X="3" Y="512"/>
     61        <UsageCount Value="119"/>
    6162        <Loaded Value="True"/>
    6263        <LoadedDesigner Value="True"/>
     
    7273        <TopLine Value="96"/>
    7374        <CursorPos X="36" Y="108"/>
    74         <UsageCount Value="116"/>
     75        <UsageCount Value="119"/>
    7576        <Loaded Value="True"/>
    7677        <LoadedDesigner Value="True"/>
     
    8182        <UnitName Value="UInstance"/>
    8283        <IsVisibleTab Value="True"/>
    83         <EditorIndex Value="5"/>
    84         <WindowIndex Value="0"/>
    85         <TopLine Value="122"/>
    86         <CursorPos X="1" Y="131"/>
    87         <UsageCount Value="116"/>
     84        <EditorIndex Value="4"/>
     85        <WindowIndex Value="0"/>
     86        <TopLine Value="128"/>
     87        <CursorPos X="69" Y="154"/>
     88        <UsageCount Value="119"/>
    8889        <Loaded Value="True"/>
    8990      </Unit3>
     
    9293        <IsPartOfProject Value="True"/>
    9394        <UnitName Value="USource"/>
    94         <EditorIndex Value="11"/>
     95        <EditorIndex Value="7"/>
    9596        <WindowIndex Value="0"/>
    9697        <TopLine Value="6"/>
    9798        <CursorPos X="8" Y="19"/>
    98         <UsageCount Value="116"/>
     99        <UsageCount Value="119"/>
    99100        <Loaded Value="True"/>
    100101      </Unit4>
    101102      <Unit5>
    102103        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\rtl\objpas\classes\classesh.inc"/>
    103         <EditorIndex Value="6"/>
    104104        <WindowIndex Value="0"/>
    105105        <TopLine Value="616"/>
    106106        <CursorPos X="40" Y="638"/>
    107107        <UsageCount Value="12"/>
    108         <Loaded Value="True"/>
    109108      </Unit5>
    110109      <Unit6>
     
    177176        <ResourceBaseClass Value="Form"/>
    178177        <UnitName Value="UOperationProgress"/>
    179         <EditorIndex Value="8"/>
    180         <WindowIndex Value="0"/>
    181         <TopLine Value="43"/>
    182         <CursorPos X="3" Y="58"/>
    183         <UsageCount Value="72"/>
     178        <EditorIndex Value="5"/>
     179        <WindowIndex Value="0"/>
     180        <TopLine Value="73"/>
     181        <CursorPos X="82" Y="82"/>
     182        <UsageCount Value="75"/>
    184183        <Loaded Value="True"/>
    185184        <LoadedDesigner Value="True"/>
     
    210209      <Unit18>
    211210        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\rtl\objpas\classes\stringl.inc"/>
    212         <EditorIndex Value="7"/>
    213211        <WindowIndex Value="0"/>
    214212        <TopLine Value="443"/>
    215213        <CursorPos X="3" Y="441"/>
    216214        <UsageCount Value="12"/>
    217         <Loaded Value="True"/>
    218215      </Unit18>
    219216      <Unit19>
     
    236233        <Filename Value="ReadMe.txt"/>
    237234        <IsPartOfProject Value="True"/>
    238         <EditorIndex Value="10"/>
     235        <EditorIndex Value="6"/>
    239236        <WindowIndex Value="0"/>
    240237        <TopLine Value="1"/>
    241238        <CursorPos X="6" Y="22"/>
    242         <UsageCount Value="70"/>
     239        <UsageCount Value="73"/>
    243240        <Loaded Value="True"/>
    244241        <DefaultSyntaxHighlighter Value="None"/>
     
    247244        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\interfaces\win32\win32wscontrols.pp"/>
    248245        <UnitName Value="Win32WSControls"/>
    249         <EditorIndex Value="9"/>
    250246        <WindowIndex Value="0"/>
    251247        <TopLine Value="254"/>
    252248        <CursorPos X="10" Y="265"/>
    253249        <UsageCount Value="12"/>
    254         <Loaded Value="True"/>
    255250      </Unit22>
    256251      <Unit23>
     
    272267        <TopLine Value="43"/>
    273268        <CursorPos X="22" Y="57"/>
    274         <UsageCount Value="63"/>
     269        <UsageCount Value="66"/>
    275270        <Loaded Value="True"/>
    276271        <LoadedDesigner Value="True"/>
     
    318313        <ResourceBaseClass Value="Form"/>
    319314        <UnitName Value="USourceSelection"/>
    320         <EditorIndex Value="4"/>
     315        <EditorIndex Value="3"/>
    321316        <WindowIndex Value="0"/>
    322317        <TopLine Value="38"/>
    323318        <CursorPos X="33" Y="54"/>
    324         <UsageCount Value="24"/>
     319        <UsageCount Value="27"/>
    325320        <Loaded Value="True"/>
    326321        <LoadedDesigner Value="True"/>
     
    328323      <Unit31>
    329324        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\include\listitem.inc"/>
    330         <EditorIndex Value="3"/>
    331325        <WindowIndex Value="0"/>
    332326        <TopLine Value="760"/>
    333327        <CursorPos X="1" Y="773"/>
    334328        <UsageCount Value="11"/>
    335         <Loaded Value="True"/>
    336329      </Unit31>
    337330    </Units>
    338     <JumpHistory Count="30" HistoryIndex="29">
     331    <JumpHistory Count="30" HistoryIndex="28">
    339332      <Position1>
    340         <Filename Value="Forms\USourceSelection.pas"/>
    341         <Caret Line="86" Column="5" TopLine="79"/>
     333        <Filename Value="Forms\UMainForm.pas"/>
     334        <Caret Line="294" Column="35" TopLine="279"/>
    342335      </Position1>
    343336      <Position2>
    344         <Filename Value="Forms\USourceSelection.pas"/>
    345         <Caret Line="29" Column="19" TopLine="16"/>
     337        <Filename Value="Forms\UMainForm.pas"/>
     338        <Caret Line="167" Column="55" TopLine="163"/>
    346339      </Position2>
    347340      <Position3>
    348         <Filename Value="USource.pas"/>
    349         <Caret Line="29" Column="53" TopLine="21"/>
     341        <Filename Value="UInstance.pas"/>
     342        <Caret Line="109" Column="15" TopLine="102"/>
    350343      </Position3>
    351344      <Position4>
    352         <Filename Value="USource.pas"/>
    353         <Caret Line="19" Column="10" TopLine="7"/>
     345        <Filename Value="UInstance.pas"/>
     346        <Caret Line="139" Column="41" TopLine="122"/>
    354347      </Position4>
    355348      <Position5>
    356349        <Filename Value="Forms\UMainForm.pas"/>
    357         <Caret Line="366" Column="47" TopLine="356"/>
     350        <Caret Line="362" Column="36" TopLine="433"/>
    358351      </Position5>
    359352      <Position6>
    360353        <Filename Value="Forms\UMainForm.pas"/>
    361         <Caret Line="364" Column="44" TopLine="353"/>
     354        <Caret Line="129" Column="8" TopLine="124"/>
    362355      </Position6>
    363356      <Position7>
    364         <Filename Value="Forms\UMainForm.pas"/>
    365         <Caret Line="367" Column="42" TopLine="353"/>
     357        <Filename Value="UInstance.pas"/>
     358        <Caret Line="90" Column="28" TopLine="78"/>
    366359      </Position7>
    367360      <Position8>
    368         <Filename Value="Forms\UMainForm.pas"/>
    369         <Caret Line="370" Column="52" TopLine="354"/>
     361        <Filename Value="UInstance.pas"/>
     362        <Caret Line="80" Column="61" TopLine="78"/>
    370363      </Position8>
    371364      <Position9>
    372365        <Filename Value="Forms\UMainForm.pas"/>
    373         <Caret Line="276" Column="32" TopLine="265"/>
     366        <Caret Line="84" Column="34" TopLine="65"/>
    374367      </Position9>
    375368      <Position10>
    376         <Filename Value="Forms\UMainOptions.pas"/>
    377         <Caret Line="44" Column="44" TopLine="37"/>
     369        <Filename Value="Forms\UMainForm.pas"/>
     370        <Caret Line="534" Column="89" TopLine="506"/>
    378371      </Position10>
    379372      <Position11>
    380373        <Filename Value="Forms\UMainForm.pas"/>
    381         <Caret Line="389" Column="58" TopLine="378"/>
     374        <Caret Line="130" Column="9" TopLine="125"/>
    382375      </Position11>
    383376      <Position12>
    384         <Filename Value="Forms\UMainForm.pas"/>
    385         <Caret Line="293" Column="45" TopLine="279"/>
     377        <Filename Value="UInstance.pas"/>
     378        <Caret Line="95" Column="20" TopLine="78"/>
    386379      </Position12>
    387380      <Position13>
    388         <Filename Value="Forms\UMainOptions.pas"/>
    389         <Caret Line="45" Column="44" TopLine="38"/>
     381        <Filename Value="UInstance.pas"/>
     382        <Caret Line="86" Column="24" TopLine="78"/>
    390383      </Position13>
    391384      <Position14>
    392         <Filename Value="Forms\UMainOptions.pas"/>
    393         <Caret Line="64" Column="3" TopLine="43"/>
     385        <Filename Value="Forms\UMainForm.pas"/>
     386        <Caret Line="248" Column="40" TopLine="225"/>
    394387      </Position14>
    395388      <Position15>
    396         <Filename Value="Forms\UMainForm.pas"/>
    397         <Caret Line="268" Column="16" TopLine="258"/>
     389        <Filename Value="UInstance.pas"/>
     390        <Caret Line="33" Column="41" TopLine="16"/>
    398391      </Position15>
    399392      <Position16>
    400         <Filename Value="Forms\UMainForm.pas"/>
    401         <Caret Line="269" Column="16" TopLine="259"/>
     393        <Filename Value="UInstance.pas"/>
     394        <Caret Line="63" Column="3" TopLine="61"/>
    402395      </Position16>
    403396      <Position17>
    404         <Filename Value="Forms\UMainForm.pas"/>
    405         <Caret Line="270" Column="16" TopLine="260"/>
     397        <Filename Value="UInstance.pas"/>
     398        <Caret Line="64" Column="95" TopLine="56"/>
    406399      </Position17>
    407400      <Position18>
    408         <Filename Value="Forms\UMainForm.pas"/>
    409         <Caret Line="277" Column="16" TopLine="267"/>
     401        <Filename Value="UInstance.pas"/>
     402        <Caret Line="65" Column="1" TopLine="56"/>
    410403      </Position18>
    411404      <Position19>
    412         <Filename Value="Forms\UMainForm.pas"/>
    413         <Caret Line="158" Column="19" TopLine="156"/>
     405        <Filename Value="UInstance.pas"/>
     406        <Caret Line="57" Column="95" TopLine="41"/>
    414407      </Position19>
    415408      <Position20>
    416         <Filename Value="Forms\UMainForm.pas"/>
    417         <Caret Line="11" Column="19" TopLine="1"/>
     409        <Filename Value="UInstance.pas"/>
     410        <Caret Line="74" Column="76" TopLine="43"/>
    418411      </Position20>
    419412      <Position21>
    420         <Filename Value="Forms\UMainForm.pas"/>
    421         <Caret Line="159" Column="24" TopLine="146"/>
     413        <Filename Value="UInstance.pas"/>
     414        <Caret Line="73" Column="1" TopLine="45"/>
    422415      </Position21>
    423416      <Position22>
    424         <Filename Value="Forms\USourceSelection.pas"/>
    425         <Caret Line="54" Column="33" TopLine="38"/>
     417        <Filename Value="UInstance.pas"/>
     418        <Caret Line="75" Column="1" TopLine="47"/>
    426419      </Position22>
    427420      <Position23>
    428         <Filename Value="Forms\UMainForm.pas"/>
    429         <Caret Line="294" Column="35" TopLine="279"/>
     421        <Filename Value="UInstance.pas"/>
     422        <Caret Line="76" Column="1" TopLine="48"/>
    430423      </Position23>
    431424      <Position24>
    432         <Filename Value="UInstance.pas"/>
    433         <Caret Line="90" Column="25" TopLine="75"/>
     425        <Filename Value="Forms\UMainForm.pas"/>
     426        <Caret Line="237" Column="1" TopLine="225"/>
    434427      </Position24>
    435428      <Position25>
    436429        <Filename Value="UInstance.pas"/>
    437         <Caret Line="80" Column="1" TopLine="75"/>
     430        <Caret Line="66" Column="88" TopLine="48"/>
    438431      </Position25>
    439432      <Position26>
    440433        <Filename Value="UInstance.pas"/>
    441         <Caret Line="91" Column="51" TopLine="75"/>
     434        <Caret Line="32" Column="33" TopLine="13"/>
    442435      </Position26>
    443436      <Position27>
    444         <Filename Value="Forms\UMainForm.pas"/>
    445         <Caret Line="294" Column="35" TopLine="279"/>
     437        <Filename Value="UInstance.pas"/>
     438        <Caret Line="178" Column="62" TopLine="149"/>
    446439      </Position27>
    447440      <Position28>
    448         <Filename Value="Forms\UMainForm.pas"/>
    449         <Caret Line="167" Column="55" TopLine="163"/>
     441        <Filename Value="UInstance.pas"/>
     442        <Caret Line="146" Column="70" TopLine="128"/>
    450443      </Position28>
    451444      <Position29>
    452445        <Filename Value="UInstance.pas"/>
    453         <Caret Line="109" Column="15" TopLine="102"/>
     446        <Caret Line="147" Column="64" TopLine="128"/>
    454447      </Position29>
    455448      <Position30>
    456         <Filename Value="UInstance.pas"/>
    457         <Caret Line="139" Column="41" TopLine="122"/>
     449        <Filename Value="Forms\UMainForm.pas"/>
     450        <Caret Line="512" Column="3" TopLine="495"/>
    458451      </Position30>
    459452    </JumpHistory>
  • trunk/FreePascalManager.lpr

    r6 r9  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UMainForm,
    11 UInstanceOptions, UInstance, USource, synapse, UOperationProgress,
     10  Forms, synapse, UMainForm,
     11UInstanceOptions, UInstance, USource, UOperationProgress,
    1212  UMainOptions, USourceSelection
    1313  { you can add units after this };
  • trunk/Template/environmentoptions.xml

    r6 r9  
    55    <LazarusDirectory Value="%LazarusDir%">
    66    </LazarusDirectory>
    7     <CompilerFilename Value="%FPCDir%\bin\%FPCPlatform%\fpc.exe">
     7    <CompilerFilename Value="%FPCCompiler%">
    88    </CompilerFilename>
    99    <FPCSourceDirectory Value="%FPCDir%">
    1010    </FPCSourceDirectory>
    11     <MakeFilename Value="%FPCDir%\bin\%FPCPlatform%\make.exe">
     11    <MakeFilename Value="%Make%">
    1212    </MakeFilename>
    1313    <TestBuildDirectory Value="%Temp%">
    1414    </TestBuildDirectory>
    1515    <Debugger Class="TGDBMIDebugger"/>
    16     <DebuggerFilename Value="%BaseDir%\BinUtils\%FPCPlatform%\mingw\gdb.exe">
     16    <DebuggerFilename Value="%GDB%">
    1717    </DebuggerFilename>
    1818  </EnvironmentOptions>
  • trunk/UInstance.pas

    r8 r9  
    3030    procedure UpdateFPCConfig;
    3131    function GetPath: string;
     32    function GetBinPath: string;
    3233    property Downloaded: Boolean read GetDownloaded;
    3334    property Compiled: Boolean read GetCompiled;
     
    6162function TInstance.GetCompiled: Boolean;
    6263begin
    63   Result := FileExistsUTF8(GetPath + DirectorySeparator + FPCSource.ProjectShortName +
    64     DirectorySeparator + 'bin' + DirectorySeparator +
    65     MainForm.Platform + DirectorySeparator + FPCSource.GetExecutableFile);
     64  Result := FileExistsUTF8(GetBinPath + DirectorySeparator + FPCSource.GetExecutableFile);
    6665  if Assigned(IDESource) then Result := Result and
    6766    FileExistsUTF8(GetPath + DirectorySeparator + IDESource.ProjectShortName +
     
    7877procedure TInstance.Build;
    7978begin
    80   OperationProgressForm.Environment := 'path=' + MainForm.GetBinUtilsDir;
     79  {$IFDEF Windows}
     80  OperationProgressForm.Environment := 'PATH=' + MainForm.GetBinUtilsDir;
     81  {$ENDIF}
    8182  OperationProgressForm.Path := GetPath + DirectorySeparator + FPCSource.ProjectShortName;
    8283  OperationProgressForm.CommandLine := 'make clean all PP="' +
    83     MainForm.GetBinUtilsDir + DirectorySeparator + 'fpc"';
     84    MainForm.GetCompilerPath + '"';
    8485  OperationProgressForm.ShowModal;
    8586
    86   OperationProgressForm.Environment := 'path=' + MainForm.GetBinUtilsDir;
     87  {$IFDEF Windows}
     88  OperationProgressForm.Environment := 'PATH=' + MainForm.GetBinUtilsDir;
     89  {$ENDIF}
    8790  OperationProgressForm.Path := GetPath + DirectorySeparator + FPCSource.ProjectShortName;
    88   OperationProgressForm.CommandLine := 'make install PREFIX="' +
    89     GetPath + DirectorySeparator + FPCSource.ProjectShortName + '"' +
    90     ' PP="' + MainForm.GetBinUtilsDir + DirectorySeparator + 'fpc"';
     91  OperationProgressForm.CommandLine := 'make install PREFIX=' +
     92    GetPath + DirectorySeparator + FPCSource.ProjectShortName + '' +
     93    ' PP=' + MainForm.GetCompilerPath + '';
    9194  OperationProgressForm.ShowModal;
    9295
    9396  if Assigned(IDESource) then begin
    94     OperationProgressForm.Environment := 'path=' + MainForm.GetBinUtilsDir;
     97    {$IFDEF Windows}
     98    OperationProgressForm.Environment := 'PATH=' + MainForm.GetBinUtilsDir;
     99    {$ENDIF}
    95100    OperationProgressForm.Path := GetPath + DirectorySeparator + IDESource.ProjectShortName;
    96101    OperationProgressForm.CommandLine :=
     
    124129  Config: TStringList;
    125130  ConfigFileName: string;
     131  ConfigPath: string;
    126132begin
    127   ConfigFileName := GetPath + DirectorySeparator + IDESource.ProjectShortName +
    128     DirectorySeparator + 'config' + DirectorySeparator + 'environmentoptions.xml';
     133  ConfigPath := GetPath + DirectorySeparator + IDESource.ProjectShortName +
     134    DirectorySeparator + 'config';
     135  ForceDirectoriesUTF8(ConfigPath);
     136  ConfigFileName := ConfigPath + DirectorySeparator + 'environmentoptions.xml';
    129137  if not FileExistsUTF8(ConfigFileName) then
    130138  try
     
    135143    Config.Text := StringReplace(Config.Text, '%BaseDir%', MainForm.GetBaseDir, [rfReplaceAll]);
    136144    Config.Text := StringReplace(Config.Text, '%LazarusDir%', GetPath + DirectorySeparator + IDESource.ProjectShortName, [rfReplaceAll]);
    137     Config.Text := StringReplace(Config.Text, '%FPCPlatform%', MainForm.Platform, [rfReplaceAll]);
    138     Config.Text := StringReplace(Config.Text, '%Temp%', GetEnvironmentVariableUTF8('Temp'), [rfReplaceAll]);
     145    Config.Text := StringReplace(Config.Text, '%FPCCompiler%', GetBinPath + DirectorySeparator + FPCSource.ExecutableFile, [rfReplaceAll]);
     146    Config.Text := StringReplace(Config.Text, '%Make%', MainForm.GetBinUtilsDir + DirectorySeparator + 'make', [rfReplaceAll]);
     147    {$IFDEF Windows}
     148    Config.Text := StringReplace(Config.Text, '%Temp%', GetEnvironmentVariableUTF8('TEMP'), [rfReplaceAll]);
     149    Config.Text := StringReplace(Config.Text, '%GDB%', MainForm.GetBinUtilsDir + DirectorySeparator + 'mingw\gdb.exe', [rfReplaceAll]);
     150    {$ENDIF}
     151    {$IFDEF Linux}
     152    Config.Text := StringReplace(Config.Text, '%Temp%', '/tmp', [rfReplaceAll]);
     153    Config.Text := StringReplace(Config.Text, '%GDB%', '/usr/bin/gdb', [rfReplaceAll]);
     154    {$ENDIF}
    139155    Config.SaveToFile(ConfigFileName);
    140156  finally
     
    153169    Config.Text := StringReplace(Config.Text, '$(FPCDir)', GetPath +
    154170      DirectorySeparator + FPCSource.ProjectShortName, [rfReplaceAll]);
    155     Config.SaveToFile(GetPath + DirectorySeparator + FPCSource.ProjectShortName +
    156       DirectorySeparator + 'bin' + DirectorySeparator +
    157       MainForm.Platform + DirectorySeparator + 'fpc.cfg');
     171    Config.SaveToFile(GetBinPath + DirectorySeparator + 'fpc.cfg');
    158172  finally
    159173    Config.Free;
     
    167181end;
    168182
     183function TInstance.GetBinPath: string;
     184begin
     185  Result := GetPath + DirectorySeparator + FPCSource.ProjectShortName +
     186    DirectorySeparator + 'bin';
     187  {$IFDEF Windows}
     188  Result := Result + DirectorySeparator +  MainForm.Platform;
     189  {$ENDIF}
     190end;
     191
    169192end.
    170193
  • trunk/USource.pas

    r6 r9  
    77uses
    88  Classes, SysUtils, Contnrs, FileUtil, Dialogs, Forms,
    9   DOM, XMLWrite, XMLRead, HTTPSend;
     9  DOM, XMLWrite, XMLRead;
    1010
    1111type
Note: See TracChangeset for help on using the changeset viewer.