コード例 #1
0
 protected override bool IsCorrectType(InstallFileType type)
 {
     return(type == InstallFileType.Assembly);
 }
コード例 #2
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports.
 /// </summary>
 /// <param name="type">The type of file being processed.</param>
 /// <returns></returns>
 /// -----------------------------------------------------------------------------
 protected override bool IsCorrectType(InstallFileType type)
 {
     return(type == InstallFileType.Script);
 }
コード例 #3
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports
 /// </summary>
 /// <param name="type">The type of file being processed</param>
 /// <history>
 /// 	[cnurse]	08/07/2007  created
 /// </history>
 /// -----------------------------------------------------------------------------
 protected override bool IsCorrectType(InstallFileType type)
 {
     return (type == InstallFileType.Script);
 }
コード例 #4
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// The ParseFileName parses the ZipEntry metadata
        /// </summary>
        /// <param name="fileName">A String representing the file name</param>
        /// <history>
        ///     [cnurse]	07/24/2007  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private void ParseFileName(string fileName)
        {
            int i = fileName.Replace("\\", "/").LastIndexOf("/");

            if (i < 0)
            {
                _Name = fileName.Substring(0, fileName.Length);
                _Path = "";
            }
            else
            {
                _Name = fileName.Substring(i + 1, fileName.Length - (i + 1));
                _Path = fileName.Substring(0, i);
            }
            if (string.IsNullOrEmpty(_Path) && fileName.StartsWith("[app_code]"))
            {
                _Name = fileName.Substring(10, fileName.Length - 10);
                _Path = fileName.Substring(0, 10);
            }
            if (_Name.ToLower() == "manifest.xml")
            {
                _Type = InstallFileType.Manifest;
            }
            else
            {
                switch (Extension.ToLower())
                {
                case "ascx":
                    _Type = InstallFileType.Ascx;
                    break;

                case "dll":
                    _Type = InstallFileType.Assembly;
                    break;

                case "dnn":
                case "dnn5":
                case "dnn6":
                    _Type = InstallFileType.Manifest;
                    break;

                case "resx":
                    _Type = InstallFileType.Language;
                    break;

                case "resources":
                case "zip":
                    _Type = InstallFileType.Resources;
                    break;

                default:
                    if (Extension.ToLower().EndsWith("dataprovider") || Extension.ToLower() == "sql")
                    {
                        _Type = InstallFileType.Script;
                    }
                    else if (_Path.StartsWith("[app_code]"))
                    {
                        _Type = InstallFileType.AppCode;
                    }
                    else
                    {
                        if (Regex.IsMatch(_Name, Util.REGEX_Version + ".txt"))
                        {
                            _Type = InstallFileType.CleanUp;
                        }
                        else
                        {
                            _Type = InstallFileType.Other;
                        }
                    }
                    break;
                }
            }

            //remove [app_code] token
            _Path = _Path.Replace("[app_code]", "");

            //remove starting "\"
            if (_Path.StartsWith("\\"))
            {
                _Path = _Path.Substring(1);
            }
        }
コード例 #5
0
ファイル: AssemblyInstaller.cs プロジェクト: biganth/Curt
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports
 /// </summary>
 /// <param name="type">The type of file being processed</param>
 /// <history>
 /// 	[cnurse]	08/07/2007  created
 /// </history>
 /// -----------------------------------------------------------------------------
 protected override bool IsCorrectType(InstallFileType type)
 {
     return (type == InstallFileType.Assembly);
 }
コード例 #6
0
ファイル: InstallFile.cs プロジェクト: rut5949/Dnn.Platform
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// The ParseFileName parses the ZipEntry metadata
        /// </summary>
        /// <param name="fileName">A String representing the file name</param>
        /// <history>
        /// 	[cnurse]	07/24/2007  created
        /// </history>
        /// -----------------------------------------------------------------------------
        private void ParseFileName(string fileName)
        {
            int i = fileName.Replace("\\", "/").LastIndexOf("/");
            if (i < 0)
            {
                _Name = fileName.Substring(0, fileName.Length);
                _Path = "";
            }
            else
            {
                _Name = fileName.Substring(i + 1, fileName.Length - (i + 1));
                _Path = fileName.Substring(0, i);
            }
            if (string.IsNullOrEmpty(_Path) && fileName.StartsWith("[app_code]"))
            {
                _Name = fileName.Substring(10, fileName.Length - 10);
                _Path = fileName.Substring(0, 10);
            }
            if (_Name.ToLower() == "manifest.xml")
            {
                _Type = InstallFileType.Manifest;
            }
            else
            {
                switch (Extension.ToLower())
                {
                    case "ascx":
                        _Type = InstallFileType.Ascx;
                        break;
                    case "dll":
                        _Type = InstallFileType.Assembly;
                        break;
                    case "dnn":
                    case "dnn5":
                    case "dnn6":
                        _Type = InstallFileType.Manifest;
                        break;
                    case "resx":
                        _Type = InstallFileType.Language;
                        break;
                    case "resources":
                    case "zip":
                        _Type = InstallFileType.Resources;
                        break;
                    default:
                        if (Extension.ToLower().EndsWith("dataprovider") || Extension.ToLower() == "sql")
                        {
                            _Type = InstallFileType.Script;
                        }
                        else if (_Path.StartsWith("[app_code]"))
                        {
                            _Type = InstallFileType.AppCode;
                        }
                        else
                        {
                            if (Regex.IsMatch(_Name, Util.REGEX_Version + ".txt"))
                            {
                                _Type = InstallFileType.CleanUp;
                            }
                            else
                            {
                                _Type = InstallFileType.Other;
                            }
                        }
                        break;
                }
            }
			
            //remove [app_code] token
            _Path = _Path.Replace("[app_code]", "");

            //remove starting "\"
            if (_Path.StartsWith("\\"))
            {
                _Path = _Path.Substring(1);
            }
        }
コード例 #7
0
ファイル: ResourceFileInstaller.cs プロジェクト: biganth/Curt
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports
 /// </summary>
 /// <param name="type">The type of file being processed</param>
 /// <history>
 /// 	[cnurse]	01/18/2008  created
 /// </history>
 /// -----------------------------------------------------------------------------
 protected override bool IsCorrectType(InstallFileType type)
 {
     return (type == InstallFileType.Resources);
 }
コード例 #8
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports
 /// </summary>
 /// <param name="type">The type of file being processed</param>
 /// -----------------------------------------------------------------------------
 protected virtual bool IsCorrectType(InstallFileType type)
 {
     return(true);
 }
コード例 #9
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports
 /// </summary>
 /// <param name="type">The type of file being processed</param>
 /// <history>
 ///     [cnurse]	01/18/2008  created
 /// </history>
 /// -----------------------------------------------------------------------------
 protected override bool IsCorrectType(InstallFileType type)
 {
     return(type == InstallFileType.Resources);
 }
コード例 #10
0
ファイル: FileInstaller.cs プロジェクト: rut5949/Dnn.Platform
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets a flag that determines what type of file this installer supports
 /// </summary>
 /// <param name="type">The type of file being processed</param>
 /// <history>
 /// 	[cnurse]	08/07/2007  created
 /// </history>
 /// -----------------------------------------------------------------------------
 protected virtual bool IsCorrectType(InstallFileType type)
 {
     return true;
 }