Пример #1
0
 public static void AddLayerFile(FileListFile file)
 {
     if (!LayerFileDict.ContainsKey(file.FileInfo.Name))
     {
         LayerFileDict[file.FileInfo.Name] = file;
     }
 }
Пример #2
0
        public static void CopyFileToOutput(ImageFile imageFile)
        {
            string tempFilePath = imageFile.FileInfo.FullName;

            tempFilePath = tempFilePath.Replace(PathManager.InputPath.FullName,
                                                PathManager.OutputResPath.FullName);

            if (imageFile.IsOptimzed && imageFile.ResultImage != null)
            {
                imageFile.ResultImage.Save(tempFilePath);
            }
            else
            {
                //SystemTool.FastCopy(imageFile.FileInfo.FullName, tempFilePath);
                imageFile.FileInfo.CopyTo(tempFilePath);
            }

            if (imageFile.IsPVREnabled)
            {
                tempFilePath = Resource.ImageFile.TryConvertToPVR(new FileInfo(tempFilePath), imageFile.Md5);
                imageFile.UpdateFileInfo(new FileInfo(tempFilePath));
                AddFileAndTag(imageFile);
            }
            else
            {
                FileListFile fileListFile = new FileListFile(new FileInfo(tempFilePath), imageFile.EnablePacking, imageFile.IsCoded);
                AddFileAndTag(fileListFile);
            }
        }
Пример #3
0
        private static FileSystemOrderItem AddFileTagItem(FileListFile originalFile, uint fileId)
        {
            //find tag item
            var publishInfo = PublishInfo.GetPublishInfo(originalFile.FileInfo);
            FileSystemTagItem tagItem;

            if (TagItems.ContainsKey(publishInfo))
            {
                tagItem = TagItems[publishInfo];
            }
            else
            {
                tagItem = new FileSystemTagItem
                {
                    Tag = publishInfo.Tag
                };
                TagItems.Add(publishInfo, tagItem);
                FileSystem.TagItems.Add(tagItem);
            }

            //find name item
            string resourceName = originalFile.ResourceName;

            if (tagItem != null)
            {
                var nameItems = tagItem.NameItems;
                var nameItem  = nameItems.FirstOrDefault(resourceMapNameItem => resourceMapNameItem.Name == resourceName);

                if (nameItem == null)
                {
                    nameItem = new FileSystemNameItem {
                        Name = resourceName
                    };
                    nameItems.Add(nameItem);
                }

                //find order item
                uint order      = originalFile.Order;
                var  orderItems = nameItem.OrderItems;
                var  orderItem  = orderItems.FirstOrDefault(resourceMapOrderItem => resourceMapOrderItem.Order == order);
                if (orderItem == null)
                {
                    orderItem = new FileSystemOrderItem
                    {
                        Order  = order,
                        FileId = fileId
                    };
                    orderItems.Add(orderItem);
                    return(orderItem);
                }
                else
                {
                    var prevItem = FileListGenerator.GetFileName(orderItem.FileId);
                    Logger.LogAll("\tDuplicate tag item:{0} in {1} & {2}\r\n", resourceName, originalFile, prevItem);
                }
            }
            return(null);
        }
Пример #4
0
 public static uint AddFileAndTag(FileListFile file)
 {
     uint id = AddFile(file);
     if (id != uint.MaxValue)
     {
         AddFileTagItem(file, id);
     }
     return id;
 }
Пример #5
0
 private void CopyAudio(FileListFile audioFile)
 {
     var packageInfo = PublishInfo.GetPublishInfo(audioFile.FileInfo.FullName);
     if (packageInfo.IsPublish(PublishTarget.Current))
     {
         string tempFilePath = PathManager.OutputPath + Path.AltDirectorySeparatorChar.ToString() + PathManager.AudioDirectoryName + Path.AltDirectorySeparatorChar.ToString() + audioFile.FileInfo.Name;
         audioFile.FileInfo.CopyTo(tempFilePath);
     }
 }
Пример #6
0
        public static uint AddFileAndTag(FileListFile file)
        {
            uint id = AddFile(file);

            if (id != uint.MaxValue)
            {
                AddFileTagItem(file, id);
            }
            return(id);
        }
Пример #7
0
        public void Analyze()
        {
            Logger.LogAllLine("Analyze config================>");

            FileListFile fileListFile = new FileListFile(PathManager.InputConfigPaperConfigPath, true, true);
            FileSystemGenerator.CopyFileToOutput(fileListFile);

            fileListFile = new FileListFile(PathManager.InputConfigServerGameConfigPath, true, true);
            FileSystemGenerator.CopyFileToOutput(fileListFile);
        }
Пример #8
0
        public void Analyze()
        {
            Logger.LogAllLine("Analyze Other================>");

            var files = SystemTool.GetDirectoryFiles(PathManager.InputOtherPath);

            foreach (var animationFile in files)
            {
                var resourceFile = new FileListFile(animationFile);
                FileSystemGenerator.CopyFileToOutput(resourceFile);

            }
        }
Пример #9
0
        public void Analyze()
        {
            Logger.LogAllLine("Analyze Audio================>");

            var files = SystemTool.GetDirectoryFiles(PathManager.InputAudioPath);

            foreach (var file in files)
            {
                if (file.Extension == ".wav" || file.Extension == ".mp3")
                {
                    var resourceFile = new FileListFile(file);
                    FileSystemGenerator.CopyFileToOutput(resourceFile);
                }

            }
        }
Пример #10
0
        private void GetFileList(string path, string prefix)
        {
            var files = Directory.GetFiles(path);
            foreach (string file in files)
            {
                var fileInfo = new FileInfo(file);
                var resourceFile = new FileListFile(fileInfo);

                FileSystemGenerator.AddFileAndTag(resourceFile);

                Logger.LogInfoLine("{0}File: {1}", prefix, fileInfo.FullName);
                CopyAudio(resourceFile);
            }

            var dirs = Directory.GetDirectories(path);
            foreach (string dir in dirs)
            {
                var directoryInfo = new DirectoryInfo(dir);
                Logger.LogInfoLine("{0}Dir:\t{1}", prefix, directoryInfo.Name);
                GetFileList(dir, prefix + "\t");
            }
        }
Пример #11
0
        public static void CopyFileToOutput(FileListFile imageFile)
        {
            string tempFilePath = imageFile.FileInfo.FullName;

            tempFilePath = tempFilePath.Replace(PathManager.InputPath.FullName,
                                                PathManager.OutputResPath.FullName);

            FileInfo tempFileInfo = new FileInfo(tempFilePath);

            if (!tempFileInfo.Directory.Exists)
            {
                tempFileInfo.Directory.Create();
            }

            //if (imageFile.IsCoded)
            //{
            //    using (var file = imageFile.FileInfo.OpenRead())
            //    {
            //        var resultStream=mFileListGenerator.Code(file);
            //        StreamWriter sw=new StreamWriter(tempFilePath);
            //        resultStream.CopyTo(sw.BaseStream);
            //        sw.Close();

            //    }
            //    //imageFile.FileInfo.CopyTo(tempFilePath, true);
            //}
            //else
            //{
            //    imageFile.FileInfo.CopyTo(tempFilePath, true);
            //}
            imageFile.FileInfo.CopyTo(tempFilePath, true);

            var resourceFile = new FileListFile(new FileInfo(tempFilePath), imageFile.EnablePacking, imageFile.IsCoded);

            AddFileAndTag(resourceFile);
        }
Пример #12
0
        public uint AddFile(FileListFile file)
        {
            if (mItemDict.ContainsKey(file))
            {
                Logger.LogErrorLine("\tDuplicate File name: {0}\tVS\t{1}", file.FileInfo.Name,
                                    mItemDict[file]);
                return(uint.MaxValue);
            }

            if (string.IsNullOrEmpty(file.FileInfo.Name))
            {
                Logger.LogErrorLine("Empty file item path:{0}", file);
                return(uint.MaxValue);
            }

            string dirName = file.FileInfo.DirectoryName + Path.AltDirectorySeparatorChar;

            dirName = dirName.Replace(PathManager.InputPath.FullName, string.Empty);
            //dirName = dirName.Replace(PathManager.OutputResPath.FullName, string.Empty);
            dirName = dirName.Replace(PathManager.OutputPath.FullName, string.Empty);
            dirName = dirName.TrimStart(new[] { '\\', '/' });
            dirName = dirName.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);

            int dirIndex = -1;

            if (!string.IsNullOrEmpty(dirName))
            {
                if (!mDirSet.Contains(dirName))
                {
                    mDirSet.Add(dirName);
                    mFileList.Dirs.Add(dirName);
                    dirIndex = mFileList.Dirs.Count - 1;
                }
                else
                {
                    dirIndex = mDirSet.TakeWhile(dir => dir != dirName).Count();
                }
            }

            //if (file.IsCoded)
            //{
            //    file.IsCoded = file.FileInfo.Length > 1024 * 50;  //50K
            //}
            if (file.IsCoded)
            {
                CodeFile(file.FileInfo, file.Md5);
                file.UpdateFileInfo(file.FileInfo);
            }

            if (PublishTarget.Current.IsGuidName)
            {
                file.MakeGuidName();
            }

            var item = new FileList.FileItem
            {
                FileId   = mFileId++,
                DirIndex = dirIndex,
                Name     = file.FileInfo.Name,
                MD5      = file.Md5
            };

            if (file.IsCoded)
            {
                item.Coders.AddRange(mProtoCoders);
            }
            if (file.OriginalFileInfo != null)
            {
                item.OriginalName = file.OriginalFileInfo.Name;
            }

            mFileList.Files.Add(item);
            return(item.FileId);
        }
Пример #13
0
 public static uint AddFile(FileListFile file)
 {
     return(FileListGenerator.AddFile(file));
 }
Пример #14
0
        public void Analyze()
        {
            AllItems.Clear();

            Logger.LogAllLine("Analyze ServerConfig================>");
            var reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Jet\4.0\Engines\Excel", true);
            reg.SetValue("TypeGuessRows", 0);

            ServerConfig config = new ServerConfig();

            var table = ExcelHelper.LoadDataFromExcel(PathManager.InputConfigServerConfigPath.FullName, PathManager.ServerConfigTableName);
            foreach (DataRow row in table.Rows)
            {
                bool isValid = true;
                bool isAllNull = true;
                for (int i = 0; i < row.ItemArray.Length; i++)
                {
                    if (row.IsNull(i))
                    {
                        isValid = false;
                    }
                    else
                    {
                        isAllNull = false;
                    }
                }

                if (isValid)
                {
                    try
                    {
                        var configItem = new ServerConfigItem();
                        configItem.Id = Convert.ToUInt32(row["Id"]);
                        configItem.Address = Convert.ToString(row["Address"]);
                        configItem.Port = Convert.ToUInt32(row["Port"]);

                        configItem.Type = (ServerConfigItem.ServerType)Convert.ToUInt32(row["Type"]);

                        if (!AllItems.ContainsKey(configItem.Id))
                        {
                            AllItems.Add(configItem.Id,false);
                            config.Items.Add(configItem);

                        }
                        else
                        {
                            Logger.LogErrorLine("Duplicate Server Config line:");
                            ExcelHelper.PrintRow(row);
                        }

                    }
                    catch (Exception ex)
                    {
                        Logger.LogErrorLine(ex.Message);
                        ExcelHelper.PrintRow(row);
                    }

                }
                else if (!isAllNull)
                {
                    Logger.LogErrorLine("Invalid Server Config line:");
                    ExcelHelper.PrintRow(row);
                }
            }

            using (var file = PathManager.OutputConfigServerConfigPath.OpenWrite())
            {
                Serializer.Serialize(file, config);
            }

            var resourceFile = new FileListFile(PathManager.OutputConfigServerConfigPath, true, true);
            FileSystemGenerator.AddFileAndTag(resourceFile);

            Logger.LogAllLine("Generate:\t{0}", PathManager.OutputConfigServerConfigPath);
        }
Пример #15
0
        public uint AddFile(FileListFile file)
        {
            if (mItemDict.ContainsKey(file))
            {
                Logger.LogErrorLine("\tDuplicate File name: {0}\tVS\t{1}", file.FileInfo.Name,
                                   mItemDict[file]);
                return uint.MaxValue;
            }

            if (string.IsNullOrEmpty(file.FileInfo.Name))
            {
                Logger.LogErrorLine("Empty file item path:{0}", file);
                return uint.MaxValue;
            }

            string dirName = file.FileInfo.DirectoryName + Path.AltDirectorySeparatorChar;
            dirName = dirName.Replace(PathManager.InputPath.FullName, string.Empty);
            //dirName = dirName.Replace(PathManager.OutputResPath.FullName, string.Empty);
            dirName = dirName.Replace(PathManager.OutputPath.FullName, string.Empty);
            dirName = dirName.TrimStart(new[] { '\\', '/' });
            dirName = dirName.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);

            int dirIndex = -1;
            if (!string.IsNullOrEmpty(dirName))
            {
                if (!mDirSet.Contains(dirName))
                {
                    mDirSet.Add(dirName);
                    mFileList.Dirs.Add(dirName);
                    dirIndex = mFileList.Dirs.Count - 1;

                }
                else
                {
                    dirIndex = mDirSet.TakeWhile(dir => dir != dirName).Count();
                }
            }

            //if (file.IsCoded)
            //{
            //    file.IsCoded = file.FileInfo.Length > 1024 * 50;  //50K
            //}
            if (file.IsCoded)
            {
                CodeFile(file.FileInfo,file.Md5);
                file.UpdateFileInfo(file.FileInfo);
            }

            if (PublishTarget.Current.IsGuidName)
            {
                file.MakeGuidName();
            }

            var item = new FileList.FileItem
            {
                FileId = mFileId++,
                DirIndex = dirIndex,
                Name = file.FileInfo.Name,
                MD5 = file.Md5
            };

            if (file.IsCoded)
            {
                item.Coders.AddRange(mProtoCoders);
            }
            if (file.OriginalFileInfo!=null)
            {
                item.OriginalName = file.OriginalFileInfo.Name;
            }

            mFileList.Files.Add(item);
            return item.FileId;
        }
Пример #16
0
        public static void CopyFileToOutput(ImageFile imageFile)
        {
            string tempFilePath = imageFile.FileInfo.FullName;
            tempFilePath = tempFilePath.Replace(PathManager.InputPath.FullName,
                                                PathManager.OutputResPath.FullName);

            if (imageFile.IsOptimzed && imageFile.ResultImage != null)
            {
                imageFile.ResultImage.Save(tempFilePath);
            }
            else
            {
                //SystemTool.FastCopy(imageFile.FileInfo.FullName, tempFilePath);
                imageFile.FileInfo.CopyTo(tempFilePath);
            }

            if (imageFile.IsPVREnabled)
            {
                tempFilePath = Resource.ImageFile.TryConvertToPVR(new FileInfo(tempFilePath), imageFile.Md5);
                imageFile.UpdateFileInfo(new FileInfo(tempFilePath));
                AddFileAndTag(imageFile);
            }
            else
            {
                FileListFile fileListFile=new FileListFile(new FileInfo(tempFilePath),imageFile.EnablePacking,imageFile.IsCoded);
                AddFileAndTag(fileListFile);
            }
        }
Пример #17
0
        public void Analyze()
        {
            Logger.LogAllLine("Analyze Scripts================>");
            MissionScripts.Clear();
            HeroScripts.Clear();
            MonsterScripts.Clear();
            SkillScripts.Clear();
            BufferScripts.Clear();

            {
                var files = SystemTool.GetDirectoryFiles(PathManager.InputMissionScriptPath);
                foreach (var scriptFile in files)
                {
                    MissionScripts.Add(scriptFile.Name, false);
                }

            }

            {
                var files = SystemTool.GetDirectoryFiles(PathManager.InputHeroScriptPath);
                foreach (var scriptFile in files)
                {
                    HeroScripts.Add(scriptFile.Name, false);
                }

            }

            {
                var files = SystemTool.GetDirectoryFiles(PathManager.InputMonsterScriptPath);
                foreach (var scriptFile in files)
                {
                    MonsterScripts.Add(scriptFile.Name, false);
                }

            }

            {
                var files = SystemTool.GetDirectoryFiles(PathManager.InputSkillScriptPath);
                foreach (var scriptFile in files)
                {
                    SkillScripts.Add(scriptFile.Name, false);
                }

            }

            {
                var files = SystemTool.GetDirectoryFiles(PathManager.InputBufferScriptPath);
                foreach (var scriptFile in files)
                {
                    BufferScripts.Add(scriptFile.Name, false);
                }

            }

            //copy all scripts
            {
                var files = SystemTool.GetDirectoryFiles(PathManager.InputScriptPath);
                foreach (var scriptFile in files)
                {
                    var resourceFile = new FileListFile(scriptFile,true,true);
                    FileSystemGenerator.CopyFileToOutput(resourceFile);
                }

            }
        }
Пример #18
0
        public static void CopyFileToOutput(FileListFile imageFile)
        {
            string tempFilePath = imageFile.FileInfo.FullName;
            tempFilePath = tempFilePath.Replace(PathManager.InputPath.FullName,
                                                PathManager.OutputResPath.FullName);

            FileInfo tempFileInfo = new FileInfo(tempFilePath);
            if (!tempFileInfo.Directory.Exists)
            {
                tempFileInfo.Directory.Create();
            }

            //if (imageFile.IsCoded)
            //{
            //    using (var file = imageFile.FileInfo.OpenRead())
            //    {
            //        var resultStream=mFileListGenerator.Code(file);
            //        StreamWriter sw=new StreamWriter(tempFilePath);
            //        resultStream.CopyTo(sw.BaseStream);
            //        sw.Close();

            //    }
            //    //imageFile.FileInfo.CopyTo(tempFilePath, true);
            //}
            //else
            //{
            //    imageFile.FileInfo.CopyTo(tempFilePath, true);
            //}
            imageFile.FileInfo.CopyTo(tempFilePath, true);

            var resourceFile = new FileListFile(new FileInfo(tempFilePath), imageFile.EnablePacking, imageFile.IsCoded);
            AddFileAndTag(resourceFile);
        }
Пример #19
0
 public static uint AddFile(FileListFile file)
 {
     return FileListGenerator.AddFile(file);
 }
Пример #20
0
        private static FileSystemOrderItem AddFileTagItem(FileListFile originalFile, uint fileId)
        {
            //find tag item
            var publishInfo = PublishInfo.GetPublishInfo(originalFile.FileInfo);
            FileSystemTagItem tagItem;
            if (TagItems.ContainsKey(publishInfo))
            {
                tagItem = TagItems[publishInfo];
            }
            else
            {
                tagItem = new FileSystemTagItem
                {
                    Tag = publishInfo.Tag
                };
                TagItems.Add(publishInfo, tagItem);
                FileSystem.TagItems.Add(tagItem);
            }

            //find name item
            string resourceName = originalFile.ResourceName;

            if (tagItem != null)
            {
                var nameItems = tagItem.NameItems;
                var nameItem = nameItems.FirstOrDefault(resourceMapNameItem => resourceMapNameItem.Name == resourceName);

                if (nameItem == null)
                {
                    nameItem = new FileSystemNameItem { Name = resourceName };
                    nameItems.Add(nameItem);
                }

                //find order item
                uint order = originalFile.Order;
                var orderItems = nameItem.OrderItems;
                var orderItem = orderItems.FirstOrDefault(resourceMapOrderItem => resourceMapOrderItem.Order == order);
                if (orderItem == null)
                {
                    orderItem = new FileSystemOrderItem
                    {
                        Order = order,
                        FileId = fileId
                    };
                    orderItems.Add(orderItem);
                    return orderItem;
                }
                else
                {
                    var prevItem = FileListGenerator.GetFileName(orderItem.FileId);
                    Logger.LogAll("\tDuplicate tag item:{0} in {1} & {2}\r\n", resourceName,originalFile, prevItem);
                }
            }
            return null;
        }
Пример #21
0
        public void Analyze()
        {
            Logger.LogAllLine("Analyze RandomName================>");
            var reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Jet\4.0\Engines\Excel", true);
            reg.SetValue("TypeGuessRows", 0);

            var validNames = Enum.GetNames(typeof(PublishLanguages));
            var tabelNames = ExcelHelper.GetExcelTableNames(PathManager.InputConfigStringTablePath.FullName);
            foreach (string tableName in tabelNames)
            {
                string pureTableName = tableName.Replace("$", String.Empty).Replace("'", String.Empty).Replace(TableName, String.Empty);
                bool isValidTable = validNames.Any(pureTableName.Contains);
                if (!isValidTable||!tableName.Contains(TableName))
                {
                    continue;
                }

                var table = ExcelHelper.LoadDataFromExcel(PathManager.InputConfigStringTablePath.FullName, tableName);
                string resourceName = tableName.Replace("$", String.Empty);
                var packageInfo = PublishInfo.GetPublishInfo(resourceName);

                RandomNameConfig config=new RandomNameConfig();
                foreach (DataRow row in table.Rows)
                {
                    bool isValid = true;
                    bool isAllNull = true;
                    for (int i = 0; i < row.ItemArray.Length; i++)
                    {
                        if (row.IsNull(i))
                        {
                            isValid = false;
                        }
                        else
                        {
                            isAllNull = false;
                        }
                    }

                    if (isValid)
                    {
                        try
                        {

                            RandomNameConfigItem item=new RandomNameConfigItem();
                            item.Position = Convert.ToUInt32(row["Position"]);
                            item.Value= Convert.ToString(row["Value"]);
                            item.Value = ExcelHelper.ConvertToUTF8(item.Value);
                            config.Items.Add(item);

                        }
                        catch (Exception ex)
                        {
                            Logger.LogErrorLine(ex.Message);
                            ExcelHelper.PrintRow(row);
                        }

                    }
                    else if (!isAllNull)
                    {
                        Logger.LogErrorLine("Invalid string table line:");
                        ExcelHelper.PrintRow(row);
                    }
                }

                //print
                if ((PublishTarget.Current.PublishInfo.Language & packageInfo.Language) == packageInfo.Language)
                {
                    string tempPath = PathManager.OutputConfigPath + "/" + TableName +
                                      pureTableName + ".bin";
                    using (var file = File.Open(tempPath, FileMode.Create, FileAccess.ReadWrite))
                    {
                        Serializer.Serialize(file, config);
                        Logger.LogAllLine("Generate:{0}", tempPath);
                    }

                    var resourceFile = new FileListFile(new FileInfo(tempPath), true, true);
                    FileSystemGenerator.AddFileAndTag(resourceFile);

                }
                else
                {
                    Logger.LogAllLine("Ignore:\t{0}", pureTableName);
                }

            }
        }
Пример #22
0
        public void Analyze()
        {
            Logger.LogAllLine("Analyze FuckyString================>");
            var reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Jet\4.0\Engines\Excel", true);
            reg.SetValue("TypeGuessRows", 0);

            var validNames = Enum.GetNames(typeof(PublishLanguages));
            var tabelNames = ExcelHelper.GetExcelTableNames(PathManager.InputConfigStringTablePath.FullName);
            foreach (string tableName in tabelNames)
            {
                string pureTableName = tableName.Replace("$", String.Empty).Replace("'", String.Empty).Replace(TableName, String.Empty);
                bool isValidTable = validNames.Any(pureTableName.Contains);
                if (!isValidTable||!tableName.Contains(TableName))
                {
                    continue;
                }

                var table = ExcelHelper.LoadDataFromExcel(PathManager.InputConfigStringTablePath.FullName, tableName);
                string resourceName = tableName.Replace("$", String.Empty);
                var packageInfo = PublishInfo.GetPublishInfo(resourceName);

                SortedDictionary<char, MyFuckyStringNode> rootNodes = new SortedDictionary<char, MyFuckyStringNode>();

                foreach (DataRow row in table.Rows)
                {
                    bool isValid = true;
                    bool isAllNull = true;
                    for (int i = 0; i < row.ItemArray.Length; i++)
                    {
                        if (row.IsNull(i))
                        {
                            isValid = false;
                        }
                        else
                        {
                            isAllNull = false;
                        }
                    }

                    if (isValid)
                    {
                        try
                        {
                            string str = Convert.ToString(row["Value"]).Trim();
                            string resultStr = ExcelHelper.ConvertToUTF8(str);

                            SortedDictionary<char, MyFuckyStringNode> nodes = rootNodes;
                            var chars = resultStr.ToCharArray();
                            for (int i = 0; i < chars.Length; ++i)
                            {
                                MyFuckyStringNode node;
                                if (!nodes.TryGetValue(chars[i], out node))
                                {
                                    node = new MyFuckyStringNode { Char = chars[i], IsFucky = i == chars.Length - 1 };
                                    nodes.Add(chars[i], node);
                                }
                                nodes = node.Childs;
                                if (!node.IsFucky)
                                {
                                    node.IsFucky = i == chars.Length - 1;
                                }
                            }

                        }
                        catch (Exception ex)
                        {
                            Logger.LogErrorLine(ex.Message);
                            ExcelHelper.PrintRow(row);
                        }

                    }
                    else if (!isAllNull)
                    {
                        Logger.LogErrorLine("Invalid string table line:");
                        ExcelHelper.PrintRow(row);
                    }
                }

                if ((PublishTarget.Current.PublishInfo.Language & packageInfo.Language) == packageInfo.Language)
                {
                    var config = new FuckyString();
                    foreach (var fuckyStringNode in rootNodes)
                    {
                        FuckyStringNode node = new FuckyStringNode();
                        fuckyStringNode.Value.Fill(node);
                        config.rootNodes.Add(node);
                    }

                    string tempPath = PathManager.OutputConfigPath + "/" + TableName +
                                      pureTableName + ".bin";
                    using (var file = File.Open(tempPath, FileMode.Create, FileAccess.ReadWrite))
                    {
                        Serializer.Serialize(file, config);
                        Logger.LogAllLine("Generate:{0}", tempPath);
                    }

                    var resourceFile = new FileListFile(new FileInfo(tempPath), true, true);
                    FileSystemGenerator.AddFileAndTag(resourceFile);

                }
                else
                {
                    Logger.LogAllLine("Ignore:\t{0}", pureTableName);
                }

            }
        }