Exemple #1
0
        public static void LoadConfig()
        {
            if (S_AllChannelConfig.Count > 0)
            {
                return;
            }
            string path = S_RootPath + @"/Config.ini";

            if (!HS_File.Exists(path))
            {
                throw new System.MissingFieldException("配置文件丢失");
            }
            HS_Config.GetInstance().LoadConfigINI(HS_File.ReadAllBytes(path));

            for (int i = 0; i < 100; ++i)
            {
                string section = string.Format("Channel_{0}", i);
                if (!HS_Config.GetInstance().ContainsSection(section))
                {
                    break;
                }
                ChannelConfig config;
                config.platform   = HS_Config.GetInstance().GetValue(section, "platform");
                config.packerName = HS_Config.GetInstance().GetValue(section, "packername");
                config.channel    = HS_Config.GetInstance().GetValue(section, "channel");
                if (string.IsNullOrEmpty(config.channel))
                {
                    throw new System.NullReferenceException("配置文件 " + section);
                }
                config.defineSymbols = HS_Config.GetInstance().GetValue(section, "definesymbols");
                S_AllChannelConfig.Add(config.channel, config);
            }
        }
Exemple #2
0
        static private void FilterEditorDLL(FilterEditorDLLModel model)
        {
            string rootPath = S_RootPath;

            rootPath = rootPath.Replace("\\", "/");
            string dll     = rootPath + "/Assets/Plugins/HSEngineEditor.dll";
            string destDll = rootPath + "/" + HS_Path.GetFileName(dll);

            if (model == FilterEditorDLLModel.Backups2Assets)
            {
                string temp = destDll;
                destDll = dll;
                dll     = temp;
            }

            if (HS_File.Exists(dll))
            {
                FileUtil.CopyFileOrDirectory(dll, destDll);
                FileUtil.DeleteFileOrDirectory(dll);
                AssetDatabase.Refresh();
            }
        }