Changeset 5
- Timestamp:
- May 1, 2014, 11:31:03 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LinuxBuilder.lpi
r4 r5 33 33 </Item1> 34 34 </RequiredPackages> 35 <Units Count=" 5">35 <Units Count="6"> 36 36 <Unit0> 37 37 <Filename Value="LinuxBuilder.lpr"/> … … 56 56 <IsPartOfProject Value="True"/> 57 57 <ComponentName Value="FormList"/> 58 <HasResources Value="True"/> 58 59 <ResourceBaseClass Value="Form"/> 59 60 <UnitName Value="UFormList"/> … … 63 64 <IsPartOfProject Value="True"/> 64 65 <ComponentName Value="FormLog"/> 66 <HasResources Value="True"/> 65 67 <ResourceBaseClass Value="Form"/> 66 68 <UnitName Value="UFormLog"/> 67 69 </Unit4> 70 <Unit5> 71 <Filename Value="UFormCompare.pas"/> 72 <IsPartOfProject Value="True"/> 73 <ComponentName Value="FormCompare"/> 74 <HasResources Value="True"/> 75 <ResourceBaseClass Value="Form"/> 76 <UnitName Value="UFormCompare"/> 77 </Unit5> 68 78 </Units> 69 79 </ProjectOptions> -
trunk/LinuxBuilder.lpr
r4 r5 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UFormMain, UKConfig, UFormList, UFormLog 10 Forms, UFormMain, UKConfig, UFormList, UFormLog, UFormCompare 11 11 { you can add units after this }; 12 12 … … 19 19 Application.CreateForm(TFormList, FormList); 20 20 Application.CreateForm(TFormLog, FormLog); 21 Application.CreateForm(TFormCompare, FormCompare); 21 22 Application.Run; 22 23 end. -
trunk/UFormMain.lfm
r4 r5 32 32 Top = 535 33 33 Width = 857 34 Panels = <> 34 Panels = < 35 item 36 Width = 150 37 end 38 item 39 Width = 150 40 end> 41 SimplePanel = False 35 42 end 36 43 object ToolBar1: TToolBar … … 74 81 Action = AOpenDir 75 82 end 83 object MenuItem7: TMenuItem 84 Action = ACompare 85 end 76 86 end 77 87 object MenuItem2: TMenuItem … … 94 104 object AOpenDir: TAction 95 105 Caption = 'Open directory' 106 ImageIndex = 1 96 107 OnExecute = AOpenDirExecute 97 108 end 98 109 object AViemSystem: TAction 99 110 Caption = 'System options' 111 ImageIndex = 0 100 112 OnExecute = AViemSystemExecute 101 113 end 102 114 object AShowList: TAction 103 115 Caption = 'Show list' 116 ImageIndex = 3 104 117 OnExecute = AShowListExecute 105 118 end 106 119 object AShowLog: TAction 107 120 Caption = 'Show log' 121 ImageIndex = 4 108 122 OnExecute = AShowLogExecute 123 end 124 object ACompare: TAction 125 Caption = 'Compare with directory' 126 OnExecute = ACompareExecute 109 127 end 110 128 end 111 129 object ImageList1: TImageList 112 130 left = 281 113 top = 185 131 top = 184 132 Bitmap = { 133 4C69050000001000000010000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 134 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 135 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 136 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 137 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 138 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 139 FF00FFFFFF00FFFFFF00FFFFFF000101010001010100000000000000000E0000 140 004E00000094000000B6000000C8000000C8000000B6000000940000004E0000 141 000E00000000010101000101010001010100010101010000004F070707B44D4D 142 4DD8A9A9A9EE7E7E7EF9424242FF424242FF7E7E7EF9A9A9A9EE4D4D4DD80707 143 07B40000004F01010101010101000101010801010171353535C6CACACAF0FBFB 144 FBFFA6A6A6FF9B9B9BFF383737FF383737FF383838FFA6A6A6FFFBFBFBFFCACA 145 CAF0353535C6010101710101010803030348464646BEE9E9E9F9F6F6F6FFF6F6 146 F6FFBDBDBDFFFFFFFFFF9E9B9BFF413C3CFF4C4646FF5C5C5CFFF6F6F6FFF6F6 147 F6FFE9E9E9F9464646BE03030348030303A07E7E7ED0F0F0F0FFF0F0F0FFF0F0 148 F0FF434343FFBAB2B2FF352E2EFF352E2EFF6D5F5FFF434343FFF0F0F0FFF0F0 149 F0FFF0F0F0FF7E7E7ED0030303A003030341484848B1E2E2E2F7EAEAEAFFEAEA 150 EAFF646464FF816F6FFF7A6767FF7A6767FF816F6FFF646464FFEAEAEAFFEAEA 151 EAFFE2E2E2F7484848B103030341030303070404045A3A3A3AA5C6C6C6E6E7E7 152 E7FFA2A2A2FF645D5DFF9E8484FF9E8484FF645D5DFFA2A2A2FFE7E7E7FFC6C6 153 C6E63A3A3AA50404045A030303070303030004040401040404390C0C0C805454 154 54ACAAAAAAD88C8C8CF15E5E5EFE5E5E5EFE8C8C8CF1AAAAAAD8545454AC0C0C 155 0C800404043904040401030303000303030004040400040404000404040A0404 156 0435040404650404047B04040488040404880404047B04040465040404350404 157 040A040404000404040003030300FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 158 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 159 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 160 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 161 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 162 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 163 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 164 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 165 FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 166 0000000000000000000000000000000000000000000000000000000000000000 167 0000000000000000000000000000000000000000000000000000000000000000 168 000000000000000000000000000000000000000000FF000000FF000000FF0000 169 0000000000000000000000000000000000000000000000000000000000000000 170 0000000000000000000000000000000000FF0000000000000000000000000000 171 00FF00000000000000FF00000000000000000000000000000000000000000000 172 0000000000000000000000000000000000000000000000000000000000000000 173 0000000000FF000000FF0000000000000000000000FF000000FF000000FF0000 174 0000000000000000000000000000000000000000000000000000000000000000 175 00FF000000FF000000FF00000000000000FF00FFFFFFFFFFFFFF00FFFFFF0000 176 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000000000 177 0000000000000000000000000000000000FFFFFFFFFF00FFFFFFFFFFFFFF00FF 178 FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF000000FF000000000000 179 0000000000000000000000000000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFF 180 FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF000000FF000000000000 181 0000000000000000000000000000000000FFFFFFFFFF00FFFFFFFFFFFFFF00FF 182 FFFF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 183 00FF000000FF000000FF000000FF000000FF00FFFFFFFFFFFFFF00FFFFFF0000 184 00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 185 84FF008484FF000000FF00000000000000FFFFFFFFFF00FFFFFF000000FF0084 186 84FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 187 84FF000000FF0000000000000000000000FF00FFFFFF000000FF008484FF0084 188 84FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0000 189 00FF000000000000000000000000000000FF000000FF008484FF008484FF0084 190 84FF008484FF008484FF008484FF008484FF008484FF008484FF000000FF0000 191 0000000000000000000000000000000000FF000000FF000000FF000000FF0000 192 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000000000 193 0000000000000000000000000000000000000000000000000000000000000000 194 0000000000000000000000000000000000000000000000000000000000000000 195 0000000000000000000000000000000000000000000000000000000000000000 196 0000000000000000000000000000000000000000000000000000000000000000 197 0000000000000000000000000000000000000000000000000000000000000000 198 0000000000000000000000000000000000000000000000000000000000000000 199 0000000000000000000000000000000000000000000000000000000000000000 200 0000000000000000000000000000000000000000000000000000000000000000 201 0000000000000000000000000000000000000000000000000000000000000000 202 0000000000000000000000000000000000000000000000000000000000000000 203 0000000000000000000000000000000000000000000000000000339966FF0000 204 00000000000066CC99FF009933FF009933FF009933FF339966FF000000000000 205 0000000000000000000000000000000000000000000000000000009933FF3399 206 66FF009933FF009933FF009933FF009933FF009933FF339966FF339966FF0000 207 0000000000000000000000000000000000000000000000000000009933FF0099 208 33FF009933FF009933FF66CC99FF000000000000000066CC99FF009933FF66CC 209 99FF000000000000000000000000000000000000000000000000009933FF0099 210 33FF009933FF339966FF0000000000000000000000000000000066CC99FF0099 211 33FF000000000000000000000000000000000000000000000000009933FF0099 212 33FF009933FF009933FF339966FF000000000000000000000000000000000000 213 0000000000000000000000000000000000000000000000000000000000000000 214 0000000000000000000000000000000000000000000000000000000000000000 215 0000000000000000000000000000000000000000000000000000000000000000 216 0000000000000000000000000000339966FF009933FF009933FF009933FF0099 217 33FF000000000000000000000000000000000000000000000000009933FF66CC 218 99FF00000000000000000000000000000000339966FF009933FF009933FF0099 219 33FF00000000000000000000000000000000000000000000000066CC99FF0099 220 33FF66CC99FF000000000000000066CC99FF009933FF009933FF009933FF0099 221 33FF000000000000000000000000000000000000000000000000000000003399 222 66FF339966FF009933FF009933FF009933FF009933FF009933FF339966FF0099 223 33FF000000000000000000000000000000000000000000000000000000000000 224 0000339966FF009933FF009933FF009933FF66CC99FF00000000000000003399 225 66FF000000000000000000000000000000000000000000000000000000000000 226 0000000000000000000000000000000000000000000000000000000000000000 227 0000000000000000000000000000000000000000000000000000000000000000 228 0000000000000000000000000000000000000000000000000000000000000000 229 0000000000000000000000000000A37B48FFA37B48FFA27A47FFA27946FFA178 230 45FFA07744FFA07643FF9F7542FF9E7441FF9E7340FF9D723FFF9C713EFF9C70 231 3DFF9B6F3CFF9A6E3BFF9A6D3AFFA37B48FFBEA27FFFBEA17EFFBDA17DFFBDA0 232 7CFFBD9F7CFFBC9F7BFFBB9E7AFFBB9D7AFFBB9D79FFBA9C78FFB99B78FFB99A 233 77FFB89A76FFB89975FF996C39FFA27A47FFFFFFFFFFFFFFFFFFFEFEFEFFFEFE 234 FEFFFDFDFDFFFDFDFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFAF9FFFAFAF9FFFAF9 235 F8FFF9F9F7FFF9F8F7FF986B37FFA17946FFFFFFFFFF878787FF5D5D5DFFA0A0 236 A0FFFDFCFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFAF9FFFAFAF9FFFAF9F8FFF9F8 237 F7FFF8F8F7FFF8F7F6FF976A36FFA17844FFFEFEFEFF5F5F5FFF949494FF5353 238 53FFFCFCFBFF7B7B7BFF797979FF757575FF727272FF6E6E6EFF6A6A69FF6666 239 66FF626262FFF7F7F5FF966935FFA07643FFFEFDFDFF8C8C8CFF525252FFA4A4 240 A4FFFBFBFAFFFBFBFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8F7FFF8F8F6FFF8F7 241 F6FFF7F7F5FFF7F6F4FF966734FF9F7542FFFDFDFCFFFCFCFCFFFCFCFBFFFBFB 242 FAFFFBFAFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8F7FFF8F8F6FFF8F7F6FFF7F6 243 F5FFF7F6F4FFF6F5F4FF956633FF9E7441FFFCFCFCFFB5B5B5FF848484FFBEBD 244 BDFFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FFF8F8F6FFF8F7F5FFF7F6F5FFF7F6 245 F4FFF6F5F3FFF6F5F3FF946531FF9D7340FFFCFBFBFF818181FFC4C4C4FF8F8F 246 8FFFFAF9F8FF7B7B7AFF797979FF757574FF727171FF6D6D6DFF696969FF6666 247 65FF626261FFF5F4F2FF936430FF9D723EFFFBFBFAFF9F9F9EFF7F7F7FFFAEAE 248 ADFFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F6F4FFF6F5F3FFF5F4 249 F3FFF5F4F2FFF4F3F1FF92622FFF9C703DFFFAFAF9FFFAF9F9FFF9F9F8FFF9F8 250 F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F5F4FFF6F5F3FFF5F4F3FFF5F4 251 F2FFF4F3F1FFF4F3F0FF92612EFF9B6F3CFFFAF9F8FFBEBEBDFF929292FFBCBC 252 BBFFF8F7F6FFF7F7F5FFF7F6F4FFF6F5F4FFF6F5F3FFF5F4F2FFF5F4F2FFF4F3 253 F1FFF4F2F0FFF3F2F0FF91602DFF9A6E3BFFF9F9F8FF7C7C7CFFC4C4C4FF8787 254 87FFF7F6F5FF7A7A7AFF787878FF747474FF717170FF6D6D6CFF696968FF6565 255 65FF616161FFF2F1EFFF905F2BFF996D3AFFF9F8F7FF959594FF878787FF9B9A 256 9AFFF7F6F4FFF6F5F3FFF6F5F3FFF5F4F2FFF4F3F1FFF4F3F1FFF3F2F0FFF3F2 257 EFFFF2F1EFFFF2F1EEFF8F5E2AFF996C38FFF8F7F6FFF8F7F5FFF7F6F5FFF6F6 258 F4FFF6F5F3FFF5F5F3FFF5F4F2FFF4F3F1FFF4F3F1FFF3F2F0FFF3F2EFFFF2F1 259 EFFFF2F0EEFFF1F0EDFF8E5D29FF986B37FF976A36FF966935FF966734FF9566 260 33FF946532FF946531FF936430FF92622FFF92612EFF91602DFF90602CFF905F 261 2BFF8F5D2AFF8E5C29FF8D5B28FF000000000000000000000000000000000000 262 0000000000000000000000000000000000000000000000000000000000000000 263 0000000000000000000000000000000000000000000000A0C44400A0C4FF00A0 264 C44400A0C4FF00A0C44400A0C4FF00A0C44400A0C4FF00A0C44400A0C4FF00A0 265 C44400000000000000000000000000000000858A886600A0C4FFC6E8F9FF00A0 266 C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0 267 C4FF00000000000000000000000000000000858A88FF00A0C4FF3DB1EBFF00A0 268 C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0 269 C4FF02598FFF02598FFF02598F5C00000000858A88FFEBEBEBFF00A0C4FFBCBC 270 BCFF00A0C4FFB8B8B8FF00A0C4FFB8B8B8FF00A0C4FFB8B8B8FF00A0C4FF0259 271 8FFFC6EAEEFF71ADCFFF02598FFF00000000858A88FFFFFFFFFFECECECFFECEC 272 ECFFECECECFFECECECFFECECECFFECECECFFECECECFFD3D3D3FF02598FFFC7EB 273 EFFF6AACD2FF5583A1FC02598FFF00000000858A88FFFFFFFFFFDBDBDBFFCCCC 274 CCFFCCCCCCFFCCCCCCFFCCCCCCFFCCCCCCFFB7B7B7FF02598FFFC7EBEFFF6AAC 275 D2FF5787A4FF02598FFF02598F3300000000858A88FFFFFFFFFFECECECFFECEC 276 ECFFECECECFFECECECFFECECECFFD3D3D3FF02598FFFC6EAEEFF69AACFFF5683 277 A0FF02598FFF02598F330000000000000000858A88FFFFFFFFFFDBDBDBFFCCCC 278 CCFFCCCCCCFFCCCCCCFFB7B7B7FF02598FFFC5E6EDFF68A6CEFF5784A0FF0259 279 8FFF858A88FF000000000000000100000000858A88FFFFFFFFFFECECECFFECEC 280 ECFFECECECFFEBEBEBFF02598FFFC4E5EDFF649FC8FF5787A4FF02598FFF7171 281 71FF858A88FF000000000000000100000000858A88FFFFFFFFFFDBDBDBFFCCCC 282 CCFFCBCBCBFF757575FF395B70FF8AABC2FF5585A3FF02598FFF8F8F8FFF8686 283 86FF858A88FF000000010000000000000000858A88FFFFFFFFFFECECECFFECEC 284 ECFFE9E9E9FF02598FFF26424CFF36576BFF02598FFF9D9D9DFFD6D6D6FFAEAE 285 AEFF858A88FF000000000000000000000000858A88FFFFFFFFFFDBDBDBFFCBCB 286 CBFFC4C4C4FF000000FF02598FFF636363FF8C8C8CFFCACACAFFDADADAFFB2B2 287 B2FF858A88FF000000020000000000000000858A88FFFFFFFFFFECECECFFEBEB 288 EBFFEAEAEAFFEAEAEAFFE9E9E9FFEBEBEBFFEAEAEAFFEBEBEBFFECECECFFB2B2 289 B2FF858A88FF000000000000000000000000858A88FFEEEEEEFFB2B2B2FFB2B2 290 B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB1B1B1FFB2B2B2FFB2B2 291 B2FF858A88FF000000000000000000000000858A88A3858A88FF858A88FF858A 292 88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A 293 88FF858A88A30000000000000000 294 } 114 295 end 115 296 end -
trunk/UFormMain.pas
r4 r5 14 14 15 15 TFormMain = class(TForm) 16 ACompare: TAction; 16 17 AShowList: TAction; 17 18 AShowLog: TAction; … … 28 29 MenuItem5: TMenuItem; 29 30 MenuItem6: TMenuItem; 31 MenuItem7: TMenuItem; 30 32 StatusBar1: TStatusBar; 31 33 ToolBar1: TToolBar; … … 33 35 ToolButton2: TToolButton; 34 36 TreeView1: TTreeView; 37 procedure ACompareExecute(Sender: TObject); 35 38 procedure AOpenDirExecute(Sender: TObject); 36 39 procedure AShowListExecute(Sender: TObject); … … 54 57 55 58 uses 56 UFormList, UFormLog ;59 UFormList, UFormLog, UFormCompare; 57 60 58 61 {$R *.lfm} … … 90 93 Config.TopNode.LoadTreeNode(TreeView1.TopItem, Options); 91 94 TreeView1.TopItem.Expanded := True; 95 StatusBar1.Panels[0].Text := 'Count: ' + IntToStr(Config.TopNode.GetCount); 92 96 end; 93 97 … … 99 103 Config.LoadFromDir(OutDir, 'x86'); 100 104 Reload; 105 end; 106 end; 107 108 procedure TFormMain.ACompareExecute(Sender: TObject); 109 var 110 List1, List2: TStringList; 111 Missing1, Missing2: TStringList; 112 Config2: TConfigMenu; 113 begin 114 try 115 List1 := TStringList.Create; 116 List2 := TStringList.Create; 117 Missing1 := TStringList.Create; 118 Missing2 := TStringList.Create; 119 Config2 := TConfigMenu.Create; 120 Config.TopNode.SaveToList(List1); 121 Config2.LoadFromDir('/home/chronos/Stažené/linux-3.12.18', 'x86'); 122 Config2.TopNode.SaveToList(List2); 123 Config.CompareStringLists(List1, List2, Missing1, Missing2); 124 FormCompare.Memo1.Lines.Assign(Missing1); 125 FormCompare.Memo2.Lines.Assign(Missing2); 126 FormCompare.Show; 127 finally 128 Config2.Free; 129 Missing1.Free; 130 Missing2.Free; 131 List1.Free; 132 List2.Free; 101 133 end; 102 134 end; -
trunk/UKConfig.pas
r4 r5 41 41 procedure LoadTreeNode(Node: TTreeNode; Options: TLoadTreeOptions = []); virtual; 42 42 procedure LoadStats(List: TStrings); virtual; 43 procedure GetNodes(List: TStrings); virtual; 43 44 procedure SaveToList(List: TStrings); virtual; 44 procedure PrepareMoveList(var List: TObjectMoves); virtual; 45 procedure PrepareMoveList(Lookup: TStringList; var List: TObjectMoves); virtual; 46 function GetCount: Integer; virtual; 45 47 function GetTopNode: TMenuNode; virtual; 46 48 function FindNode(ID: string): TMenuNode; virtual; … … 63 65 TopNode: TMenuNode; 64 66 BaseDir: string; 67 procedure PrepareMoveList(var List: TObjectMoves); 68 procedure CompareStringLists(List1, List2: TStringList; Missing1, 69 Missing2: TStrings); 65 70 procedure LoadFromDir(Dir: string; Arch: string); 66 71 property OnLog: TOnLogEvent read FOnLog write FOnLog; … … 133 138 end; 134 139 140 procedure TMenuNode.GetNodes(List: TStrings); 141 var 142 I: Integer; 143 begin 144 if ID <> '' then List.AddObject(ID, Self); 145 for I := 0 to Items.Count - 1 do 146 with TMenuNode(Items[I]) do begin 147 GetNodes(List); 148 end; 149 end; 150 135 151 procedure TMenuNode.SaveToList(List: TStrings); 136 152 var … … 144 160 end; 145 161 146 procedure TMenuNode.PrepareMoveList( var List: TObjectMoves);162 procedure TMenuNode.PrepareMoveList(Lookup: TStringList; var List: TObjectMoves); 147 163 var 148 164 I: Integer; 149 165 Node: TMenuNode; 150 166 NewMove: TObjectMove; 167 Index: Integer; 151 168 begin 152 169 if Depends.Count > 0 then begin 153 Node := GetTopNode.FindNode(Depends[0]); 170 Index := Lookup.IndexOf(Depends[0]); 171 if Index <> -1 then Node := TMenuNode(Lookup.Objects[Index]) 172 else Node := nil; 154 173 if Assigned(Node) and (Parent <> Node) then begin 155 174 NewMove.Source := Self; … … 160 179 end else 161 180 if Condition <> '' then begin 162 Node := GetTopNode.FindNode(Condition); 181 Index := Lookup.IndexOf(Condition); 182 if Index <> -1 then Node := TMenuNode(Lookup.Objects[Index]) 183 else Node := nil; 163 184 if Assigned(Node) and (Parent <> Node) then begin 164 185 NewMove.Source := Self; … … 171 192 while I < Items.Count do 172 193 with TMenuNode(Items[I]) do begin 173 PrepareMoveList(L ist);194 PrepareMoveList(Lookup, List); 174 195 Inc(I); 196 end; 197 end; 198 199 function TMenuNode.GetCount: Integer; 200 var 201 I: Integer; 202 begin 203 Result := 1; 204 for I := 0 to Items.Count - 1 do 205 with TMenuNode(Items[I]) do begin 206 Result := Result + GetCount; 175 207 end; 176 208 end; … … 460 492 end; 461 493 494 procedure TConfigMenu.PrepareMoveList(var List: TObjectMoves); 495 var 496 Lookup: TStringList; 497 begin 498 try 499 Lookup := TStringList.Create; 500 Lookup.OwnsObjects := False; 501 TopNode.GetNodes(Lookup); 502 Lookup.Sorted := True; 503 TopNode.PrepareMoveList(Lookup, List); 504 finally 505 Lookup.Free; 506 end; 507 end; 508 509 procedure TConfigMenu.CompareStringLists(List1, List2: TStringList; 510 Missing1, Missing2: TStrings); 511 var 512 I: Integer; 513 J: Integer; 514 begin 515 List1.Sort; 516 List2.Sort; 517 I := 0; 518 J := 0; 519 while (I < List1.Count) and (J < List2.Count) do 520 begin 521 if List1[I] < List2[J] then 522 begin 523 Missing2.Add(List1[I]); 524 Inc(I); 525 end 526 else if List1[I] > List2[J] then 527 begin 528 Missing1.Add(List2[J]); 529 Inc(J); 530 end 531 else 532 begin 533 Inc(I); 534 Inc(J); 535 end; 536 end; 537 for I := I to List1.Count - 1 do 538 Missing2.Add(List1[I]); 539 for J := J to List2.Count - 1 do 540 Missing1.Add(List2[J]); 541 end; 542 462 543 procedure TConfigMenu.LoadFromDir(Dir: string; Arch: string); 463 544 var … … 473 554 ParseFile(BaseDir + DirectorySeparator + 'Kconfig'); 474 555 475 TopNode.PrepareMoveList(Moves);556 PrepareMoveList(Moves); 476 557 for I := 0 to Length(Moves) - 1 do 477 558 with Moves[I] do begin
Note:
See TracChangeset
for help on using the changeset viewer.