System.Data.SQLite
Check-in [5b9a231104]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Design-time installer changes for EF6.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ef6
Files: files | file ages | folders
SHA1: 5b9a23110460a929e34f590268678a0c99d37f4c
User & Date: mistachkin 2014-01-10 23:58:51
Context
2014-01-11
00:16
More automation changes. check-in: 74e7a42df7 user: mistachkin tags: ef6
2014-01-10
23:58
Design-time installer changes for EF6. check-in: 5b9a231104 user: mistachkin tags: ef6
23:58
Initial test suite changes for EF6 (incomplete). check-in: df2f4392a1 user: mistachkin tags: ef6
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tools/install/Installer.cs.

  1911   1911               #region Private Constructors
  1912   1912               private Configuration(
  1913   1913                   Assembly assembly,
  1914   1914                   string logFileName,
  1915   1915                   string directory,
  1916   1916                   string coreFileName,
  1917   1917                   string linqFileName,
         1918  +                string ef6FileName,
  1918   1919                   string designerFileName,
  1919   1920                   string registryVersion,
  1920   1921                   string configVersion,
  1921   1922                   string vsVersionSuffix,
  1922   1923                   string debugFormat,
  1923   1924                   string traceFormat,
  1924   1925                   InstallFlags installFlags,
................................................................................
  1951   1952                   )
  1952   1953               {
  1953   1954                   this.assembly = assembly;
  1954   1955                   this.logFileName = logFileName;
  1955   1956                   this.directory = directory;
  1956   1957                   this.coreFileName = coreFileName;
  1957   1958                   this.linqFileName = linqFileName;
         1959  +                this.ef6FileName = ef6FileName;
  1958   1960                   this.designerFileName = designerFileName;
  1959   1961                   this.registryVersion = registryVersion;
  1960   1962                   this.configVersion = configVersion;
  1961   1963                   this.vsVersionSuffix = vsVersionSuffix;
  1962   1964                   this.debugFormat = debugFormat;
  1963   1965                   this.traceFormat = traceFormat;
  1964   1966                   this.installFlags = installFlags;
................................................................................
  1994   1996               ///////////////////////////////////////////////////////////////////
  1995   1997   
  1996   1998               #region Private Static Methods
  1997   1999               private static void GetDefaultFileNames(
  1998   2000                   ref string directory,
  1999   2001                   ref string coreFileName,
  2000   2002                   ref string linqFileName,
         2003  +                ref string ef6FileName,
  2001   2004                   ref string designerFileName
  2002   2005                   )
  2003   2006               {
  2004   2007                   if (thisAssembly == null)
  2005   2008                       return;
  2006   2009   
  2007   2010                   directory = Path.GetDirectoryName(thisAssembly.Location);
................................................................................
  2010   2013                       return;
  2011   2014   
  2012   2015                   coreFileName = Path.Combine(directory,
  2013   2016                       Installer.CoreFileName);
  2014   2017   
  2015   2018                   linqFileName = Path.Combine(directory,
  2016   2019                       Installer.LinqFileName);
         2020  +
         2021  +                ef6FileName = Path.Combine(directory,
         2022  +                    Installer.Ef6FileName);
  2017   2023   
  2018   2024                   designerFileName = Path.Combine(directory,
  2019   2025                       Installer.DesignerFileName);
  2020   2026               }
  2021   2027   
  2022   2028               ///////////////////////////////////////////////////////////////////
  2023   2029   
................................................................................
  2122   2128   
  2123   2129               #region Public Static Methods
  2124   2130               public static Configuration CreateDefault()
  2125   2131               {
  2126   2132                   string directory = null;
  2127   2133                   string coreFileName = null;
  2128   2134                   string linqFileName = null;
         2135  +                string ef6FileName = null;
  2129   2136                   string designerFileName = null;
  2130   2137   
  2131   2138                   GetDefaultFileNames(
  2132   2139                       ref directory, ref coreFileName, ref linqFileName,
  2133         -                    ref designerFileName);
         2140  +                    ref ef6FileName, ref designerFileName);
  2134   2141   
  2135         -                return new Configuration(thisAssembly, null, directory,
  2136         -                    coreFileName, linqFileName, designerFileName, null, null,
  2137         -                    null, TraceOps.DebugFormat, TraceOps.TraceFormat,
         2142  +                return new Configuration(
         2143  +                    thisAssembly, null, directory, coreFileName, linqFileName,
         2144  +                    ef6FileName, designerFileName, null, null, null,
         2145  +                    TraceOps.DebugFormat, TraceOps.TraceFormat,
  2138   2146                       InstallFlags.Default, TracePriority.Default,
  2139   2147                       TracePriority.Default, false, true, false, false, false,
  2140   2148                       false, false, false, false, false, false, false, false,
  2141   2149                       false, false, false, false, false, false, true, true,
  2142   2150                       false, false, false);
  2143   2151               }
  2144   2152   
................................................................................
  2344   2352                                   linqFileName = Path.GetFileName(linqFileName);
  2345   2353   
  2346   2354                               if (String.IsNullOrEmpty(linqFileName))
  2347   2355                                   linqFileName = Installer.LinqFileName;
  2348   2356   
  2349   2357                               configuration.linqFileName = Path.Combine(
  2350   2358                                   configuration.directory, linqFileName);
         2359  +
         2360  +                            string ef6FileName = configuration.ef6FileName;
         2361  +
         2362  +                            if (!String.IsNullOrEmpty(ef6FileName))
         2363  +                                ef6FileName = Path.GetFileName(ef6FileName);
         2364  +
         2365  +                            if (String.IsNullOrEmpty(ef6FileName))
         2366  +                                ef6FileName = Installer.Ef6FileName;
         2367  +
         2368  +                            configuration.ef6FileName = Path.Combine(
         2369  +                                configuration.directory, ef6FileName);
  2351   2370   
  2352   2371                               string designerFileName = configuration.designerFileName;
  2353   2372   
  2354   2373                               if (!String.IsNullOrEmpty(designerFileName))
  2355   2374                                   designerFileName = Path.GetFileName(designerFileName);
  2356   2375   
  2357   2376                               if (String.IsNullOrEmpty(designerFileName))
  2358   2377                                   designerFileName = Installer.DesignerFileName;
  2359   2378   
  2360   2379                               configuration.designerFileName = Path.Combine(
  2361   2380                                   configuration.directory, designerFileName);
         2381  +                        }
         2382  +                        else if (MatchOption(newArg, "ef6FileName"))
         2383  +                        {
         2384  +                            configuration.ef6FileName = text;
  2362   2385                           }
  2363   2386                           else if (MatchOption(newArg, "install"))
  2364   2387                           {
  2365   2388                               bool? value = ParseBoolean(text);
  2366   2389   
  2367   2390                               if (value == null)
  2368   2391                               {
................................................................................
  3261   3284                   //       Visual Studio 2005, this should return zero.
  3262   3285                   //
  3263   3286                   return !noNetFx35 || !noNetFx40 || !noNetFx45 || !noNetFx451;
  3264   3287               }
  3265   3288   
  3266   3289               ///////////////////////////////////////////////////////////////////
  3267   3290   
         3291  +            public bool IsEf6Supported()
         3292  +            {
         3293  +                //
         3294  +                // NOTE: Return non-zero if the EF6 assembly should be
         3295  +                //       processed during the install.  If the target is
         3296  +                //       Visual Studio 2005 or Visual Studio 2008, this
         3297  +                //       should return zero.
         3298  +                //
         3299  +                return !noNetFx40 || !noNetFx45 || !noNetFx451;
         3300  +            }
         3301  +
         3302  +            ///////////////////////////////////////////////////////////////////
         3303  +
  3268   3304               public void Dump(
  3269   3305                   TraceCallback traceCallback
  3270   3306                   )
  3271   3307               {
  3272   3308                   if (traceCallback != null)
  3273   3309                   {
  3274   3310                       traceCallback(String.Format(NameAndValueFormat,
................................................................................
  3286   3322                       traceCallback(String.Format(NameAndValueFormat,
  3287   3323                           "CoreFileName", ForDisplay(coreFileName)),
  3288   3324                           traceCategory);
  3289   3325   
  3290   3326                       traceCallback(String.Format(NameAndValueFormat,
  3291   3327                           "LinqFileName", ForDisplay(linqFileName)),
  3292   3328                           traceCategory);
         3329  +
         3330  +                    traceCallback(String.Format(NameAndValueFormat,
         3331  +                        "Ef6FileName", ForDisplay(ef6FileName)),
         3332  +                        traceCategory);
  3293   3333   
  3294   3334                       traceCallback(String.Format(NameAndValueFormat,
  3295   3335                           "DesignerFileName", ForDisplay(designerFileName)),
  3296   3336                           traceCategory);
  3297   3337   
  3298   3338                       traceCallback(String.Format(NameAndValueFormat,
  3299   3339                           "RegistryVersion", ForDisplay(registryVersion)),
................................................................................
  3482   3522   
  3483   3523               private string linqFileName;
  3484   3524               public string LinqFileName
  3485   3525               {
  3486   3526                   get { return linqFileName; }
  3487   3527                   set { linqFileName = value; }
  3488   3528               }
         3529  +
         3530  +            ///////////////////////////////////////////////////////////////////
         3531  +
         3532  +            private string ef6FileName;
         3533  +            public string Ef6FileName
         3534  +            {
         3535  +                get { return ef6FileName; }
         3536  +                set { ef6FileName = value; }
         3537  +            }
  3489   3538   
  3490   3539               ///////////////////////////////////////////////////////////////////
  3491   3540   
  3492   3541               private string designerFileName;
  3493   3542               public string DesignerFileName
  3494   3543               {
  3495   3544                   get { return designerFileName; }
................................................................................
  3875   3924           #endregion
  3876   3925   
  3877   3926           ///////////////////////////////////////////////////////////////////////
  3878   3927   
  3879   3928           #region Private Constant Data
  3880   3929           private const string CoreFileName = "System.Data.SQLite.dll";
  3881   3930           private const string LinqFileName = "System.Data.SQLite.Linq.dll";
         3931  +        private const string Ef6FileName = "System.Data.SQLite.EF6.dll";
  3882   3932           private const string DesignerFileName = "SQLite.Designer.dll";
  3883   3933           private const string ProviderName = "SQLite Data Provider";
  3884   3934           private const string ProjectName = "System.Data.SQLite";
  3885   3935           private const string LegacyProjectName = "SQLite";
  3886   3936           private const string InvariantName = "System.Data.SQLite";
  3887   3937           private const string FactoryTypeName = "System.Data.SQLite.SQLiteFactory";
  3888   3938           private const string Description = ".NET Framework Data Provider for SQLite";
................................................................................
  6555   6605   
  6556   6606                                   TraceOps.DebugAndTrace(TracePriority.Highest,
  6557   6607                                       debugCallback, traceCallback, String.Format(
  6558   6608                                       "GacInstall: assemblyPath = {0}",
  6559   6609                                       ForDisplay(configuration.LinqFileName)),
  6560   6610                                       traceCategory);
  6561   6611                               }
         6612  +
         6613  +                            if (configuration.IsEf6Supported())
         6614  +                            {
         6615  +                                if (!configuration.WhatIf)
         6616  +                                    /* throw */
         6617  +                                    publish.GacInstall(configuration.Ef6FileName);
         6618  +
         6619  +                                TraceOps.DebugAndTrace(TracePriority.Highest,
         6620  +                                    debugCallback, traceCallback, String.Format(
         6621  +                                    "GacInstall: assemblyPath = {0}",
         6622  +                                    ForDisplay(configuration.Ef6FileName)),
         6623  +                                    traceCategory);
         6624  +                            }
  6562   6625   
  6563   6626                               if (configuration.HasFlags(
  6564   6627                                       InstallFlags.VsPackageGlobalAssemblyCache, true))
  6565   6628                               {
  6566   6629                                   if (!configuration.WhatIf)
  6567   6630                                       /* throw */
  6568   6631                                       publish.GacInstall(configuration.DesignerFileName);
................................................................................
  6585   6648   
  6586   6649                                   TraceOps.DebugAndTrace(TracePriority.Highest,
  6587   6650                                       debugCallback, traceCallback, String.Format(
  6588   6651                                       "GacRemove: assemblyPath = {0}",
  6589   6652                                       ForDisplay(configuration.DesignerFileName)),
  6590   6653                                       traceCategory);
  6591   6654                               }
         6655  +
         6656  +                            if (configuration.IsEf6Supported())
         6657  +                            {
         6658  +                                if (!configuration.WhatIf)
         6659  +                                    /* throw */
         6660  +                                    publish.GacRemove(configuration.Ef6FileName);
         6661  +
         6662  +                                TraceOps.DebugAndTrace(TracePriority.Highest,
         6663  +                                    debugCallback, traceCallback, String.Format(
         6664  +                                    "GacRemove: assemblyPath = {0}",
         6665  +                                    ForDisplay(configuration.Ef6FileName)),
         6666  +                                    traceCategory);
         6667  +                            }
  6592   6668   
  6593   6669                               if (configuration.IsLinqSupported())
  6594   6670                               {
  6595   6671                                   if (!configuration.WhatIf)
  6596   6672                                       /* throw */
  6597   6673                                       publish.GacRemove(configuration.LinqFileName);
  6598   6674