Changeset 5 for trunk


Ignore:
Timestamp:
Feb 3, 2011, 2:18:11 PM (13 years ago)
Author:
chronos
Message:
 
Location:
trunk
Files:
11 added
4 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11lib
        22FreePascalManager.exe
        3 SourceList.xml
        43Config.xml
         4Source
         5Instance
  • trunk/FreePascalManager.lpi

    r4 r5  
    3838      </Item2>
    3939    </RequiredPackages>
    40     <Units Count="14">
     40    <Units Count="25">
    4141      <Unit0>
    4242        <Filename Value="FreePascalManager.lpr"/>
     
    4646        <TopLine Value="1"/>
    4747        <CursorPos X="1" Y="15"/>
    48         <UsageCount Value="63"/>
     48        <UsageCount Value="75"/>
    4949      </Unit0>
    5050      <Unit1>
    51         <Filename Value="UMainForm.pas"/>
     51        <Filename Value="Forms\UMainForm.pas"/>
    5252        <IsPartOfProject Value="True"/>
    5353        <ComponentName Value="MainForm"/>
    5454        <ResourceBaseClass Value="Form"/>
    5555        <UnitName Value="UMainForm"/>
    56         <IsVisibleTab Value="True"/>
    5756        <EditorIndex Value="0"/>
    5857        <WindowIndex Value="0"/>
    59         <TopLine Value="140"/>
    60         <CursorPos X="60" Y="144"/>
    61         <UsageCount Value="63"/>
     58        <TopLine Value="109"/>
     59        <CursorPos X="11" Y="114"/>
     60        <UsageCount Value="75"/>
    6261        <Loaded Value="True"/>
    6362        <LoadedDesigner Value="True"/>
    6463      </Unit1>
    6564      <Unit2>
    66         <Filename Value="UOptions.pas"/>
    67         <IsPartOfProject Value="True"/>
    68         <ComponentName Value="OptionsForm"/>
     65        <Filename Value="Forms\UInstanceOptions.pas"/>
     66        <IsPartOfProject Value="True"/>
     67        <ComponentName Value="InstanceOptionsForm"/>
    6968        <ResourceBaseClass Value="Form"/>
    70         <UnitName Value="UOptions"/>
     69        <UnitName Value="UInstanceOptions"/>
    7170        <EditorIndex Value="2"/>
    7271        <WindowIndex Value="0"/>
    73         <TopLine Value="81"/>
    74         <CursorPos X="77" Y="102"/>
    75         <UsageCount Value="63"/>
     72        <TopLine Value="7"/>
     73        <CursorPos X="38" Y="103"/>
     74        <UsageCount Value="75"/>
    7675        <Loaded Value="True"/>
    7776        <LoadedDesigner Value="True"/>
     
    8180        <IsPartOfProject Value="True"/>
    8281        <UnitName Value="UInstance"/>
     82        <IsVisibleTab Value="True"/>
    8383        <EditorIndex Value="3"/>
    8484        <WindowIndex Value="0"/>
    85         <TopLine Value="13"/>
    86         <CursorPos X="24" Y="27"/>
    87         <UsageCount Value="63"/>
     85        <TopLine Value="61"/>
     86        <CursorPos X="38" Y="79"/>
     87        <UsageCount Value="75"/>
    8888        <Loaded Value="True"/>
    8989      </Unit3>
     
    9292        <IsPartOfProject Value="True"/>
    9393        <UnitName Value="USource"/>
    94         <EditorIndex Value="4"/>
    95         <WindowIndex Value="0"/>
    96         <TopLine Value="77"/>
    97         <CursorPos X="39" Y="108"/>
    98         <UsageCount Value="63"/>
     94        <EditorIndex Value="8"/>
     95        <WindowIndex Value="0"/>
     96        <TopLine Value="49"/>
     97        <CursorPos X="14" Y="50"/>
     98        <UsageCount Value="75"/>
    9999        <Loaded Value="True"/>
    100100      </Unit4>
     
    102102        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\rtl\objpas\classes\classesh.inc"/>
    103103        <WindowIndex Value="0"/>
    104         <TopLine Value="1670"/>
    105         <CursorPos X="14" Y="1683"/>
    106         <UsageCount Value="7"/>
     104        <TopLine Value="600"/>
     105        <CursorPos X="15" Y="613"/>
     106        <UsageCount Value="10"/>
    107107      </Unit5>
    108108      <Unit6>
    109109        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\lclclasses.pp"/>
    110110        <UnitName Value="LCLClasses"/>
    111         <EditorIndex Value="1"/>
    112111        <WindowIndex Value="0"/>
    113112        <TopLine Value="34"/>
    114113        <CursorPos X="20" Y="47"/>
    115         <UsageCount Value="10"/>
    116         <Loaded Value="True"/>
     114        <UsageCount Value="11"/>
    117115      </Unit6>
    118116      <Unit7>
     
    122120        <TopLine Value="253"/>
    123121        <CursorPos X="14" Y="266"/>
    124         <UsageCount Value="29"/>
     122        <UsageCount Value="28"/>
    125123      </Unit7>
    126124      <Unit8>
     
    130128        <TopLine Value="749"/>
    131129        <CursorPos X="3" Y="753"/>
    132         <UsageCount Value="27"/>
     130        <UsageCount Value="26"/>
    133131      </Unit8>
    134132      <Unit9>
     
    137135        <TopLine Value="58"/>
    138136        <CursorPos X="72" Y="81"/>
    139         <UsageCount Value="18"/>
     137        <UsageCount Value="17"/>
    140138        <DefaultSyntaxHighlighter Value="XML"/>
    141139      </Unit9>
     
    145143        <TopLine Value="1"/>
    146144        <CursorPos X="46" Y="49"/>
    147         <UsageCount Value="16"/>
     145        <UsageCount Value="15"/>
    148146        <DefaultSyntaxHighlighter Value="XML"/>
    149147      </Unit10>
     
    154152        <TopLine Value="67"/>
    155153        <CursorPos X="17" Y="80"/>
    156         <UsageCount Value="27"/>
     154        <UsageCount Value="26"/>
    157155      </Unit11>
    158156      <Unit12>
     
    161159        <TopLine Value="865"/>
    162160        <CursorPos X="1" Y="878"/>
    163         <UsageCount Value="10"/>
     161        <UsageCount Value="9"/>
    164162      </Unit12>
    165163      <Unit13>
     
    169167        <TopLine Value="594"/>
    170168        <CursorPos X="14" Y="607"/>
     169        <UsageCount Value="9"/>
     170      </Unit13>
     171      <Unit14>
     172        <Filename Value="Forms\UOperationProgress.pas"/>
     173        <IsPartOfProject Value="True"/>
     174        <ComponentName Value="OperationProgressForm"/>
     175        <ResourceBaseClass Value="Form"/>
     176        <UnitName Value="UOperationProgress"/>
     177        <EditorIndex Value="5"/>
     178        <WindowIndex Value="0"/>
     179        <TopLine Value="62"/>
     180        <CursorPos X="1" Y="82"/>
     181        <UsageCount Value="31"/>
     182        <Loaded Value="True"/>
     183        <LoadedDesigner Value="True"/>
     184      </Unit14>
     185      <Unit15>
     186        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\packages\fcl-process\src\process.pp"/>
     187        <UnitName Value="process"/>
     188        <EditorIndex Value="6"/>
     189        <WindowIndex Value="0"/>
     190        <TopLine Value="110"/>
     191        <CursorPos X="14" Y="123"/>
     192        <UsageCount Value="14"/>
     193        <Loaded Value="True"/>
     194      </Unit15>
     195      <Unit16>
     196        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\packages\fcl-process\src\pipes.pp"/>
     197        <UnitName Value="Pipes"/>
     198        <WindowIndex Value="0"/>
     199        <TopLine Value="18"/>
     200        <CursorPos X="16" Y="39"/>
    171201        <UsageCount Value="10"/>
    172       </Unit13>
     202      </Unit16>
     203      <Unit17>
     204        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\packages\fcl-process\src\win\process.inc"/>
     205        <WindowIndex Value="0"/>
     206        <TopLine Value="248"/>
     207        <CursorPos X="3" Y="269"/>
     208        <UsageCount Value="10"/>
     209      </Unit17>
     210      <Unit18>
     211        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\rtl\objpas\classes\stringl.inc"/>
     212        <WindowIndex Value="0"/>
     213        <TopLine Value="566"/>
     214        <CursorPos X="8" Y="570"/>
     215        <UsageCount Value="10"/>
     216      </Unit18>
     217      <Unit19>
     218        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\stdctrls.pp"/>
     219        <UnitName Value="StdCtrls"/>
     220        <WindowIndex Value="0"/>
     221        <TopLine Value="906"/>
     222        <CursorPos X="16" Y="919"/>
     223        <UsageCount Value="10"/>
     224      </Unit19>
     225      <Unit20>
     226        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\controls.pp"/>
     227        <UnitName Value="Controls"/>
     228        <WindowIndex Value="0"/>
     229        <TopLine Value="38"/>
     230        <CursorPos X="3" Y="51"/>
     231        <UsageCount Value="9"/>
     232      </Unit20>
     233      <Unit21>
     234        <Filename Value="ReadMe.txt"/>
     235        <IsPartOfProject Value="True"/>
     236        <EditorIndex Value="7"/>
     237        <WindowIndex Value="0"/>
     238        <TopLine Value="1"/>
     239        <CursorPos X="17" Y="6"/>
     240        <UsageCount Value="29"/>
     241        <Loaded Value="True"/>
     242        <DefaultSyntaxHighlighter Value="None"/>
     243      </Unit21>
     244      <Unit22>
     245        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\interfaces\win32\win32wscontrols.pp"/>
     246        <UnitName Value="Win32WSControls"/>
     247        <WindowIndex Value="0"/>
     248        <TopLine Value="254"/>
     249        <CursorPos X="48" Y="260"/>
     250        <UsageCount Value="13"/>
     251      </Unit22>
     252      <Unit23>
     253        <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\rtl\win32\system.pp"/>
     254        <UnitName Value="System"/>
     255        <EditorIndex Value="4"/>
     256        <WindowIndex Value="0"/>
     257        <TopLine Value="785"/>
     258        <CursorPos X="22" Y="993"/>
     259        <UsageCount Value="11"/>
     260        <Loaded Value="True"/>
     261      </Unit23>
     262      <Unit24>
     263        <Filename Value="Forms\UMainOptions.pas"/>
     264        <IsPartOfProject Value="True"/>
     265        <ComponentName Value="MainOptionsForm"/>
     266        <ResourceBaseClass Value="Form"/>
     267        <UnitName Value="UMainOptions"/>
     268        <EditorIndex Value="1"/>
     269        <WindowIndex Value="0"/>
     270        <TopLine Value="30"/>
     271        <CursorPos X="36" Y="48"/>
     272        <UsageCount Value="22"/>
     273        <Loaded Value="True"/>
     274        <LoadedDesigner Value="True"/>
     275      </Unit24>
    173276    </Units>
    174277    <JumpHistory Count="30" HistoryIndex="29">
    175278      <Position1>
    176         <Filename Value="UOptions.pas"/>
    177         <Caret Line="106" Column="18" TopLine="95"/>
     279        <Filename Value="Forms\UMainOptions.pas"/>
     280        <Caret Line="52" Column="34" TopLine="30"/>
    178281      </Position1>
    179282      <Position2>
    180         <Filename Value="UMainForm.pas"/>
    181         <Caret Line="77" Column="24" TopLine="65"/>
     283        <Filename Value="Forms\UMainOptions.pas"/>
     284        <Caret Line="51" Column="34" TopLine="29"/>
    182285      </Position2>
    183286      <Position3>
    184         <Filename Value="UOptions.pas"/>
    185         <Caret Line="139" Column="1" TopLine="128"/>
     287        <Filename Value="Forms\UMainForm.pas"/>
     288        <Caret Line="96" Column="3" TopLine="87"/>
    186289      </Position3>
    187290      <Position4>
    188         <Filename Value="UOptions.pas"/>
    189         <Caret Line="72" Column="1" TopLine="62"/>
     291        <Filename Value="Forms\UMainForm.pas"/>
     292        <Caret Line="102" Column="11" TopLine="89"/>
    190293      </Position4>
    191294      <Position5>
    192         <Filename Value="UOptions.pas"/>
    193         <Caret Line="102" Column="77" TopLine="81"/>
     295        <Filename Value="Forms\UMainForm.pas"/>
     296        <Caret Line="103" Column="14" TopLine="90"/>
    194297      </Position5>
    195298      <Position6>
    196         <Filename Value="UMainForm.pas"/>
    197         <Caret Line="243" Column="35" TopLine="221"/>
     299        <Filename Value="Forms\UMainForm.pas"/>
     300        <Caret Line="104" Column="27" TopLine="91"/>
    198301      </Position6>
    199302      <Position7>
    200         <Filename Value="UMainForm.pas"/>
    201         <Caret Line="141" Column="35" TopLine="139"/>
     303        <Filename Value="Forms\UMainForm.pas"/>
     304        <Caret Line="122" Column="13" TopLine="109"/>
    202305      </Position7>
    203306      <Position8>
    204         <Filename Value="UMainForm.pas"/>
    205         <Caret Line="142" Column="35" TopLine="140"/>
     307        <Filename Value="Forms\UMainForm.pas"/>
     308        <Caret Line="123" Column="16" TopLine="110"/>
    206309      </Position8>
    207310      <Position9>
    208         <Filename Value="UMainForm.pas"/>
    209         <Caret Line="143" Column="35" TopLine="141"/>
     311        <Filename Value="Forms\UMainForm.pas"/>
     312        <Caret Line="130" Column="7" TopLine="117"/>
    210313      </Position9>
    211314      <Position10>
    212         <Filename Value="UMainForm.pas"/>
    213         <Caret Line="144" Column="35" TopLine="142"/>
     315        <Filename Value="Forms\UMainForm.pas"/>
     316        <Caret Line="444" Column="41" TopLine="420"/>
    214317      </Position10>
    215318      <Position11>
    216         <Filename Value="UMainForm.pas"/>
    217         <Caret Line="145" Column="35" TopLine="143"/>
     319        <Filename Value="Forms\UMainForm.pas"/>
     320        <Caret Line="114" Column="11" TopLine="109"/>
    218321      </Position11>
    219322      <Position12>
    220         <Filename Value="UMainForm.pas"/>
    221         <Caret Line="146" Column="35" TopLine="144"/>
     323        <Filename Value="UInstance.pas"/>
     324        <Caret Line="67" Column="23" TopLine="65"/>
    222325      </Position12>
    223326      <Position13>
    224         <Filename Value="UMainForm.pas"/>
    225         <Caret Line="158" Column="1" TopLine="145"/>
     327        <Filename Value="Forms\UOperationProgress.pas"/>
     328        <Caret Line="29" Column="25" TopLine="9"/>
    226329      </Position13>
    227330      <Position14>
    228         <Filename Value="UMainForm.pas"/>
    229         <Caret Line="164" Column="1" TopLine="145"/>
     331        <Filename Value="Forms\UOperationProgress.pas"/>
     332        <Caret Line="73" Column="8" TopLine="60"/>
    230333      </Position14>
    231334      <Position15>
    232         <Filename Value="UMainForm.pas"/>
    233         <Caret Line="165" Column="1" TopLine="145"/>
     335        <Filename Value="Forms\UOperationProgress.pas"/>
     336        <Caret Line="74" Column="35" TopLine="61"/>
    234337      </Position15>
    235338      <Position16>
    236         <Filename Value="UMainForm.pas"/>
    237         <Caret Line="166" Column="1" TopLine="145"/>
     339        <Filename Value="UInstance.pas"/>
     340        <Caret Line="67" Column="23" TopLine="65"/>
    238341      </Position16>
    239342      <Position17>
    240         <Filename Value="UMainForm.pas"/>
    241         <Caret Line="167" Column="1" TopLine="146"/>
     343        <Filename Value="UInstance.pas"/>
     344        <Caret Line="69" Column="28" TopLine="54"/>
    242345      </Position17>
    243346      <Position18>
    244         <Filename Value="UMainForm.pas"/>
    245         <Caret Line="168" Column="1" TopLine="147"/>
     347        <Filename Value="Forms\UOperationProgress.pas"/>
     348        <Caret Line="77" Column="23" TopLine="63"/>
    246349      </Position18>
    247350      <Position19>
    248         <Filename Value="UMainForm.pas"/>
    249         <Caret Line="165" Column="1" TopLine="148"/>
     351        <Filename Value="UInstance.pas"/>
     352        <Caret Line="69" Column="28" TopLine="54"/>
    250353      </Position19>
    251354      <Position20>
    252         <Filename Value="UMainForm.pas"/>
    253         <Caret Line="164" Column="6" TopLine="148"/>
     355        <Filename Value="UInstance.pas"/>
     356        <Caret Line="76" Column="25" TopLine="62"/>
    254357      </Position20>
    255358      <Position21>
    256         <Filename Value="UMainForm.pas"/>
    257         <Caret Line="155" Column="11" TopLine="154"/>
     359        <Filename Value="UInstance.pas"/>
     360        <Caret Line="69" Column="43" TopLine="61"/>
    258361      </Position21>
    259362      <Position22>
    260         <Filename Value="UMainForm.pas"/>
    261         <Caret Line="101" Column="15" TopLine="98"/>
     363        <Filename Value="UInstance.pas"/>
     364        <Caret Line="68" Column="31" TopLine="61"/>
    262365      </Position22>
    263366      <Position23>
    264         <Filename Value="UMainForm.pas"/>
    265         <Caret Line="130" Column="1" TopLine="130"/>
     367        <Filename Value="UInstance.pas"/>
     368        <Caret Line="72" Column="3" TopLine="61"/>
    266369      </Position23>
    267370      <Position24>
    268         <Filename Value="UMainForm.pas"/>
    269         <Caret Line="174" Column="46" TopLine="160"/>
     371        <Filename Value="UInstance.pas"/>
     372        <Caret Line="76" Column="28" TopLine="61"/>
    270373      </Position24>
    271374      <Position25>
    272         <Filename Value="UMainForm.pas"/>
    273         <Caret Line="176" Column="11" TopLine="163"/>
     375        <Filename Value="Forms\UOperationProgress.pas"/>
     376        <Caret Line="76" Column="1" TopLine="62"/>
    274377      </Position25>
    275378      <Position26>
    276         <Filename Value="UMainForm.pas"/>
    277         <Caret Line="131" Column="56" TopLine="127"/>
     379        <Filename Value="UInstance.pas"/>
     380        <Caret Line="68" Column="28" TopLine="61"/>
    278381      </Position26>
    279382      <Position27>
    280         <Filename Value="UMainForm.pas"/>
    281         <Caret Line="132" Column="56" TopLine="128"/>
     383        <Filename Value="Forms\UOperationProgress.pas"/>
     384        <Caret Line="76" Column="1" TopLine="62"/>
    282385      </Position27>
    283386      <Position28>
    284         <Filename Value="UMainForm.pas"/>
    285         <Caret Line="133" Column="56" TopLine="129"/>
     387        <Filename Value="Forms\UOperationProgress.pas"/>
     388        <Caret Line="77" Column="1" TopLine="62"/>
    286389      </Position28>
    287390      <Position29>
    288         <Filename Value="UMainForm.pas"/>
    289         <Caret Line="134" Column="56" TopLine="130"/>
     391        <Filename Value="Forms\UOperationProgress.pas"/>
     392        <Caret Line="79" Column="34" TopLine="62"/>
    290393      </Position29>
    291394      <Position30>
    292         <Filename Value="UMainForm.pas"/>
    293         <Caret Line="133" Column="1" TopLine="131"/>
     395        <Filename Value="UInstance.pas"/>
     396        <Caret Line="69" Column="46" TopLine="61"/>
    294397      </Position30>
    295398    </JumpHistory>
     
    303406    <SearchPaths>
    304407      <IncludeFiles Value="$(ProjOutDir)"/>
     408      <OtherUnitFiles Value="Forms"/>
    305409      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
    306410    </SearchPaths>
     
    332436  </CompilerOptions>
    333437  <Debugging>
     438    <BreakPoints Count="1">
     439      <Item1>
     440        <Source Value="UInstance.pas"/>
     441        <Line Value="75"/>
     442      </Item1>
     443    </BreakPoints>
    334444    <Exceptions Count="3">
    335445      <Item1>
  • trunk/FreePascalManager.lpr

    r3 r5  
    88  {$ENDIF}{$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UMainForm, UOptions, UInstance, USource, synapse
     10  Forms, UMainForm,
     11UInstanceOptions, UInstance, USource, synapse, UOperationProgress,
     12  UMainOptions
    1113  { you can add units after this };
    1214
     
    1618  Application.Initialize;
    1719  Application.CreateForm(TMainForm, MainForm);
    18   Application.CreateForm(TOptionsForm, OptionsForm);
     20  Application.CreateForm(TInstanceOptionsForm, InstanceOptionsForm);
     21  Application.CreateForm(TOperationProgressForm, OperationProgressForm);
     22  Application.CreateForm(TMainOptionsForm, MainOptionsForm);
    1923  Application.Run;
    2024end.
  • trunk/UInstance.pas

    r4 r5  
    66
    77uses
    8   Classes, SysUtils, USource, Contnrs;
     8  Classes, SysUtils, USource, Contnrs, Process, Forms, Controls,
     9  FileUtil;
    910
    1011type
     
    1213
    1314  TInstance = class
     15  private
     16    function GetDownloaded: Boolean;
     17  public
    1418    Id: Integer;
    1519    Name: string;
    16     Downloaded: Boolean;
    1720    Compiled: Boolean;
    1821    IDESource: TSource;
     
    2427    procedure Build;
    2528    procedure Start;
    26     procedure Update;
    27     procedure Download;
     29    function GetPath: string;
     30    property Downloaded: Boolean read GetDownloaded;
    2831  end;
    2932
     
    3538
    3639implementation
     40
     41uses
     42  UOperationProgress, UMainForm;
    3743
    3844{ TInstanceList }
     
    5056{ TInstance }
    5157
     58function TInstance.GetDownloaded: Boolean;
     59begin
     60  Result := DirectoryExistsUTF8(GetPath + DirectorySeparator + FPCSource.ProjectShortName);
     61  if Assigned(IDESource) then Result := Result and
     62    DirectoryExistsUTF8(GetPath + DirectorySeparator + IDESource.ProjectShortName);
     63end;
     64
    5265procedure TInstance.Build;
    5366begin
     67  OperationProgressForm.Environment := 'path=' + //GetEnvironmentVariable('PATH') + ';' +
     68    MainForm.GetBinUtilsDir;
     69  OperationProgressForm.Path := GetPath + DirectorySeparator + FPCSource.ProjectShortName;
     70  OperationProgressForm.CommandLine :=
     71    '"' + MainForm.GetBinUtilsDir + DirectorySeparator + 'make.exe" clean all PP="' +
     72    MainForm.GetBinUtilsDir + '"';
     73  OperationProgressForm.ShowModal;
    5474
     75  OperationProgressForm.Path := GetPath + DirectorySeparator + FPCSource.ProjectShortName;
     76  OperationProgressForm.CommandLine :=
     77    '"' + MainForm.GetBinUtilsDir + DirectorySeparator + 'make.exe" install PREFIX="' +
     78    GetPath + DirectorySeparator + FPCSource.ProjectShortName + '"' +
     79    ' PP="' + MainForm.GetBinUtilsDir + '"';
     80  OperationProgressForm.ShowModal;
     81
     82  if Assigned(IDESource) then begin
     83    OperationProgressForm.Path := GetPath + DirectorySeparator + IDESource.ProjectShortName;
     84    OperationProgressForm.CommandLine :=
     85      '"' + MainForm.GetBinUtilsDir + DirectorySeparator + 'make.exe" bigideclean bigide OPT="-Xg"';
     86    OperationProgressForm.ShowModal;
     87  end;
    5588end;
    5689
    5790procedure TInstance.Start;
     91var
     92  Process: TProcess;
    5893begin
    59 
     94  if Assigned(IDESource) then
     95  try
     96    Process := TProcess.Create(nil);
     97    Process.CurrentDirectory := GetPath + DirectorySeparator + IDESource.ProjectShortName;
     98    Process.CommandLine := IDESource.GetExecutableFile;
     99    Process.Execute;
     100  finally
     101    Process.Free;
     102  end;
    60103end;
    61104
    62 procedure TInstance.Update;
     105function TInstance.GetPath: string;
    63106begin
    64 
    65 end;
    66 
    67 procedure TInstance.Download;
    68 begin
    69 
     107  Result := ExtractFileDir(Application.ExeName) + DirectorySeparator +
     108    MainForm.InstanceDir + DirectorySeparator + IntToStr(Id);
    70109end;
    71110
  • trunk/USource.pas

    r4 r5  
    66
    77uses
    8   Classes, SysUtils, Contnrs, FileUtil, Dialogs,
     8  Classes, SysUtils, Contnrs, FileUtil, Dialogs, Forms,
    99  DOM, XMLWrite, XMLRead, HTTPSend;
    1010
     
    1616  TSource = class
    1717    Id: Integer;
    18     Name: string;
     18    ProjectName: string;
     19    ProjectShortName: string;
     20    ProjectType: string;
    1921    SubversionURL: string;
    2022    VersionNumber: string;
    2123    VersionType: string;
    2224    SourceType: TSourceType;
     25    ExecutableFile: string;
    2326    procedure Assign(Source: TSource);
     27    procedure Download;
     28    procedure Update;
     29    procedure ExportTo(Path: string);
     30    function GetExecutableFile: string;
     31    function GetPath: string;
    2432  end;
    2533
     
    3341implementation
    3442
     43uses
     44  UMainForm, UOperationProgress;
     45
    3546{ TSource }
    3647
     
    3849begin
    3950  Id := Source.Id;
    40   Name := Source.Name;
     51  ProjectName := Source.ProjectName;
     52  ProjectShortName := Source.ProjectShortName;
     53  ProjectType := Source.ProjectType;
    4154  VersionNumber := Source.VersionNumber;
    4255  VersionType := Source.VersionType;
    4356  SubversionURL := Source.SubversionURL;
    4457  SourceType := Source.SourceType;
     58  ExecutableFile := Source.ExecutableFile;
     59end;
     60
     61procedure TSource.Download;
     62begin
     63  OperationProgressForm.CommandLine := 'svn checkout "' + SubversionURL +
     64    '" "' + GetPath + '"';
     65  OperationProgressForm.ShowModal;
     66end;
     67
     68procedure TSource.Update;
     69begin
     70  OperationProgressForm.CommandLine := 'svn update "' + GetPath + '"';
     71  OperationProgressForm.ShowModal;
     72end;
     73
     74procedure TSource.ExportTo(Path: string);
     75begin
     76  OperationProgressForm.CommandLine := 'svn export --force "' + GetPath + '" "' +
     77    Path + '"';
     78  OperationProgressForm.ShowModal;
     79end;
     80
     81function TSource.GetExecutableFile: string;
     82var
     83  Postfix: string;
     84begin
     85  PostFix := '';
     86  {$IFDEF WINDOWS}
     87  PostFix := '.exe';
     88  {$ENDIF}
     89  Result := ExecutableFile + Postfix;
     90end;
     91
     92function TSource.GetPath: string;
     93begin
     94  Result := ExtractFileDir(Application.ExeName) + DirectorySeparator +
     95    MainForm.SourceDir + DirectorySeparator + IntToStr(Id);
    4596end;
    4697
     
    78129        NewSource := TSource.Create;
    79130        with NewSource do begin
    80           NewSubNode := Child.FindNode('Name');
     131          NewSubNode := Child.FindNode('ProjectName');
    81132          if Assigned(NewSubNode) then
    82             Name := UTF8Encode(string(NewSubNode.TextContent));
     133            ProjectName := UTF8Encode(string(NewSubNode.TextContent));
     134          NewSubNode := Child.FindNode('ProjectShortName');
     135          if Assigned(NewSubNode) then
     136            ProjectShortName := UTF8Encode(string(NewSubNode.TextContent));
     137          NewSubNode := Child.FindNode('ProjectType');
     138          if Assigned(NewSubNode) then
     139            ProjectType := UTF8Encode(string(NewSubNode.TextContent));
    83140          NewSubNode := Child.FindNode('Id');
    84141          if Assigned(NewSubNode) then
     
    93150          if Assigned(NewSubNode) then
    94151            VersionType := UTF8Encode(string(NewSubNode.TextContent));
     152          NewSubNode := Child.FindNode('ExecutableFile');
     153          if Assigned(NewSubNode) then
     154            ExecutableFile := UTF8Encode(string(NewSubNode.TextContent));
    95155          NewSubNode := Child.FindNode('SourceType');
    96156          if Assigned(NewSubNode) then
Note: See TracChangeset for help on using the changeset viewer.