Changeset 50 for trunk/Target
- Timestamp:
- Jul 13, 2012, 1:37:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTarget.pas
r48 r50 257 257 OpenKey(Key + '\Compiler', True); 258 258 for I := 0 to Count - 1 do 259 with TTarget(Items[I]) do 260 if ValueExists(Name) then CompilerPath := ReadString(Name); 259 TTarget(Items[I]).LoadFromRegistry(Root, Key + '\Compiler'); 261 260 finally 262 261 Free; … … 274 273 for I := 0 to Count - 1 do 275 274 with TTarget(Items[I]) do 276 if CompilerPath <> '' then WriteString(Name, CompilerPath) 277 else DeleteValue(Name); 275 TTarget(Items[I]).SaveToRegistry(Root, Key + '\Compiler'); 278 276 finally 279 277 Free; … … 465 463 procedure TTarget.LoadFromRegistry(Root: HKEY; Key: string); 466 464 begin 467 465 with TRegistryEx.Create do 466 try 467 RootKey := Root; 468 OpenKey(Key + '\' + Name, True); 469 CompilerPath := ReadStringWithDefault('CompilerPath', CompilerPath); 470 ExecutorPath := ReadStringWithDefault('ExecutorPath', ExecutorPath); 471 finally 472 Free; 473 end; 468 474 end; 469 475 470 476 procedure TTarget.SaveToRegistry(Root: HKEY; Key: string); 471 477 begin 472 478 with TRegistryEx.Create do 479 try 480 RootKey := Root; 481 OpenKey(Key + '\' + Name, True); 482 if CompilerPath <> '' then WriteString('CompilerPath', CompilerPath) 483 else DeleteValue('CompilerPath'); 484 if ExecutorPath <> '' then WriteString('ExecutorPath', ExecutorPath) 485 else DeleteValue('ExecutorPath'); 486 finally 487 Free; 488 end; 473 489 end; 474 490
Note:
See TracChangeset
for help on using the changeset viewer.