- Timestamp:
- Feb 3, 2011, 2:18:11 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 added
- 4 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 lib 2 2 FreePascalManager.exe 3 SourceList.xml4 3 Config.xml 4 Source 5 Instance
-
- Property svn:ignore
-
trunk/FreePascalManager.lpi
r4 r5 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count=" 14">40 <Units Count="25"> 41 41 <Unit0> 42 42 <Filename Value="FreePascalManager.lpr"/> … … 46 46 <TopLine Value="1"/> 47 47 <CursorPos X="1" Y="15"/> 48 <UsageCount Value=" 63"/>48 <UsageCount Value="75"/> 49 49 </Unit0> 50 50 <Unit1> 51 <Filename Value=" UMainForm.pas"/>51 <Filename Value="Forms\UMainForm.pas"/> 52 52 <IsPartOfProject Value="True"/> 53 53 <ComponentName Value="MainForm"/> 54 54 <ResourceBaseClass Value="Form"/> 55 55 <UnitName Value="UMainForm"/> 56 <IsVisibleTab Value="True"/>57 56 <EditorIndex Value="0"/> 58 57 <WindowIndex Value="0"/> 59 <TopLine Value="1 40"/>60 <CursorPos X=" 60" Y="144"/>61 <UsageCount Value=" 63"/>58 <TopLine Value="109"/> 59 <CursorPos X="11" Y="114"/> 60 <UsageCount Value="75"/> 62 61 <Loaded Value="True"/> 63 62 <LoadedDesigner Value="True"/> 64 63 </Unit1> 65 64 <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"/> 69 68 <ResourceBaseClass Value="Form"/> 70 <UnitName Value="U Options"/>69 <UnitName Value="UInstanceOptions"/> 71 70 <EditorIndex Value="2"/> 72 71 <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"/> 76 75 <Loaded Value="True"/> 77 76 <LoadedDesigner Value="True"/> … … 81 80 <IsPartOfProject Value="True"/> 82 81 <UnitName Value="UInstance"/> 82 <IsVisibleTab Value="True"/> 83 83 <EditorIndex Value="3"/> 84 84 <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"/> 88 88 <Loaded Value="True"/> 89 89 </Unit3> … … 92 92 <IsPartOfProject Value="True"/> 93 93 <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"/> 99 99 <Loaded Value="True"/> 100 100 </Unit4> … … 102 102 <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\fpc\2.5.1\source\rtl\objpas\classes\classesh.inc"/> 103 103 <WindowIndex Value="0"/> 104 <TopLine Value=" 1670"/>105 <CursorPos X="1 4" Y="1683"/>106 <UsageCount Value=" 7"/>104 <TopLine Value="600"/> 105 <CursorPos X="15" Y="613"/> 106 <UsageCount Value="10"/> 107 107 </Unit5> 108 108 <Unit6> 109 109 <Filename Value="E:\Programy\Lazarus\0.9.31_2.5.1\lcl\lclclasses.pp"/> 110 110 <UnitName Value="LCLClasses"/> 111 <EditorIndex Value="1"/>112 111 <WindowIndex Value="0"/> 113 112 <TopLine Value="34"/> 114 113 <CursorPos X="20" Y="47"/> 115 <UsageCount Value="10"/> 116 <Loaded Value="True"/> 114 <UsageCount Value="11"/> 117 115 </Unit6> 118 116 <Unit7> … … 122 120 <TopLine Value="253"/> 123 121 <CursorPos X="14" Y="266"/> 124 <UsageCount Value="2 9"/>122 <UsageCount Value="28"/> 125 123 </Unit7> 126 124 <Unit8> … … 130 128 <TopLine Value="749"/> 131 129 <CursorPos X="3" Y="753"/> 132 <UsageCount Value="2 7"/>130 <UsageCount Value="26"/> 133 131 </Unit8> 134 132 <Unit9> … … 137 135 <TopLine Value="58"/> 138 136 <CursorPos X="72" Y="81"/> 139 <UsageCount Value="1 8"/>137 <UsageCount Value="17"/> 140 138 <DefaultSyntaxHighlighter Value="XML"/> 141 139 </Unit9> … … 145 143 <TopLine Value="1"/> 146 144 <CursorPos X="46" Y="49"/> 147 <UsageCount Value="1 6"/>145 <UsageCount Value="15"/> 148 146 <DefaultSyntaxHighlighter Value="XML"/> 149 147 </Unit10> … … 154 152 <TopLine Value="67"/> 155 153 <CursorPos X="17" Y="80"/> 156 <UsageCount Value="2 7"/>154 <UsageCount Value="26"/> 157 155 </Unit11> 158 156 <Unit12> … … 161 159 <TopLine Value="865"/> 162 160 <CursorPos X="1" Y="878"/> 163 <UsageCount Value=" 10"/>161 <UsageCount Value="9"/> 164 162 </Unit12> 165 163 <Unit13> … … 169 167 <TopLine Value="594"/> 170 168 <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"/> 171 201 <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> 173 276 </Units> 174 277 <JumpHistory Count="30" HistoryIndex="29"> 175 278 <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"/> 178 281 </Position1> 179 282 <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"/> 182 285 </Position2> 183 286 <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"/> 186 289 </Position3> 187 290 <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"/> 190 293 </Position4> 191 294 <Position5> 192 <Filename Value=" UOptions.pas"/>193 <Caret Line="10 2" Column="77" TopLine="81"/>295 <Filename Value="Forms\UMainForm.pas"/> 296 <Caret Line="103" Column="14" TopLine="90"/> 194 297 </Position5> 195 298 <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"/> 198 301 </Position6> 199 302 <Position7> 200 <Filename Value=" UMainForm.pas"/>201 <Caret Line="1 41" Column="35" TopLine="139"/>303 <Filename Value="Forms\UMainForm.pas"/> 304 <Caret Line="122" Column="13" TopLine="109"/> 202 305 </Position7> 203 306 <Position8> 204 <Filename Value=" UMainForm.pas"/>205 <Caret Line="1 42" Column="35" TopLine="140"/>307 <Filename Value="Forms\UMainForm.pas"/> 308 <Caret Line="123" Column="16" TopLine="110"/> 206 309 </Position8> 207 310 <Position9> 208 <Filename Value=" UMainForm.pas"/>209 <Caret Line="1 43" Column="35" TopLine="141"/>311 <Filename Value="Forms\UMainForm.pas"/> 312 <Caret Line="130" Column="7" TopLine="117"/> 210 313 </Position9> 211 314 <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"/> 214 317 </Position10> 215 318 <Position11> 216 <Filename Value=" UMainForm.pas"/>217 <Caret Line="1 45" Column="35" TopLine="143"/>319 <Filename Value="Forms\UMainForm.pas"/> 320 <Caret Line="114" Column="11" TopLine="109"/> 218 321 </Position11> 219 322 <Position12> 220 <Filename Value="U MainForm.pas"/>221 <Caret Line=" 146" Column="35" TopLine="144"/>323 <Filename Value="UInstance.pas"/> 324 <Caret Line="67" Column="23" TopLine="65"/> 222 325 </Position12> 223 326 <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"/> 226 329 </Position13> 227 330 <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"/> 230 333 </Position14> 231 334 <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"/> 234 337 </Position15> 235 338 <Position16> 236 <Filename Value="U MainForm.pas"/>237 <Caret Line=" 166" Column="1" TopLine="145"/>339 <Filename Value="UInstance.pas"/> 340 <Caret Line="67" Column="23" TopLine="65"/> 238 341 </Position16> 239 342 <Position17> 240 <Filename Value="U MainForm.pas"/>241 <Caret Line=" 167" Column="1" TopLine="146"/>343 <Filename Value="UInstance.pas"/> 344 <Caret Line="69" Column="28" TopLine="54"/> 242 345 </Position17> 243 346 <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"/> 246 349 </Position18> 247 350 <Position19> 248 <Filename Value="U MainForm.pas"/>249 <Caret Line=" 165" Column="1" TopLine="148"/>351 <Filename Value="UInstance.pas"/> 352 <Caret Line="69" Column="28" TopLine="54"/> 250 353 </Position19> 251 354 <Position20> 252 <Filename Value="U MainForm.pas"/>253 <Caret Line=" 164" Column="6" TopLine="148"/>355 <Filename Value="UInstance.pas"/> 356 <Caret Line="76" Column="25" TopLine="62"/> 254 357 </Position20> 255 358 <Position21> 256 <Filename Value="U MainForm.pas"/>257 <Caret Line=" 155" Column="11" TopLine="154"/>359 <Filename Value="UInstance.pas"/> 360 <Caret Line="69" Column="43" TopLine="61"/> 258 361 </Position21> 259 362 <Position22> 260 <Filename Value="U MainForm.pas"/>261 <Caret Line=" 101" Column="15" TopLine="98"/>363 <Filename Value="UInstance.pas"/> 364 <Caret Line="68" Column="31" TopLine="61"/> 262 365 </Position22> 263 366 <Position23> 264 <Filename Value="U MainForm.pas"/>265 <Caret Line=" 130" Column="1" TopLine="130"/>367 <Filename Value="UInstance.pas"/> 368 <Caret Line="72" Column="3" TopLine="61"/> 266 369 </Position23> 267 370 <Position24> 268 <Filename Value="U MainForm.pas"/>269 <Caret Line=" 174" Column="46" TopLine="160"/>371 <Filename Value="UInstance.pas"/> 372 <Caret Line="76" Column="28" TopLine="61"/> 270 373 </Position24> 271 374 <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"/> 274 377 </Position25> 275 378 <Position26> 276 <Filename Value="U MainForm.pas"/>277 <Caret Line=" 131" Column="56" TopLine="127"/>379 <Filename Value="UInstance.pas"/> 380 <Caret Line="68" Column="28" TopLine="61"/> 278 381 </Position26> 279 382 <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"/> 282 385 </Position27> 283 386 <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"/> 286 389 </Position28> 287 390 <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"/> 290 393 </Position29> 291 394 <Position30> 292 <Filename Value="U MainForm.pas"/>293 <Caret Line=" 133" Column="1" TopLine="131"/>395 <Filename Value="UInstance.pas"/> 396 <Caret Line="69" Column="46" TopLine="61"/> 294 397 </Position30> 295 398 </JumpHistory> … … 303 406 <SearchPaths> 304 407 <IncludeFiles Value="$(ProjOutDir)"/> 408 <OtherUnitFiles Value="Forms"/> 305 409 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 306 410 </SearchPaths> … … 332 436 </CompilerOptions> 333 437 <Debugging> 438 <BreakPoints Count="1"> 439 <Item1> 440 <Source Value="UInstance.pas"/> 441 <Line Value="75"/> 442 </Item1> 443 </BreakPoints> 334 444 <Exceptions Count="3"> 335 445 <Item1> -
trunk/FreePascalManager.lpr
r3 r5 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UMainForm, UOptions, UInstance, USource, synapse 10 Forms, UMainForm, 11 UInstanceOptions, UInstance, USource, synapse, UOperationProgress, 12 UMainOptions 11 13 { you can add units after this }; 12 14 … … 16 18 Application.Initialize; 17 19 Application.CreateForm(TMainForm, MainForm); 18 Application.CreateForm(TOptionsForm, OptionsForm); 20 Application.CreateForm(TInstanceOptionsForm, InstanceOptionsForm); 21 Application.CreateForm(TOperationProgressForm, OperationProgressForm); 22 Application.CreateForm(TMainOptionsForm, MainOptionsForm); 19 23 Application.Run; 20 24 end. -
trunk/UInstance.pas
r4 r5 6 6 7 7 uses 8 Classes, SysUtils, USource, Contnrs; 8 Classes, SysUtils, USource, Contnrs, Process, Forms, Controls, 9 FileUtil; 9 10 10 11 type … … 12 13 13 14 TInstance = class 15 private 16 function GetDownloaded: Boolean; 17 public 14 18 Id: Integer; 15 19 Name: string; 16 Downloaded: Boolean;17 20 Compiled: Boolean; 18 21 IDESource: TSource; … … 24 27 procedure Build; 25 28 procedure Start; 26 procedure Update;27 pro cedure Download;29 function GetPath: string; 30 property Downloaded: Boolean read GetDownloaded; 28 31 end; 29 32 … … 35 38 36 39 implementation 40 41 uses 42 UOperationProgress, UMainForm; 37 43 38 44 { TInstanceList } … … 50 56 { TInstance } 51 57 58 function TInstance.GetDownloaded: Boolean; 59 begin 60 Result := DirectoryExistsUTF8(GetPath + DirectorySeparator + FPCSource.ProjectShortName); 61 if Assigned(IDESource) then Result := Result and 62 DirectoryExistsUTF8(GetPath + DirectorySeparator + IDESource.ProjectShortName); 63 end; 64 52 65 procedure TInstance.Build; 53 66 begin 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; 54 74 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; 55 88 end; 56 89 57 90 procedure TInstance.Start; 91 var 92 Process: TProcess; 58 93 begin 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; 60 103 end; 61 104 62 procedure TInstance.Update;105 function TInstance.GetPath: string; 63 106 begin 64 65 end; 66 67 procedure TInstance.Download; 68 begin 69 107 Result := ExtractFileDir(Application.ExeName) + DirectorySeparator + 108 MainForm.InstanceDir + DirectorySeparator + IntToStr(Id); 70 109 end; 71 110 -
trunk/USource.pas
r4 r5 6 6 7 7 uses 8 Classes, SysUtils, Contnrs, FileUtil, Dialogs, 8 Classes, SysUtils, Contnrs, FileUtil, Dialogs, Forms, 9 9 DOM, XMLWrite, XMLRead, HTTPSend; 10 10 … … 16 16 TSource = class 17 17 Id: Integer; 18 Name: string; 18 ProjectName: string; 19 ProjectShortName: string; 20 ProjectType: string; 19 21 SubversionURL: string; 20 22 VersionNumber: string; 21 23 VersionType: string; 22 24 SourceType: TSourceType; 25 ExecutableFile: string; 23 26 procedure Assign(Source: TSource); 27 procedure Download; 28 procedure Update; 29 procedure ExportTo(Path: string); 30 function GetExecutableFile: string; 31 function GetPath: string; 24 32 end; 25 33 … … 33 41 implementation 34 42 43 uses 44 UMainForm, UOperationProgress; 45 35 46 { TSource } 36 47 … … 38 49 begin 39 50 Id := Source.Id; 40 Name := Source.Name; 51 ProjectName := Source.ProjectName; 52 ProjectShortName := Source.ProjectShortName; 53 ProjectType := Source.ProjectType; 41 54 VersionNumber := Source.VersionNumber; 42 55 VersionType := Source.VersionType; 43 56 SubversionURL := Source.SubversionURL; 44 57 SourceType := Source.SourceType; 58 ExecutableFile := Source.ExecutableFile; 59 end; 60 61 procedure TSource.Download; 62 begin 63 OperationProgressForm.CommandLine := 'svn checkout "' + SubversionURL + 64 '" "' + GetPath + '"'; 65 OperationProgressForm.ShowModal; 66 end; 67 68 procedure TSource.Update; 69 begin 70 OperationProgressForm.CommandLine := 'svn update "' + GetPath + '"'; 71 OperationProgressForm.ShowModal; 72 end; 73 74 procedure TSource.ExportTo(Path: string); 75 begin 76 OperationProgressForm.CommandLine := 'svn export --force "' + GetPath + '" "' + 77 Path + '"'; 78 OperationProgressForm.ShowModal; 79 end; 80 81 function TSource.GetExecutableFile: string; 82 var 83 Postfix: string; 84 begin 85 PostFix := ''; 86 {$IFDEF WINDOWS} 87 PostFix := '.exe'; 88 {$ENDIF} 89 Result := ExecutableFile + Postfix; 90 end; 91 92 function TSource.GetPath: string; 93 begin 94 Result := ExtractFileDir(Application.ExeName) + DirectorySeparator + 95 MainForm.SourceDir + DirectorySeparator + IntToStr(Id); 45 96 end; 46 97 … … 78 129 NewSource := TSource.Create; 79 130 with NewSource do begin 80 NewSubNode := Child.FindNode(' Name');131 NewSubNode := Child.FindNode('ProjectName'); 81 132 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)); 83 140 NewSubNode := Child.FindNode('Id'); 84 141 if Assigned(NewSubNode) then … … 93 150 if Assigned(NewSubNode) then 94 151 VersionType := UTF8Encode(string(NewSubNode.TextContent)); 152 NewSubNode := Child.FindNode('ExecutableFile'); 153 if Assigned(NewSubNode) then 154 ExecutableFile := UTF8Encode(string(NewSubNode.TextContent)); 95 155 NewSubNode := Child.FindNode('SourceType'); 96 156 if Assigned(NewSubNode) then
Note:
See TracChangeset
for help on using the changeset viewer.