~ubuntu-branches/debian/sid/mono-tools/sid

« back to all changes in this revision

Viewing changes to gui-compare/InfoManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-13 09:08:47 UTC
  • mfrom: (14.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20100913090847-lhu3z021w2azaj8q
Tags: 2.6.2-3
Upload to Debian Unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                
42
42
                // The base directory where Mono stores its profile assemblies 
43
43
                string monodir;
 
44
 
 
45
                // The base directory where the Moonlight plugin stores its profile assemblies 
 
46
                string moondir;
44
47
                
45
48
                // A handle to our container window
46
49
                MainWindow main;
204
207
                        // "System.Management.Instrumentation",
205
208
                        "System.Messaging",
206
209
                };
 
210
 
 
211
                string [] api_4_0 = {
 
212
                        "mscorlib",
 
213
                        
 
214
                        "System.Activities.Core.Design",
 
215
                        "System.Activities.Design.Base",
 
216
                        "System.Activities.Design",
 
217
                        "System.Activities",
 
218
                        "System.Activities.Extended",
 
219
                        "System.AddIn.Contract",
 
220
                        "System.AddIn",
 
221
                        "System.Caching",
 
222
                        "System.ComponentModel.Composition",
 
223
                        "System.ComponentModel.DataAnnotations",
 
224
                        "System.configuration",
 
225
                //      "System.Configuration.Install",
 
226
                        "System.Core",
 
227
                        "System.Data.DataSetExtensions",
 
228
                        "System.Data",
 
229
                        "System.Data.Entity.Design",
 
230
                        "System.Data.Entity",
 
231
                        "System.Data.Linq",
 
232
                        "System.Data.OracleClient",
 
233
                        "System.Data.Services.Client",
 
234
                        "System.Data.Services.Design",
 
235
                        "System.Data.Services",
 
236
                        "System.Data.SqlXml",
 
237
                        "System.Deployment",
 
238
                        "System.Design",
 
239
                //      "System.DirectoryServices.AccountManagement",
 
240
                        "System.DirectoryServices",
 
241
                //      "System.DirectoryServices.Protocols",
 
242
                        "System",
 
243
                        "System.Drawing.Design",
 
244
                        "System.Drawing",
 
245
                        "System.Dynamic",
 
246
                        "System.EnterpriseServices",
 
247
                        "System.EnterpriseServices.Thunk",
 
248
                        "System.EnterpriseServices.Wrapper",
 
249
                        "System.IdentityModel",
 
250
                        "System.IdentityModel.Selectors",
 
251
                        "System.IO.Log",
 
252
                        "System.Management",
 
253
                //      "System.Management.Instrumentation",
 
254
                        "System.Messaging",
 
255
                        "System.Net",
 
256
                        "System.Printing",
 
257
                        "System.Runtime",
 
258
                        "System.Runtime.Remoting",
 
259
                        "System.Runtime.Serialization",
 
260
                        "System.Runtime.Serialization.Formatters.Soap",
 
261
                        "System.Security",
 
262
                        "System.ServiceModel.Activities",
 
263
                        "System.ServiceModel.Channels",
 
264
                        "System.ServiceModel.Discovery",
 
265
                        "System.ServiceModel",
 
266
                        "System.ServiceModel.Routing",
 
267
                        "System.ServiceModel.Web",
 
268
                        "System.ServiceProcess",
 
269
                        "System.Speech",
 
270
                        "System.Transactions",
 
271
                        "System.Web.Abstractions",
 
272
                        "System.Web.DataVisualization.Design",
 
273
                        "System.Web.DataVisualization",
 
274
                        "System.Web",
 
275
                        "System.Web.DynamicData.Design",
 
276
                        "System.Web.DynamicData",
 
277
                        "System.Web.Entity.Design",
 
278
                        "System.Web.Entity",
 
279
                //      "System.Web.Extensions.Design",
 
280
                        "System.Web.Extensions",
 
281
                //      "System.Web.Mobile",
 
282
                //      "System.Web.RegularExpressions",
 
283
                        "System.Web.Routing",
 
284
                        "System.Web.Services",
 
285
                        "System.Windows.Forms.DataVisualization.Design",
 
286
                        "System.Windows.Forms.DataVisualization",
 
287
                        "System.Windows.Forms",
 
288
                        "System.Windows.Presentation",
 
289
                        "System.Workflow.Activities",
 
290
                        "System.Workflow.ComponentModel",
 
291
                        "System.Workflow.Runtime",
 
292
                        "System.WorkflowServices",
 
293
                        "System.Xaml",
 
294
                        "System.Xaml.Hosting",
 
295
                        "System.Xml",
 
296
                        "System.Xml.Linq",
 
297
 
 
298
                        "Microsoft.Build.Conversion.v4.0",
 
299
                        "Microsoft.Build",
 
300
                        "Microsoft.Build.Engine",
 
301
                        "Microsoft.Build.Framework",
 
302
                        "Microsoft.Build.Tasks.v4.0",
 
303
                        "Microsoft.Build.Utilities.v4.0",
 
304
                        "Microsoft.CSharp",
 
305
                        "Microsoft.JScript",
 
306
                        "Microsoft.VisualBasic.Compatibility.Data",
 
307
                        "Microsoft.VisualBasic.Compatibility",
 
308
                        "Microsoft.VisualBasic",
 
309
 
 
310
                        "PresentationBuildTasks",
 
311
                        "PresentationCore",
 
312
                        "PresentationFramework.Aero",
 
313
                        "PresentationFramework.Classic",
 
314
                        "PresentationFramework",
 
315
                        "PresentationFramework.Luna",
 
316
                        "PresentationFramework.Royale",
 
317
 
 
318
                        "ReachFramework",
 
319
                        "ReferenceAssemblyBuildTask",
 
320
 
 
321
                        "WindowsBase",
 
322
                //      "XamlBuildTask"
 
323
                };
 
324
                
 
325
                const string masterinfos_version = "2.6";
 
326
 
 
327
                static Uri GetMasterInfoUri (string file)
 
328
                {
 
329
                        return new Uri (string.Format ("http://mono.ximian.com/masterinfos/{0}/{1}", masterinfos_version, file));
 
330
                }
207
331
                
208
332
                public static void Init ()
209
333
                {
231
355
                        string target = Path.Combine (infos, "masterinfos-" + prof + ".tar.gz");
232
356
                        string masterinfo = Path.Combine (pdir, assemblyname) + ".xml";
233
357
                        Uri u = null;
234
 
 
 
358
                        
235
359
                        switch (prof){
236
360
                        case "1.0":
237
 
                                u = new Uri ("http://mono.ximian.com/masterinfos/2.4/masterinfos-1.1.tar.gz");
 
361
                                u = GetMasterInfoUri ("masterinfos-1.1.tar.gz");
238
362
                                break;
239
363
                                
240
364
                        case "2.0":
241
 
                                u = new Uri ("http://mono.ximian.com/masterinfos/2.4/masterinfos-2.0.tar.gz");
 
365
                                u = GetMasterInfoUri ("masterinfos-2.0.tar.gz");
242
366
                                break;
243
367
                                
244
368
                        case "3.0":
245
 
                                u = new Uri ("http://mono.ximian.com/masterinfos/2.4/masterinfos-3.0.tar.gz");
 
369
                                u = GetMasterInfoUri ("masterinfos-3.0.tar.gz");
246
370
                                break;
247
371
                                
248
372
                        case "3.5":
249
 
                                u = new Uri ("http://mono.ximian.com/masterinfos/2.4/masterinfos-3.5.tar.gz");
 
373
                                u = GetMasterInfoUri ("masterinfos-3.5.tar.gz");
 
374
                                break;
 
375
                                
 
376
                        case "4.0":
 
377
                                u = GetMasterInfoUri ("masterinfos-4.0.tar.gz");                        
250
378
                                break;
251
379
                        
252
380
                        case "SL2":
253
 
                                u = new Uri ("http://mono.ximian.com/masterinfos/2.4/masterinfos-SL2.tar.gz");
 
381
                                u = GetMasterInfoUri ("masterinfos-SL2.tar.gz");
 
382
                                break;
 
383
 
 
384
                        case "SL3":
 
385
                                u = GetMasterInfoUri ("masterinfos-SL3.tar.gz");
254
386
                                break;
255
387
                        
256
388
                        default:
416
548
                                                                break;
417
549
                                                }
418
550
                                        }
 
551
                                        if (!found) {
 
552
                                                assemblyfile = System.IO.Path.Combine (moondir, e + ".dll");
 
553
                                                found = System.IO.File.Exists (assemblyfile);
 
554
                                        }
419
555
 
420
556
                                        if (!found) {
421
557
                                                Console.WriteLine ("Skipping {0} for profile {1}, could not locate it in profile dir or MONO_GAC_PREFIX", e, pdir);
478
614
                        
479
615
                        string corlibdir = System.IO.Path.GetDirectoryName (typeof (int).Assembly.Location);
480
616
                        monodir = System.IO.Path.GetFullPath (System.IO.Path.Combine (corlibdir, "..")); 
 
617
                        moondir = System.IO.Path.Combine (monodir, @"../moonlight/plugin");
481
618
        
482
619
                        // Work around limitation in Stetic, there is no way
483
620
                        // of getting a handle on the menu (!!!)
523
660
                        separator.ShowAll ();
524
661
                        sub.Add (separator);
525
662
                        
526
 
                        Populate (sub, "API 1.1", "1.0", "1.0", api_1_1);
527
 
                        Populate (sub, "API 2.0 sp1", "2.0", "2.0", api_2_0);
528
 
                        Populate (sub, "API 3.0 sp1", "3.0", "3.0", api_3_0);
529
 
                        Populate (sub, "API 3.5 sp1", "2.0", "3.5", api_3_5);
530
 
                        Populate (sub, "Silverlight 2.0", "2.1", "SL2", api_sl2);
 
663
                        Populate (sub, "API 1.1", GetVersionPath ("1.0", "net_1_1"), "1.0", api_1_1);
 
664
                        Populate (sub, "API 2.0 sp1", GetVersionPath ("2.0", "net_2_0"), "2.0", api_2_0);
 
665
                        Populate (sub, "API 3.0 sp1", GetVersionPath ("3.0", "net_3_0"), "3.0", api_3_0);
 
666
                        Populate (sub, "API 3.5 sp1", GetVersionPath ("2.0", "net_2_0"), "3.5", api_3_5);
 
667
                        Populate (sub, "API 4.0 beta 1", GetVersionPath ("4.0", "net_4_0"), "4.0", api_4_0);
 
668
                        Populate (sub, "Silverlight 2.0", GetVersionPath ("2.1", "net_2_1"), "SL2", api_sl2);
 
669
                        Populate (sub, "Silverlight 3.0", GetVersionPath ("2.1", "net_2_1"), "SL3", api_sl2);
 
670
                }
 
671
                
 
672
                static string GetVersionPath (string version, string profile)
 
673
                {
 
674
                        if (string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_PATH")))
 
675
                                return version;
 
676
 
 
677
                        // Developer's version pointing to /mcs/class/lib/<profile>/
 
678
                        return profile;
531
679
                }
532
680
        }
533
681
}